Testbench's configuration problem

O

Olaf

Hi,

for my self written uart (learning by doing ;-) I wrote a testbench and
want to use configurations for the test cases:

------>8--------------------------
package uart_tb_pkg is
type wire_t is (loopback, stuck_high, stuck_low, random);
end package;
------>8--------------------------
....
use work.uart_tb_pkg.all;

entity TB_uart is
generic (
WIRE_TYPE : wire_t := loopback);
end entity;
------>8--------------------------
architecture testbench of TB_uart is
....
end architecture;
------>8--------------------------
library ieee;
use work.uart_tb_pkg.all;

entity TB_uart_Wrapper is
end entity;

architecture structure of TB_uart_Wrapper is
begin
TB : entity work.TB_uart(testbench);
end architecture;
------>8--------------------------
configuration tb_uart_loopback_cfg of TB_uart_Wrapper is
for structure
for TB : work.TB_uart(testbench) -- L356
use entity work.TB_uart(testbench)
generic map (WIRE_TYPE => loopback);
end for;
end for;
end configuration;
------>8--------------------------

But I get the error:

Error: ../vhdl/TB_uart.vhd(356): (vcom-1141) Identifier "tb_uart" does
not identify a component declaration.

each time I use configurations I got into trouble :-(

Is this way possible? How to get it working using vhdl93?

Thanks,
Olaf
 
M

Mike Treseler

Olaf said:
But I get the error:

Error: ../vhdl/TB_uart.vhd(356): (vcom-1141) Identifier "tb_uart" does
not identify a component declaration.

A direct instance cannot be configured.
each time I use configurations I got into trouble :-(

They are fussy. That is one reason I prefer generic options
for a testbench.

-- Mike Treseler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top