eet 1131 unit 4 programmable logic devices read kleitz, chapter 4. homework #4 and lab #4 due next...

26
EET 1131 Unit 4 Programmable Logic Devices Read Kleitz, Chapter 4. Homework #4 and Lab #4 due next week. Quiz next week.

Upload: janice-mccoy

Post on 22-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

EET 1131 Unit 4Programmable Logic Devices

Read Kleitz, Chapter 4. Homework #4 and Lab #4 due next

week. Quiz next week.

Page 2: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Programmable Logic

SPLD (Simple PLD): the earliest type of programmable logic, used for smaller circuits with a limited number of gates.

CPLD (Complex PLD): contain multiple SPLD arrays and inter-connection arrays on a single chip.

FPGA (Field Programmable Gate Array): a more flexible arrangement than CPLDs, with much larger capacity.

Programmable Logic Devices (PLDs) are chips with a large number of gates that can be configured with software to perform a specific logic function. Major types of PLDs are:

Page 3: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Programmable Logic

Advantages of PLDs over fixed-function chips include: Reduced complexity of circuit boards

• Lower power requirements• Less board space• Simpler testing procedures

Higher reliability Design flexibility

Page 4: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Approximate Equivalent Densities

The Lattice GAL22V10 (a popular SPLD) is equivalent to about 500 logic gates.

A typical Altera MAX7000 CPLD is equivalent to about 2500 logic gates.

A typical Altera Cyclone FPGA is equivalent to about 50,000 gates.

Page 5: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Major PLD Manufacturers

Three big names in this field are Xilinx, with 51% of market shareAltera, with 34%Lattice, with less than 10%

Market share numbers retrieved from Wikipedia on 9/10/2014.

Page 6: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Some Product Lines from Altera and Xilinx

AlteraCPLDs: MAXFPGAs: Cyclone, Arria, StratixProgramming software: Quartus II

Xilinx:CPLDs: CoolRunner, XC9500FPGAs: Vertix, Spartan, Kintex, ArtixProgramming software: ISE

Page 7: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

PALs and GALs

PALs have a one-time programmable (OTP) array, in which fuses are permanently blown, creating the product terms in an AND array.

SPLDs contain arrays of gates. Two important kinds of SPLD are PALs (Programmable Array Logic) and GALs (Generic Array Logic). A typical array consists of a matrix of conductors connected in rows and columns to AND gates.

Simplified AND-OR array

X

A A B B

Page 8: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

X

A A B B

What expression is represented by the array?

X = AB + AB

PALs are programmed with a specialized programmer that blows selected internal fuse links. After blowing the fuses, the array represents the Boolean logic expression for the desired circuit.

PALs

Page 9: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

The GAL (Generic Array Logic) is similar to a PAL but can be reprogrammed. For this reason, they are useful for new product development (prototyping) and for training purposes.

A A B B

X

GALs were developed by Lattice Semiconductor.

GALs

Page 10: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

PALs and GALs are often represented by simplified diagrams in which a single line represents multiple gate inputs. The logic shown is for the same circuit shown earlier.

X

X

X

X

2

2

Input buffer A A B BSingle line with slash indicating multiple AND gate inputs

Fuse blown

Fuse intact

AB

AB

AB + AB

PALs and GALs

Page 11: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

The GAL22V10 is a typical SPLD. It has 12 dedicated inputs pins and 10 pins that can be used as inputs or outputs.

Link to datasheet

GAL22V10

Page 12: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

CPLDsA complex programmable logic device (CPLD) has multiple logic array blocks (LABs), each roughly equivalent to an SPLD. LABs are connected via a programmable interconnect array (PIA). Various CPLDs have different structures for these elements.

I/O

PIA

I/O

I/O I/O

I/O I/O

Logic arrayblock (LAB)

SPLD

Logic arrayblock (LAB)

SPLD

Logic arrayblock (LAB)

SPLD

Logic arrayblock (LAB)

SPLD

Logic arrayblock (LAB)

SPLD

Logic arrayblock (LAB)

SPLD

The PIA is the interconnection between the LABs.

Page 13: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

FPGAs compared to CPLDs

CPLDs FPGAs

Based on programmable AND array and fixed OR

array.

Based on look-up table (LUT), which is basically a truth table. (Results

in higher density.)

Both are programmed using the same software, using either schematic entry or text entry.

Page 14: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Programmable Logic Software

All manufacturers of programmable logic provide software to support their products. The process is illustrated in the flowchart.

Design entry

Synthesis

Deviceprogramming(downloading)

TimingsimulationFunctional

simulation

Implementation

SchematicHDL

The first step is to enter the logic design into a computer. It is done in one of two ways:

1) Schematic entry2) Text entry using a

hardware description language (HDL).

Page 15: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Programmable Logic Software

In schematic entry, the design is drawn on a computer screen by placing components and connecting then with simulated wires. After drawing the schematic, it can be reduced to a single block symbol:

Design entry

SchematicHDL

Page 16: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Programmable Logic Software

• In text entry, the design is entered via a hardware description language (HDL).

• Learning an HDL takes longer than learning to do schematic entry. But for complex designs it can provide a more powerful and simpler way to enter designs.

Design entry

SchematicHDL

Page 17: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Some Popular Hardware Description Languages

Open-standard HDLs VHDL (IEEE 1076) Verilog (IEEE 1364)

Proprietary HDLs CUPL ABEL (Advanced Boolean Expression

Language, now owned by Xilinx) AHDL (Altera HDL)

Page 18: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed

A VHDL Sample

One way of writing VHDL programs is to use Boolean-type statements. There are two parts to such a program: the entity and the architecture. The entity portion describes the I/O. The architecture portion describes the logic. Following is a short VHDL program showing the two parts.

entity Example is

port (B,C,D: in bit; X: out bit);

end entity Example;

architecture Behavior of Example isbegin X <= (B or C) and D;

end architecture Behavior;

Page 19: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Simulation

After entering the circuit, the circuit is tested in a simulation. You can test the circuit with waveforms to verify the operation.

The following shows the functional test of a counter using a waveform editor:

Functionalsimulation

Page 20: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Device Programming

The final step is to send the programming file from the computer to the target device and test the implementation.

Deviceprogramming(downloading)

Shown is an Altera DE2-115 board with an Altera FPGA, along with switches, LEDs and many other I/O devices for testing your design after you’ve downloaded it to the FPGA.

Page 21: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Our Software and Equipment

Software: Altera’s Quartus II, version 13.0 sp1. (Free download, so you can install it at home.)

Hardware: Altera Cyclone IV FPGA. Chip is mounted on Altera’s DE2-115

experimenter’s board. (Manual on course website.)

Page 22: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Three Ways of Representing a Digital Circuit

We have at least three ways of describing a digital circuit:1. Diagram showing the logic gates.2. Boolean expression.3. Truth table.

Given any one of these, you should be able to write the other two.

See examples on following slides.

Page 23: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

From Gate Diagram to Boolean Expression or Truth Table

Given a gate diagram, you should be able to:

1. Write a Boolean expression for the diagram.

2. Write the truth table for the diagram.

Example: Write a Boolean expression and the truth table for the following gate diagram.

A

B

CX

Page 24: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

From Boolean Expression to Gate Diagram or Truth Table

Given a Boolean expression, you should be able to:

1. Draw a gate diagram that implements the expression.

2. Write the truth table for the expression.

In many cases your job will be easier if you first use Boolean algebra or a Karnaugh map to simplify the expression. We’ll study these techniques next week.

Example: Draw a gate diagram and write the truth table for

X = AB + ABC

Page 25: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

From Truth Table to Boolean Expression or Gate Diagram

Given a truth table, you should be able to:

1. Write a Boolean expression for that truth table. Here’s how:

a) For each row in the truth table with a 1 in the output column, list the corresponding AND term of the input variables.

b) OR together all of the AND terms from Step a.

2. Draw a gate diagram that implements the truth table.

Example: Write a Boolean expression and draw a gate diagram for the truth table on the next slide.

Page 26: EET 1131 Unit 4 Programmable Logic Devices  Read Kleitz, Chapter 4.  Homework #4 and Lab #4 due next week.  Quiz next week

Example: From Truth Table to Boolean Expression or Gate Diagram

A B C X

0 0 0 00 0 1 0

0 1 0 1

0 1 1 1

1 0 0 01 0 1 1

1 1 0 0

1 1 1 0