Reputation: 119
comp_A1: comp_A port map ( CLK => CLK,
RESET_N => RESET_N,
DATA_IN => DATA(to_integer(unsigned(count))),
VLD_IN => VLD_IN,
DATA_OUT=> DATA_OUT,
VLD_OUT => VLD_OUT,
BUSY_OUT=> BUSY_OUT
);
In the above snippet I am trying to pass 'DATA' serially to the 'DATA_IN' pin of component comp_A1 within a testbench. 'DATA' and 'count' are both std_logic_vectors. All other signals are std_logic. 'DATA' is a constant vector of size 64 bits and 'count' is a vector being incremented at every rising edge(CLK).
During compilation Model Sim shows me the following errors only,
Is the error to do with 'count' being dynamic? What would be a workaround to do this?
Upvotes: 2
Views: 947
Reputation: 4374
Just move the multiplexer created with the line DATA(to_integer(unsigned(count)))
to a separate statement using an intermediate signal, for example:
selected_data <= DATA(to_integer(unsigned(count)));
...
DATA_IN => selected_data
Upvotes: 4