Top Banner
Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223
34

Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Jan 04, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Introduction to FPGAs

Dr. Philip BriskDepartment of Computer Science and Engineering

University of California, Riverside

CS 223

Page 2: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

The Basics

SRAM

Transistor

1

Open Closed

0

Page 3: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Configuration Comes at a Cost

4-6 T

1T

SRAM

+ Configuration circuitry+ Error detection/correction+ Security features

6T SRAM

4T SRAM

https://en.wikipedia.org/wiki/Static_random-access_memory

Page 4: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Lookup Tables (LUTs)

SRAM

SRAM

SRAM

SRAM

x y Commercial FPGAs• Xilinx: 6-LUT• Altera: 6-LUT• Microsemi: 4-LUT

Page 5: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

LUT = Programmable Truth Table

A

B

C

D

x y zx y

z

0 0 A

0 1 B1 0 C

1 1 D

Page 6: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

AND

0

0

0

1

x y zx y

z

0 0 0

0 1 01 0 0

1 1 1

Page 7: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

OR

0

1

1

1

x y zx y

z

0 0 0

0 1 11 0 1

1 1 1

Page 8: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

NAND

1

1

1

0

x y zx y

z

0 0 1

0 1 11 0 1

1 1 0

Page 9: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

NOR

1

0

0

0

x y zx y

z

0 0 1

0 1 01 0 0

1 1 0

Page 10: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

XOR

0

1

1

0

x y zx y

z

0 0 0

0 1 11 0 1

1 1 0

Page 11: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

XNOR

1

0

0

1

x y zx y

z

0 0 1

0 1 01 0 0

1 1 1

Page 12: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

z = y

1

0

1

0

x y zx y

z

0 0 1

0 1 01 0 1

1 1 0

Page 13: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

z = y + x

1

0

1

1

x y zx y

z

0 0 1

0 1 01 0 1

1 1 1

Page 14: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Basic Logic Element (BLE)

Page 15: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Configurable Logic Block (CLB)

Page 16: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA

Page 17: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA CAD Flow• Input: – A circuit (netlist)

• Output: – FPGA configuration bitstream

• Main (Algorithmic) Stages: – Logic optimization– Technology mapping– Packing/placement– Routing– Retiming

Page 18: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Technology Mapping

Ling et al., DAC 2005, Fig. 2

Page 19: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Technology Mapping + Logic Optimization

Cong and Minkovich, IEEE TCAD 26(2), Feb. 2007, Fig. 1

Page 20: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA Packing

Ahmed et al., ACM TRETS 2(3), article #18, Sep. 2009, Fig. 12

Assume that each CLB contains two BLEs

Page 21: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA Placement

http://www.eecg.toronto.edu/~vaughn/vpr/e64.html

Page 22: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA Routing

http://www.eecg.toronto.edu/~vaughn/vpr/e64.html

Page 23: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Retiming

http://www.xilinx.com/support/answers/40089.html

Each cloud represents a BLE along the circuit’s critical path

Remember, routing delays between clouds are significant, and you don’t know them until AFTER placement and routing are done.

Page 24: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Introduction to FPGA Design

J. Serrano, CERN, Geneva, Switzerlandhttp://cds.cern.ch/record/1100537/files/p231.pdf

Page 25: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Typical Digital Design

Page 26: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

FPGA Structure

Page 27: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Signal Processing: CPU vs. FPGA

Page 28: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Speed/Area Tradeoff

Page 29: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Fixed-Point Arithmetic

In this example• Two’s complement (signed)• 3 integer bits• 5 fractional bits

Page 30: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Truncation vs. Rounding in Fixed-Point

Page 31: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Distributed Arithmetic

Xb[n] is 0 or 1Shift c[n] left by b

Page 32: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

c[n] or 0

(c[n] << 1) or 0

(c[n] << 2) or 0

(c[n] << 3) or 0

X0[n]

X1[n]

X2[n]

X3[n]

Distributed Arithmetic

Page 33: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Distributed Arithmetic Architecture

Page 34: Introduction to FPGAs Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.

Course Topics

• FPGA architectures– Academic (VPR)– Commercial (Xilinx / Altera / Microsemi)

• FPGA CAD algorithms• Compilers (e.g., C, OpenCL, etc. to FPGA)• FPGA Applications• Reconfigurable alternatives to FPGAs• The history of reconfigurable computing– Going back to the vacuum tube era