Loading in 5 sec....

IAY 0 80 0 Digitaalsüsteemide disainPowerPoint Presentation

IAY 0 80 0 Digitaalsüsteemide disain

- By
**greta** - Follow User

- 110 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' IAY 0 80 0 Digitaalsüsteemide disain' - greta

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### IAY 0800Digitaalsüsteemide disain

Tallinn University of Technology

Hazards in Combinational Circuits

Timing and Post-Synthesis Verifications

Logic synthesis phase of design flow

The next group of phases is performed to synthesize logic to the target PLD:

- Select PLD
A PLD must be selected that has logic capacity to implement the logic to be synthesized. This selected PLD is called the target PLD. The target PLD must also be fast enogh to meet the system’s timing requirements.

- Synthesize logic
Synthesis is the process of automatically translating a VHDL design description to logic. The synthesized logic is optimized in terms of area (number of gates) and/or speed (number of gate levels).

- Post-synthesis simulation

Synthesizer

- The objective of a synthesizer is to synthesize logic that behaves identically to the simulated behavior of the design description. A synthesizer translates a design description into a functionally equivalent gate-level logic implementation.
- A synthesizer requires two inputs: the design description file and the specification of the target PLD
- The synthesizer produces two outputfiles:
- A VHDL netlist – a design file that describes, in VHDL structural style, the connectivity of the optimized logic implemented using the target PLD’s primitives. The VHDL netlist is used as UUT model in a post-synthesis simulation.
- A technology dependent gate-level netlist.

- A netlist is a textual representation of the interconnections.

Synthesizer

Typically, a synthesizer performs three steps during synthesis:

- Language synthesis: the design description is transformed into a representation based on Boolean equations.
- Optimization: algorithms apply the rules of Boolean algebra to optimize the logic for area and /or speed. This optimizations are independent of the technology of the target PLD and produce a technology-independent netlist.
- Technology mapping: the logic is mapped to the target PLD. This step corresponds to transforming the technology independent netlist to a technology dependent netlist.

Technology dependent view of half-adder

22V10 SPLD was selected as the target PLD for half-adder design.

Post-synthesis (gate-level) simulation

Simulation of the VHDL netlist is called post-synthesis simulation, since it simulates the structural interconnection of the gates and flip-flops synthesized for a design.

The results from this simulation are compared with the results from the functional simulation of design description. These results should be the same.

If a timing simulation is to be performed, post-synthesis simulation may be skipped.

Place-and-route phase of design flow

- A place-and-route (or fitter) tool is software used to automatically map or fit synthesized logic to a target PLD’s architecture.
- The place operation selects and configures specific logic primitives in the PLD’s architecture for each logic primitive in the technology dependent netlist.
- The route operation determines the path for each connection between a logic primitive and a pin of the PLD.
- The place-and-route tool is usually obtained from PLD vendor.
- A place-and-route tool as its inputs a technology dependent gate-level EDIF netlist and constraint information such as pin assignments for port signals and timing constraints.

Place-and-route phase of design flow

- A technology dependent netlist describesthe connectivity of the optimized logic using the target PLD’s logic primitives. These primitives are the logic elements available in the target PLD’s architecture.
- The technology dependent netlist is in a format readable by the PLD vendor’s place-and-route tool. Typically, the EDIF netlist format is used.
- EDIF ( Electronic Data Interchange Format ) is a format issued by the Electronic Industries Association, as EIE-548. Its purpose is to provide a standard format for transferring design information between EDA tools.

Place-and-route tool outputs

- A chip report – which port signals are assigned to which PLD pins and how much of the PLD’s logic capacity is used.
- A configuration file (programming file) – contains the interconnection and configuration data necessary to program the PLD. This file specifies exactly which programmable interconnects in the target PLD are to be programmed as connections and which are not.
- A VHDL timing model – is a file containing a structural-stile VHDL program that describes the logic and timing of the synthesized logic mapped to the target PLD. This model includes information detailingthe propagation delays of signals through the PLD.

Hazard and glitch

A hazard is an output glitch caused by the gate-level structureof acircuit and the propagation delays of its individual gates.

A static hazard occurs when a change in the input values to a combinational circuit causes an output to briefly change value when functionally it should have remained the same. This brief change (glitch)is caused by differences in propagation delays through different signal paths in the circuit.

A dynamic hazard occurs when a change in the input values to a combinational circuit causes an output to briefly change value multiple times when it should have changed value only once.

Circuit’s Behavior

The steady-state behavior of a circuit is the value of the

output after the inputs have been stable for a long time.

The transient behavior of a circuit is the value of the

output while (or soon after) the inputs change.

The glitch is a (often undesirable) short pulse produced

in the output during a transient phase.

If a circuit has the possibility of producing a glitch,

the circuit has a hazard.

Static-1 Hazard

A static-1 hazard is a set of two input combinations

Xa and Xb such that:

(i) Xa and Xb differ in only one input variable;

(ii) both Xa and Xb produce a 1 output;

but it is possible for a momentary 0 to appear in the output when the input transits from Xa to Xb or fromXb to Xa

i.e., a static-1 hazard is a possibility of a 0 glitch when we expect a steady 1 output.

Static-0 Hazard

A static-0 hazard is a set of two input combinations Xa and Xb such that:

(i) Xa and Xb differ in only one input variable;

(ii) both Xa and Xb produce a 0 output;

but it is possible for a momentary 1 to appear in the output when the input transits from Xa to Xb or from Xb to Xa

i.e., a static-0 is a possibility of a 1 glitch when we expect a steady 0 output.

1

1

Z

Z’

YZ

XZ’

F

ExampleDoes this circuit have a hazard?

If so, of what kind?

X

XZ’

0

1

Z’

0

Z

F

0

1

1

0 1

YZ

1

0

The hazard occurs in the transition

from X,Y,Z = 111 to X,Y,Z = 110

Y

1

1

1

1

1

Z

1

Y

Static Hazards in Karnaugh MapsX

Z

F

Y

F = X•Z’ + Y•Z

How can we identify a static-1 hazard

in this Karnaugh map?

Two adjacent 1’s that are not in the

same term cause a static-1 hazard.

1

1

We can add one extra term to F.

1

1

Z

F = X•Z’ + Y•Z + X•Y

X•Y

Y

Consensus Term

Hazard free designX

Z

F

Y

F = X•Z’ + Y•Z

How can we eliminate the hazard?

1

1

We can add one extra term to F.

1

1

Z

X•Y

F = X•Z’ + Y•Z + X•Y

Y

Consensus Term

Hazard free designin Karnaugh MapsX

Z

F

Y

F = X•Z’ + Y•Z

X

How can we eliminate the hazard?

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

X

1

1

Z

Z

F = W’•Z + X•Z’ + X’•W

F = W’•Z + X•Z’ + X’•W

1

1

Y

Y

Hazard free design:another exampleTo avoid hazards: every par of adjacent 1s should be covered by a 1-term

W

1

1

1

1

1

1

1

1

1

1

1

1

X

1. Write minimal form for F

2. Identify static-1 hazards

3. Eliminate static-1 hazards

1

Z

Z

F = W’•Z + X•Z’ + X’•W

1

1

Y

Y

Hazard free design:another exampleW

W

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

X

X

F = W’•Z + X•Z’ + X’•W + X•W’

1. Write minimal form for F

2. Identify static-1 hazards

3. Eliminate static-1 hazards

1

1

1

Z

Z

F = W’•Z + X•Z’ + X’•W

Y

Y

Hazard free designW

W

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

X

X

F = W’•Z + X•Z’ + X’•W + X•W’ + W•Z’

1. Write minimal form for F

2. Identify static-1 hazards

3. Eliminate static-1 hazards

1

1

1

Z

Z

F = W’•Z + X•Z’ + X’•W

Y

Y

Hazard free designW

W

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

X

X

F = W’•Z + X•Z’ + X’•W + X•W’ + W•Z’ + X’•Z

1. Write minimal form for F

2. Identify static-1 hazards

3. Eliminate static-1 hazards

Dynamic hazards do not occur in properly designed

two level AND-OR or OR-AND circuits.

PS: A two level AND-OR or OR-AND circuit is

properly design if a variable and its complement are

never input to the same first level gate.

Dynamic hazardsA dynamic hazard is the possibility of an output changing more than once as the result of a single

transition.

Dynamic hazards exist when there are multiple paths with different delays from the changing input to the changing output.

1

0

1

0

slower

Dynamic hazard example0

1

W

0

1

0

X

0

1

0

0

Y

0

1

0

1

1

1

0

0

1

1

1

Z

A dynamic hazard occurs when

oscilation may occur when a single

transition is expected.

Process to verify logic and timing

tb : process

constant tpd_spec : time := 11 ns ;

constant period: time := 20 ns ;

constant n : integer := 2 ;

begin

--Apply every posiible input combination

for i in 0 to 2**n - 1 loop

(a_tb, b_tb) <= to_unsigned (i, n) ;

-- Verify output values at specified time

wait for tpd_spec ;

assert ((sum_tb = (a_tb xor b_tb)) and (carry_out_tb = (a_tb and b_tb)))

report "test failed for a_tb = "& std_logic' image (a_tb) & and

b_tb = " & std_logic ' image (a_tb) severity error ;

-- Verify that outputs do not subsequently change

wait for period - tpd_spec ;

assert sum_tb' quiet (period - tpd_spec) and (carry_out_tb' quiet (period - tpd_spec)

report "propagation delay specification exceded" severity error ;

endloop ;

wait ;

endprocess ;

end ;

Generics

- The VHDL timing model uses a set of timing parameters to specify the propagation delays of the PLD’s primitive elements.
- The timing parameter values are usually passed to the model using constants called generics.
- Actual generic values are either defined directly in the timing model or specified in a separate file that is generated by the place-and-route tool.
- If a separate file is used it usually specifies the generic timing values in a format called standard delay format (SDF).
- A PLD’s timing is a function of both the propagation delays of its primitive elements and the specific delay paths that result when the synthesized logic is routed for the target PLD.

Signal-related attributes

VHDLcontains anumber ofpredefinedattributeswhich arerelated tosignals :

- attributeswhich definesignalsthemselves
- attributeswhich arefunctions toprovideinformationabout signals.

These attributes are signals themselves

Models of time delays

Inertial delay

– Model the time lag between stable inputs and valid

output of a device

– Representative of combinational logic elements

– Pulses smaller than transmission delay are suppressed

– Default model for VHDL descriptions

Transport delay

– Model a pure delay mechanism

– All pulses are transmitted

– Used for transmission lines or elements with clock- cycle

latency

Process to verify logic and timing of model

tb : process

constant tpd_spec : time := 11 ns ;

constant period: time := 20 ns ;

constant n : integer := 2 ;

begin

--Apply every posiible input combination

for i in 0 to 2**n - 1 loop

(a_tb, b_tb) <= to_unsigned (i, n) ;

-- Verify output values at specified time

wait for tpd_spec ;

assert ((sum_tb = (a_tb xor b_tb)) and (carry_out_tb = (a_tb and b_tb)))

report "test failed for a_tb = " & std_logic ' image (a_tb) & and b_tb = " & std_logic ' image (a_tb)

severity error ;

Process to verify logic and timing of model

-- Verify that outputs do not subsequently change

wait for period - tpd_spec ;

assert sum_tb ' quiet (period - tpd_spec) and (carry_out_tb ' quiet (period - tpd_spec)

report "propagation delay specification exceded" severity error ;

endloop ;

wait ;

endprocess ;

end ;

Download Presentation

Connecting to Server..