FPGA 개발하면서 겪은 삽질에 대한 총 정리
NOV. 4, 2017
Hanwook Kim
<1>
Contents
I. Introduction
1) What is FPGA?
2) Development process
3) Difference between FPGA and MCU/DSP
4) Application of FPGA
II. Troubles of developing FPGA
1) Case I : Timing violation due to negative slack
2) Case II : H/W configuration and A/D converter debugging
3) Case III : DDR3 I/F problem due to h/w design fault
4) Case IV : FPGA resource problem
Part I. Introduction
<3>
I. Introduction
 1) What is FPGA?
 Definition : Field Programmable Gate Array
→ Contain logical-gate (AND, OR, XOR, NOT… etc.), Flip-flop, and internal wire
→ “Programmable” during operating time and “Reconfigurable”
→ Cost-efficient, and flexible device
[Configuration of FPGA] [CMOS gate array of FPGA]
<4>
I. Introduction
 1) What is FPGA?
[ALTERA FPGA : Stratix IV] [Xilinx FPGA : KINTEX]
<5>
I. Introduction
 1) What is FPGA?
 Main vendor : ALTERA, Xilinx, ACTEL, Mircrosemi, Lettice semiconductor …
 IDE(Integrated Development Environment) : ATLERA Quartus, Xilinx ISE, Vivado,
ACTEL Libero …
 HDL (Hardware Description Language) : VHDL, Verilog, System Verlilog … etc
→ Compatible each other
[ALTERA Quartus II] [Xilinx Vivado]
<6>
I. Introduction
 2) Development process
[FPGA Development Process]
<7>
I. Introduction
 2) Development process
[HDL Synthesis]
<8>
I. Introduction
 3) Difference between FPGA and DSP/MCU
[Difference between parallel process and sequential process]
<9>
I. Introduction
 4) Application of FPGA
 Space, Defense/Military, Automobile, Communication, Cloud, Test and measurement,
Industrial, Medical… etc.
https://www.xilinx.com/applications/megatrends.html
Part II. Trouble of developing FPGA
<11>
II. Trouble of developing FPGA
 1) Timing violation due to negative slack
 Slack : (Required clock period) – (Actual clock period)
 Positive slack : The timing requirements are met
 Negative slack : The timing requirements are not met
[Timing slack]
<12>
II. Trouble of developing FPGA
 1) Timing violation due to negative slack
 As the master clock (60MHz) has the negative slack, the reset of 12bit free-
running counter causes some trouble
→ Negative slack is because of heavy encryption logic supported by supervisor corp
always @(posedge i_clk, negedge i_rstn) begin
if (!i_rstn) begin
cnt <= 12’d0;
end
else begin
cnt <= cnt + 1’d1;
end
end
[Free running counter logic]
<13>
II. Trouble of developing FPGA
 2) H/W configuration and A/D converter debugging
 H/W configuration error causes a malfunction A/D converter
<14>
II. Trouble of developing FPGA
 3) DDR3 I/F problem due to h/w design fault
[DDR3 SDRAM architecture and memory topology]
<15>
II. Trouble of developing FPGA
 3) DDR3 I/F problem due to h/w design fault
[DDR3 SDRAM controller block diagram]
<16>
II. Trouble of developing FPGA
 3) DDR3 I/F problem due to h/w design fault
[DDR3 SDRAM Write/Read process] [DDR3 SDRAM controller main FSM]
<17>
II. Trouble of developing FPGA
 3) DDR3 I/F problem due to h/w design fault
 The clock frequency of DDR3 SDRAM is very high (1066 MHz)
→ Deliberate h/w design is required for DDR3 SDRAM control
: Impedance matching, PCB pattern routing, PCB pattern length and width… etc
→ Some H/W design fault causes DDR3 SRRAM control fault
[DDR3 SDRAM impedance matching]
<18>
II. Trouble of developing FPGA
 4) FPGA logic resource
 Unnecessary using of register (flip-flop) causes an excessive resource of FPGA
→ Commonly, FPGA vendors recommend that logic is used up to 70%
→ Our logic occupied 85% of FPGA resource
→ The operating of logic varied frequently when the logic is ported on FPGA
→ Solution : Code optimization, and compiler option
FPGA 개발하면서 겪은 삽질에 대한 총 정리

FPGA 개발하면서 겪은 삽질에 대한 총 정리

  • 1.
    FPGA 개발하면서 겪은삽질에 대한 총 정리 NOV. 4, 2017 Hanwook Kim
  • 2.
    <1> Contents I. Introduction 1) Whatis FPGA? 2) Development process 3) Difference between FPGA and MCU/DSP 4) Application of FPGA II. Troubles of developing FPGA 1) Case I : Timing violation due to negative slack 2) Case II : H/W configuration and A/D converter debugging 3) Case III : DDR3 I/F problem due to h/w design fault 4) Case IV : FPGA resource problem
  • 3.
  • 4.
    <3> I. Introduction  1)What is FPGA?  Definition : Field Programmable Gate Array → Contain logical-gate (AND, OR, XOR, NOT… etc.), Flip-flop, and internal wire → “Programmable” during operating time and “Reconfigurable” → Cost-efficient, and flexible device [Configuration of FPGA] [CMOS gate array of FPGA]
  • 5.
    <4> I. Introduction  1)What is FPGA? [ALTERA FPGA : Stratix IV] [Xilinx FPGA : KINTEX]
  • 6.
    <5> I. Introduction  1)What is FPGA?  Main vendor : ALTERA, Xilinx, ACTEL, Mircrosemi, Lettice semiconductor …  IDE(Integrated Development Environment) : ATLERA Quartus, Xilinx ISE, Vivado, ACTEL Libero …  HDL (Hardware Description Language) : VHDL, Verilog, System Verlilog … etc → Compatible each other [ALTERA Quartus II] [Xilinx Vivado]
  • 7.
    <6> I. Introduction  2)Development process [FPGA Development Process]
  • 8.
    <7> I. Introduction  2)Development process [HDL Synthesis]
  • 9.
    <8> I. Introduction  3)Difference between FPGA and DSP/MCU [Difference between parallel process and sequential process]
  • 10.
    <9> I. Introduction  4)Application of FPGA  Space, Defense/Military, Automobile, Communication, Cloud, Test and measurement, Industrial, Medical… etc. https://www.xilinx.com/applications/megatrends.html
  • 11.
    Part II. Troubleof developing FPGA
  • 12.
    <11> II. Trouble ofdeveloping FPGA  1) Timing violation due to negative slack  Slack : (Required clock period) – (Actual clock period)  Positive slack : The timing requirements are met  Negative slack : The timing requirements are not met [Timing slack]
  • 13.
    <12> II. Trouble ofdeveloping FPGA  1) Timing violation due to negative slack  As the master clock (60MHz) has the negative slack, the reset of 12bit free- running counter causes some trouble → Negative slack is because of heavy encryption logic supported by supervisor corp always @(posedge i_clk, negedge i_rstn) begin if (!i_rstn) begin cnt <= 12’d0; end else begin cnt <= cnt + 1’d1; end end [Free running counter logic]
  • 14.
    <13> II. Trouble ofdeveloping FPGA  2) H/W configuration and A/D converter debugging  H/W configuration error causes a malfunction A/D converter
  • 15.
    <14> II. Trouble ofdeveloping FPGA  3) DDR3 I/F problem due to h/w design fault [DDR3 SDRAM architecture and memory topology]
  • 16.
    <15> II. Trouble ofdeveloping FPGA  3) DDR3 I/F problem due to h/w design fault [DDR3 SDRAM controller block diagram]
  • 17.
    <16> II. Trouble ofdeveloping FPGA  3) DDR3 I/F problem due to h/w design fault [DDR3 SDRAM Write/Read process] [DDR3 SDRAM controller main FSM]
  • 18.
    <17> II. Trouble ofdeveloping FPGA  3) DDR3 I/F problem due to h/w design fault  The clock frequency of DDR3 SDRAM is very high (1066 MHz) → Deliberate h/w design is required for DDR3 SDRAM control : Impedance matching, PCB pattern routing, PCB pattern length and width… etc → Some H/W design fault causes DDR3 SRRAM control fault [DDR3 SDRAM impedance matching]
  • 19.
    <18> II. Trouble ofdeveloping FPGA  4) FPGA logic resource  Unnecessary using of register (flip-flop) causes an excessive resource of FPGA → Commonly, FPGA vendors recommend that logic is used up to 70% → Our logic occupied 85% of FPGA resource → The operating of logic varied frequently when the logic is ported on FPGA → Solution : Code optimization, and compiler option