Commit 9afddf8c authored by Konstantinos Blantos's avatar Konstantinos Blantos

Update dut_env.sv

parent dbd72902
......@@ -72,8 +72,7 @@ module simple_tdc_driver
acam_fifo_entry t;
time now;
wait (pulses.size() != 0)
;
wait (pulses.size() != 0);
t = pulses.pop_front();
now = $time;
......@@ -90,7 +89,7 @@ module simple_tdc_driver
val[27:26] = t.channel & 2'b11;
val[25:18] = start;
val[17] = 1'b1;
val[16:0] = (t.ts - start_time) / 81ps;
val[16:0] = (t.ts - start_time) / 0.00081us; //81ps
$display("[DUT] <%t> TDC: pulse at %t for channel %0d (start #0x%x, time_data 0x%x, start_time %t)",
$realtime, t.ts, t.channel, start, val[16:0], start_time);
......@@ -101,7 +100,7 @@ module simple_tdc_driver
val[27:26] = t.channel & 2'b11;
val[25:18] = start;
val[17] = 1'b0;
val[16:0] = (t.duration + t.ts - start_time) / 81ps;
val[16:0] = (t.duration + t.ts - start_time) / 0.00081us;
fifos[t.channel / 4].push_back(val);
......@@ -125,7 +124,7 @@ module simple_tdc_driver
if (restart_pulse) begin
start = 1;
restart_pulse = 0;
start01 = ($time - restart_time) / 81ps;
start01 = ($time - restart_time) / 0.00081us;
end
else begin
start_time = $time;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment