fix: add timing sim tricks
This commit is contained in:
@ -94,6 +94,7 @@ module tb_top;
|
||||
task automatic reset_dut_dac(
|
||||
input int rst_duration // сколько тактов держать сброс
|
||||
);
|
||||
@(posedge clk_dac);
|
||||
rst_dac <= 1;
|
||||
repeat(rst_duration) @(posedge clk_dac);
|
||||
rst_dac <= 0;
|
||||
@ -103,6 +104,7 @@ module tb_top;
|
||||
task automatic reset_dut_adc(
|
||||
input int rst_duration // сколько тактов держать сброс
|
||||
);
|
||||
@(posedge clk_adc);
|
||||
rst_adc <= 1;
|
||||
repeat(rst_duration) @(posedge clk_adc);
|
||||
rst_adc <= 0;
|
||||
@ -180,6 +182,7 @@ module tb_top;
|
||||
.h(pulse_height),
|
||||
.sn(sample_num)
|
||||
);
|
||||
@(posedge clk_dac);
|
||||
|
||||
if (randomize_start_timing)
|
||||
start_hold_time = $urandom_range(1, 15);
|
||||
@ -266,6 +269,7 @@ module tb_top;
|
||||
$display("[TB] -run_test_case- Stop randomize_out_of_range_proc");
|
||||
end
|
||||
end
|
||||
out_of_range = 0;
|
||||
|
||||
// Проверка по статистике. Подсчет средних значений
|
||||
if (pulse_delay_time_stats.size() != pulse_num && pulse_height != ZERO_LEVEL && pulse_width != 0) begin // Detected with pulse level. Skip if pulse level undetectable
|
||||
@ -350,6 +354,8 @@ module tb_top;
|
||||
rst_adc = 0;
|
||||
rst_dac = 0;
|
||||
|
||||
#100; // init
|
||||
|
||||
$display("[TB] Test 1. Simple test. (1/3)");
|
||||
run_test_case(
|
||||
.pulse_width(50),
|
||||
|
||||
Reference in New Issue
Block a user