Introduction To PLD: Logic Standard Logic
Introduction To PLD: Logic Standard Logic
Logic
<##>
1
Edited by Chu Yu
FPGA
Gate Array
<##>
2
Edited by Chu Yu
FPGA
Standard Cell
<##>
3
Edited by Chu Yu
FPGA
Full Custom
<##>
4
Edited by Chu Yu
FPGA
z Example
Solution A: (Basic Logic Gate) Solution B: (Multiplexer)
F(A, B, C) = Σ(1, 3, 5, 6) I0 I1 I2 I3
00 01 10 11
BC
A 00 01 11 10 A 0 1 0 1
0 0 1 1 0
A 0 1 1 0
1 0 1 0 1
0 1 A A
F=AC+BC+ABC
0 I0
A 1 I1 4×1
C Y F
B A I2 MUX
C F A I3 S1 S2
A
B B
C C
<##>
2
Edited by Chu Yu
FPGA
F(A, B, C) = Σ(1, 3, 5, 6)
Solution C: (ROM) Solution D: (PLD)
A B C
Y0
Y1
A I0
Y2
AC P1
3×8 Y3
B I1
Decoder Y4 P2
BC
Y5
C I2 P3
Y6 ABC
Y7 P4
Fuse
1 3 56
F1 F2
Solution E: (Decoder)
Y0
Y1
A I0
Y2
3×8 Y3
B I1 F
Decoder Y4
Y5
C I2
Y6
Y7
<##>
3
Edited by Chu Yu
FPGA
Gate-level diagram of a PLA Customary schematic for the PLA in the left-side hand
<##>
4
Edited by Chu Yu
FPGA
<##>
5
Edited by Chu Yu
FPGA
<##>
7
Edited by Chu Yu
FPGA
<##>
8
Edited by Chu Yu
FPGA
<##>
9
Edited by Chu Yu
FPGA
<##>
10
Edited by Chu Yu
FPGA
A Three-input LUT
<##>
11
Main Features
Field-programmable
Reprogrammable
In-circuit design verification
Rapid prototyping
Fast time-to-market
No IC-test & NRE cost
H/W emulation instead of S/W simulation
Good software
...
Programmability
Why programmable? Why reprogrammable?
• Logic is implemented by programming the “configuration memory”
• Various configuration memory technologies
– One-Time Programmable: anti-fuse, EPROM
– Reprogrammable: EPROM, EEPROM, Flash & SRAM
configuratio
n
memory
Programmable Combinational
Logic
configuratio LUT
n (Look-Up Table)
memory
preset select
M
PR output select
M
D Q
M
clock select edge control
M
M
M
EN
enable select
CLR
M
clear select 1 M
M
M
switching switching
element element
logic block
switching switching
element element
output
select Vcc
output enable
M M
pull-up
PR control
D Q
M
M
slew-rate
M control PAD
input select
M CLR pull-down
M
control
PR
Q D
M Gnd
CLR M
Typical I/O controls: direction, I/O registers, 3-state, slew rate, ...
Field-Programmability a
b
z
FPGA
CPLD
• You can verify your designs at any time by configuring the FPGA/CPLD devices on
board via the download cable or hardware programmer
download cable
FPGA
or
programmer & adapter CPLD
output display
Rapid Prototyping
Reduce system prototyping time : Design
Feasibility
• You can see the “real” things
– In-circuit design verification Detailed
Design
• Quick delivery instead of IC manufacture
• No test development, no re-spin potential (i.e. no NRE cost)
IC
• Satisfied for educational purposes Manufacture
Fast time-to-market
0. Design, simulation, & compilation Test &
1. Downloading configuration bitstream Debug
Prototyping
APEX
APEX 20K
FLEX APEX 20KE
FLEX 10KE
I/O FLEX 10KA
FLEX 10K
FLEX 6000
MAX FLEX 8000
MAX 7000B
MAX 7000AE
MAX 7000S
MAX 9000A
Usable Gates
Altera Device Families
Altera offers 7 device families
Reconfigurabl Logic Cell Usable/Typica
Device Family Members
e Element Structure l Gates
Family
Classic EPROM SOP 200 ~ 900 EP610, 910, 1810
MAX 5000 EPROM SOP 800 ~ 3,200 EPM5032, 064, 128, 130, 192
MAX 7000/E/S EEPROM SOP 600 ~ 5,000 EPM7032/V/S, 064/S, 096/S,
EPM7128E/S, 160E/S, 192E/S, 256E/S
FLEX 6000(1) SRAM LUT 10,000 ~ 24,000 EPF6016/A, 024A
FLEX 8000A SRAM LUT 2,500 ~ 16,000 EPF8282A, 452A, 636A, 820A, 1188A, 1500A
MAX 9000/A(1) EEPROM SOP 6,000 ~ 12,000 EPM9320/A, 400/A, 480/A, 560/A
FLEX 10K/A/B(1) SRAM LUT 10,000 ~ 100,000 EPF10K10/A, 20/A, 30/A, 40/A, 50/V/A,
EPF10K70/V/A, 100/A, 130/V/A, 250A
Note:
(1) Not all devices are currently available.
(2) Altera plans to ship new MAX7000A family in the near future.
Device Part Numbers
EPM7128STC100-7
• EPM = Family Signature (Erasable Programmable MAX device)
• 7128S = Device type (128 = number of macrocells)
• T = Package type (L = PLCC, T = TQFP...)
• C = Operating temperature (Commercial, Industrial)
• 100 = Pin count (number of pins on the package)
• -7 = Speed Grade in nsec
• Suffix may follow speed grade (for special device features)
Another Example:
• EPM7064SLC44-5
– EPM7064S in a commercial-temp, 44 pin PLCC package with a 5 ns speed
grade
MAX & FLEX Architectures - (1)
Global Global
Clear Clock
MAX architecture
Parallel Logic
Expanders
(from other MCs) Programmable
Register
Register
Bypass
PRn
Product- D Q to I/O
Term Control
Select ENA Block
Matrix CLRn
VCC
Clear
Select
Clock/
Shared Logic Enable
Expanders to PIA
Select
Carry-In Cascade-In
36 Programmable 16 Expander
Interconnect Programmable Register
Product Terms
Signals
DATA1
Look-Up LE Out
DATA2 Carry Cascade PRn
Table D Q
DATA3 Chain Chain
(LUT)
DATA4
CLRn
Clear/
LABCTRL1 Preset
LABCTRL2 Logic
Clock Select
LABCTRL3 FLEX architecture
LABCTRL4
Carry-Out Cascade-Out
MAX & FLEX Architectures - (2)
Choose the appropriate architecture
• Different PLD architectures provide different performance & capacity results for
same application
MAX FLEX
Feature
Architecture Architecture
Basic Building Block
Course Grain Fine Grain
Device Gates LEs FFs Speed Grade Package Options I/O Pins
1 IOE IOE 1
Logic Element
1 IOE IOE 1
Carry-In Cascade-In
Programmable Register
DATA1
Look-Up LE Out
DATA2 Carry Cascade PRn
Table D Q
DATA3 Chain Chain
(LUT)
DATA4
CLRn
Clear/
LABCTRL1 Preset
LABCTRL2 Logic
Clock Select
LABCTRL3
LABCTRL4
Carry-Out Cascade-Out
Carry Chains
Carry-In
A1 LUT Register S1
B1
Carry Chain
LE1
A2 LUT Register S2
B2
Carry Chain
LE2
An LUT Register Sn
Bn
Carry Chain
LEn
Carry Chain
LEn+1
Cascade Chains
AND Cascade Chain OR Cascade Chain
LUT LUT
LEn LEn
FLEX 8000A Logic Array Block
Row FastTrack Interconnect
24
4
Carry-In &
LAB local 8
4 Cascade-In
Interconnect from LAB
(32 channels) on left
2 8 16
4
LAB Control Column-to-Row
Signals 4 LE 1 Interconnect
4 LE 2
4 LE 3 Column FastTrack
LE 4 Interconnect
4
4 LE 5
4 LE 6
4 LE 7
4 LE 8
8 Carry-Out &
2
Cascade-Out
to LAB on right
FLEX 8000A FastTrack
Interconnect
Column FastTrack
(16 channels)
Row FastTrack
(168/216 channels)
LAB
LE
to Row or Column 6
Interconnect
Programmable
Inversion
6
VCC
from Row or Column
Interconnect D Q
GND
CLRn
Slew-Rate
Control
VCC
CLR1/OE0
(OE[4..9])
CLK1/OE1
CLR0
CLK0
OE2
OE3
Logic 576 1,152 1,728 2,304 2,880 3,744 4,992 6,656 12,160
Elements
RAM Bits 6.144 12,288 12,288 16,384 20,480 18,432 24,576 32,768 40,960
Registers 720 1,344 1,968 2,576 3,184 4,096 5,392 7,120 12,624
Max. 134 189 246 189 310 358 406 470 470
User
I/O
FLEX 10K Features
FLEX 10K/A main features...
• SRAM-based devices based on Altera’s FLEX architecture
• Embedded programmable logic family
– Embedded array for implementing RAMs & specialized logic functions
– Logic array for general logic functions
• High density
– 10,000 ~ 100,000 typical gates (logic & RAMs)
– 720 ~ 5,392 registers
– 6,144 ~ 24,576 RAM bits
• Flexible interconnect
– FastTrack continuous routing structure
– Dedicated carry chain & cascade chain
– Up to 6 global clock & 4 global clear signals
FLEX 10K Features - (2)
FLEX 10K main features... (continued)
• Powerful I/O pins
– Individual tri-state control for each pin
– Programmable output slew-rate control
– Open-drain option on each I/O pin
– Peripheral register
• System-level features
– Supports in-circuit reconfiguration (ICR)
– JTAG boundary-scan test circuitry
– PCI-compliant -3 speed grade
– 3.3-V or 5-V I/O pins on devices in PGA, BGA & 208-pin QFP packages
– ClockLock & ClockBoost option(for EPF10K100GC503-3DX device only)
• Flexible package options
– Pin-compatibility with other FLEX 10K devices in the same packages
Flex10KE Family Member
Typical
30,000 50,000 100,000 130,000 200,000
Gates
Logic
1,728 2,880 4,992 6,656 9,984
Elements
1 IOE IOE 1
8 IOE IOE 8
EAB
1 IOE IOE 1
8 IOE IOE 8
EAB
LAB
Logic Element
Embedded
Array
Logic Array Logic Array
Out
Clock
10KE EAB
Data Out
D
Data In D RAM/ROM ENA
ENA 4,096 Bits
Write Address D
ENA
256x16
Write Enable 512x8
D Write EAB contains
ENA Pulse
1024x4 registers for
Circu 2048x2 incoming and
it
outgoing
Read Address D signals
ENA
Read Enable D
ENA
Clock 1
Clock 1 Enable
Clock 2
Clock 2 Enable
FLEX 10K Logic Element
Carry-In Cascade-In
Programmable Register
DATA1
Look-Up
DATA2 Carry Cascade to FastTrack
Table PRn
DATA3 Chain Chain D/T Q Interconnect
(LUT)
DATA4
ENA
CLRn
to LAB Local
Interconnect
LABCTRL1 Clear/
LABCTRL2 Preset
Logic
Device-Wide Clear
Clock Select
LABCTRL3
LABCTRL4
Carry-Out Cascade-Out
FLEX 10K Register Packing
Carry-In Cascade-In
Programmable Register
DATA1
Look-Up
DATA2 Carry Cascade to FastTrack
Table PRn
DATA3 Chain Chain D/T Q Interconnect
(LUT)
DATA4
ENA
CLRn
to LAB Local
Interconnect
LABCTRL1 Clear/
LABCTRL2 Preset
Logic
Device-Wide Clear
Clock Select
LABCTRL3
LABCTRL4
Carry-Out Cascade-Out
FLEX 10K Logic Array Block
Dedicated Inputs & Global Signals
Row FastTrack Interconnect
22/26
6
16 4
LAB local
4
Interconnect Carry-In &
(30/34 channels) Cascade-In
8 24
2
4
LAB Control
Signals 4 LE 1
LE 2 Column-to-Row
4
Interconnect
4 LE 3
4 LE 4 16 Column FastTrack
8
4 LE 5 Interconnect
4 LE 6
4 LE 7
4 LE 8
8
2
Carry-Out &
Cascade-Out
FLEX 10K FastTrack Interconnect
Column FastTrack
(24 channels)
Row FastTrack
(144/216/312 channels)
LAB
LE
12 Programmable
2
Inversion
from Row or Column VCC
Interconnect
D Q
GND
CLK[2..1] ENA Open-Drain Slew-Rate
CLRn
Output Control
CLK[3..2]
VCC
from One Row or ENA[5..0]
Column Channel
VCC
CLRn[1..0]
2 Dedicated
Clock Inputs
D Q
Clock
Clock
Delay
ClockLock
D Q
Clock at Pin
ClockLock Clock
Clock at Register
Effective clock delay is small.
ClockBoost Feature
ClockBoost: increased system bandwidth & reduced area
• ClockBoost feature provides clock multiplication, which increases clock frequencies
by as much as 4 times the incoming clock rate
• You can distribute a low-speed clock on the PCB with ClockBoost
• ClockBoost allows designers to implement time-domain multiplexed applications.
The same functionality is accomplished with fewer logic resources.
– Note:
(1) Up to now, only EPF10K100-3DX devices support ClockLock & ClockBoost features.
(2) All new FLEX 10KA devices will support ClockBoost option.
FLEX 10K Configuration
Configuration schemes & data source
• Refer to Altera’s Application Notes for details
– AN059: Configuring FLEX 10K Devices
– AN039: JTAG Boundary-Scan Testing in Altera Devices
FLEX 10K/A
FLEX 8000A
FLEX 6000
Classic MAX 5000 MAX 7000/E/S MAX 9000/A
Low-Voltage Systems
5.0 V Become More Prevalent
100%
80%
% of
Design
60% 3.3 V
2.5 V
Starts 40%
20%
1.8 V
Source: Altera0%
1992 1993 1994 1995 1996 1997 1998 1999 2000 2001
Interfacing 2.5-V PLD to System
Most Systems Today Incorporate 5.0-V & 3.3-V Devices
2.5-V FLEX 10KE Device Must Interface to System
2.5-V I/O Standards Incompatible with LVTTL/LVCMOS
2.5-V
Device
3.3-V I/O with 2.5-V Logic
2.5 3.3
V V Min. VOH = VCC –
FLEX 0.2
10KE 3.3-V
Device Device
2.5-V Input
3.3-V Input Logic 5.0-V
5.0-V Input Device
GND
GND
GND
GND 2.5-V Output Can
Drive 2.5-V Devices
2.5-V & 5.0-V Tolerant
Input Buffers
Simulating Timing of MultiVolt I/O
Increasing VCCIO Reduces Output Delay
MAX+PLUS® II Accurately Models Timing Effect
Turn on MultiVolt™
I/O Setting when
VCCIO Is Not Equal
to VCCINT
FLEX 10KE MultiVolt I/O
Summary
Separate VCC Pins for Logic & I/O Pins
• Logic Driven by VCCINT
• I/O Pins Driven by VCCIO
Connect VCCINT to 2.5-V Supply
Connect VCCIO to 2.5-V or 3.3-V Supply
Drives Driven by
VCCINT VCCIO
2.5 V 3.3 V 5.0 V 2.5 V 3.3 V 5.0 V
2.5 V 3.3 V Ok Ok Ok Ok Ok Ok
2.5 V 2.5 V Ok Ok Ok Ok
Altera’s Multivolt Offering
Device Technology VccINT VccIO Drives(TTL) Driven by
Notes :
Multi-Volt ; PCI ; Slew slow rate ; JTAG-BST ==> All
Devices
PLL = Phase Locked Loop (ClockBoost)
ISP = In System Programmability
ICR = In Circuit Reconfiguration
OE = Output Enable
FPGA/CPLD Design Flow
Design
Design Detailed
Detailed Functional
Functional
Ideas
Ideas Design
Design Simulation
Simulation
Device
Device Timing
Timing Implementation
Implementation
Programming
Programming Simulation
Simulation (P&R)
(P&R)
FPGA
CPLD tpd=22.1ns
fmax=47.1MHz
Design Ideas
What are the main design considerations?
• Design feasibility?
• Design spec?
• Cost?
• FPGA/CPLD or ASIC?
• Which FPGA/CPLD vendor?
• Which device family?
• Development time?
Detailed Design
Choose the design entry method
• Schematic
– Gate level design
– Intuitive & easy to debug
• HDL (Hardware Description Language), e.g. Verilog & VHDL
– Descriptive & portable
– Easy to modify
• Mixed HDL & schematic
Manage the design hierarchy
• Design partitioning
– Chip partitioning
– Logic partitioning
• Use vendor-supplied libraries or parameterized libraries to reduce design time
• Create & manage user-created libraries (circuits)
Functional Simulation
Preparation for simulation
• Generate simulation patterns
– Waveform entry
– HDL testbench
• Generate simulation netlist
Functional simulation
• To verify the functionality of your design only
Simulation results
• Waveform display
• Text output
Challenge
• Sufficient & efficient test patterns
Design Implementation
a
z
b
FPGA
Implementation flow 01011...
CPLD
Timing analysis
fmax=47.1MHz
Standard EDA
Schematics
Verilog HDL
Standard EDA VHDL
Simulator EDIF
SDF
MAX+PLUS II
Altera’s Fully-Integrated Development System
MAX+PLUS II MAX+PLUS II
Symbol Editor Floorplan Editor
Verilog
MAX+PLUS II MAX+PLUS II
VHDL Graphic Editor Text Editor OrCAD
AHDL
Top- Top-level design files Synopsys,
Level can be .gdf, .tdf, .vhd, Synplicity,
Waveform File .v, .sch, or .edf Mentor Graphics,
etc...
Schematic
.gdf .wdf .tdf .vhd .v .sch .edf
Double click in
Graphic Editor Click on the
MegaWizard
Plug-In Manager
Accessing the MegaWizard
New Custom
Megafunction
Edit Existing
Custom
Megafunction
Available Megafunctions & Output
File
Select a function
from the available
megafunction Select a type
of
output file
Select a
directory
and a output
file
name
Customizing the Megafunction
Files generated by the MegaWizard
Double click in
Graphic Editor
Tri-state emulation
Example: Decoder
Design a decoder with...
• If-Then statements SUBDESIGN priority
• Case statements (
low, middle, high : INPUT;
• Table statements highest_level[1..0] : OUTPUT;
)
• LPM function: LPM_DECODE BEGIN
IF high THEN
highest_level[] = 3;
SUBDESIGN decoder ELSIF middle THEN
( highest_level[] = 2;
code[1..0] : INPUT; ELSIF low THEN
out[3..0] : OUTPUT; highest_level[] = 1;
) ELSE
highest_level[] = 0;
BEGIN END IF;
CASE code[] IS END;
WHEN 0 => out[] = B"0001";
WHEN 1 => out[] = B"0010";
WHEN 2 => out[] = B"0100";
WHEN 3 => out[] = B"1000";
END CASE;
END;
Example: Counter
Create a counter with DFF/DFFE or LPM_COUNTER
SUBDESIGN ahdlcnt
(
clk, load, ena, clr, d[15..0] : INPUT;
q[15..0] : OUTPUT;
)
VARIABLE
count[15..0] : DFF;
BEGIN INCLUDE "lpm_counter.inc"
count[].clk = clk; SUBDESIGN lpm_cnt
count[].clrn = !clr; (
clk, load, ena, clr, d[15..0] : INPUT;
IF load THEN q[15..0] : OUTPUT;
count[].d = d[]; )
ELSIF ena THEN VARIABLE
count[].d = count[].q + 1; my_cntr: lpm_counter WITH (LPM_WIDTH=16);
ELSE BEGIN
count[].d = count[].q; my_cntr.clock = clk;
END IF; my_cntr.aload = load;
my_cntr.cnt_en = ena;
q[] = count[]; my_cntr.aclr = clr;
END; my_cntr.data[] = d[];
q[] = my_cntr.q[];
END;
Example: Multiplier
Design a multiplier with LPM_MULT
CONSTANT WIDTH = 4;
INCLUDE "lpm_mult.inc";
SUBDESIGN tmul3t
(
a[WIDTH-1..0] : INPUT;
b[WIDTH-1..0] : INPUT;
out[2*WIDTH-1..0] : OUTPUT;
)
VARIABLE
mult : lpm_mult WITH (LPM_REPRESENTATION="SIGNED",
LPM_WIDTHA=WIDTH, LPM_WIDTHB=WIDTH,
LPM_WIDTHS=WIDTH, LPM_WIDTHP=WIDTH*2);
BEGIN
mult.dataa[] = a[];
mult.datab[] = b[];
out[] = mult.result[];
END;
Example: Multiplexer
Design a multiplexer with LPM_MUX
FUNCTION lpm_mux (data[LPM_SIZE-1..0][LPM_WIDTH-1..0], sel[LPM_WIDTHS-1..0])
WITH (LPM_WIDTH, LPM_SIZE, LPM_WIDTHS, CASCADE_CHAIN)
RETURNS (result[LPM_WIDTH-1..0]);
SUBDESIGN mux
(
a[3..0], b[3..0], c[3..0], d[3..0] : INPUT;
select[1..0] : INPUT;
result[3..0] : OUTPUT;
)
BEGIN
result[3..0] = lpm_mux (a[3..0], b[3..0], c[3..0], d[3..0], select[1..0])
WITH (LPM_WIDTH=4, LPM_SIZE=4, LPM_WIDTHS=2);
END;
Example: RAM
Design RAM circuit with LPM
INCLUDE "lpm_ram_dq.inc";
SUBDESIGN ram_dq
(
clk : INPUT;
we : INPUT;
ram_data[31..0] : INPUT;
ram_add[7..0] : INPUT;
data_out[31..0] : OUTPUT;
)
BEGIN
END;
Example: Tri-State Buses
Design tri-state buses with TRI
SUBDESIGN tribus
(
ina[7..0], inb[7..0], inc[7..0], oe_a, oe_b, oe_c, clock : INPUT;
out[7..0] : OUTPUT;
)
VARIABLE
flip[7..0] : DFF;
tri_a[7..0], tri_b[7..0], tri_c[7..0] : TRI;
mid[7..0] : TRI_STATE_NODE;
BEGIN
-- Declare the data inputs to the tri-state buses
tri_a[] = ina[]; tri_b[] = inb[]; tri_c[] = inc[];
-- Declare the output enable inputs to the tri-state buses
tri_a[].oe = oe_a; tri_b[].oe = oe_b; tri_c[].oe = oe_c;
-- Connect the outputs of the tri-state buses together
mid[] = tri_a[]; mid[] = tri_b[]; mid[] = tri_c[];
-- Feed the output pins
flip[].d = mid[]; flip[].clk = clock; out[] = flip[].q;
END;
Example: Moore State Machine
Moore state SUBDESIGN moore1
(
machine clk : INPUT;
reset : INPUT;
• The outputs of a state y : INPUT;
machine depend only z : OUTPUT;
)
the the state VARIABLE
ss: MACHINE OF BITS (z)
WITH STATES (s0 = 0, s1 = 1, s2 = 1, s3 = 0);
% current_state =
current_output%
BEGIN
ss.clk = clk;
ss.reset = reset;
TABLE
ss, y => ss;
s0, 0 => s0;
s0, 1 => S2;
s1, 0 => s0;
s1, 1 => s2;
s2, 0 => s2;
s2, 1 => s3;
s3, 0 => s3;
s3, 1 => s1;
END TABLE;
END;
Example: Mealy State Machine
Mealy state machine SUBDESIGN mealy
(
• A state machine with clk : INPUT;
reset : INPUT;
asynchronous output(s) y : INPUT;
z : OUTPUT;
)
VARIABLE
ss: MACHINE WITH STATES (s0, s1, s2, s3);
BEGIN
ss.clk = clk;
ss.reset = reset;
TABLE
ss, y => z, ss;
s0, 0 => 0, s0;
s0, 1 => 1, s1;
s1, 0 => 1, s1;
s1, 1 => 0, s2;
s2, 0 => 0, s2;
s2, 1 => 1, s3;
s3, 0 => 0, s3;
s3, 1 => 1, s0;
END TABLE;
END;
Compiler Input and Output Files
3rd Party EDA
Design Files Mapping Files
(.edf, .sch) (.lmf)
Functional SNF
Files
(.snf)
MAX+PLUS II Compiler
MAX+PLUS II Compiler Netlist Database Logic
Extractor (includes Builder Synthesizer
Design Files all netlist readers Timing SNF
(.gdf, .tdf, .vhd, .v, Functional, Timing, Files
.wdf) or Linked SNF Partitioner Fitter
(.snf)
Assignments Extractor
(.acf) EDIF, VHDL &
Design
Verilog Netlist Assembler
Doctor
Writers
Programming
Files
(.pof, .sof, .jed)
3rd Party EDA
Simulation/Timing Files
(.edo, vo, vho, sdo)
Compiler Input Files
Design files
• MAX+PLUS II
– Graphics file (.gdf), AHDL file (.tdf), VHDL file (.vhd), Verilog (.v), Wavefrom
file (.wdf)
• 3rd Party EDA Tools
– EDIF file (.edf)
• Select Vendor in EDIF Netlist Reader Settings
• Library Mapping File (.lmf) required for vendors not listed
– OrCAD file (.sch)
Assignment and Configuration File (.acf)
• Controls the Compiler’s synthesis and place & route operations
• Automatically generated when user enter assignments
• Automatically updated when user changes assignments or back-annotates
project
Compiler Output Files
Design verification files
• MAX+PLUS II
– Simulation Netlist File (.snf)
• 3rd Party EDA Tools
– VHDL netlist file (.vho)
– EDIF netlist file (.edo)
– Verilog netlist file (.vo)
– Standard Delay Format SDF file (.sdo)
Programming files
• Programmer Object file (.pof)
• SRAM Object file (.sof)
• JEDEC file (.jed)
MAX+PLUS II Compiler Window
Compiler
Output File modules
Message
Processor
Display
control
Highlighted LCELL
LCELL
equation
Floorplan Editor (Read Only)
Last Compilation Floorplan Device View
Color
Legend
definition
Pin name
Pin number
Floorplan Editor (Editable)
Current Assignment view has drag and drop capability
(Note: Auto Device can not be used)
Anywhere
on this
Column
Anywhere
on Device
Anywhere
on this
Row
Project Compilation Summary
Design Simulation/
Files Timing Files
.gdf .snf
.wdf
MAX+PLUS II Compiler
.tdf Programming
Compiler Netlist Database Logic Files
Extractor (includes Builder Synthesizer
.v all netlist readers
.pof
.vhd Functional, Timing,
or Linked SNF Partitioner Fitter
Extractor
EDIF, VHDL &
Design Report
Verilog Netlist Assembler
Doctor Files
Writers
.sch
.rpt
.edf
Design Entry
Design Modification
Project Compilation
Command-
Simulation
Line
Mode Timing Analysis
Device Programming
In-System Verification
System Production
Create Vector Simulation Stimulus
Open Text Editor
Type in vector stimulus
– Clock % units default to ns %
START 0 ;
STOP 1000 ;
INTERVAL 100 ;
INPUTS CLOCK ;
PATTERN
0 1 ; % CLOCK ticks every 100 ns %
– Pattern INPUTS A B ;
PATTERN
0> 0 0
220> 1 0
320> 1 1
570> 0 1
720> 1 1;
– Output OUTPUTS Y1 Y0 ;
PATTERN % check output at every Clock pulse %
=XX
=00
=01
=10
= 1 1;
Save the Vector Stimulus File
Save the vector stimulus file with .vec extension
– You must change the .vec extension since MAX+PLUS
II defaults to .tdf extension for text files
Change the
extension to .vec
Simulation Input & Output Files
Specify simulation input and output
files File Menu
• You can specify SCF or VEC file as the source of
simulation input vectors
Menu: File -> Inputs/Outputs...
– VEC file will be converted into SCF file by
Simulator
– You can specify a history(*.hst) or log(*.log)
file to record simulation commands and
outputs
• During and after simulation, the simulation results
are written to the SCF file, you can create
another ASCII-format table file
Menu: File -> Create Table File...
– TBL file format is a subset of VEC file
format
– A TBL file can be specified as a vector input
file for another simulation
Memory Initialization
Initialize Menu
Give memory initialization values for functional simulation
• To generate memory initialization values in Simulator
Menu: Initialize -> Initialize Memory...
• You can save the data in the Initialize Memory dialog box to a Hexadecimal File
(*.hex) or Memory Initialization File (*.mif) for future use
Menu: Initialize -> Initialize Memory... -> Export File...
– An MIF is used as an input file for memory initialization in the Compiler and
Simulator. You can also use a Hexadecimal File (.hex) to provide memory
initialization data.
• You can load the memory initialization data for a memory block that is saved in a
HEX or MIF file
Menu: Initialize -> Initialize Memory... -> Import File...
Initialize Memory Window
Memory Initialization File Formats
WIDTH = 16; :020000000000fe
DEPTH = 256; :020001000000fd
:020002000000fc
ADDRESS_RADIX = HEX; :020003000000fb
DATA_RADIX = HEX; :020004000000fa
:020005000000f9
CONTENT BEGIN :020006000000f8
0 : 0000; :020007000000f7
1 : 0000; :02000800fffff8
2 : 0000; :02000900fffff7
3 : 0000; :02000a00fffff6
4 : 0000; :02000b00fffff5
5 : 0000; :02000c00fffff4
6 : 0000; :02000d00fffff3
7 : 0000; :02000e00fffff2
8 : ffff; :02000f00fffff1
9 : ffff; ...
a : ffff; :0200ff000000ff
b : ffff; :00000001ff
c : ffff;
d : ffff; HEX file example
e : ffff;
f : ffff;
...
ff : 0000;
END;
A
B
D Q D Q
C
Run Delay Matrix Analysis
Select Delay Matrix Analysis and click on Start
button
Matrix shows all paths, longest path, or shortest
path depending on Time Restrictions option
selected
Use List Path to analyze the path of delays
Setup/Hold Matrix Analysis
Setup/Hold Matrix calculates setup & hold times for device
flip-flops
tsetup, thold
Comb D Q
Setup
• tsetup = tdata - tclock + tsetup
Hold
• thold = tclock - tdata + thold
Run Setup/Hold Matrix Analysis
Click on Start button
Setup/Hold times are displayed with respect to the clocks
Saving Timing Analysis Results
Save the current Timing Analyzer results to a TAO File
• Timing Analyzer can save the information in the current timing analysis display to an
ASCII-format Timing Analyzer Output file (*.tao)
Menu: File -> Save Analysis As...
Destination
y3 y4 y5
----------------- ----------------- -----------------
S aclr . . .
o clk 10.8ns 12.7ns 11.7ns
u xin1 . . .
r xin2 . . .
c xin3 . . .
e xin4 . . .
xin5 . . .
xin6 . . .
xin7 . . .
xin8 . . .
Listing & Locating Delay Paths
To trace delay paths or clock paths in the design file
• After you run a timing analysis, you can list selected signal paths and locate them in
the original design file(s) for the project
• Select the matrix cell or clock, click List Paths
• Select one of the delay paths shown in Message Processor, and click Locate to
trace the path in the source file(s)
Listing & Locating Paths