add window_size register

This commit is contained in:
otroubi
2026-07-10 14:15:17 +03:00
parent 7bd1aa68da
commit c0a2f0e403
4 changed files with 125 additions and 91 deletions

View File

@ -10,7 +10,7 @@ module control #(
// adc_clk_in domain
input logic finish,
input logic [127:0] cfg_bus_input,
input logic [159:0] cfg_bus_input,
input logic cfg_bus_valid,
input logic start,
@ -26,6 +26,7 @@ module control #(
// adc_clk_in domain outputs
output logic [31:0] adc_pulse_period,
output logic [15:0] adc_pulse_num,
output logic [31:0] adc_window_size,
// pulse outputs
output logic dac_start,
@ -155,7 +156,7 @@ module control #(
end
end
logic [127:0] cfg_bus;
logic [159:0] cfg_bus;
always_ff @(posedge ctrl_clk or posedge ctrl_rst) begin
if (ctrl_rst) begin
@ -316,8 +317,9 @@ module control #(
cfg_req_sync_adc_d <= 1'b0;
cfg_ack_toggle_adc <= 1'b0;
adc_pulse_period <= '0;
adc_pulse_num <= '0;
adc_pulse_period <= '0;
adc_pulse_num <= '0;
adc_window_size <= '0;
end else begin
cfg_req_meta_adc <= cfg_req_toggle_adc;
cfg_req_sync_adc <= cfg_req_meta_adc;
@ -326,6 +328,7 @@ module control #(
if (cfg_req_pulse_adc) begin
adc_pulse_period <= cfg_bus[127:96];
adc_pulse_num <= cfg_bus[79:64];
adc_window_size <= cfg_bus[159:128];
cfg_ack_toggle_adc <= ~cfg_ack_toggle_adc;
end