Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5f05823
[openquantumhardware/qick_internal#22] Added RB_tProc_v1_experiment n…
mmdiego Oct 29, 2025
c430151
[openquantumhardware/qick_internal#22] Updated test03_random_benchmar…
mmdiego Oct 29, 2025
cbde8bc
[openquantumhardware/qick_internal#22] Renamed test03_random_benchmar…
mmdiego Oct 29, 2025
ca61e2d
Merge remote-tracking branch 'origin/main' into 43-build-a-complete-q…
mmdiego Nov 10, 2025
2641a12
Merge remote-tracking branch 'origin/main' into 43-build-a-complete-q…
mmdiego Nov 20, 2025
062db18
[openquantumhardware/qick_internal#43] Moved testbench_notebooks to f…
mmdiego Nov 20, 2025
13cfcc1
Merge remote-tracking branch 'origin/main' into 43-build-a-complete-q…
mmdiego Dec 5, 2025
c153651
[openquantumhardware/qick_internal#43] moved stimuli and tasks code f…
mmdiego Jan 8, 2026
a838f28
[openquantumhardware/qick_internal#43] created qick_dut and moved tpr…
mmdiego Jan 8, 2026
90192c9
[openquantumhardware/qick_internal#43] moved sg and ro blocks into qi…
mmdiego Jan 9, 2026
0cbd9e8
[openquantumhardware/qick_internal#43] moved model_DAC_ADC to its own…
mmdiego Jan 9, 2026
e2340e7
Merge remote-tracking branch 'origin/main' into 43-build-a-complete-q…
mmdiego Jan 9, 2026
4bf966f
Merge branch '43-qick-testbench-ai-mods' into 43-build-a-complete-qic…
mmdiego Jan 9, 2026
4bccba1
[openquantumhardware/qick_internal#43] Added option to dump_cfg() to …
mmdiego Feb 11, 2026
8a3c136
Merge remote-tracking branch 'qick_internal/43-build-a-complete-qick-…
mmdiego Apr 15, 2026
5d652c7
update version
qickbot Apr 15, 2026
0d49d48
[openquantumhardware/qick_internal#43] Fixed some Copilot review comm…
mmdiego Apr 17, 2026
431f15d
Merge remote-tracking branch 'qick_internal/43-build-a-complete-qick-…
mmdiego Apr 17, 2026
74279ae
Merge branch 'PR-43-build-a-complete-qick-testbench-to-run-simulation…
mmdiego Apr 17, 2026
55dd4e6
[openquantumhardware/qick_internal#43] Fixed some Copilot review comm…
mmdiego Apr 17, 2026
dbc08ea
Merge remote-tracking branch 'qick_internal/43-build-a-complete-qick-…
mmdiego Apr 17, 2026
d57c7f5
[openquantumhardware/qick_internal#43] Fixed some Copilot review comm…
mmdiego Apr 17, 2026
49bf0b9
Merge remote-tracking branch 'qick_internal/43-build-a-complete-qick-…
mmdiego Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firmware/hdl/fifo_dc_axi_xpm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,4 @@ module fifo_dc_axi_xpm

// End of xpm_fifo_async_inst instantiation

endmodule;
endmodule
638 changes: 638 additions & 0 deletions firmware/notebooks/qick_rb/RB_tProc_v1_experiment.ipynb

Large diffs are not rendered by default.

1,724 changes: 1,724 additions & 0 deletions firmware/notebooks/qick_rb/RB_tProc_v2_experiment.ipynb

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions firmware/testbench/qick_testbench/qick_testbench.xpr
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<Option Name="UseIPStaticLibs" Val="0"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="DSABoardId" Val="zcu216"/>
<Option Name="WTXSimLaunchSim" Val="836"/>
<Option Name="WTXSimLaunchSim" Val="924"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>
Expand Down Expand Up @@ -550,8 +550,6 @@
</File>
<File Path="$PPRDIR/src/tb/tb_qick.sv">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
Expand Down Expand Up @@ -655,6 +653,16 @@
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/src/tb/qick_dut.sv">
<FileInfo>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PPRDIR/src/tb/model_DAC_ADC.sv">
<FileInfo>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
<Option Name="TopModule" Val="tb_qick"/>
Expand All @@ -669,7 +677,6 @@
<Option Name="PamPseudoTop" Val="pseudo_tb"/>
<Option Name="SrcSet" Val="sources_1"/>
<Option Name="XSimWcfgFile" Val="$PPRDIR/src/tb/tb_qick_behav.wcfg"/>
<Option Name="xsim.simulate.log_all_signals" Val="true"/>
</Config>
</FileSet>
<FileSet Name="utils_1" Type="Utils" RelSrcDir="$PSRCDIR/utils_1" RelGenDir="$PGENDIR/utils_1">
Expand Down
87 changes: 87 additions & 0 deletions firmware/testbench/qick_testbench/src/tb/model_DAC_ADC.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
///////////////////////////////////////////////////////////////////////////////
// Fermilab National Accelerator Laboratory
///////////////////////////////////////////////////////////////////////////////
// Description:
// DAC-ADC RF frontend model
///////////////////////////////////////////////////////////////////////////

module model_DAC_ADC #(
parameter integer DAC_W = 16,
parameter integer ADC_W = 16,
parameter integer BUFFER_SIZE = 16
)(
input wire clk_DAC,
input wire [DAC_W-1:0] dac_sample,

input wire clk_ADC,
output logic [ADC_W-1:0] adc_sample,

input int mode // 0 = ZOH, 1 = linear
);

// Parameters
real pi = 3.14159265358979;

// DAC samples Buffer
real buffer_samples[BUFFER_SIZE];
real buffer_times[BUFFER_SIZE];
int wr_ptr = 0;

// Internal Signals
real signal_in;
real sampled_ADC;

initial begin
for (int i=0; i<BUFFER_SIZE; i++) begin
buffer_samples[i] = 0.0;
buffer_times[i] = 0.0;
end
end

// DAC processing
always @(posedge clk_DAC) begin
real t_now = $realtime * 1e-9;
signal_in = $signed(dac_sample) / 2.0**(DAC_W-1);

buffer_samples[wr_ptr] = signal_in;
buffer_times[wr_ptr] = t_now;
wr_ptr = (wr_ptr + 1) % BUFFER_SIZE;

// $display("[%0t ns] DAC sample: %f", $time, signal_in);
end

// ADC processing
always @(posedge clk_ADC) begin
real t_adc = $realtime * 1e-9;
real val;
case (mode)
0: begin
// ZOH: last value
int idx_last = (wr_ptr + BUFFER_SIZE - 1) % BUFFER_SIZE;
val = buffer_samples[idx_last];
end
1: begin
// Linear: use last 2 samples to interpolate
int idx_curr = (wr_ptr + BUFFER_SIZE - 1) % BUFFER_SIZE;
int idx_prev = (wr_ptr + BUFFER_SIZE - 2) % BUFFER_SIZE;
real t1 = buffer_times[idx_prev];
real t2 = buffer_times[idx_curr];
real y1 = buffer_samples[idx_prev];
real y2 = buffer_samples[idx_curr];
if (t2 != t1)
val = y1 + (t_adc - t1) * (y2 - y1)/(t2 - t1);
else
val = y2;
end
default: val = 0.0;
endcase

if (val > 1.0) sampled_ADC = 1.0;
else if (val < -1.0) sampled_ADC = -1.0;
else sampled_ADC = val;
adc_sample = sampled_ADC * $signed(2**(ADC_W-1)-1);

// $display("[%0t ns] ADC sample (mode %0d): %f", $time, mode, sampled_ADC);
end

endmodule
Loading