Docsity

VHDL Processes and Sensitivity Lists, Slides of Computer Science

Partial preview of the text

Download VHDL Processes and Sensitivity Lists and more Slides Computer Science in PDF only on Docsity!

Sequential VHDLSequential VHDL

OverviewOverview

 Process

 Sensitivity List

 Wait Statements

 If Statements

 Case Statements

 Loop Statements

 Process

 Sensitivity List

 Wait Statements

 If Statements

 Case Statements

 Loop Statements

Modeling StylesModeling Styles

 Possibly many different architecture

bodies of one entity corresponding to

alternative implementations performing

the same function (design functionality)

 Styles of architecture body

 Behavioral  Structural  Mixed structural/behavioral

 Possibly many different architecture

bodies of one entity corresponding to

alternative implementations performing

the same function (design functionality)

 Styles of architecture body

 Behavioral  Structural  Mixed structural/behavioral

Behavioral Architecture BodyBehavioral Architecture Body

 Describes function in abstract way  Include process statements  Collections of actions executed in sequence  Similar to standard programming languages like C  VHDL in general concurrent language – all statements outside processes executed in parallel (like in hardware)  Sequential statements include: evaluation of expressions, assignment of values to variables and signals, conditional executions, repeated executions and subprogram calls  Describes function in abstract way  Include process statements  Collections of actions executed in sequence  Similar to standard programming languages like C  VHDL in general concurrent language – all statements outside processes executed in parallel (like in hardware)  Sequential statements include: evaluation of expressions, assignment of values to variables and signals, conditional executions, repeated executions and subprogram calls

or_gate: process (a, b)

Process – Process – Syntax 1Syntax 1

 Starts with key word process  Optionally label can be assigned to process  Sensitivity list  Placed in ( ) right after key word process  List of all signals to which is sensitive  Upon changing of values of at least one of signals process is invoked  Relevant only at pre-synthesized level (pre-synthesized simulations)  Transparent for post-synthesis netlists  Circuits produce output for any set of inputs regardless of whether all inputs were declared on the sensitivity list  Starts with key word process  Optionally label can be assigned to process  Sensitivity list  Placed in ( ) right after key word process  List of all signals to which is sensitive  Upon changing of values of at least one of signals process is invoked  Relevant only at pre-synthesized level (pre-synthesized simulations)  Transparent for post-synthesis netlists  Circuits produce output for any set of inputs regardless of whether all inputs were declared on the sensitivity list label Sensitivity list

Process –Process – Syntax 2Syntax 2

ma: process (a, b, d, c_in) variable m_tmp: bit_vector(7 downto 0) := “00000000”; begin mult_tmp := a * b; sum <= mult_tmp + d + c_in; end process ; process_label key word variable declaration key word process body key word sensitivity list

Sensitivity List – What to Put

There?

Sensitivity List – What to Put

There?

 Sensitivity list of processes describing

combinational designs include all signals

inputted to process

 If some process input signals omitted from sensitivity list, then events on these signals not triggering process execution  If process activated by changes of other signals from sensitivity list, then calculations inside process not reflecting changes of values of signals not on the sensitivity list

 Sensitivity list of processes describing

combinational designs include all signals

inputted to process

 If some process input signals omitted from sensitivity list, then events on these signals not triggering process execution  If process activated by changes of other signals from sensitivity list, then calculations inside process not reflecting changes of values of signals not on the sensitivity list

Example: Sensitivity ListExample: Sensitivity List

a b c a b c Pre-synthesis simulations Synthesized netlist Post-synthesis waveform or_gate: process (a) begin c <= a or b; end process; b not in Sensitivity list a b c Sensitivity list

Sensitivity List and SynthesisSensitivity List and Synthesis

 Processes and sensitivity list only on simulation level  Incorrect simulations due to incomplete sensitivity list transparent to synthesized circuit  Circuits simulating with errors due to incomplete sensitivity list synthesized into correct netlist  Potential problems in verification, when post synthesis netlist checked vs. pre-synthesis RTL  Processes and sensitivity list only on simulation level  Incorrect simulations due to incomplete sensitivity list transparent to synthesized circuit  Circuits simulating with errors due to incomplete sensitivity list synthesized into correct netlist  Potential problems in verification, when post synthesis netlist checked vs. pre-synthesis RTL

Sensitivity List and WaitSensitivity List and Wait

 Process can be suspended by means of sensitivity list  Wait statement – alternative way of suspending processes  Wait statements and sensitivity lists are mutually exclusive  Process sensitivity list signals are implicitly wait on  Process suspended upon encountering wait statement  Reactivated when wait period ends  Process can be suspended by means of sensitivity list  Wait statement – alternative way of suspending processes  Wait statements and sensitivity lists are mutually exclusive  Process sensitivity list signals are implicitly wait on  Process suspended upon encountering wait statement  Reactivated when wait period ends

  • Advance of simulation time: When does simulation time advance during theexecution of a process?

    On the expiring of a wait: - @ t: wait for 10 ns; Æ wait expires @ t+10 ns - @ t: wait on a, b; if a’event is true @ t+5 ns, & b’event is true @ t+3 ns Æ wait expires @ t+3 ns; • @ t: wait until (a = ‘0’ and b=1’); @ t: a=‘1’ and b=‘0’; @ t+2 ns, b=‘1’; @ t+** **ns, a=0’ Æ wait expires @ t+7 ns - If a wait expires @ t+x ns Î the statement after the wait is executed @ t+x ns (new simulation time is t+x ns) - When the process reaches the end @ t, and has: - a sensitivity list which is triggered at t+y ns (the earliest one of the signals on the list changes is at t+y ns) Æ the process restarts @ t+y ns which is also the new simulation time • no sensitivity list Æ the process restarts @ t + ∆ ns, which is also the new simulation time - Does the above discussion square w/ our earlier discussion of advance of sim.time for simple signal assignment statements in a dataflow description? Advance of Simulation Time During Process Execution (ShantanuDutt, UIC) Docsity.com

Boolean condition; time-period; time-period; Docsity.com

Wait UntilWait Until

 Process suspends until cpecified condition

becomes true

 Upon encountering even on signals A or B “=“ condition evaluated  If fulfilled process resumes operation from next statement onwards, otherwise it remains suspended

 Process suspends until cpecified condition

becomes true

 Upon encountering even on signals A or B “=“ condition evaluated  If fulfilled process resumes operation from next statement onwards, otherwise it remains suspended wait until A=B;

Wait ForWait For

 Execution of wait statement at time T

causes suspense of process for 10 ns

 Next process statement executed at time T+10ns

 Execution of wait statement at time T

causes suspense of process for 10 ns

 Next process statement executed at time T+10ns wait for 10 ns;