modul 3 pld, vhdl, pld, vhdl, latches latches, , flipflip--flops...

Post on 25-Oct-2020

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Digital Design 2010

DE2 1

1

Modul 3Modul 3

PLD, VHDL, PLD, VHDL, LatchesLatches, , FlipFlip--Flops & Flops & CountersCounters

2

Cou te sCou te s

Digital Design 2010

DE2 2

PLAPLAPALPALPLDPLDCPLDCPLDFPGAFPGA

3

FPGAFPGAASICASIC

PLA contains a 2 level structure of AND and OR gates with userprogrammable connections (sum of the product basically min terms)programmable connections (sum of the product, basically min terms).

PLA structure was enhanced to PAL programmable logic arrays and todaysuch devices are called PLD programmable Logic Devices.

However, PAL lack scalability as the 2 level cannot be scaled to larger sizes,so instead of PLD, CPLD Complex PLD are introduced which basicallycontains large number of PLDs and interconnection structure that is alsoprogrammable so providing a rich design capability.

4

programmable so providing a rich design capability.

The later version of CPLD which contains large number of individual blocksis called FPGA.

Digital Design 2010

DE2 3

Sum of the product: AND gates providethe product and OR gates as sum.

5

Embedded Systems: A Contemporary Design Tool by James K. Peckol

The only limitation here is size of thedevice as the number of input and outputpins and the number of product termsavailable.

6

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Digital Design 2010

DE2 4

7

Embedded Systems: A Contemporary Design Tool by James K. Peckol

To make it more flexible and enhancing the capability of these circuits an inputdriver with true and negated option.

8

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Digital Design 2010

DE2 5

9

Embedded Systems: A Contemporary Design Tool by James K. Peckol

10

Embedded Systems: A Contemporary Design Tool by James K. Peckol

In PAL, only AND gates are programmable where as OR gates are fixed, so there is a limit on producing product terms in sum.

Digital Design 2010

DE2 6

11

Embedded Systems: A Contemporary Design Tool by James K. Peckol

In this case both are programmable, so product terms are re-usable.

12

Embedded Systems: A Contemporary Design Tool by James K. Peckol

This is just the extension of PLA, it contains a flip-flop as a storageelement and typically the output of the flip-flop is fed back to the logic tosupport finite state machine design.

Digital Design 2010

DE2 7

One time: One time: Antifuse (Metal crystalline alloy is created for conduction.

Reprogrammable: Floating Gate.

13

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Floating Gate

14

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Digital Design 2010

DE2 8

15

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Initially, floating gate has no charge so it has no effect on circuitoperation and all transistors are effectively connected, to programthe logic high voltage is applied to the link where no connection isrequired.

16

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Through avalanche injection a negative charge is placed to the floating gateso once you apply a normal 1 logic transistor does not turned on and typicallyit is believed that the charge remains there for 10 years. Ultraviolet light wasused to erase the device, because it becomes conductive under ultravioletlight.

Digital Design 2010

DE2 9

17

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Modern devices are manufactured in a different way using a tunneling effect, the advantage is that one can electronically erase the device.

18

Embedded Systems: A Contemporary Design Tool by James K. Peckol

PLD and CPLD has coarse grain architecture meaning fewer interconnections, where as FPGA has fine grain architecture having a rich inter connection topology. Generic (GAL) Gate Array logic is also a PAL as shown in figure.

Digital Design 2010

DE2 10

19

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Output which contains a flip-flop is called registered output where as the other is obviously called un-registered output.

20

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Contains 6 logic block with each containing 6 macro-cell, interconnection issupported at different levels some may be connected some may be not.

Digital Design 2010

DE2 11

The basic logic blocks are much simpler than the CPLD, but it is fine grain interconnection topology.

21

Embedded Systems: A Contemporary Design Tool by James K. Peckol

22

Embedded Systems: A Contemporary Design Tool by James K. Peckol

Digital Design 2010

DE2 12

23

Embedded Systems: A Contemporary Design Tool by James K. Peckol

24

Output which contains a flip-flop is called registered output .

Digital Design 2010

DE2 13

25

26

Digital Design 2010

DE2 14

27

28

Digital Design 2010

DE2 15

29

tPD : Propogation delaytCO : Propagation delay from the rising edge of the clocktCF : PD from the rising edge of the clock to the macrocell’s outputtSU : Setup time during which signal must be stabletH : Signal at D input must be hold for that period of time

30

It should be remembered that timing parameters in PLDs have longer setup times because ofAND & OR gates, so for critical timing requirements it should be kept in mind forimplementation.

Which gate is faster ?

Digital Design 2010

DE2 16

HDL and HDL and VerilogVerilog are hardware description languages.are hardware description languages.

HDL has its root in PASCAL & ADA HDL has its root in PASCAL & ADA

WhWh V ilV il h it t i Ch it t i C

31

Where as Where as VerilogVerilog has its root in C. has its root in C.

Documentation and Modelling Language

Developed and designed with principles of structured programming in mind (ideas from PASCAL and Ada).

Design is decomposed.Each design element has both well defined interface and precise functional specifications.Concurrency, timing and clocking can be modelled.

32

Logical operations and timing behaviour can be simulated.

VHDL is basically, VHSIC Hardware Description Language, Very High Speed Integrated Circuits HDL.

Digital Design 2010

DE2 17

Entity is declaration of modules input and output. It is like a wrapper hiding h d il f h i i id

33

the details of what is inside.

Where as architecture is more detailed description of the modules internal behavior or structure. This allows a hierarchical design.

34

Digital Design 2010

DE2 18

35

Inside the text file entity and architecture is defined separately.

36

Digital Design 2010

DE2 19

37

38

Digital Design 2010

DE2 20

39

40

Digital Design 2010

DE2 21

41

Before we start going into any language we must understand the overall language in this VHDL d i flcase VHDL design flow.

It is divided into 2 parts, front end and back end.

Typically, large logic designs has the capacity to be divided into blocks of different functionality so one can have a hierarchical structure.

Verification or testing has 2 dimensions, functional verification which is concerned with logical behaviour of the circuit where as timing is concerned with more on gate delays etc, so in this case one test the actual delay verses the estimated delay However in the front end

42

so in this case one test the actual delay verses the estimated delay. However, in the front end it is still limited verification.

In the back end the design is converted into set of primitives which can be assembled into the target technology (PLD/CPLD etc). Fitting is mapping to the technology. Final step is the timing verification due to many things including length of wires etc.

Digital Design 2010

DE2 22

43

For ReferenceFor Reference

44

For ReferenceFor Reference

Digital Design 2010

DE2 23

45

46

Digital Design 2010

DE2 24

47

48

Digital Design 2010

DE2 25

49

A collection of 2 or more D type flip flops with acommon clock is called a register, registers are usedto store collection of related bits. Constraint is that allthe bits gets updated with the same clock.

50

Digital Design 2010

DE2 26

51

52

Digital Design 2010

DE2 27

53

54

If EN_L is asserted then at the rising edge of clock the flip flops are loadedwith the data inputs, otherwise they retain their present values.

Digital Design 2010

DE2 28

55

The reason of having latching the address is that typically address busand data bus are multiplexed in 3 state logic to save pins. ROMCS_L isROM chip select effective low.

56

In this case the higher order bits (12 bits) are used for chip select, where as the20 lower order bits are used for address location of the selected device.

Digital Design 2010

DE2 29

57

It may produce quick chip select for devices, higher order address bits are directlygiven to latching decoder and the address valid is also applied directly to latchingdecoder.

58

Digital Design 2010

DE2 30

59

Most commonly used counter is n bit binary counter. This is a ripple binarycounter as carry is propagated to the next counter, one bit at a time.

T is the toggle flip flop which changes (toggles) its state at each clock pulse.

Ri l t l d i i if it i l i l t th

60

Ripple counters are slow and one can imagine if it is a large ripple counter themost significant output may not be valid because of the propagation delay.

The counter shown is with a Serial Enable, it is called serial counter because thecombinational enable signal propagate serial from LSB to MSB. It can haveproblem if the clock period is two short, it will not have enough time that LSBchange is propagated to MSB

Digital Design 2010

DE2 31

61

The counter with Parallel Enable, which eliminates the problem and this is thefastest binary counter structure

62

Digital Design 2010

DE2 32

63

64

Digital Design 2010

DE2 33

65

If you look at the 4 output signals it can be realised easily that each output isdivided by 2 at each step, so the counter can be used as divide by 2, 4, 8 and 16counter.

66

Digital Design 2010

DE2 34

67

68

Digital Design 2010

DE2 35

69

70

Digital Design 2010

DE2 36

71

72

Digital Design 2010

DE2 37

73

74

Digital Design 2010

DE2 38

75

76

Digital Design 2010

DE2 39

77

78

Digital Design 2010

DE2 40

79

80

Digital Design 2010

DE2 41

81

82

Digital Design 2010

DE2 42

83

84

Digital Design 2010

DE2 43

85

86

Digital Design 2010

DE2 44

87

top related