+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Advanced Member level 1
    Points: 2,557, Level: 11

    Join Date
    May 2012
    Posts
    404
    Helped
    2 / 2
    Points
    2,557
    Level
    11

    what is different signal and variable in vhdl?

    Hi.

    When i have trying to use these signal and variable in vhdl, i dont know exactly different each of them.

    What they have pros and cons and how can handle to use? Would you let me know?

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 2
    Points: 3,454, Level: 13

    Join Date
    Apr 2011
    Location
    India
    Posts
    552
    Helped
    126 / 126
    Points
    3,454
    Level
    13

    Re: what is different signal and variable in vhdl?

    You can refer any material on the net for this. Basically signal is global(throughout the architecture) while variable is local to the process it is defined in.



    •   AltAdvertisment

        
       

  3. #3
    Super Moderator
    Points: 29,904, Level: 42
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,889
    Helped
    1640 / 1640
    Points
    29,904
    Level
    42

    Re: what is different signal and variable in vhdl?

    Also in a process signal assignments are scheduled whereas variable assignments are dome immediately.

    Regards



    •   AltAdvertisment

        
       

  4. #4
    Member level 3
    Points: 997, Level: 7

    Join Date
    Jun 2012
    Posts
    64
    Helped
    14 / 14
    Points
    997
    Level
    7

    Re: what is different signal and variable in vhdl?

    There are three major difference between a signal and a variable in the VHDL

    Coverage wise –

    Signals has coverage to whole architecture, it can be access from any place in a Architecture of entity

    A variable is local to a procedure defined in the architecture

    Behavior wise –

    Signal assignments executes concurrently, It means, if we have 5 signals assignment, then it depends on the simulator to decide which signal to be assigned first

    In case of variable, it takes the value immediately OR in other language, it executes sequentially

    Synthesis Wise –

    If we have 2 variable and two signals used in a process, the variables infer just a wire during synthesis, but the signals infer a Flop.



--[[ ]]--