Testbench's configuration problem

Discussion in 'VHDL' started by Olaf, Sep 25, 2007.

  1. Olaf

    Olaf Guest

    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
    Olaf, Sep 25, 2007
    #1
    1. Advertising

  2. Olaf wrote:

    > 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
    Mike Treseler, Sep 25, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rajan
    Replies:
    1
    Views:
    2,729
    Marcin
    Jul 29, 2003
  2. Replies:
    10
    Views:
    2,594
    Simon Peacock
    Oct 1, 2005
  3. Guido
    Replies:
    3
    Views:
    3,212
    Mike Treseler
    Jan 30, 2006
  4. Mark
    Replies:
    0
    Views:
    798
  5. JSreeniv
    Replies:
    1
    Views:
    1,160
    sri.cvcblr
    Aug 4, 2011
Loading...

Share This Page