Docsity

Timing - HDL Design - Lecture Slides, Slides of Verilog and VHDL

Partial preview of the text

Download Timing - HDL Design - Lecture Slides and more Slides Verilog and VHDL in PDF only on Docsity!

Timing & Concurrency I

How do you achieve deterministic

concurrent simulation in a linear time

world on a machine that is not

inherently concurrent?

Overview – Timing & Concurrency

• Basic digital circuit operation

• Gate response

• VHDL Concurrency

• Process equivalency

• Simulation example

Multithreading

• Even with a multi-threaded architecture, any

real architecture will be capable of supporting

far less threads than the concurrency in a real

circuit.

• A formal paradigm is needed to emulate that

concurrency.

Consider the following

  • Consider the digital circuit
  • In this example, all gates

have a gate delay of 12 ns

  • Have input stimulus as

shown and circuit is stable.

a b c w x y z 0

a b

c

z

y

x

w

Z <= X + Y Z <= (A B) + (W C) Z <= (A B) + ((NOT B) C)

Result at 12 ns

  • At 12 ns G1 and G2 have

transitioned their output

and now G3 and G4 react

a b c w x y z 0

G G G G

12 24 36

a b

c

z

y

x

w 0-> 0

1

1->

1

0

1

G

G

G

G

At t=

Result at 24 ns

  • At 12 ns G3 and G4 have

transitioned their output

  • With change on G3’s output

G4 will respond

a b c wx y z 0 G G2G G

12 24 36

a b

c

z y

x

w 0->

0

1

1->

1

0

1

G

G

G

G

At t=

  • • Ended here on Jan

VHDL Concurrency

  • Within an architecture the order of concurrent statements is not significant.
  • The previous example becomes
    • ENTITY circuit_ex IS
    • PORT (a,b,c : IN BIT; z : OUT BIT);
    • END circuit_ex;
    • ARCHITECTURE concurrent OF circuit_ex IS
    • SIGNAL w,x,y : BIT;
    • BEGIN
    • w <= NOT b AFTER 12 ns;
    • x <= a AND b AFTER 12 ns;
    • y <= c AND w AFTER 12 ns;
    • z <= x OR y AFTER 12 ns;
    • END concurrent;
  • Each statement between begin and end translates into an independent

process

More notes

  • When input b transitions

from 1->0 anything

“sensitive” to b is tagged for

execution

  • Here G1 and G2 will be re-

evaluated generating

transactions

  • sig(val, abs time gen, delay

time, action time)

  • x(‘0’, 0, 12ns, 12ns)
  • w(‘1’, 0, 12ns, 12ns)

a b

c

z

y

x

w^0 0

1

1

1

1 1->

G

G

G

G

At t=

Processes

• The sensitivity list determines the signals to which a

process is sensitive.

• These two processes are equivalent, i.e., you could write

it either way. THEY ARE THE SAME – BY DEFINITION.

PROCESS (A, B, C)

BEGIN

END PROCESS;

PROCESS

BEGIN

WAIT ON A,B,C;

END PROCESS;

Concurrent signal assignment

statement

  • Concurrent signal assignment statements have an

equivalent process.

  • What is it?

X <= (Y OR Z) AND Q AFTER 45 NS;

Concurrent signal assignment

statement

  • Concurrent signal assignment statements have an

equivalent process.

  • They are sensitive to the signals on the rhs.
PROCESS (Y, Z, Q)
BEGIN
X <= (Y OR Z) AND Q AFTER 45 NS;
END PROCESS;
X <= (Y OR Z) AND Q AFTER 45 NS;

Think about

• Are these two equivalent?

PROCESS BEGIN WAIT FOR 45 NS; X <= (Y OR Z) AND Q; END PROCESS;

X <= (Y OR Z) AND Q AFTER 45 NS;

???

Think about

  • Are these two equivalent? NO
  • The semantics of the process says that waits for 45 NS and then evaluates

the equation, generating a new future value for X.

  • It then waits again for 45 NS not watching or responding to any transitions

on Y, Z, or Q

PROCESS

PROCESS

BEGIN

BEGIN

WAIT FOR

WAIT FOR

45

NS

NS

;

X

X

<

= (

Y OR Z

Y OR Z

)

AND Q

AND Q

;

END PROCESS

END PROCESS

;

X (^) X< = (<= ( Y OR ZY OR Z ) AND Q AFTER) AND Q AFTER 45 NS; 45 NS

??? ???