Commit fb16540a authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sim/Release: Update testbench and update do files after simulation

Apart from the .do files which were updated after simulation, the main
change is the addition within the main testbench file of a daisy-chain
loop on the channel and a couple of assert statements to see if any
pulses are missed.
Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
parent dbabef0c
......@@ -6,5 +6,5 @@ radix -hexadecimal
#add wave *
do wave.do
run 100 ms
run 10 ms
wave zoomfull
......@@ -64,7 +64,8 @@ architecture behav of testbench is
generic
(
g_nr_ttl_chan : natural := 6;
g_nr_inv_chan : natural := 4
g_nr_inv_chan : natural := 4;
g_sim : boolean := false
);
port
(
......@@ -209,7 +210,8 @@ begin
generic map
(
g_nr_ttl_chan => 6,
g_nr_inv_chan => 4
g_nr_inv_chan => 4,
g_sim => true
)
port map
(
......@@ -325,8 +327,11 @@ begin
--============================================================================
-- Pulse stimuli
--============================================================================
blo_inp <= (others => '0');
blo_inp(6) <= '0';
ttl_inp_n(5 downto 1) <= (others => '1');
gen_pulse_chain : for i in 6 downto 2 generate
blo_inp(i-1) <= blo_outp(i);
end generate gen_pulse_chain;
p_ttl_stim : process
begin
......@@ -335,11 +340,17 @@ begin
ttl_inp_n(6) <= '0';
wait for 1.2 us;
ttl_inp_n(6) <= '1';
for i in 1 to 200 loop
wait for 10 us;
while true loop
wait for 5.561 us;
ttl_inp_n(6) <= '0';
wait for 500 ns;
ttl_inp_n(6) <= '1';
if ttl_outp(6) /= '1' then
assert false report "ttl_outp not '1'" severity warning;
end if;
if blo_outp(6) /= '1' then
assert false report "blo_outp not '1'" severity warning;
end if;
end loop;
wait;
end process p_ttl_stim;
......
......@@ -18,13 +18,15 @@ add wave -noupdate /testbench/cmp_dut/fpga_input_ttl_n_i
add wave -noupdate /testbench/cmp_dut/fpga_blo_in_i
add wave -noupdate /testbench/cmp_dut/trig_a
add wave -noupdate /testbench/cmp_dut/trig_ttl_a
add wave -noupdate /testbench/cmp_dut/trig_blo_a
add wave -noupdate -expand /testbench/cmp_dut/trig_blo_a
add wave -noupdate /testbench/cmp_dut/trig
add wave -noupdate /testbench/cmp_dut/trig_chan
add wave -noupdate /testbench/cmp_dut/trig_man
add wave -noupdate -divider counters
add wave -noupdate -expand /testbench/cmp_dut/pulse_cnt
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {1998954 ps} 0}
configure wave -namecolwidth 520
WaveRestoreCursors {{Cursor 1} {640454438 ps} 0}
configure wave -namecolwidth 266
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 0
......@@ -38,4 +40,4 @@ configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
WaveRestoreZoom {0 ps} {105 us}
WaveRestoreZoom {582143750 ps} {746206250 ps}
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