pkg_feature_exec_dispath-body.vhd 1.23 KB
Newer Older
Martin Jeřábek's avatar
Martin Jeřábek committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Library ieee;
library vunit_lib;
library work;
context vunit_lib.vunit_context;
USE IEEE.std_logic_1164.all;
USE IEEE.numeric_std.ALL;
USE ieee.math_real.ALL;
use work.CANconstants.all;
USE work.CANtestLib.All;
USE work.randomLib.All;


--Testbench packages
{% for test in tests %}
use work.{{ test }}_feature.All;
{% endfor %}


package body pkg_feature_exec_dispath is
--Procedure for processing the feature tests!
procedure exec_feature_test(
    --Common test parameters
Martin Jeřábek's avatar
Martin Jeřábek committed
23
    constant test_name    : in     string;
Martin Jeřábek's avatar
Martin Jeřábek committed
24 25
    variable o            : out    feature_outputs_t;
    signal   so           : out    feature_signal_outputs_t;
Martin Jeřábek's avatar
Martin Jeřábek committed
26
    signal   rand_ctr     : inout  natural range 0 to RAND_POOL_SIZE;
Martin Jeřábek's avatar
Martin Jeřábek committed
27 28 29
    signal   iout         : in     instance_inputs_arr_t;
    signal   mem_bus      : inout  mem_bus_arr_t;
    signal   bus_level    : in     std_logic
Martin Jeřábek's avatar
Martin Jeřábek committed
30 31
) is
begin
Martin Jeřábek's avatar
Martin Jeřábek committed
32
    o.outcome := false;
Martin Jeřábek's avatar
Martin Jeřábek committed
33 34 35

    if false then
    {% for test in tests %}
36
    elsif str_equal(test_name, "{{ test }}") then
Martin Jeřábek's avatar
Martin Jeřábek committed
37 38 39
        {{ test }}_feature_exec(
            o => o,
            rand_ctr => rand_ctr,
40 41
            mem_bus => mem_bus,
            iout => iout,
Martin Jeřábek's avatar
Martin Jeřábek committed
42 43 44
            bus_level => bus_level,
            so => so
        );
Martin Jeřábek's avatar
Martin Jeřábek committed
45 46 47 48 49
    {% endfor %}
    end if;
end procedure;

end package body;