composite inout signals with different driver directions

Discussion in 'VHDL' started by Ralph Friedrich, Nov 7, 2003.

  1. Hello,
    I'm use vectors to combine signals with different driver directions.
    May be that's not a good coding style ?!


    T(
    Q : INOUT Std_logic_vector (24 DOWNTO 0) ;
    ....

    For example:
    Q(12 downto 0) is driven by the testbech.
    Q(24 downto 13) is driven by DUT.

    In the simulation I get there a X on some signals.

    When I set a init value to the vector it works sometimes.

    Does anyone know whats going on?
     
    Ralph Friedrich, Nov 7, 2003
    #1
    1. Advertisements

  2. Ralph Friedrich

    Jim Lewis Guest

    Ralph,
    Initially the testbench and the DUT are driving
    driving all elements of the array. If one does
    not drive a field, the value it is effectively
    driving is 'U', the left most value of std_ulogic.

    A simple way to get around this is to initialize
    the port to all 'Z' as follows:

    T(
    Q : INOUT Std_logic_vector (24 DOWNTO 0) := (others => 'Z') ;
    ...

    Cheers,
    Jim

    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Jim Lewis
    Director of Training mailto:
    SynthWorks Design Inc. http://www.SynthWorks.com
    1-503-590-4787

    Expert VHDL Training for Hardware Design and Verification
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Jim Lewis, Nov 7, 2003
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.