1、,Digital FundamentalsTenth EditionFloyd,Chapter 11,Summary,Programmable Logic,SPLD:(Simple PLDs)are the earliest type of array logic used for fixed functions and smaller circuits with a limited number of gates.(The PAL and GAL are both SPLDs).CPLD:(Complex PLDs)are multiple SPLDs arrays and inter-co
2、nnection arrays on a single chip.FPLD:(Field Programmable Gate Array)are a more flexible arrangement than CPLDs,with much larger capacity.,Programmable Logic Devices(PLDs)are ICs with a large number of gates and flip flops that can be configured with basic software to perform a specific logic functi
3、on or perform the logic for a complex circuit.Major types of PLDs are:,Summary,Programmable Logic,Advantages to PLDs include,Reduced complexity of circuit boards Lower power requirements Less board space Simpler testing procedures Higher reliability Design flexibility,Summary,PALs and GALs,PALs have
4、 a one time programmable(OTP)array,in which fuses are permanently blown,creating the product terms in an AND array.,All PLDs contain arrays.Two important SPLDs are PALs(Programmable Array Logic)and GALs(Generic Array Logic).A typical array consists of a matrix of conductors connected in rows and col
5、umns to AND gates.,Simplified AND-OR array,X,A A B B,Summary,X,A A B B,What function is represented by the array?,Example,Solution,The function represents an XOR gate.,X=AB+AB,PALs are programmed with a specialized programmer that blows selected internal fuse links.After blowing the fuses,the array
6、represents the Boolean logic expression for the desired circuit.,PALs and GALs,Summary,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 S
7、emiconductor.They are high speed,extremely fast devices and can interface with both 3.3 V or 5 V logic signals.,PALs and GALs,Summary,PALs and GALs can be represented with a simplified diagram.A single line can represent multiple gate inputs.The logic shown is for the XOR gate,given previously.,Inpu
8、t buffer,A A B B,Single line with slash indicating multiple AND gate inputs,Fuse blown,Fuse intact,AB,AB,AB+AB,PALs and GALs,Summary,PALs and GALs have large array logic and include output logic that varies in complexity.The output logic is connected to each OR gate and together is referred to as a
9、macrocell.Two types of PAL/GAL macrocells are shown.For these particular macrocells,the I/O pins can serve as an input or an output.,Tristate control,From AND array,From AND array,I/O,I/O,Programmable fuse link to control output polarity,To AND array,To AND array,PALs and GALs,Summary,The PAL16V8 is
10、 a typical SPLD.There are 16 pins that can be used as inputs and 8 pins that can be used as outputs.I/O pins are counted as both inputs and outputs.,I1,I2,I3,I4,I5,I6,I7,I8,I9,I/O10,O1,I/O1,I/O2,I/O3,I/O4,I/O5,I/O6,O2,Programmable AND array,PLCC Package,PALs and GALs,Summary,CPLDs,A complex programm
11、able logic device(CPLD)has multiple logic array blocks(LABs)that are actually SPLDs on a single IC.LABs are connected via a programmable interconnect array(PIA).Various CPLDs have different structures for these elements.,The PIA is the interconnection between the LABs.Logic is fitted to the CPLD and
12、 routing is determined by a high-level programming language called a hardware description language(HDL).,Summary,CPLDs,The architecture of a CPLD is the way in which the internal elements are configured.A portion of the Altera MAX 7000 series is shown.This structure is typical for CPLDs although den
13、sities,size,speed,and internal factors(macrocells,etc)will vary between manufacturers.,I/O pins,I/O pins,General-purpose inputs,Summary,CPLDs,Macrocells in the Altera MAX 7000 series can generate up to five product terms.For expressions requiring more terms,the output can be expanded as described in
14、 the text.,Summary,Macrocells,In addition to combination logic,some macrocells have registered outputs available(using programmable flip-flops).This allows the CPLD to perform sequential logic.,Summary,FPGAs,A field programmable gate array(FPGA)uses a different architecture than a CPLD.The configura
15、ble logic block(CLB)is the basic element which is replicated many times.,CLBs are arranged in a row and column structure.Within the CLBs are logic modules joined by local interconnects.Generally,the logic modules are composed of a look-up table(LUT),a flip-flop,and a MUX that can be used to bypass t
16、he flip-flop for strictly combinational logic.,Summary,FPGAs,Logic modules can be configured for combinational logic,registered logic,or a combination of both.The global interconnects distribute signals(including the clock)to various CLBs.,FPGAs may also have a hard core portion of logic that is put
17、 in by the manufacturer and cannot be reprogrammed by the user.These FPGAs are useful in commonly used functions such as I/O interfaces.,Summary,Programmable Logic Software,All manufacturers of programmable logic provide software to support their products.The process is illustrated in the flowchart.
18、,The first step is to enter the logic design into a computer.It is done in one of two ways:1)Schematic entry2)Hardware description language(HDL).,Summary,Programmable Logic Software,In schematic entry,the design is drawn on a computer screen by placing components and connecting then with simulated w
19、ires.You do not need to know the details of an HDL.After drawing the schematic,it can be reduced to a single block symbol:,Summary,Programmable Logic Software,In text entry,the design is entered via a hardware description language such as VHDL or Verilog.,VHDL has two key parts:the entity and the ar
20、chitecture.The entity section describes the inputs,outputs,and variables.The architecture section describes the relationships between variables using Boolean equations.The VHDL equation can be understood,even if you do not know VHDL.,For example,the VHDL expression for LED1 is written as,LED1=(D XOR
21、 C)XOR B)XOR A;,Summary,Programmable Logic Software,The complete VHDL program for this component is shown on the following slide.,VHDL allows you to describe components in one program and then use them in another program.,For example,an active-LOW S-R latch can be drawn as,Summary,Programmable Logic
22、 Software,entity S_RLatch is port(A,B:in bit;Q,QNot:inout bit);end entity S_RLatch;architecture Behavior of S_RLatch is begin Q=not A or not QNot;QNot=not B or not Q;end architecture Behavior;,Entity section,Architecture section,Summary,Functional Simulation,After entering the circuit into an HDL(su
23、ch as VHDL),the circuit is tested in a functional simulation.The functional simulation is part of the HDL.You can test the circuit with waveforms to verify the operation.,The following shows the functional test of a counter using a waveform editor:,Example,Summary,Synthesis,After the simulation,the
24、computer program optimizes the logic by eliminating redundant terms and generating a netlist,(a connection list)that is a complete description of the circuit.,Netlist,Summary,Implementation,The computer next“maps”the design from the netlist to fit it to a target device.Data for all potential target
25、devices are in a software library.The computer must account for the I/O pins and fit the logic to the target device.,Summary,Timing Simulation,After implementation,a timing simulation is done that takes into account the specific delays in the target device and verifies that there no problems with th
26、e timing.As in the case of the functional simulation,the waveform editor can be used to review final timing.,If a problem is revealed,it is not too late to correct it before downloading the file.,Summary,Device Programming,The final step is to send the programming file from the computer to the targe
27、t device and test the implementation.,A PLDT-2 prototyping board that has an Altera PLD as the target device is shown.Connections are added to the board from a pulse generator and oscilloscope to test the actual circuit in a laboratory environment.The prototyping board has built-in power supplies,in
28、terfacing,I/O,and more.,Summary,Testing,The traffic light system application was described in several System Application Activities in the text.The photograph is the traffic light logic downloaded to a PLDT-2 board and operating a simulated traffic light.An interface is added to allow for the voltag
29、e and current requirements of the bulbs.,Interface board,PLDT-2 board,Summary,Boundary Scan Logic,Boundary scan that is designed by the manufacturer of programmable devices to provide a means of testing and programming the device without requiring physical access to the internal logic.Programmable d
30、evices that are compliant with a certain standard have internal registers to allow testing of internal interconnections and logic.Test data is supplied and verified.When the circuit is operating,the boundary scan logic is“invisible”.,The following slide shows a boundary scan logic diagram,Summary,Bo
31、undary Scan Logic,Selected Key Terms,PAL GALMacrocellCPLD,A type of one-time programmable SPLD that consists of a programmable array of AND gates that connects to a fixed array of OR gates.,A reprogrammable type of SPLD that that is similar to a PAL except it uses a reprogrammable process technology
32、,such as EEPROM instead of fuses.,Part of a PAL,GAL,or CPLD that generally consists of one OR gate and some associated output logic.,A complex reprogrammable logic device that consists basically of multiple SPLD arrays with programmable interconnections.,Selected Key Terms,FPGA Design flowSchematic
33、entryText entryBoundary scan,Field programmable gate array;a programmable logic device that uses the LUT as the basic logic element and generally employs either the antifuse or SRAM-based process technology,The process or sequence carried out to program a target device.,A method of placing a logic design into software using schematic symbols.,A method of placing a logic design into software using