electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

VHDL: <= and := . What's the difference?


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> VHDL: <= and := . What's the difference?
Author Message
yuenkit



Joined: 20 Jan 2005
Posts: 110
Helped: 5


Post27 Jan 2005 3:29   

VHDL: <= and := . What's the difference?


Hi,

i am confused when I should use := and when I should use <= in VHDL.

Thank you.
Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1751
Helped: 28


Post27 Jan 2005 4:29   

Re: VHDL: <= and := . What's the difference?


:= is used to initialize a variable :
MYVAR:='1' ;

<= is to used to initialise a signal ( a wire);
signal led_wire
led_wire <='1';

VHDL is a strongly typed language and some types use diffrent operators
But yes i think that they could have reduced the number of equivalent operators.
Back to top
masai_mara



Joined: 13 Aug 2004
Posts: 118
Helped: 6


Post27 Jan 2005 4:54   

Re: VHDL: <= and := . What's the difference?


Hi,
In vhdl the operator ":=" is used while initializing signals and variables when they are declared and the other instance being assignment to variables inside processes. The operator "<=" is used in assignment to signals inside a process and in continuous assingment outside a process.
hope its clear.
Back to top
smith_kang



Joined: 22 Jan 2005
Posts: 90
Helped: 1


Post27 Jan 2005 5:55   

Re: VHDL: <= and := . What's the difference?


you can thing in this way
:= it is used to realise blocking statements.so the statements with := are order dependent i.e. after executing first second will execute.but this is good in case of combinational circuit.othewise in sequential circuit it causes Race conditions.

<= is generally used to realise a non blocking statement.that is the statement with this sign are order independent.So if you are realising sequential circuit then better use <=.it will overcome race condition which will arise if you use :=
Back to top
Google
AdSense
Google Adsense




Post27 Jan 2005 5:55   

Ads




Back to top
crazy_man



Joined: 29 Dec 2004
Posts: 66
Helped: 2


Post27 Jan 2005 6:03   

Re: VHDL: <= and := . What's the difference?


<= is used to assign values to an output port
:= is used to assign values for signal
Back to top
the_penetrator



Joined: 22 Jun 2001
Posts: 327
Helped: 3


Post27 Jan 2005 14:22   

Re: VHDL: <= and := . What's the difference?


crazy_man: what are you talking about? You don't know any VHDL, do you, just wanna get the points.

This topic has been already answered:

<= assign to a signal
:= assign to a variable

RH operands can be either signals or variables.

And to the one who started the topic: Please don't bother with VHDL. If you start asking for such elementary issues, do something else in your life.

Get it?

the_penetrator©
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> VHDL: <= and := . What's the difference?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
What's the difference between '#5 a = b;' and 'a = #5 b;'? (3)
what's the difference between the diplexer and duplexer? (5)
what's the difference for aix and linux in the syn0psys site (1)
What's the difference between Z=Z* and Z=Z matching? (3)
what's the difference between TT FF and SS Model? (4)
What's the difference of OTA and OPAMP? (6)
What's the difference of the SC-70 and SOT-23 (5)
What's the difference between IC50 and IC5032 ? (6)
What's the difference between AGC and ALC? (5)
what's the difference between USART and UART? (12)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS