Commit 489df5c6 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Merge branch '154-extend-basic-unit-test-run' into 'master'

Resolve "Extend basic unit test run"

Closes #154

See merge request illeondr/CAN_FD_IP_Core!107
parents b51a0fdb e398224f
Pipeline #1219 passed with stages
in 5 minutes and 37 seconds
......@@ -437,9 +437,9 @@ end architecture;
architecture Fault_confinement_unit_test_wrapper of CAN_test_wrapper is
--Select architecture of the test
for test_comp : CAN_test use entity work.CAN_test(Fault_confinement_unit_test);
--Select architecture of the test
for test_comp : CAN_test use entity work.CAN_test(Fault_confinement_unit_test);
-- Input trigger, test starts running when true
signal run : boolean;
......@@ -451,36 +451,36 @@ architecture Fault_confinement_unit_test_wrapper of CAN_test_wrapper is
begin
-- In this test wrapper generics are directly connected to the signals
-- of test entity
test_comp : CAN_test
port map(
run => run,
iterations => iterations ,
log_level => log_level,
error_beh => error_beh,
error_tol => error_tol,
status => status_int,
errors => errors
);
status <= status_int;
------------------------------------
-- Starts the test and lets it run
------------------------------------
test:process
begin
run <= true;
wait for 1 ns;
--Wait until the only test finishes and then propagate the results
wait until (status_int = passed or status_int = failed);
-- In this test wrapper generics are directly connected to the signals
-- of test entity
test_comp : CAN_test
port map(
run => run,
iterations => iterations ,
log_level => log_level,
error_beh => error_beh,
error_tol => error_tol,
status => status_int,
errors => errors
);
status <= status_int;
------------------------------------
-- Starts the test and lets it run
------------------------------------
test : process
begin
run <= true;
wait for 1 ns;
--Wait until the only test finishes and then propagate the results
wait until (status_int = passed or status_int = failed);
wait for 100 ns;
run <= false;
wait for 100 ns;
run <= false;
end process;
end process;
end;
......@@ -560,12 +560,12 @@ begin
-- Overall amount of errors is sum of errors from all processes
error_ctr <= stim_errs + read_errs + status_errs + cons_errs;
-- Common input memory is considered full once there is less space
-- than RX buffer size!
in_mem_full <= true when in_pointer + buff_size + 1 > 1024 else
-- Common input memory is not filled totally so that one iteration
-- of test won't take too long!
in_mem_full <= true when in_pointer + buff_size + 1 > 300 else
false;
out_mem_full <= true when out_pointer + buff_size + 1 > 1024 else
out_mem_full <= true when out_pointer + buff_size + 1 > 300 else
false;
drv_bus(DRV_READ_START_INDEX) <= drv_read_start;
......
......@@ -54,7 +54,7 @@ USE work.CANtestLib.All;
entity vunittb_wrapper is
generic (
xrunner_cfg : string;
iterations : natural := 1;
iterations : natural := 50;
log_level : log_lvl_type := info_l;
error_beh : err_beh_type := quit; -- Test behaviour when error occurs: Quit, or Go on
error_tol : natural := 0 -- Error tolerance, error counter should not
......
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