+ All Categories
Home > Documents > Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ......

Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ......

Date post: 27-May-2018
Category:
Upload: nguyenkhanh
View: 238 times
Download: 0 times
Share this document with a friend
61
Synthesis Of VHDL Code RTL Hardware Design Chapter 6 1
Transcript
Page 1: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Synthesis Of VHDL Code

RTL Hardware Design Chapter 6 1

Page 2: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

OutlineOutline

1. Fundamental limitation of EDA software2 Realization of VHDL operator2. Realization of VHDL operator3. Realization of VHDL data type4. VHDL synthesis flow5 Timing consideration5. Timing consideration

RTL Hardware Design Chapter 6 2

Page 3: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

1. Fundamental limitation of EDA software

• Can “C-to-hardware” be done?EDA tools:• EDA tools: – Core: optimization algorithms– Shell: wrapping

• What does theoretical computer science• What does theoretical computer science say?

C– Computability – Computation complexity

RTL Hardware Design Chapter 6 3

Page 4: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

ComputabilityComputability

• A problem is computable if an algorithm exists.

• E.g., “halting problem”:d l th t t k– can we develop a program that takes any

program and its input, and determines h th th t ti f th twhether the computation of that program

will eventually halt?• any attempt to examine the “meaning” of

a program is uncomputableRTL Hardware Design Chapter 6 4

p g p

Page 5: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Computation complexityComputation complexity

• How fast an algorithm can run (or how good an algorithm is)?g g )

• “Interferences” in measuring execution time:time: – types of CPU, speed of CPU, compiler etc.

RTL Hardware Design Chapter 6 5

Page 6: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Big O notationBig-O notation• f(n) is O(g(n)):• f(n) is O(g(n)):

if n0 and c can be found to satisfy:f( ) < ( ) f >f(n) < cg(n) for any n, n > n0

• g(n) is simple function: 1, n, log2n, n2, n3, 2ng( ) p , , g2 , , ,• Following are O(n2):

RTL Hardware Design Chapter 6 6

Page 7: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Interpretation of Big OInterpretation of Big-O

• Filter out the “interference”: constants and less important terms p

• n is the input size of an algorithmTh “ li f t ” f l ith• The “scaling factor” of an algorithm:What happens if the input size increases

RTL Hardware Design Chapter 6 7

Page 8: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

E gE.g.,

RTL Hardware Design Chapter 6 8

Page 9: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Intractable problems: – algorithms with O(2n)g ( )– Not realistic for a larger n

Frequently tractable algorithms for sub– Frequently tractable algorithms for sub-optimal solution exist

• Many problems encountered in synthesis are intractable

RTL Hardware Design Chapter 6 9

Page 10: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Theoretical limitationTheoretical limitation

S th i ft d t k• Synthesis software does not know your intention

• Synthesis software cannot obtain the optimal solution p

• Synthesis should be treated as transformation and a “local search” in thetransformation and a local search in the “design space”Good VHDL code pro ides a good starting• Good VHDL code provides a good starting point for the local search

RTL Hardware Design Chapter 6 10

Page 11: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• What is the fuss about:– “hardware-software” co-design?g– SystemC, HardwareC, SpecC etc.?

RTL Hardware Design Chapter 6 11

Page 12: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

2 Realization of VHDL operator2. Realization of VHDL operatorL i t• Logic operator– Simple, direct mapping

• Relational operator= /= fast simple implementation exists– =, /= fast, simple implementation exists

– >, < etc: more complex implementation, l d llarger delay

• Addition operatorp• Other arith operators: support varies

RTL Hardware Design Chapter 6 12

Page 13: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Operator with two constant operands:• Operator with two constant operands:– Simplified in preprocessing

N h d i f d– No hardware inferred– Good for documentation – E.g.,

RTL Hardware Design Chapter 6 13

Page 14: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Operator with one constant operand:– Can significantly reduce the hardware

complexityp y– E.g., adder vs. incrementor– E gE.g

y <= rotate_right(x, y); -- barrel shiftery <= rotate right(x 3); -- rewiringy < rotate_right(x, 3); rewiringy <= x(2 downto 0) & x(7 downto 3);

– E g 4-bit comparator: x=y vs x=0– E.g., 4-bit comparator: x=y vs. x=0

RTL Hardware Design Chapter 6 14

Page 15: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

An example 0.55 um standard-cell pCMOS implementation

RTL Hardware Design Chapter 6 15

Page 16: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

3 Realization of VHDL data type3. Realization of VHDL data type

• Use and synthesis of ‘Z’• Use of ‘-’Use of

RTL Hardware Design Chapter 6 16

Page 17: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Use and synthesis of ‘Z’Use and synthesis of ZT i t t b ff• Tri-state buffer:– Output with “high-impedance”– Not a value in Boolean algebra – Need special output circuitry (tri-state buffer)– Need special output circuitry (tri-state buffer)

RTL Hardware Design Chapter 6 17

Page 18: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Major application:j pp– Bi-directional I/O pins

Tri state bus– Tri-state bus• VHDL description:

y <= 'Z' when oe='1' elsea in;a_in;

• ‘Z’ cannot be used as input or manipulatedf <= 'Z' and a;y <= data_a when in_bus='Z' elsey _ _

data_b;

RTL Hardware Design Chapter 6 18

Page 19: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Separate tri-state buffer from regular code:p g– Less clear:with sel selectwith sel select

y <= 'Z' when "00",'1' when "01"|"11"1 when 01 | 11 ,'0' when others;

better:– better:with sel select

'1' h "01"|"11"tmp <= '1' when "01"|"11",'0' when others;

y <= 'Z' when sel="00" elsetmp;

RTL Hardware Design Chapter 6 19

Page 20: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Bi directional i/o pinsBi-directional i/o pins

RTL Hardware Design Chapter 6 20

Page 21: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RTL Hardware Design Chapter 6 21

Page 22: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RTL Hardware Design Chapter 6 22

Page 23: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Tri-state bus

RTL Hardware Design Chapter 6 23

Page 24: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RTL Hardware Design Chapter 6 24

Page 25: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Problem with tri-state bus• Problem with tri-state bus– Difficult to optimize, verify and test – Somewhat difficult to design: “parking”,

“fighting” • Alternative to tri-state bus: mux

RTL Hardware Design Chapter 6 25

Page 26: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Use of ‘-’• In conventional logic design

– ‘-’ as input value: shorthand to make table compact– E gE.g.,

RTL Hardware Design Chapter 6 26

Page 27: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

– ‘-’ as output value: help simplificationp p p– E.g.,

‘-’ assigned to 1: a + b assigned to 1: a + b‘-’ assigned to 0: a’b + ab’

RTL Hardware Design Chapter 6 27

Page 28: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Use ‘ ’ in VHDLUse - in VHDLA i t l ( i t i t iti )• As input value (against our intuition):

• Wrong:g

RTL Hardware Design Chapter 6 28

Page 29: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Fix #1:

• Fix #2:

RTL Hardware Design Chapter 6 29

Page 30: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Wrong:Wrong:

• Fix:Fix:

RTL Hardware Design Chapter 6 30

Page 31: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• ‘-’ as an output value in VHDLM k ith ft• May work with some software

RTL Hardware Design Chapter 6 31

Page 32: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

4 VHDL Synthesis Flow4. VHDL Synthesis Flow

• Synthesis: – Realize VHDL code using logic cells from the g g

device’s library– a refinement processa refinement process

• Main steps:– RT level synthesis – Logic synthesisg y– Technology mapping

RTL Hardware Design Chapter 6 32

Page 33: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RTL Hardware Design Chapter 6 33

Page 34: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RT level synthesisRT level synthesis

• Realize VHDL code using RT-level components p

• Somewhat like the derivation of the conceptual diagramconceptual diagram

• Limited optimization• Generated netlist includes

“regular” logic: e g adder comparator– regular logic: e.g., adder, comparator– “random” logic: e.g., truth table description

RTL Hardware Design Chapter 6 34

Page 35: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Module generatorModule generator

• “regular” logic can be replaced by pre-designed moduleg– Pre-designed module is more efficient

Module can be generated in different levels of– Module can be generated in different levels of detailR d th i ti– Reduce the processing time

RTL Hardware Design Chapter 6 35

Page 36: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Logic SynthesisLogic Synthesis

• Realize the circuit with the optimal number of “generic” gate level componentsg g p

• Process the “random” logicT t i• Two categories: – Two-level synthesis: sum-of-product formaty p– Multi-level synthesis

RTL Hardware Design Chapter 6 36

Page 37: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

E• E.g.,

RTL Hardware Design Chapter 6 37

Page 38: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Technology mappingTechnology mapping

• Map “generic” gates to “device-dependent” logic cells g

• The technology library is provided by the vendors who manufactured (in FPGA) orvendors who manufactured (in FPGA) or will manufacture (in ASIC) the device

RTL Hardware Design Chapter 6 38

Page 39: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

E.g., mapping in standard-cell ASIC • Device

librarylibrary

RTL Hardware Design Chapter 6 39

Page 40: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Cost: 31 vs. 17

RTL Hardware Design Chapter 6 40

Page 41: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

E.g., mapping in FPGA• With 5-input LUT (Look-Up-Table) cells

RTL Hardware Design Chapter 6 41

Page 42: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Effective use of synthesis softwareEffective use of synthesis software

• Logic operators: software can do a good jobj

• Relational/Arith operators: manual intervention neededintervention needed

• “layout” and “routing structure”: – Silicon chip is 2-dimensional square– “rectangular” or “tree-shaped” circuit is easierrectangular or tree-shaped circuit is easier

to optimize

RTL Hardware Design Chapter 6 42

Page 43: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

RTL Hardware Design Chapter 6 43

Page 44: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

5 Timing consideration5. Timing consideration

• Propagation delay• Synthesis with timing constraintSynthesis with timing constraint• Hazards• Delay-sensitive design

RTL Hardware Design Chapter 6 44

Page 45: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Propagation delayPropagation delay

• Delay: time required to propagate a signal from an input port to a output portp p p p

• Cell level delay: most accurateSi lifi d d l• Simplified model:

• The impact of wire becomes more dominantdominant

RTL Hardware Design Chapter 6 45

Page 46: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• E.g.

RTL Hardware Design Chapter 6 46

Page 47: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

System delay y y• The longest path (critical path) in the

system• The worst input to output delayThe worst input to output delay• E.g.,

RTL Hardware Design Chapter 6 47

Page 48: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• “False path” may exists:p y

RTL Hardware Design Chapter 6 48

Page 49: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• RT level delay estimation:– Difficult if the design is mainly “random” logicg y g– Critical path can be identified if many complex

operators (such adder) are used in theoperators (such adder) are used in the design.

RTL Hardware Design Chapter 6 49

Page 50: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Synthesis with timing constraintSynthesis with timing constraint

• Multi-level synthesis is flexible• It is possible to reduce by delay byIt is possible to reduce by delay by

adding extra logicS th i ith ti i t i t• Synthesis with timing constraint

1. Obtain the minimal-area implementationp2. Identify the critical path3 Reduce the delay by adding extra logic3. Reduce the delay by adding extra logic4. Repeat 2 & 3 until meeting the constraint

RTL Hardware Design Chapter 6 50

Page 51: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• E gE.g.,

RTL Hardware Design Chapter 6 51

Page 52: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Area-delay trade-off curveArea delay trade off curve

RTL Hardware Design Chapter 6 52

Page 53: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• Improvement in “architectural” level design (better VHDL code to start with)

RTL Hardware Design Chapter 6 53

Page 54: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Timing HazardsTiming Hazards

P ti d l ti t bt i t bl• Propagation delay: time to obtain a stable output

• Hazards: the fluctuation occurring during the transient period p– Static hazard: glitch when the signal should

be stable– Dynamic hazard: a glitch in transition

• Due to the multiple converging paths of an• Due to the multiple converging paths of an output port

RTL Hardware Design Chapter 6 54

Page 55: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• E.g., static-hazard (sh=ab’+bc; a=c=1)

RTL Hardware Design Chapter 6 55

Page 56: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• E.g., dynamic hazard (a=c=d=1)

RTL Hardware Design Chapter 6 56

Page 57: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Dealing with hazardsDealing with hazards• Some hazards can be eliminated in theory y• E.g.,

RTL Hardware Design Chapter 6 57

Page 58: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Eliminating glitches is very difficult in• Eliminating glitches is very difficult in reality, and almost impossible for synthesis

• Multiple inputs can change simultaneouslyMultiple inputs can change simultaneously (e.g., 1111=>0000 in a counter)H t d l ith it?• How to deal with it? Ignore glitches in the transient period and retrieve the data after the signal is stabilizedstabilized

RTL Hardware Design Chapter 6 58

Page 59: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

Delay sensitive design and its danger

• Boolean algebra – the theoretical model for digital design and g g

most algorithms used in synthesis process– algebra deals with the stabilized signalsalgebra deals with the stabilized signals

• Delay-sensitive design – Depend on the transient property (and delay)

of the circuit– Difficult to design and analyze

RTL Hardware Design Chapter 6 59

Page 60: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• E g hazard elimination circuit:E.g., hazard elimination circuit: ac term is not needed

• E g edge detection circuit (pulse=a a’)• E.g., edge detection circuit (pulse=a a )

RTL Hardware Design Chapter 6 60

Page 61: Synthesis Of VHDL Codegalia.fc.uaslp.mx/~rmariela/digital/unidad5-1.pdfSynthesis Of VHDL Code ... Realization of VHDL data type 4. VHDL synthesis flow 5. ... • Map “generic”

• What’s can go wrong:– E.g., pulse <= a and (not a);– During logic synthesis, the logic expressions g g y , g p

will be rearranged and optimized.– During technology mapping generic gates willDuring technology mapping, generic gates will

be re-mappedDuring placement & routing wire delays may– During placement & routing, wire delays may changeIt i b d f t ti ifi ti– It is bad for testing verification

• If delay-sensitive design is really needed, it y g y ,should be done manually, not by synthesis

RTL Hardware Design Chapter 6 61


Recommended