42
 1. Course overview  2. Intro to PICOBLAZE, C and Number systems and Boolean Algebra  3. Course overview with microprocessor MU0 (I)  4. Course overview with microprocessor MU0 (II)  5. Verilog HDL  6. Digital system components using schematics and Verilog  7. Combinational logic standard forms. Karnaugh maps  8. Combinational ccts and configurable logic devices  9. Simple Sequential circuits, flip flops 10. Sequential circuits, counters, registers, memories 11. Non-ideal effects in digital circuits 12. Finite State Machines (EXAM THURSDAY APRIL 9, Forestry) 13. Design of FSMs 14. Register Transfer Level Systems (RTL) systems 15. Design of RTLs 16. Non-ideal effects in complex digital systems (Karnaugh maps) 17. Complex RTL design 18. The PICOBLAZE Softcore 19. Assembly language programming 20. C and Assembly 21. Other microprocessor architectures 3213: Digital Systems & Microprocessors: L#11 Course Summary

Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

  • Upload
    others

  • View
    26

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

1. Course overview 2. Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0 (I) 4. Course overview with microprocessor MU0 (II) 5. Verilog HDL 6. Digital system components using schematics and Verilog 7. Combinational logic standard forms. Karnaugh maps 8. Combinational ccts and configurable logic devices 9. Simple Sequential circuits, flip flops10. Sequential circuits, counters, registers, memories11. Non­ideal effects in digital circuits

12. Finite State Machines (EXAM THURSDAY APRIL 9, Forestry)13. Design of FSMs14. Register Transfer Level Systems (RTL) systems15. Design of RTLs16. Non­ideal effects in complex digital systems (Karnaugh maps)17. Complex RTL design18. The PICOBLAZE Softcore19. Assembly language programming20. C and Assembly21. Other microprocessor architectures

3213: Digital Systems & Microprocessors: L#11

Course Summary

Page 2: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Non Ideal Effects in Digital Circuits

3213: Digital Systems & Microprocessors: L#11

Page 3: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

The combinational abstraction ignores propagation delays => combinational circuits are steady­state

The sequential abstraction ignores setup and hold times => sequential circuits are instantaneously synchronous with the clock

3213: Digital Systems & Microprocessors: L#11

Non­Ideal Effects in Digital Circuits: Timing Hazards

Page 4: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Analog Analysis

Page 5: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• Digital analysis works only if circuits are operated in spec:– Power supply voltage– Temperature– Input­signal quality– Output loading

• Must do some “analog” analysis to prove that circuits are operated in spec.– Fanout specs– Timing analysis (setup and hold times)

3213: Digital Systems & Microprocessors: L#11

CMOS Electrical Characteristics

Page 6: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

•VIH(min) The minimum voltage level at the input recognised as H.

•VIL(max) The maximum voltage level at the input recognised as L.

•VOH(min) The minimum voltage at the output when in state H.

•VOL(max) The maximum voltage at the output when in state L.

Specified by the device manufacturer

VOH(min) > VIH(min) VOL(max) < VIL(max)

3213: Digital Systems & Microprocessors: L#11

Device Specifications

Page 7: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Device Specifications

Page 8: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• An output must sinkcurrent from a load when the output is in the LOW state.

• An output must source current to a load when the output is in the HIGH state.

3213: Digital Systems & Microprocessors: L#11

DC Loading

Page 9: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

1MΩ

Isink

5V

Gnd

100Ω

VoutVin = 5V

200ΩIsource

5V

Gnd

1MΩ

VoutVin = 0V

In practice, resistances are never zero or infinite Example: Inverter

3213: Digital Systems & Microprocessors: L#11

CMOS Non­ideal Characteristics

Page 10: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

1MΩ

Isink

5V

Gnd

100Ω

VoutVin = 5V

E.g. if VOL(max) = 0.1V, then

IOL(max) = 0.1V / 100

= 1mA

3213: Digital Systems & Microprocessors: L#11

CMOS Nonideal Characteristics

Page 11: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

IOH The maximum current that can be sourced in the HIGH state while maintaining the output voltage within specified limits

• IOL The maximum current that can be sunk in the LOW state while maintaining the output voltage within specified limits

Noise MarginA measure of the extent to which a logic circuit can tolerate noise or unwanted spurious signals

3213: Digital Systems & Microprocessors: L#11

Device Specifications

Page 12: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Noise Margin

VIH(min)

VIL(max)

VOH(min)

Page 13: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

The maximum number of gates that can be driven reliably.

3213: Digital Systems & Microprocessors: L#11

Fanout

Page 14: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

AC loading has become a critical design factor as the industry has moved to pure CMOS systems.

– CMOS inputs have very high impedance, DC loading is negligible.

– CMOS inputs and related packaging and wiring have significant capacitance.

– Time to charge and discharge capacitance is a major component of delay.

3213: Digital Systems & Microprocessors: L#11

AC Loading

Page 15: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Transition times

Page 16: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

tPHL tPLH

3213: Digital Systems & Microprocessors: L#11

Propagation Delay

Page 17: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Setup and Hold Times Setup time is the time that a signal needs to be established before an active clock edge for its output to be valid

Hold time is the time that a signal needs to remain valid after an active clock edge for its output to remain valid

Page 18: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• Low static (Steady state) power consumption • Significant Dynamic power consumption due to

• Capacitive loads

• Both n and p channel transistors are partially on during transitions

Higher clock speeds => higher power consumption

3213: Digital Systems & Microprocessors: L#11

Power Consumption in CMOS Devices

Page 19: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

What are the manifestations of the above non­ideal physical phenomena?

Static hazards

Even if a combinational circuit's output settles eventually, it may produce a short pulse or GLITCH during the switching of its inputs

Glitches are only harmful to any sequential circuits that follow

One can design combinational circuits using Karnaugh maps for glitch free operation

3213: Digital Systems & Microprocessors: L#11

Non­Ideal Effects in Combinational Circuits

Page 20: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

A static­1 hazard is a pair of input combinations that differ in only one input variable and both give a 1­output.

But it is possible for a momentary 0 output to occur during a transition of that input variable

A static­0 hazard is the converse.

3213: Digital Systems & Microprocessors: L#11

Static Hazards

Page 21: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Example of a Static­1 Hazard

Page 22: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Static­1 Hazard Eliminated

Page 23: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

A dynamic hazard occurs when more than one output transition results from a single input transition.

Multiple output transitions can occur if there are multiple paths with differing propagation delays from the input to the output

Handle by proper design and simulation

3213: Digital Systems & Microprocessors: L#11

Dynamic Hazards

Page 24: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Dynamic Hazards: An example

Page 25: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

What are the manifestations of the above non­ideal physical phenomena in sequential circuits?

Clock synchronisation

Clock skew

Pulse catching

Switch debouncing

note that a switch could bounce through a combinational circuit but the problem is for the sequential circuits

3213: Digital Systems & Microprocessors: L#11

Non­Ideal Effects in Sequential Circuits

Page 26: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• Not all inputs to an RTL system are synchronised with the clock

• Examples:– Keystrokes– Sensor inputs– Data received from a network (transmitter has its own clock)

• Inputs must be synchronised with the system clock before being applied to a synchronous system.

3213: Digital Systems & Microprocessors: L#11

Asynchronous inputs

Page 27: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Go – no go configuration

3213: Digital Systems & Microprocessors: L#11

Asynchronous inputs

Page 28: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

A simple synchroniser

Page 29: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Only one synchroniser per input

Page 30: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Combinational delays to the two synchronizers are likely to be different.

3213: Digital Systems & Microprocessors: L#11

Even worse

Page 31: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• One synchroniser per input• Carefully locate the synchronisation points in a system.• But still a problem ­­ the synchroniser output may

become metastable when setup and hold time are not met.

3213: Digital Systems & Microprocessors: L#11

Different approach...

Page 32: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

• Hope that FF1 settles down before “META” is sampled.– In this case, “SYNCIN” is valid for almost a full

clock period

A bit like toll gates...3213: Digital Systems & Microprocessors: L#13

The correct approach...

Page 33: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0
Page 34: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Pulses must meet minimum pulse width requirement of SR latch!

3213: Digital Systems & Microprocessors: L#11

Pulse Catching

Page 35: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

– Clock signal may not reach all flip­flops simultaneously.– Output changes of flip­flops receiving “early” clock may reach D inputs of flip­

flops with “late” clock too soon.

Reasons for slowness:(a) wiring delays(b) capacitance(c) incorrect design

3213: Digital Systems & Microprocessors: L#11

Clock Skew

Page 36: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Switch Bounce

3213: Digital Systems & Microprocessors: L#11

Page 37: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Measured bounce

Page 38: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

Measured bounce

Page 39: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Schmitt TriggerVOUT

VIN

VT­ VT+5.0

0.0

VO

time

High

Low

VIN

time

5.0

0.0

VT+

VT­

(a)

(b)

3213: Digital Systems & Microprocessors: L#11

Page 40: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Debouncing Circuit

VO

time

High

Low

VIN

time

5.0

0.0

VT+

VT­

(a)

(b)R1 >>R2

3213: Digital Systems & Microprocessors: L#11

Page 41: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

3213: Digital Systems & Microprocessors: L#11

SR Debouncer

In practice, one writes software instead of using this circuit

Page 42: Course Summarycourses.cecs.anu.edu.au › courses › ...Ideal_Effects.pdf · Intro to PICOBLAZE, C and Number systems and Boolean Algebra 3. Course overview with microprocessor MU0

Power­up

3213: Digital Systems & Microprocessors: L#11

RC Debouncer