Professional Documents
Culture Documents
Verilog
PROCEDURAL
STATEMENTS
CONTROL FLOW
INTRODUCTION
BLOCKING
ASSIGNMENT
PROCEDURAL
STATEMENTS NONBLOCKING
ASSIGNMENT
WHILE, DO-WHILE
FOREACH
LOOP STATE MEN T S
ENHANCED FOR LOOP
REPEAT, FOREVER
BREAK
JUMP
STATEMENTS
CONTINUE
BLOCKING
ASSIGNMENT
A Syst e mVe r i l o g B l o c k i ng as s i g nme nt
i s an ass i g nme nt st at e me nt t hat
e x e c ut e s i n a s e r i e s o r de r , b l ock i ng t he
e x e c ut i on of t he ne xt s t at e me nt unt i l
t he c ompl e t i o n of t he cur r e nt
as s i g nme nt e xe c u t i on. The s e
as s i g nme nt s a r e ma de us i ng t he " = "
ope r at or an d a r e e xe c ut e d one aft e r
t he ot he r i n a pr o c e du r a l b l ock .
BLOCKI NG AS S I GN MENTS E XA MP L E S
OUTPUT
NONBLOCKING
ASSIGNMENT
Non- bl oc ki n g a s s i g nme nt s t at e me nt s
al l ow mul t i pl e a s s i g nme nt s t o occur i n
par al l e l wi t h o u t bl o c k i n g t he e x e cut i on
of fol l owi ng s t a t e me n t s . Thi s me ans
t ha t al l t he a s s i g nme nt s w i l l occur at
t he same t i me , du r i n g t he e nd of
s i mul a t i on t i me s t a mp.
Non- bl oc ki n g a s s i g nme nt s t at e me nt s
ar e spe c i fi e d u s i ng t h e l e s s t han or
e qual t o sym bo l ( < = ) . I t ' s i nt e r e s t i ng t o
not e t hat t h i s s ymbo l i s al s o us e d as a
r e l at i onal ope r a t o r i n e xp r e s s i ons .
NON- BLOCK I N G AS S I GN ME N TS E XA MP L E S
OUTPUT
BLOCKING ASSIGNMENTS EXAMPLES NON-BLOCKING ASSIGNMENTS EXAMPLES
OUTPUT OUTPUT
LOOP STATEMENTS
WHILE LOOP
SYNTAX
elements in an array. It
eliminates the need for index
variables and can be used
with both single and multi- MULTI DI ME N S I O N AL
AR R AY
dimensional arrays.
LOOP STATEMENTS
FOR LOOP EXAMPLE
SYNTAX
LOOP STATEMENTS
REPEAT LOOP EXAMPLE
Thi s loop i s used to execute a s et
of statements for a fi xed n umber of
ti mes.
SYNTAX
SYNTAX
JUMP STATEMENTS
BREAK
EXAMPLE OUTPUT
JUMP STATEMENTS
CONTINUE
SYNTAX
EXAMPLE
The "conti nue" statement is us ed to
ski p over certai n i teration s of a
loop. When the " con tin ue"
statement i s encountered with in a
loop, the l oop i mmedi atel y mov es
on to the next i teration with out
executi ng any further code with in
the loop f or the current itera tion .
OUTPUT
BLOCKING ASSIGNMENT AL STA
UR
TEM NT
OCED
E
R
NONBLOCKING
P
S
P
STATEM FOREACH
LOO
ENTS
ENHANCED FOR LOOP
REPEAT, FOREVER
STATEM
BREAK
JUMP
ENTS
CONTINUE
Jairaj Mirashi
THANK YOU FOR
WATCHING