Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf ·...

39
Qsys and IP Core Integration Stephen A. Edwards (after David Lariviere) Columbia University Spring 2020

Transcript of Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf ·...

Page 1: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys and IP Core Integration

Stephen A. Edwards(after David Lariviere)

Columbia University

Spring 2020

Page 2: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,
Page 3: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

IP Cores

Page 4: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Cyclone V SoC: A Mix of Hard and Soft IP Cores

IP = Intellectual Property Core = block, design, circuit, etc.Hard = wires & transistors Soft = implemented w/ FPGA

Source: Altera

Page 5: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Example IP Cores

CPUs: ARM (hard), NIOS-II (soft)

Highspeed I/O: Hard IP Blocks for High Speed Transceivers(PCI Express, 10Gb Ethernet)

Memory Controllers: DDR3

Clock and Reset signal generation: PLLs

Page 6: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Cyclone V SoC: FPGA layout

Source: Altera

Page 7: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Cyclone V SoC: HPS Layout

Source: NARD, LLC.

Page 8: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Stratix V: FPGA Layout

Source: Altera

Page 9: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Stratix V: Solarflare AoE PCB Layout

Source: Solarflare FDK

Page 10: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Stratix V: Solarflare AoE Qsys Layout

Source: Solarflare FDK

Page 11: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Stratix V: Solarflare AoE Qsys Example

Source: Solarflare FDK

Page 12: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Bridges

A bridge connects two, often different, buses.

Enables multiple clock domains, different protocols (e.g.,AXI ↔ Avalon), bus widths, etc.

Example Bridge Types:

SOC HPS ↔ FPGA Bridge

Avalon MM Clock Crossing Bridge

Avalon MM Pipeline Bridge

Page 13: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Cyclone V SoC: FPGA ↔ HPS Bridge

Source: Altera

Page 14: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Clock Crossing Bridge Example

Source: Altera

Page 15: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Pipeline Bridge Example

Source: Altera

Page 16: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Altera’s IP CoreIntegration Tools

Page 17: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

The Quartus Megawizard

Source: Altera

Page 18: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Megawizard: Example 10Gb Ethernet PHY

Source: Altera

Page 19: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Megawizard IP Cores

Arithmetic: Addition, Subtraction, Multiplication, Division,Multiply-(add|accumulate), ECC

Floating Point:

Gate Functions: Shift Registers, Decoders, Multiplexers

I/O Functions: PLL, temp sensor, remote update, varioushigh speed transceiver related

Memory: Single/Dual-port RAM or ROMs, Single/Dual-clockFIFOs, (RAM) Shift registers

DSP: FFT, ECC, FIR, etc (large suite specifically for graphics aswell)

Note: some megafunctions are only available on certainFPGAs

Page 20: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys

Qsys is Altera’s system integration tool for buildingNetwork-on-Chip (NoC) designs connecting multiple IPcores.

You Qsys

List the IP componentsand how you want themconnected

Generates the interconnect(arbiters, etc.) adds adaptersas necessary, warns of errors

Page 21: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys: Raising Level of Abstraction

Source: Altera

Page 22: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys UI

Source: Altera

Page 23: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

System Level Design: Why Use Qsys

Avoids manually developing custom interconnect fabricsand signaling.

Instead of cycle-to-cycle coordination between everyindividual IP core, focus on transaction-level designs.

Design IP without knowing exactly when data will transferand instead only focus on how (once it does).

(Only valid if you design your individual components to oneof the standardized interfaces)

Page 24: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys-based Method of Design

Source: Altera

Page 25: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Connecting IP Cores

Page 26: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Interface Types

Memory-mapped Interfaces:

Avalon MM (Altera)

AXI (ARM, supported by Qsys now for SoC)

Streaming Interfaces: Avalon ST:

Avalon ST source port: outputs streaming data

Avalon ST sink port: receives incoming streaming data

Page 27: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Control vs. Data Planes

Control Plane: Memory mapped registers typically used forconfiguring devices, querying status, initiating transactions,etc (low bandwidth)

Data Plane: Streaming directed graphs for actually movingand processing large amounts of data (audio/video,network packets, etc); high bandwidth

A single IP core can have both MM and ST interfaces(including multiple of each).

Page 28: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Control and Data Planes Example

Source: Altera

Page 29: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Control and Data Planes Example: Solarflare AoE

Source: Altera

Page 30: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Qsys signal types

Clock

Reset

Interrupt

Avalon MM signals (Memory-Mapped)

Avalon ST signals (Streaming)

Tristate

Conduit (your own custom signals)

Page 31: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Why explicitly label signal types?

...vs. simply making everything a wire/conduit

Allows Qsys to protect you from yourself!

Ensure matching between signal types (e.g., “clock out” →“clock in”)

Detect and automatically insert dual clock crossing domains(only if it knows which clock domains IPs are in)

Automatically convert data widths, formats, error flags(convert 32 bit master into four 8-bit slave reads, etc)

Automatically synchronize and OR-gate multiple resets

Automatically insert pipeline stages to improve fmax

Page 32: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Avalon MM Master Signals

Source: Altera

Page 33: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Avalon MM Slave Signals

Source: Altera

Page 34: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Avalon ST Signals

Source: Altera

Page 35: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Example Qsys Layout: 10Gb Reference Design

Source: Altera

Page 36: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Advanced: Qsys Hierarchical Designs

Source: Altera

Page 37: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Advanced: Qsys Automatic Pipelining

Source: Altera

Page 38: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Advanced: Qsys Testbench Generation

Source: Altera

Page 39: Qsys and IP Core Integration - Columbia Universitysedwards/classes/2020/4840-spring/qsys.pdf · List the IP components and how you want them connected Generates the interconnect (arbiters,

Additional References

Altera online training lectures: (HIGHLY recommended;many of these slides are taken directly from them)

http://www.altera.com/education/training/curriculum/trn-curriculum.html

Introduction to Qsys

Advanced System Design Using Qsys

Custom IP Development Using Avalon and AXI Interfaces