Commit 461ed894 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

test: Debug timestamp high-low feature test.

Keep bit 31 of generated TS equal to 0. This is to avoid
overflow on numeric conversion of 31 bit unsigned vector
to natural.
parent 982db9c3
......@@ -102,11 +102,18 @@ package body timestamp_low_high_feature is
-- Force random timestamp so that we are sure that both words of the
-- timestamp are clocked properly!
rand_logic_vect_v(rand_ctr, ts_rand, 0.5);
-- Keep highest bit 0 to avoid complete overflow during the test!
ts_rand(63) := '0';
ftr_tb_set_timestamp(ts_rand, ID_1, so.ts_preset, so.ts_preset_val);
-- Additionally, keep bit 31=0. This is because timestamp is internally
-- in TB implemented from two naturals which are 0 .. 2^31 - 1. If we
-- would generate bit 31=1, conversion "to_integer" from such unsigned
-- value is out of scope of natural!
ts_rand(31) := '0';
info("Forcing start timestamp in Node 1 to: " & to_hstring(ts_rand));
ftr_tb_set_timestamp(ts_rand, ID_1, so.ts_preset, so.ts_preset_val);
wait for 100 ns;
......
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