From 47d692a8e94452b8a3beb77f42dd98a42f997d6c Mon Sep 17 00:00:00 2001 From: Christos Gentsos Date: Mon, 2 Mar 2020 15:19:38 +0100 Subject: [PATCH] debug (vsim-8630) dut_env.sv(128): Infinity results from division operation --- hdl/testbench/wrtd_ref_spec150t_adc/Manifest.py | 4 ++++ hdl/testbench/wrtd_ref_svec_tdc_fd/dut_env.sv | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hdl/testbench/wrtd_ref_spec150t_adc/Manifest.py b/hdl/testbench/wrtd_ref_spec150t_adc/Manifest.py index a7cc8c0..631ebc7 100644 --- a/hdl/testbench/wrtd_ref_spec150t_adc/Manifest.py +++ b/hdl/testbench/wrtd_ref_spec150t_adc/Manifest.py @@ -15,6 +15,10 @@ sim_pre_cmd = "EXTRA2_CFLAGS='-DSIMULATION' make -C ../../../software/firmware" include_dirs = [ "../include", + fetchto + "/ddr3-sp6-core/hdl/sim/micron_ddr3_bfm", + fetchto + "/general-cores/modules/wishbone/wb_lm32/src", + fetchto + "/general-cores/modules/wishbone/wb_spi", + fetchto + "/urv-core/rtl", fetchto + "/gn4124-core/hdl/sim/gn4124_bfm", fetchto + "/general-cores/sim", fetchto + "/mock-turtle/hdl/testbench/include", diff --git a/hdl/testbench/wrtd_ref_svec_tdc_fd/dut_env.sv b/hdl/testbench/wrtd_ref_svec_tdc_fd/dut_env.sv index 0e5eb6e..a574492 100644 --- a/hdl/testbench/wrtd_ref_svec_tdc_fd/dut_env.sv +++ b/hdl/testbench/wrtd_ref_svec_tdc_fd/dut_env.sv @@ -90,7 +90,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) / 81.0ps; $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 +101,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) / 81.0ps; fifos[t.channel / 4].push_back(val); @@ -125,7 +125,7 @@ module simple_tdc_driver if (restart_pulse) begin start = 1; restart_pulse = 0; - start01 = ($time - restart_time) / 81ps; + start01 = ($time - restart_time) / 81.0ps; end else begin start_time = $time; -- 2.18.1