Re: Default?

Discussion in 'VHDL' started by Allan Herriman, Jul 2, 2003.

  1. On Wed, 2 Jul 2003 07:30:46 +0200, "John T." <> wrote:

    >What does it mean when I declare values in the entity, for example:
    >
    >ENTITY test IS
    >PORT(
    > dummy_1: IN std_logic := '1';
    > dummy_2: IN std_logic := '0';
    >
    > dummy_3: OUT std_logic := '1';
    > dummy_4: OUT std_logic := '1';
    > dummy_5: OUT std_logic := '0'
    >
    >);
    >END ENTITY test;
    >
    >Is this some sort of starting values? Are they only used in simulation
    >or......?


    1. For the input ports, this is the value that the signal will take
    if the port is left open (either by being mapped to 'open' in the port
    map, or by being left out of the port map altogether).
    This works perfectly well in both simulation and synthesis, as long as
    you aren't using tools supplied by Synopsys (in which case the default
    value will be 0 regardless of the value you specified).

    2. For the output ports, this is the value that the drivers will have
    at elaboration time. If there are no drivers within the architecture
    (i.e. you haven't made an assignment to the port of the form
    dummy_1 <= something; ) this is the value of (the driver of) the
    output port forever. Otherwise it is the value the port has until the
    first signal assignment to the port runs, typically 1 delta cycle into
    the simulation.


    I don't usually see default values used for output ports in
    synthesisable code. It can be useful to eliminate glitches in
    simulation though, e.g. if the architecture is driving (say) '1', and
    there's no initial value on the port, the output will be 'U' for 1
    delta cycle before changing to '1'. With the initial value, it will
    simply be '1'.

    Another way of stating that is:
    If you don't provide a value, the language provides an implicit
    initialiser of 'U', e.g.

    dummy_3: OUT std_logic := 'U';


    Regards,
    Allan.
    Allan Herriman, Jul 2, 2003
    #1
    1. Advertising

  2. Allan Herriman

    Thomas Kurth Guest

    Hi Allan,


    > 1. For the input ports, this is the value that the signal will take
    > if the port is left open (either by being mapped to 'open' in the port
    > map, or by being left out of the port map altogether).
    > This works perfectly well in both simulation and synthesis, as long as
    > you aren't using tools supplied by Synopsys (in which case the default
    > value will be 0 regardless of the value you specified).


    Really? Which logic element is it in hardware that ties the pin to this
    value?

    > 2. For the output ports, this is the value that the drivers will have
    > at elaboration time. If there are no drivers within the architecture
    > (i.e. you haven't made an assignment to the port of the form
    > dummy_1 <= something; ) this is the value of (the driver of) the
    > output port forever. Otherwise it is the value the port has until the
    > first signal assignment to the port runs, typically 1 delta cycle into
    > the simulation.


    When are these initial values executed? Do I have to use the reset pin
    of the device? Or how does it know that there has not yet been an
    operation on this pin (in HW)? For simulation I agree, that there might
    be some logic which uses these defaults, but in synthesised code?

    Greetz,

    Thomas

    --

    No matter if you are going on-piste or off-piste, just hit the slope and
    stay healthy!

    For mail reply replace "nospam" with "kurth".
    Thomas Kurth, Jul 2, 2003
    #2
    1. Advertising

  3. Allan Herriman

    Thomas Kurth Guest

    Hi Allan,

    thanks for your answer... No It has become clearer to me.

    Greetz,

    Thomas

    --

    No matter if you are going on-piste or off-piste, just hit the slope and
    stay healthy!

    For mail reply replace "nospam" with "kurth".
    Thomas Kurth, Jul 11, 2003
    #3
    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. micky

    default.mspx or default.do

    micky, Dec 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    478
    Andrew Robinson
    Dec 17, 2005
  2. Gaetan
    Replies:
    3
    Views:
    1,409
    Juan T. Llibre
    Feb 14, 2006
  3. C Gillespie
    Replies:
    3
    Views:
    395
    Peter Hansen
    Mar 22, 2005
  4. Max
    Replies:
    2
    Views:
    470
    Joe Kesselman
    Aug 1, 2006
  5. desktop
    Replies:
    2
    Views:
    449
    Victor Bazarov
    Jun 6, 2007
Loading...

Share This Page