ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential...

55
ELE432 ADVANCED DIGITAL DESIGN HACETTEPE UNIVERSITY Introduction and FPGA issues

Transcript of ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential...

Page 1: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ELE432ADVANCED DIGITAL DESIGN

HACETTEPE UNIVERSITYIntroduction and FPGA issues

Page 2: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Organization of the course• Course Basics • Group Project and Labs• Course Contents

1. Embedded World2. FPGA Introduction (NOW)3. FPGA Design Flow and VHDL4. Review of Sequential and Combinational Logic5. Lab Introduction – VHDL ve FPGA uzerinde ufak bir combinational deney6. FSM Design and ALU Design7. Lab FSM Design and ALU Design bir sequential deney ve bir ALU ornegi8. Memory Implementations9. Implementation of a small microprocessor Design10. Lab Small Processor design11. Pipelining for advanced microprocessor design12. Using Peripherals and I/O13. Lab interfacing a peripheral (accelerometer, vs. )14. Soft IP core implementation – NIOS II Softcore processor15. Proje

Page 3: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Syllabus• Details are at the web page: http://www.ee.hacettepe.edu.tr/~alkar/ELE432

for updated slides etc.

• Must be enrolled in the student information system @ HU EE• ASSOC. PROF. DR. ALI ZIYA ALKAR• DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING• BEYTEPE ANKARA TURKEY 06800• PHONE: +90 312 2977027

• You can take the course if ->• you are a Senior EE students who have performed well (C1 and above) in ELE237 Digital Design, ELE336 Microprocessor

Programming and Architecture courses. • you can spend extra hours (not necessarily during course times) for Labs and Term Project.

• Why you need to take the course if ->• you would like to expertise yourself in computer architecture and digital design field. • you would like to learn about cutting edge state-of-the-art technology in the digital design.• you are a Senior EE students who have performed well (C1 and above) in ELE237 Digital Design, ELE336 Microprocessor

Programming and Arch

• Grading

• Project (Final exam) %35, Midterm around 8th week. %30, Laboratories (5 or 6 labs) graded %35

Page 4: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Some useful resources

• Digital Design with CPLD Applications and VHDL, 2E Robert Dueck• Digital Design, Principles & Practices, J.F. Wakerly, 4th Edition (Sept 05) Prentice Hall• "High-Speed Digital Design - A handbook of black magic", Johnson, Graham.

Practical guide to designing and building very high speed digital circuits.• "Contemporary Logic Design" Gaetano Boriello, Randy H. Katz, Prentice Hall, 2004• The Design Warrior’s Guide to FPGAs• http://www.altera.com/education/univ/program/unv-overview.html

Page 5: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

DE1-SOC board

The DE1-SoC box includes:•The 6.5 x 5 inch DE1-SoC board with a Cyclone V 5CSEMA5 (896-pin package) FPGA•12V AC/DC adaptor•USB cable•Micro-USB cable•Plexiglas cover for the DE1-SoC board•Quick start guide

DE1-SoC Board InformationFeature DescriptionFPGA •Cyclone V SoC 5CSEMA5F31 with EPCQ256 256-

Mbit serial configuration deviceI/O Interfaces •Built-in USB-Blaster for FPGA configuration

•Line In/Out, Microphone In (24-bit Audio CODEC)•Video Out (VGA 24-bit DAC)•Video In (NTSC/PAL/Multi-format)•Infrared port•10/100/1000 Ethernet•Two Port USB 2.0 Host (Type A)•PS/2 dual mouse and keyboard port•Expansion headers (two 40-pin headers)

Memory •1GB DDR3 SDRAM (HPS), 64 MB SDRAM (FPGA)•Micro SD memory card slot

Displays •Six 7-segment displaysSwitches and LEDs •10 toggle switches

•10 LEDs•Four debounced pushbutton switches

Clocks •50 MHz clock (x4)

Page 6: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

The Booming of Semiconductor Industry

• $300 billion industry• Electronics is everywhere in our lives

• Cell phones, cars, buildings … • Medical, social, e-commerce … • Military, security, aerospace …

Page 7: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Billions of transistors

Page 8: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Technology Timeline

Page 9: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

PLD

Page 10: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

UNPROGRAMMED PROM

Page 11: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Simple Combinational Logic Programming

Page 12: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Programmed PROM

Page 13: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

PLA

Page 14: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

PAL/GAL

Page 15: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

SPLD -> CPLD

Page 16: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ASIC

Page 17: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ASIC – Gate Arrays

Components (Basic Cells) pre fabricated on chip.

Page 18: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Xilinx FPGAs - 18

Gate Array Technology (IBM - 1970s)• Simple logic gates

• combine transistors toimplement combinationaland sequential logic

• Interconnect• wires to connect inputs and

outputs to logic blocks

• I/O blocks• special blocks at periphery

for external connections

• Add wires to make connections• done when chip is fabbed

• “mask-programmable”• construct any circuit

Page 19: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ASIC – Standard Cells

• Nothing pre-fabricated• Libraries are provided by the factory• Reuse of IP• Dynamic Routing while designing

Page 20: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ASIC – Structured ASIC

Tiles of gates/mux’s/flops Overhead in silicon, performance and power compared to Standard Cell

Page 21: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

ASIC vs FPGA

totalcosts

number of units manufactured (volume)

NRE

A

B

1. cost of development, sometimes called non-recurring engineering (NRE)2. cost of manufacture

performance NREsUnitcost TTM

ASIC ASIC ASICFPGA

MICROFPGAMICRO

FPGAMICRO

FPGA

ASICMICRO

Page 22: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

The Gap = FPGA

Cheap & fast but not too complex expensive and slow but complex

Page 23: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

FPGA Variations• Families of FPGA’s differ in:

• physical means of implementing user programmability,• arrangement of interconnection wires, and• the basic functionality of the logic blocks.

Anti-fuse based (ex: Actel)

+ Non-volatile, relatively small– fixed (non-reprogrammable)

Latch-based (Xilinx, Altera, …)

+reconfigurablevolatilerelatively large.

latch

Page 24: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

A simple Logic Block in FPGA

Each PLB can be programmed to perform a certain functionMUX can be used to select either d or output of the LUTFlip flop can be triggered either for L-H or H-L transition

Page 25: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Configuring a LUT

Page 26: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

An Implementation of a LUT

Page 27: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Top-down view of FPGA

Page 28: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor
Page 29: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

FPGA Architecture simplified

Page 30: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Features and Specifications of the FPGAMUX based approaches

Page 31: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Features and Specifications of the FPGALUT based approach and implementation

Page 32: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Features and Specifications of the FPGA

• Slices formed of Logic Cells.

Page 33: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Distributed RAM’s

Assuming a 4-input LUT we can have a 16x1 RAM 4 slices (with each slices having two logic cells) per CLB corresponds to:

Page 34: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Fast Carry Chains

• Each LC is connected within each slice. Slices are connected with each other in CLB’s.

• CLB’s are also connected with carry chains.• With the addition of embedded multipliers in FPGA fabric• Makes it suitable for DSP applications

Page 35: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

RAM ImplementationA lot of apps now need RAM built into the FPGA.

These may be scattered around or mostly in “blocks”.

Depending on the device, such a RAM might be able tohold anywhere from a few thousand to tens of thousands of bits. Furthermore, a device might contain anywhere from tens to hundreds of these RAM blocks, thereby providing a total storage capacity of a few hundred thousand bits all the way up to several million bits.

Page 36: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded multipliers, adders, MACs, etc.

• Some functions, like multipliers, are inherently slow if they are implemented by connecting a large number of programmable logic blocks together. Since these functions are required by a lot of applications, many FPGAs incorporate special hardwired multiplier blocks.

These are typically located in close proximity to the embedded RAM blocks introduced in the previous point because these functions are often used in conjunctionwith each other

Page 37: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

MAC block implementation

Some FPGAs offer dedicated adder blocks. One operation that is very common in DSP-type applications is called a multiply-and-accumulate (MAC)

Page 38: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP?• An IP (intellectual property) core is a block of logic or data that is used in making

a field programmable gate array ( FPGA ) or application-specific integrated circuit ( ASIC ) for a product.

• As essential elements of design reuse , IP cores are part of the growing electronic design automation ( EDA ) industry trend towards repeated use of previously designed components.

• Universal Asynchronous Receiver/Transmitter (UARTs), central processing units(CPUs), Ethernet controllers, and PCI interfaces are all examples of IP cores.

• IP cores fall into one of three categories: hard cores , firm cores , or soft cores . • Hard cores are physical manifestations of the IP design. These are best for plug-and play applications,

and are less portable and flexible than the other two types of cores.• Like the hard cores, firm (sometimes called semi-hard ) cores also carry placement data but are

configurable to various applications. Firm-cores are encrypted black boxes that are integrated into design flow in the same way as library elements

• The most flexible of the three, soft cores exist either as a netlist (a list of the logic gate s and associated interconnections making up an integrated circuit ) or hardware description language ( HDL ) code.

Page 39: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (hard and soft)

• an electronic design can be realized in hardware (using logic gates and registers, etc.) or software (as instructions to be executed on a microprocessor).

Picosecond and nanosecond logic: This has to run insanely fast, which mandates that it beimplemented in hardware (in the FPGA fabric).Microsecond logic: This is reasonably fast and can be implemented either in hardware or software(this type of logic is where you spend the bulk of your time deciding which way to go).Millisecond logic: This is the logic used to implement interfaces such as reading switch positionsand flashing light-emitting diodes (LEDs). It’s a pain slowing the hardware down to implement thissort of function (using huge counters to generate delays, for example). Thus, it’s often better toimplement these tasks as microprocessor code (because processors give you lousy speed—compared to dedicated hardware—but fantastic complexity).

Page 40: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (hard)high-end FPGAs have become available that contain one or more embedded microprocessors, which are typically referred to as microprocessor cores.

A hard microprocessor core is implemented as a dedicated,predefined block. There are two main approaches for integrating such a core into the FPGA. The first is to locate it in a strip (actually called “The Stripe”) to the side of the main FPGA fabric

Page 41: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (hard)

• Hard IP cores ROM, RAM, FIFO• RISC CPU• DSP – Multiplier• Flash memory (boot, user)• PCI, PCIe• JTAG

Page 42: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (hard)

Page 43: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (soft)As opposed to embedding a microprocessor physically into the fabric of the chip, it is possible to configure a group of programmable logic blocks to act as a microprocessor.

Soft cores are simpler (more primitive) and slower than their hard-core counterparts.2 However, they have the advantage that you only need to implement a core if you need it and also that you can instantiate as many cores as you require until you run out of resources in the form of programmable logic blocks.

Page 44: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Embedded processor cores (soft)

• PCI master-target, 32/64 bit, PCIe• Ethernet, UART• μP, μC (incl. old ones), RISC CPUs• Interface to DRAM, SSRAM• DSP: CORDIC, DDS, FFT, Filters• VME, USB, CAN, I2C, SPI, SD card• encryption / decryption

Page 45: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Sources of IP

1. Internally created blocks from previous designs, 2. FPGA vendors,3. Third-party IP providers.

Page 46: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Handcrafted IP

• One scenario is that the IP provider has handcrafted an IP block starting with an RTL description also have used an IP block/core generator application

• In this case, there are several ways in which the end user might purchase and use such a block

Page 47: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP at the unencrypted RTL level

• In certain cases, FPGA designers can purchase IP at the RTL level as blocks of unencrypted source code.

• These blocks can then be integrated into the RTL code for the body of the design (a).

• These are already simulated, synthesized, and verified the IP blocks before handing over the RTL source code).

• This is an expensive option because IP providers typically don’t want anyone to see their RTL source code. The IP provider may charge you an arm and a leg, and you’ll end up signing all sorts of licensing and nondisclosure agreements (NDAs)

Page 48: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP at the unplaced-and-unrouted netlist level

• Perhaps the most common scenario is for FPGA designers to purchase IP at the unplaced-and-unrouted LUT/CLB netlistlevel (b)

• Such netlists are typically provided in encrypted form, either as encrypted EDIF or using some FPGA vendor-specificformat

• One disadvantage is that the FPGA designer doesn’t have any ability to remove unwanted functionality. Another disadvantage is that the IP block is tied to a particular FPGA vendor and device family.

Page 49: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP at the placed-and-routed netlist level

• In certain cases, the FPGA designer may purchase IP at the placed-and-routed LUT/CLB netlist level

• Such netlists are typically provided in encrypted form, either as encrypted EDIF or using some FPGA vendor-specific format

• The reason for having placed-and-routed representations is to obtain the highest levels of performance.

• In some cases the placements will be relative, which means that the locations of all of the LUT, CLB, and other elements forming the block are fixed with respect to each other, but the block as a whole may be positioned anywhere (suitable) within the FPGA.

Page 50: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP core generators

• Another very common practice is for FPGA vendors (sometimes EDA vendors, IP providers, and even small, independent design houses) to provide special tools that act as IP block/core generators.

• These generator applications are parameterized, thereby allows to specify the widths and depths, or both of buses and functional elements.

• First, you get to select from a list of different blocks/cores, and then you get to specify the parameters to be associated with each.

• In the case of some blocks/cores, the generator application may allow you to select from a list of functional elements that you wish to be included or excluded from the final representation. In the case of a communications block, for example, it might be possible to include or exclude certain error-checking logic. Or in the case of a CPU core, it might be possible to omit certain instructions or addressing modes.

• This allows the generator application to create the most efficient IP block/core in terms of its resource requirements and performance.

Page 51: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

IP core generatorsDepending on the origin of the generator application (or sometimes the licensing option you’ve signed up for), its output may be in the form of encrypted or unencrypted RTL source code, an unplaced-and-unrouted netlist, or a placedand- routed netlist.

Page 52: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Clock trees and clock managers• All of the synchronous elements inside an FPGA—for example, the registers configured to act as flip-

flops inside the programmable logic blocks—need to be driven by a clock signal. • Such a clock signal typically originates in the outside world, comes into the FPGA via a special clock

input pin, and is then routed through the device and connected to the appropriate registers.

• This is called a “clock tree” because the main clock signalbranches again and again (the flip-flops can be consider, to bethe “leaves” on the end of the branches). This structure isused to ensure that all of the flip-flops see their versions ofthe clock signal as close together as possible.

• If the clock were distributed as a single long track driving all ofthe flip-flops one after another, then the flip-flop closest tothe clock pin would see the clock signal much sooner than theone at the end of the chain.

• This is referred to as skew, and it can cause all sorts ofproblems

Page 53: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Clock managers

Jitter removal Freq. Synthesis

Phase shifting

Auto-skew correction:

Page 54: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

General-purpose I/O • Each bank can be configured individually to support a particular I/O standard. In addition to allowing the FPGA to work with devices using multiple I/O standards, this allows the FPGA to actually be used to interface between different I/O standards

• today’s FPGAs allow the use of internal terminating resistors whose values can be configured by the user to accommodate different circuit board environments and I/O standards.

• different I/O standards may use signals with voltage levels significantly different from the core voltage, so each bank of general-purpose I/Os can have its own additionalsupply pins.

Page 55: ELE432 - Hacettepe Universityalkar/ELE432/ELE432_1v2.pdfLab FSM Design and ALU Design birsequential deneyve birALU ornegi 8. Memory Implementations 9. Implementation of a small microprocessor

Age of an FPGA

• 1 human year = 15 years in FPGA years