There has been years since i have written any VHDL, so the answer may be obvious.
I am making a testbench to a module i have made, and it uses this procedure to write to a register on UUT:
procedure write_data_proc (
constant data_value : in std_logic_vector;
signal write_en : out std_logic;
signal data_in : out std_logic_vector;
signal clk : in std_logic
) is
begin
wait until falling_edge(clk);
write_en <= '1';
data_in <= data_value;
wait until falling_edge(clk);
write_en <= '0';
end procedure;
It is called from this main stimulation process:
stim_process: process
begin
mask <= "0000000011111111";
reset <= '1';
wait for 2 ns;
reset <= '0';
wait for 3 ns;
write_data_proc("0000000011110000",write_en,data_in,clk);
write_data_proc("0000000011001100",write_en, data_in,clk);
write_data_proc("0000000010001001",write_en,data_in,clk);
read_bytes(3,8,data_read, data_read_master, clk);
end process;
Modelsim gives me a "FATAL ERROR" on the following line in the procedure:
data_in <= data_value;
I have googled my head off, and i find very little to help me on my way. I hope some of you guys can help me understand what is going on here. If more information is needed, i would be happy to provide more code.
Thanks a lot!