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