openpiton+ariane: the risc-v hardware research...

30
OpenPiton+Ariane: The RISC-V Hardware Research Platform Princeton University and ETH Zürich http://openpiton.org http://pulp-platform.org

Upload: others

Post on 23-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

OpenPiton+Ariane: The RISC-V Hardware Research Platform

Princeton University and ETH Zürich

http://openpiton.orghttp://pulp-platform.org

Page 2: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

FPGA Prototyping

2

Page 3: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Comparison of Supported BoardsDevelopment Board,

FPGA name,Part

Core Clock(1 core)

Max# of Cores(with FPU)

DDR Type,Size,

Data Width

Price (nonacademic/

academic)

Xilinx VC707Virtex-7

XC7VX485T-2FFG1761C60 MHz 3

DDR31 GB

64 bits$3,495

Digilent Genesys2Kintex-7

XC7K325T-2FFG900C67 MHz 2

DDR31GB

32 bits

$999/$600

Digilent NexysVideoArtix-7

XC7A200T-1SBG484C30 MHz 1

DDR3512MB16 bits

$490/$250

Digilent Nexys 4 DDRArtix-7

XC7A100T-ACSG324C30 MHz 1^

DDR2128MiB16 bits

$320/$160

Xilinx VCU118 *Virtex UltraScale+

XCVU9P-L2FLGA2104E100MHz 8

DDR42GB

64bits$6,995

4* experimental ^ no FPU, peripheral IP (test runs from BRAM)

Page 4: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Prototype Architecture

Ariane Core

DRAMSDHCUART

Switches, LEDs

Ethernet

Digilent Genesys2

5

Wishbone SD Master*:• Up to 32GB SD/SDHC cards• Storage for OS/tests

UART:• Terminal I/O• Loading of assembly test(DMW - Direct Memory Write from a host)

DDR controller*:• Xilinx’s MIG IP core• Configurable data width• Used as main memory

*optional

Ethernet controller*:• Xilinx’s Ethernet Lite MAC IP Core• Driver from Linux kernel• 100 Mb/s

JTAG P-M

esh

Cros

sbar

Page 5: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Setup for Hands-on with FPGA

9

Page 6: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Setting Up Terminal (MAC)

10

Page 7: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

11

Page 8: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Setting Up Terminal

12

• Find serial device:– Windows: Device Manager– Linux: /dev/

• Unplug/Plug back USB cable to determine the right one

Page 9: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Setting Up Terminal (Windows, Linux)

13

Serial Line: /dev/ttyUSBX or COMX, where X is a number depending on your systemSpeed: 115200

Page 10: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Suggested ConfigurationsBRAM_TEST SD with OS

+ EthUART DMW

to DDRBRAM with hardwired

test

DRAM memory controller

SD card controller

UART 16550

Ethernet Lite MAC

UART support fortest streaming

19

Page 11: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Tools• protosynAll encompassing tool for creation of FPGA project and generating programming file

• pitonstreamTool for running assembly tests on FPGA

Sources are located at piton/tools/src/proto/

pitonstreamboard type, asm test list .ustr

protosynboard type, design, config opt.xpr

.bit

20

Page 12: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

protosyn Flow

bram test?

*.v.pyv -> *tmp.v

sims build

sims run

RTL

mapping test to BRAM

create project?

mem.imagesims.log

test_proto.coe

project creation .xpr

synthesis

mapping, placing, routing, bitstream generation, STA

NO

YES

implement?

YES

NO

IP cfg (.xci),constraints (.xdc),defines

YES

NO

.xpr

.bit,

.ltx

LegendControl FlowData Flowpyv preprocessorSims scriptVivadoinput/output filesflow step conditions

21

Page 13: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Running protosyn

…more options are in FPGA manual

23

Page 14: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Example protosyn run

25

Page 15: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

FPGA Flow Runtimes

• System including DDR controller

– ~1 hour including IP generation

– ~40 mins excluding IP generation

26

Page 16: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

FPGA Flow Outputs

27

Page 17: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

FPGA Flow Outputs

28

Page 18: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

FPGA Flow Outputs

29

Page 19: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Hands-on with FPGA

34

Page 20: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Setting up Your FPGA Board

GO!35

Page 21: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Booting Linux on OpenPiton+Ariane

36

Page 22: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Booting Linux on OpenPiton+Ariane

37

Page 23: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Booting Linux on OpenPiton+Ariane

38

Page 24: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Booting Linux on OpenPiton+Ariane

39

Page 25: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Network Setup

40

Use the MAC from your board

Page 26: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Network Setup

41

Use the MAC from your board

Page 27: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Network Setup

42

Use the MAC from your board

Page 28: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Running Tetris on OpenPiton+Ariane

43

Page 29: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Browse pulp-platform.org and openpiton.orgon OpenPiton+Ariane

44

Page 30: OpenPiton+Ariane: The RISC-V Hardware Research Platformparallel.princeton.edu/.../7-openpitonariane-fpga.pdf · Ariane Core DRAM UART SDHC Switches, LEDs Ethernet DigilentGenesys2

Challenge Each Other!

45

• Vitetris Netplay (credits @Victor Nilsson)

• First player needs to wait for connection- ./tetris –listen <port>

• Second player has to connect to specific IP of opponent- ./tetris- Select Netplay- Enter <hostname or IP : port>

• Play!