SlideShare a Scribd company logo
1 of 36
Download to read offline
FPGA Structure
Xilinx ASMBL Architecture
Design Flow
• Synthesis: HDL to FPGA primitives
• Translate: FPGA Primitives to FPGA Slice
components
• Map: Packing of Slice components into Slices,
placement of Slices on fabric
• Route: connecting Slices
• Bitstream generation: generating the required
configuration bits to load into the FPGA
Configurable Logic Blocks
Slice LUTs
• 1 CLB = 2 Slices
• 1 Slice = 4 “LUT Modules”, 2 MUXF7, 1 MUXF8
• A LUT Module contains: 1 LUT6, 1 MUXCY, 1 XORCY, 2 FFs
Slice LUTs
• 1 CLB = 2 Slices
• 1 Slice = 4 “LUT Modules”, 2 MUXF7, 1 MUXF8
• A LUT Module contrains: 1 LUT6, 1 MUXCY, 1 XORCY, 2 FFs
Slice LUTs
• LUTs = Multiplexers
– Data Inputs from the FPGA configuration bits
– Selection inputs from user logic
– For N-input LUT, 2N configuration bits
A B A|B
0 0 0
0 1 0
1 0 0
1 1 1
MUX
4:1
1 0 0 0
A
B
A|B
Slice LUTs
• Number of LUT inputs is architecture
dependent:
– Xilinx Virtex 4 and earlier: 4-input LUTs (LUT4), 2
LUTs per Slice
– Xilinx Virtex 5 and later: 6-input LUTs (LUT6), 4
LUTs per Slice
– Xilinx Virtex 6 and 7-Series: 6-input LUTs,
configurable as two shared-input 5-input LUTs
– Altera: 8-input LUTs (ALM), configurable as
combinations of smaller LUTs
Area and Delay vs. LUT Size
• LUTs have constant delay, regardless of
implemented function
• Example:
– LUT4 architecture (Virtex4)
– O = I1 & I2 & I3 & I4 => 1 LUT, 0.43 ns
– O = I1 & I2 & I3 & I4 & I5 & I6 => 2 LUTs, 0.93 ns
• As a general rule: LUT delays are small, routing
delays can be large
Exercise: Multiplexers
• Implementation of 2:1, 4:1, 8:1 multiplexers
on Virtex-4 architecture
• Advanced multiplexing techniques: XAPP522
Slice Multiplexer Resources
• A slice contains multiplexers that mux
between LUT outputs (MUXFx)
• Virtex-4: MUXF5
• Virtex-5 and later: MUXF7, MUXF8
Logic optimization using MUXFx
• Example:
– LUT4 architecture (Virtex4)
– O = I1 & I2 & I3 & I4 & I5 => 1 LUT, 1 MUXF5, 0.72ns
• Use of MUXFx reduces LUT usage and routing
requirements
• Local (in-Slice) routing -> more predictable
performance
Logic optimization using MUXFx
Multiplexers vs First Index Decoders
• Example code:
always @*
if(A)
Out = E | F;
else if(B)
Out = E & F;
else if(C)
Out = E ^ F;
else if(D)
Out = ~E | F;
else Out = 1'bx;
Multiplexers vs First Index Decoders
Multiplexers vs. First Index Decoders
• The synthesis tool cannot always detect properties of the inputs of logic
functions
– Inputs are from pins
– Inputs are from memories (Block or Distributed)
• Unconstrained version, for when we know {A,B,C,D} is one-hot:
assign sel1 = ~(A | B);
assign sel0 = B | D;
always @*
case({sel1,sel0})
2'b00: Out = E | F;
2'b01: Out = E & F;
2'b10: Out = E ^ F;
2'b11: Out = ~E | F;
endcase
Multiplexers vs. First Index Decoders
Exercise: Adder
• LUT6 Architecture (7-Series)
• Implement 4-bit adder optimally (carry-chain
versus carry look-ahead)
Slice Arithmetic Resources
• Carry-chain adder implementation
Slice Arithmetic Resources
• Slice primitives: MUXCY, XORCY
Selecting Adder Type
• Analysis of various adder types
(Design and Performance Analysis of Various Adders using Verilog; M. SaiKumar, P. Samundiswary)
• Ripple-carry (RCA) has hardware support in FPGA
• Carry-save (CSA) / Carry-look-ahead (CLA) are
first choice for VLSI
• Assignment: compare RCA/CSA based Popcount
– Implement Verilog for 16b input
– Synthesize/Map
– Record delay and LUT/Slice counts
Adder Inference
• Synthesis tools will infer RCA
• Multi-input adder implementation may be
controlled through parentheses:
– E = (A+B)+(C+D) results in tree
– E= (A+(B+(C+D))) results in cascade
Optimization Example
• Implementing an “increment” instruction in a
processor ALU in Virtex-4
• Behavioral description in ISE 14.2 yields bad
results for the following code:
always @*
if(sel) sum = a+b+carry_in;
else sum = a+4'd1+carry_in;
• 12 Slices, 1.5ns delay. Can we do better?
Optimization Results
• Using LUT3s instead of LUT2s in the adder
structure, we can hardcode a multiplexer that
selects between operand b and constant “1”
before XOR-ing with operand a
• The rest of the structure is identical (MUXCY,
XORCY) and built with primitive instantiation
• Results: 2 Slices, 1ns delay
Slice Registers
• Latch/FlipFlop primitives available within the
Slice
• Available control signals: Set/Reset, Clock
Enable, Clock
• Asynchronous/Synchronous Set/Reset
– Set/Reset typically refers to synchronous
– Clear/Preset refers to asynchronous
• Primitives: FD{R/S/RS/C/P}{E}
Slice Registers
Synchronous Asynchronous
Set always @(posedge clock)
if(set) q<=1;
else q<=d;
always @(posedge clock or
posedge set)
if(set) q<=1;
else q<=d;
Reset always @(posedge clock)
if(reset) q<=0;
else q<=d;
always @(posedge clock or
negedge reset)
if(set) q<=0;
else q<=d;
Using Clock Enables
• Control signal priority determines
implementation of the Flip-Flop primitive
Example 1: Set before CE Example 2: CE before Set
always @(posedge clk)
if(set) q<=1;
else if(ce) q<=d;
always @(posedge clk)
if(ce)
if(set) q<=1;
else q<=d;
Using Clock Enables
• Example 1 Results: FDSE
• Example 2 Results: FDE + LUT
Using Clock Enables
• Flip-Flop primitives are architecture
dependent
• Example:
always @(posedge clk)
if(reset) q<=0;
else if(set) q<=1;
else if(ce) q <= d;
Using Clock Enables
• Spartan-3: FDRSE
• Virtex-6: LUT+FDR
Using Clock Enables
• Another example:
always @(posedge clk)
if(set) q<=1;
else if(reset) q<=0;
else if(ce) q <= d;
Using Clock Enables
Async vs Sync Resets
• Asynchronous resets
– Act immediately
– Are clock-independent
– Induce timing hazards
• Synchronous resets
– Ports can be used to minimize logic
– Predictable
Global Resets
• We use global resets to:
– Get the circuit into a known state at power-up
– Initialize simulations properly (!)
• Global resets have to be routed to S/R pins of
the Flip-Flop
• FPGAs include a dedicated global set-reset net
for post-configuration initialization (GSR)
Using the GSR
STARTUP_VIRTEX6 #(
.PROG_USR("FALSE") // Activate program event security feature
)
STARTUP_VIRTEX6_inst (
.CFGCLK(CFGCLK), // 1-bit Configuration main clock output
.CFGMCLK(CFGMCLK), // 1-bit Configuration internal oscillator clock output
.DINSPI(DINSPI), // 1-bit DIN SPI PROM access output
.EOS(EOS), // 1-bit Active high output signal indicating the End Of Configuration.
.PREQ(PREQ), // 1-bit PROGRAM request to fabric output
.TCKSPI(TCKSPI), // 1-bit TCK configuration pin access output
.CLK(CLK), // 1-bit User start-up clock input
.GSR(GSR), // 1-bit Global Set/Reset input (GSR cannot be used for the port name)
.GTS(GTS), // 1-bit Global 3-state input (GTS cannot be used for the port name)
.KEYCLEARB(KEYCLEARB), // 1-bit Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM)
.PACK(PACK), // 1-bit PROGRAM acknowledge input
.USRCCLKO(USRCCLKO), // 1-bit User CCLK input
.USRCCLKTS(USRCCLKTS), // 1-bit User CCLK 3-state enable input
.USRDONEO(USRDONEO), // 1-bit User DONE pin output control
.USRDONETS(USRDONETS) // 1-bit User DONE 3-state enable output
);
Avoid Latches!
• Latches are most commonly generated by
unterminated control sequences
– Missing “else” statements in “if” clauses
– Missing “default” statements in “case” clauses
• To avoid over-constraining the logic, use “x”
values in your “else” and “default” statements

More Related Content

Similar to FPGA Structure and Design Flow Guide

CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)
CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)
CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)byteLAKE
 
NIOS II Processor.ppt
NIOS II Processor.pptNIOS II Processor.ppt
NIOS II Processor.pptAtef46
 
Pyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNPyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNnvirters
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CanSecWest
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Fpga &;cpld(by alok singh)
Fpga &;cpld(by alok singh)Fpga &;cpld(by alok singh)
Fpga &;cpld(by alok singh)Alok Singh
 
fccm2015-jain-presentation
fccm2015-jain-presentationfccm2015-jain-presentation
fccm2015-jain-presentationAbhishek Jain
 
Microblaze Performance Monitoring Engine.ppt
Microblaze Performance Monitoring Engine.pptMicroblaze Performance Monitoring Engine.ppt
Microblaze Performance Monitoring Engine.pptqhicham
 
A whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizerA whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizerNikita Popov
 
Routing Protocol EIGRP
Routing Protocol EIGRPRouting Protocol EIGRP
Routing Protocol EIGRPDmitry Figol
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareC4Media
 
Routing basics/CEF
Routing basics/CEFRouting basics/CEF
Routing basics/CEFDmitry Figol
 

Similar to FPGA Structure and Design Flow Guide (20)

CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)
CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)
CFD acceleration with FPGA (byteLAKE's presentation from PPAM 2019)
 
NIOS II Processor.ppt
NIOS II Processor.pptNIOS II Processor.ppt
NIOS II Processor.ppt
 
Fpga & VHDL
Fpga & VHDLFpga & VHDL
Fpga & VHDL
 
Pyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNPyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDN
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
13 superscalar
13 superscalar13 superscalar
13 superscalar
 
Fpga &;cpld(by alok singh)
Fpga &;cpld(by alok singh)Fpga &;cpld(by alok singh)
Fpga &;cpld(by alok singh)
 
13_Superscalar.ppt
13_Superscalar.ppt13_Superscalar.ppt
13_Superscalar.ppt
 
Brkdct 3101
Brkdct 3101Brkdct 3101
Brkdct 3101
 
fccm2015-jain-presentation
fccm2015-jain-presentationfccm2015-jain-presentation
fccm2015-jain-presentation
 
Microblaze Performance Monitoring Engine.ppt
Microblaze Performance Monitoring Engine.pptMicroblaze Performance Monitoring Engine.ppt
Microblaze Performance Monitoring Engine.ppt
 
A whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizerA whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizer
 
FPGA
FPGAFPGA
FPGA
 
Pld dp
Pld dpPld dp
Pld dp
 
Routing Protocol EIGRP
Routing Protocol EIGRPRouting Protocol EIGRP
Routing Protocol EIGRP
 
Onnc intro
Onnc introOnnc intro
Onnc intro
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 
Routing basics/CEF
Routing basics/CEFRouting basics/CEF
Routing basics/CEF
 
Lec05
Lec05Lec05
Lec05
 

More from wafawafa52

515878259-Node-Group-Synch-Workshop.pptx
515878259-Node-Group-Synch-Workshop.pptx515878259-Node-Group-Synch-Workshop.pptx
515878259-Node-Group-Synch-Workshop.pptxwafawafa52
 
385288768-TD-Training-Modules-Mobilis.pptx
385288768-TD-Training-Modules-Mobilis.pptx385288768-TD-Training-Modules-Mobilis.pptx
385288768-TD-Training-Modules-Mobilis.pptxwafawafa52
 
Ericsson Microwave Products Overview.ppt
Ericsson Microwave Products Overview.pptEricsson Microwave Products Overview.ppt
Ericsson Microwave Products Overview.pptwafawafa52
 
BaseBand-6630-Moshell-Commands .pdf
BaseBand-6630-Moshell-Commands      .pdfBaseBand-6630-Moshell-Commands      .pdf
BaseBand-6630-Moshell-Commands .pdfwafawafa52
 
45555555555-4G-Training .pptx
45555555555-4G-Training            .pptx45555555555-4G-Training            .pptx
45555555555-4G-Training .pptxwafawafa52
 
5-LTE-IP-Troubleshooting .ppt
5-LTE-IP-Troubleshooting            .ppt5-LTE-IP-Troubleshooting            .ppt
5-LTE-IP-Troubleshooting .pptwafawafa52
 
Sharing-Knowledge-OAM-3G-Ericsson .ppt
Sharing-Knowledge-OAM-3G-Ericsson   .pptSharing-Knowledge-OAM-3G-Ericsson   .ppt
Sharing-Knowledge-OAM-3G-Ericsson .pptwafawafa52
 
LTE-BASICS-ppt .ppt
LTE-BASICS-ppt                      .pptLTE-BASICS-ppt                      .ppt
LTE-BASICS-ppt .pptwafawafa52
 
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdf
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdfran-introicbasictroubleshooting3-230122164831-426c58cd.pdf
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdfwafawafa52
 
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdf
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdftoaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdf
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdfwafawafa52
 
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...wafawafa52
 
DWDM-Presentation.pdf
DWDM-Presentation.pdfDWDM-Presentation.pdf
DWDM-Presentation.pdfwafawafa52
 
Verilog HDL Design Examples ( PDFDrive ).pdf
Verilog HDL Design Examples ( PDFDrive ).pdfVerilog HDL Design Examples ( PDFDrive ).pdf
Verilog HDL Design Examples ( PDFDrive ).pdfwafawafa52
 
VHDL summary.pdf
VHDL summary.pdfVHDL summary.pdf
VHDL summary.pdfwafawafa52
 
ROM PAL PLA.ppt
ROM PAL PLA.pptROM PAL PLA.ppt
ROM PAL PLA.pptwafawafa52
 
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptxLecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptxwafawafa52
 
REVISION SYN3.pptx
REVISION SYN3.pptxREVISION SYN3.pptx
REVISION SYN3.pptxwafawafa52
 
INSTRUMENTATION.pptx
INSTRUMENTATION.pptxINSTRUMENTATION.pptx
INSTRUMENTATION.pptxwafawafa52
 
cnacan (2).ppt
cnacan (2).pptcnacan (2).ppt
cnacan (2).pptwafawafa52
 

More from wafawafa52 (20)

515878259-Node-Group-Synch-Workshop.pptx
515878259-Node-Group-Synch-Workshop.pptx515878259-Node-Group-Synch-Workshop.pptx
515878259-Node-Group-Synch-Workshop.pptx
 
385288768-TD-Training-Modules-Mobilis.pptx
385288768-TD-Training-Modules-Mobilis.pptx385288768-TD-Training-Modules-Mobilis.pptx
385288768-TD-Training-Modules-Mobilis.pptx
 
Ericsson Microwave Products Overview.ppt
Ericsson Microwave Products Overview.pptEricsson Microwave Products Overview.ppt
Ericsson Microwave Products Overview.ppt
 
BaseBand-6630-Moshell-Commands .pdf
BaseBand-6630-Moshell-Commands      .pdfBaseBand-6630-Moshell-Commands      .pdf
BaseBand-6630-Moshell-Commands .pdf
 
45555555555-4G-Training .pptx
45555555555-4G-Training            .pptx45555555555-4G-Training            .pptx
45555555555-4G-Training .pptx
 
5-LTE-IP-Troubleshooting .ppt
5-LTE-IP-Troubleshooting            .ppt5-LTE-IP-Troubleshooting            .ppt
5-LTE-IP-Troubleshooting .ppt
 
Sharing-Knowledge-OAM-3G-Ericsson .ppt
Sharing-Knowledge-OAM-3G-Ericsson   .pptSharing-Knowledge-OAM-3G-Ericsson   .ppt
Sharing-Knowledge-OAM-3G-Ericsson .ppt
 
LTE-BASICS-ppt .ppt
LTE-BASICS-ppt                      .pptLTE-BASICS-ppt                      .ppt
LTE-BASICS-ppt .ppt
 
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdf
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdfran-introicbasictroubleshooting3-230122164831-426c58cd.pdf
ran-introicbasictroubleshooting3-230122164831-426c58cd.pdf
 
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdf
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdftoaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdf
toaz.info-5g-solution-overview-pr_306866f43cebfb285586e3dd90989b89.pdf
 
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...
mop-baseband-integration-xl-project-pa-1docxdocx-pr_299cefaa0fd3e32dd950c7218...
 
DWDM-Presentation.pdf
DWDM-Presentation.pdfDWDM-Presentation.pdf
DWDM-Presentation.pdf
 
Verilog HDL Design Examples ( PDFDrive ).pdf
Verilog HDL Design Examples ( PDFDrive ).pdfVerilog HDL Design Examples ( PDFDrive ).pdf
Verilog HDL Design Examples ( PDFDrive ).pdf
 
VHDL summary.pdf
VHDL summary.pdfVHDL summary.pdf
VHDL summary.pdf
 
ROM PAL PLA.ppt
ROM PAL PLA.pptROM PAL PLA.ppt
ROM PAL PLA.ppt
 
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptxLecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
 
exam.ppt
exam.pptexam.ppt
exam.ppt
 
REVISION SYN3.pptx
REVISION SYN3.pptxREVISION SYN3.pptx
REVISION SYN3.pptx
 
INSTRUMENTATION.pptx
INSTRUMENTATION.pptxINSTRUMENTATION.pptx
INSTRUMENTATION.pptx
 
cnacan (2).ppt
cnacan (2).pptcnacan (2).ppt
cnacan (2).ppt
 

Recently uploaded

microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

FPGA Structure and Design Flow Guide

  • 3. Design Flow • Synthesis: HDL to FPGA primitives • Translate: FPGA Primitives to FPGA Slice components • Map: Packing of Slice components into Slices, placement of Slices on fabric • Route: connecting Slices • Bitstream generation: generating the required configuration bits to load into the FPGA
  • 5. Slice LUTs • 1 CLB = 2 Slices • 1 Slice = 4 “LUT Modules”, 2 MUXF7, 1 MUXF8 • A LUT Module contains: 1 LUT6, 1 MUXCY, 1 XORCY, 2 FFs
  • 6. Slice LUTs • 1 CLB = 2 Slices • 1 Slice = 4 “LUT Modules”, 2 MUXF7, 1 MUXF8 • A LUT Module contrains: 1 LUT6, 1 MUXCY, 1 XORCY, 2 FFs
  • 7. Slice LUTs • LUTs = Multiplexers – Data Inputs from the FPGA configuration bits – Selection inputs from user logic – For N-input LUT, 2N configuration bits A B A|B 0 0 0 0 1 0 1 0 0 1 1 1 MUX 4:1 1 0 0 0 A B A|B
  • 8. Slice LUTs • Number of LUT inputs is architecture dependent: – Xilinx Virtex 4 and earlier: 4-input LUTs (LUT4), 2 LUTs per Slice – Xilinx Virtex 5 and later: 6-input LUTs (LUT6), 4 LUTs per Slice – Xilinx Virtex 6 and 7-Series: 6-input LUTs, configurable as two shared-input 5-input LUTs – Altera: 8-input LUTs (ALM), configurable as combinations of smaller LUTs
  • 9. Area and Delay vs. LUT Size • LUTs have constant delay, regardless of implemented function • Example: – LUT4 architecture (Virtex4) – O = I1 & I2 & I3 & I4 => 1 LUT, 0.43 ns – O = I1 & I2 & I3 & I4 & I5 & I6 => 2 LUTs, 0.93 ns • As a general rule: LUT delays are small, routing delays can be large
  • 10. Exercise: Multiplexers • Implementation of 2:1, 4:1, 8:1 multiplexers on Virtex-4 architecture • Advanced multiplexing techniques: XAPP522
  • 11. Slice Multiplexer Resources • A slice contains multiplexers that mux between LUT outputs (MUXFx) • Virtex-4: MUXF5 • Virtex-5 and later: MUXF7, MUXF8
  • 12. Logic optimization using MUXFx • Example: – LUT4 architecture (Virtex4) – O = I1 & I2 & I3 & I4 & I5 => 1 LUT, 1 MUXF5, 0.72ns • Use of MUXFx reduces LUT usage and routing requirements • Local (in-Slice) routing -> more predictable performance
  • 14. Multiplexers vs First Index Decoders • Example code: always @* if(A) Out = E | F; else if(B) Out = E & F; else if(C) Out = E ^ F; else if(D) Out = ~E | F; else Out = 1'bx;
  • 15. Multiplexers vs First Index Decoders
  • 16. Multiplexers vs. First Index Decoders • The synthesis tool cannot always detect properties of the inputs of logic functions – Inputs are from pins – Inputs are from memories (Block or Distributed) • Unconstrained version, for when we know {A,B,C,D} is one-hot: assign sel1 = ~(A | B); assign sel0 = B | D; always @* case({sel1,sel0}) 2'b00: Out = E | F; 2'b01: Out = E & F; 2'b10: Out = E ^ F; 2'b11: Out = ~E | F; endcase
  • 17. Multiplexers vs. First Index Decoders
  • 18. Exercise: Adder • LUT6 Architecture (7-Series) • Implement 4-bit adder optimally (carry-chain versus carry look-ahead)
  • 19. Slice Arithmetic Resources • Carry-chain adder implementation
  • 20. Slice Arithmetic Resources • Slice primitives: MUXCY, XORCY
  • 21. Selecting Adder Type • Analysis of various adder types (Design and Performance Analysis of Various Adders using Verilog; M. SaiKumar, P. Samundiswary) • Ripple-carry (RCA) has hardware support in FPGA • Carry-save (CSA) / Carry-look-ahead (CLA) are first choice for VLSI • Assignment: compare RCA/CSA based Popcount – Implement Verilog for 16b input – Synthesize/Map – Record delay and LUT/Slice counts
  • 22. Adder Inference • Synthesis tools will infer RCA • Multi-input adder implementation may be controlled through parentheses: – E = (A+B)+(C+D) results in tree – E= (A+(B+(C+D))) results in cascade
  • 23. Optimization Example • Implementing an “increment” instruction in a processor ALU in Virtex-4 • Behavioral description in ISE 14.2 yields bad results for the following code: always @* if(sel) sum = a+b+carry_in; else sum = a+4'd1+carry_in; • 12 Slices, 1.5ns delay. Can we do better?
  • 24. Optimization Results • Using LUT3s instead of LUT2s in the adder structure, we can hardcode a multiplexer that selects between operand b and constant “1” before XOR-ing with operand a • The rest of the structure is identical (MUXCY, XORCY) and built with primitive instantiation • Results: 2 Slices, 1ns delay
  • 25. Slice Registers • Latch/FlipFlop primitives available within the Slice • Available control signals: Set/Reset, Clock Enable, Clock • Asynchronous/Synchronous Set/Reset – Set/Reset typically refers to synchronous – Clear/Preset refers to asynchronous • Primitives: FD{R/S/RS/C/P}{E}
  • 26. Slice Registers Synchronous Asynchronous Set always @(posedge clock) if(set) q<=1; else q<=d; always @(posedge clock or posedge set) if(set) q<=1; else q<=d; Reset always @(posedge clock) if(reset) q<=0; else q<=d; always @(posedge clock or negedge reset) if(set) q<=0; else q<=d;
  • 27. Using Clock Enables • Control signal priority determines implementation of the Flip-Flop primitive Example 1: Set before CE Example 2: CE before Set always @(posedge clk) if(set) q<=1; else if(ce) q<=d; always @(posedge clk) if(ce) if(set) q<=1; else q<=d;
  • 28. Using Clock Enables • Example 1 Results: FDSE • Example 2 Results: FDE + LUT
  • 29. Using Clock Enables • Flip-Flop primitives are architecture dependent • Example: always @(posedge clk) if(reset) q<=0; else if(set) q<=1; else if(ce) q <= d;
  • 30. Using Clock Enables • Spartan-3: FDRSE • Virtex-6: LUT+FDR
  • 31. Using Clock Enables • Another example: always @(posedge clk) if(set) q<=1; else if(reset) q<=0; else if(ce) q <= d;
  • 33. Async vs Sync Resets • Asynchronous resets – Act immediately – Are clock-independent – Induce timing hazards • Synchronous resets – Ports can be used to minimize logic – Predictable
  • 34. Global Resets • We use global resets to: – Get the circuit into a known state at power-up – Initialize simulations properly (!) • Global resets have to be routed to S/R pins of the Flip-Flop • FPGAs include a dedicated global set-reset net for post-configuration initialization (GSR)
  • 35. Using the GSR STARTUP_VIRTEX6 #( .PROG_USR("FALSE") // Activate program event security feature ) STARTUP_VIRTEX6_inst ( .CFGCLK(CFGCLK), // 1-bit Configuration main clock output .CFGMCLK(CFGMCLK), // 1-bit Configuration internal oscillator clock output .DINSPI(DINSPI), // 1-bit DIN SPI PROM access output .EOS(EOS), // 1-bit Active high output signal indicating the End Of Configuration. .PREQ(PREQ), // 1-bit PROGRAM request to fabric output .TCKSPI(TCKSPI), // 1-bit TCK configuration pin access output .CLK(CLK), // 1-bit User start-up clock input .GSR(GSR), // 1-bit Global Set/Reset input (GSR cannot be used for the port name) .GTS(GTS), // 1-bit Global 3-state input (GTS cannot be used for the port name) .KEYCLEARB(KEYCLEARB), // 1-bit Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM) .PACK(PACK), // 1-bit PROGRAM acknowledge input .USRCCLKO(USRCCLKO), // 1-bit User CCLK input .USRCCLKTS(USRCCLKTS), // 1-bit User CCLK 3-state enable input .USRDONEO(USRDONEO), // 1-bit User DONE pin output control .USRDONETS(USRDONETS) // 1-bit User DONE 3-state enable output );
  • 36. Avoid Latches! • Latches are most commonly generated by unterminated control sequences – Missing “else” statements in “if” clauses – Missing “default” statements in “case” clauses • To avoid over-constraining the logic, use “x” values in your “else” and “default” statements