week 2 dr david warddr. david ward hybrid embedded...

28
Week 2 Dr David Ward Dr . David Ward Hybrid Embedded Systems

Upload: others

Post on 01-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Week 2Dr David WardDr. David Ward

Hybrid Embedded Systems

Page 2: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Today’s AgendaDiscuss Homework and LabsReminder: Buff One card numbers neededReview Chapter 5 (textbook)

FPGA basics

Page 3: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Embedded Core Design with FPGAs(Textbook)(Textbook)

Page 4: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

A Simple Circuit (3 input / 4 output)•Simplest way to implement

• minterms using AND gates• Outputs by ORing appropriate minterms

m = minterm

Page 5: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

AND-OR implementation

Not usedused

• No simplification of Karnaugh Map

Block Diagram

Page 6: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

NOR implementation• Complement inputs => AND• Complement outputs => OR

Page 7: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Distributed Gates•Solves routing wires and building gates large inputs (e.g. 16 input = 64K minterms)

• AND plane: wires from inputs must be routed to > 64K NOR gates• OR plane: NOR gates must be large enough for every minterm of the function

to reach their inputs (> 64K minterms)

y = m2,m5, and m6m3 = a b c

to reach their inputs (> 64K minterms)•Distribute gates along rows and columns

-

fused

not fused

Page 8: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Array Programmable•Fixed AND-plane and programmable OR-plane

•Fusable transistors along OR-plane•OR-plane can only be known when the output functions are determined

Page 9: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Memory View (ROM)• Fixed AND-plane acts as a memory decoder• Progammable OR-plane becomes the memory array• One-time programmable logic array

Page 10: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

ROM VariationsPROM: Programmable ROM

one-time programmableEPROM: Erasable PROMEPROM: Erasable PROM

Exposed to ultra-violate light for minutes to eraseEEPROM: Electrically Erasable Programmable ROM

Electrically erasableCan be erased and reprogrammed without remove it from its circuit

Flash Memory: Large EEPROMsPartitioned into smaller fixed sized blocks that can independently be erasedindependently be erased

Page 11: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Programmable Logic Array (PLA)Alt ti ith l fl ibilit d l• Alternative with less flexibility and less area

• Only use the rows that are actually used (m7 not used)• Minimize output functions; implement regained product terms• Must program both AND and OR planes outputs

sharingproductterms

PLA Implementation

Page 12: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Programmable Array Logic (PAL)• ROM: array logic with fixed AND-plane and programmable OR-plane• PLA: array logic with programmable AND-plane and programmable OR-plane• PAL: array logic with programmable AND-plane and fixed OR-plane

• Rationale:Rationale: • Outputs of large functions use a limited number of product terms • All product terms for all function outputs most likely not used• Fixed number of product terms per

( )output (maximum of three)• What if product terms for output is greater

than three?

unused

Page 13: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

PAL ith P d t T E d bilitPAL with Product Term Expandability• Requires feedback from PAL outputs back into the AND-plane• Requires feedback from PAL outputs back into the AND-plane• Feedbacks used in AND-plane like regular inputs of PAL•Allows ORing a subset of product terms of the function

• Further ORed with remaining product terms of function

W= a b c+a b c+a b+a b cW= a·b·c+a·b·c+a·b+a·b·c

01

W = o2

Output feedbacks areOutput feedbacks are fixed not fused

Page 14: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

PAL with Three-State Output Control• Pin (io2) used as output can also be used as input by turning off the three state gate that drives it

• Feedback lines allow for connection of io input into AND plane• Feedback lines allow for connection of io2 input into AND-plane• Three state output controlled by a programmable product term• Three-state inverting buffer can be replaced by XOR gate with three-state

output and fusable input

Page 15: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

PAL with Registered Outputs• io2 capability:

•Registered output with three-state•Two-state output•Registered feedback into logic array•Input into the AND-plane

•Possible enhancements:•By-passing output register (registered or combinatorial output)By passing output register (registered or combinatorial output)

Page 16: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Commerical PartsPAL is trademark of American Micro Devices (AMD)PALs are referred to as PLDs or programmable logic devicesAl PLD d iAltera PLD devices

EPROM based (300 to 900 usable gates)Group of product terms that are Ored together referred to asGroup of product terms that are Ored together referred to as Macrocell

Number of Macrocells varies between 16 to 48Macrocell has a programmable register that can be programmedMacrocell has a programmable register that can be programmed as D,T,JK and SR flip-flop

EP1810 largest devicebl 8 M ll d i f 6 I/O i900 usable gates, 48 Macrocells, and a maximum of 64 I/O pins

Page 17: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Altera Classic Macrocell (EPLD Family)Mode 0: oe : tri-state output buffer controlled by single product term

combinatorial or registered

clk : global clockMode 1: oe: Always enabled

clk: clock signal generated by product term

tri-state

d f db kdirect feedback• registered• combinatorial

input

inversion

Page 18: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Complex Programmable Logic Devices (CPLD)•Extending PLDs using larger AND-plane and more macrocells to implement complex is not economical

•Instead CPLD use multiple PLDs with programmable wiring channels between thePLDs

PLD PLD

PLDs.

PLD PLD

PLDPLD

Page 19: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Altera MAX 7000s CPLDEPM7128S CPLD

EEPROM-based programmable logic device with in-system programmability feature via JTAGsystem programmability feature via JTAGLogic densities: 600 to 5000 usable gates (2500 for EPM7128S)

i l h Al PLD2 to 4 times larger than Altera PLDs8 PLDs referred to as Logic Array Blocks (LABs)

Each LAB has 16 macrocells (total macrocells is 128)( )LABs are linked by wiring channel referred to as Programmable Interconnect Array (PIA)Macrocells include hardware for expanding product terms byMacrocells include hardware for expanding product terms by linking several macrocells

Page 20: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Altera CPLD Architecture

PIA bus:• all dedicated inputs,•I/O pins• macrocell outputsLABs inputs:

6 i l f PIA d f l l i i• 36 signals from PIA used for general logic inputs• Global controls for secondary register functions•Direct input paths from the I/O pins to the register

Page 21: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Field Programmable Gate Array (FPGA)• More advanced programmable logic than CPLD• More advanced programmable logic than CPLD• More flexible then CPLD• Allows more complex logic implementation• Implement circuits >> 1 million gates

FPGA General Structure

Page 22: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Altera FLEX 10K FPGAEPF10K70 FPGA

SRAM-based FPGA that can be programmed via JTAG i t finterfaceLogic densities: 10,000 to 250,000 (118,000 for EPF10K70)40 960 RAM bits w/o reducing logic capacity (18 432 for40,960 RAM bits w/o reducing logic capacity (18,432 for EPF10K70)468 LABs (52 columns x 9 rows)Each LAB has 8 Logic Elements (LEs) => 3,744 LEs358 user I/O pins

Page 23: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

FLEX 10K Block Diagram

•Each group of Les is combined into an LAB•LABs arranged into rows and columns•Each row contains a single Embedded Array Block (EAB)•LABs and EABs are interconnected by the FastTrack Interconnect•IOEs are located at the end of each row and column of the FastTrack Interconnect

Page 24: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Embedded Array Block (EAB)Used to implement memory and specialized logic functionsEAB for memory:

2048 bitsRAM, ROM, dual-port RAM, or FIFO

Dual port RAM has ability to simultaneously read and write different memory cells at different addresses.

EAB for logic function:100 to 600 gates for complex logic functions

Multipliers state machines DSP functionsMultipliers, state machines, DSP functionsImplemented by programming EAB with read-only pattern during configuration, creating a large look-up table

Combinatorial function are implemented by looking up the results,Combinatorial function are implemented by looking up the results, rather than computing them

Page 25: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

FLEX 10K LAB Architecture

•8 LEs•Local•Local interconnect

Page 26: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

FLEX 10K Logic Element (LE)FLEX 10K Logic Element (LE) Structure

•Smallest unit of logic•Smallest unit of logic•Four-input LUT (64K functions)•Programmable flip-flop

•D,T,JK,and SR

High speed data path:•Carry chain supports high-speed counters and adder•Cascade chain implements wide-input functions

Page 27: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

Altera Cyclone FPGASRAM-based FPGALogic densities: up to 20,060 LEsPhase-locked-loops (PLLs) for clockingM4K RAM blocks are true dual-port memory blocks

Page 28: Week 2 Dr David WardDr. David Ward Hybrid Embedded Systemsecee.colorado.edu/~ecen4633/index_files/Lecture2_8312010.pdfAltera FLEX 10K FPGA yEPF10K70 FPGA ySRAM-based FPGA that can

General Outline of a Cyclone Device