ramp/hasim status update joel emer michael adler angshuman parashar michael pellauer murali...

32
RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan [email protected] [email protected] [email protected] [email protected] [email protected] VSSAD Group Intel CSG Group, CSAIL MIT

Post on 21-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

RAMP/HAsim Status UpdateRAMP/HAsim Status Update

Joel EmerMichael AdlerAngshuman ParasharMichael PellauerMurali Vijayaraghavan

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

VSSAD GroupIntel

CSG Group, CSAILMIT

Page 2: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

2

Infrastructure Update

• AWB Plug N Play– Hardware Language Support

• Bluespec, VHDL, Verilog– Software Language Support

• C++

• Build Procedure– Updated to scons

• Automatic Parallel Build– Common data types between hardware and software

• Common Platform

Page 3: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

3

History and Motivation

XUP Model “Sim” ModelTop Level Wires BDPI

XUP BoardLEDs and Switches

(image source: xilinx.com)

Software SimulatorProcesses

(image source: intel.com)

Page 4: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

4

History and Motivation

Platform Independent Model

XUP Front PanelTop Level Wires

“Sim” Front PanelBDPI

front_panel.writeLED()

Virtual Platform

XUP BoardLEDs and Switches

(image source: xilinx.com)

Software SimulatorProcesses

(image source: intel.com)

or

Page 5: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

5

Virtual Platform

• Provide common set of functionalities across multiple physical platforms

• XUP Board• PCI-express Board• Intel FSB Socket• Bluesim/Vsim• BEE3

• Leverage Asim Plug N Play– Minimize module replacements/recoding while

moving across platforms

Page 6: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

6

Virtual Platform

Communication Layer(s)

Device 1

Virtual Devices

Timing + Functional Modules

Virtual PlatformPlatform Interface

Physical Platform

Device 2Device 0

Soft Connections

ExeDecodeFetch

FuncModelControl

Page 7: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

7

Virtual Platform on XUP

VGA

Virtual Devices

Virtual PlatformPlatform Interface

LEDsSwitches

MemoryFront Panel

VGA On-BoardMemory

Timing + Functional Modules

Soft Connections

ExeDecodeFetch

FuncModelControl

Page 8: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

8

Virtual Platform on Simulator

UNIX Pipe Communication Layer

VGA

Virtual Devices

Virtual PlatformPlatform Interface

Bluesim

MemoryFront Panel

Pipe I/O

Timing + Functional Modules

Soft Connections

ExeDecodeFetch

FuncModelControl

Page 9: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

9

Virtual Platform on PCIe System

Communication Layer(s)

VGA

Virtual Devices

Virtual PlatformPlatform Interface

PCIe-based Host System

MemoryFront Panel

Timing + Functional Modules

Soft Connections

ExeDecodeFetch

FuncModelControl

HostSoftware

Page 10: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

10

Communication with Host Software: Hybrid Modules

Communication Layers

ExecuteDecodeFetch

Func ModelControllerController

Decode

PCI Express

Communication Layers

ConsoleFront PanelFront Panel Console

FPGA Host

Hybrid Module

Page 11: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

11

Server- Accept Request- Send Response

Hybrid Module Communication: The Paradigm

FPGA Modules Software Modules

Communication Layers

ExecuteDecodeFetch

Func ModelController Controller

StartStopStep

StartStopStep

PrintAssertPrintEventPrintStat

PrintAssertPrintEventPrintStat

Decode

Client- Make Request- Accept Response

Client Server

Controller Controller

PCI Express

Communication Layers

HAsim Remote Request/Response (RRR)HAsim Remote Request/Response (RRR)

Page 12: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

12

Server- Accept Request- Send Response

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

StartStopStep

StartStopStep

PrintAssertPrintEventPrintStat

PrintAssertPrintEventPrintStat

Decode

Client- Make Request- Accept Response

Client ServerRRR Protocol Stack RRR Protocol Stack

Key Issues

• Service IDs– Automatic

Assignment

• Request and Response Types

– Flexibility– Ease of Use

PCI Express

Page 13: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

13

RRR Specification Language// --------// typedefs// --------typedef MSG_CLASS { HOST: UINT8, FPGA: Bit#(8) };typedef STATUS { HOST: bool, FPGA: Bool };typedef UINT { HOST: UINT64, FPGA: Bit#(64) };

// --------------------------------------// create a new service called CONTROLLER// --------------------------------------service CONTROLLER{ // ------------------------------------------- // declare services provided by HOST partition // ------------------------------------------- server HOST <- FPGA; { method PrintMessage(in MSG_CLASS, out STATUS); method PrintStat(in MSG_CLASS); method PrintEvent(in MSG_CLASS); };

// ------------------------------------------- // declare services provided by FPGA partition // ------------------------------------------- server FPGA <- Host; { method Start(); method Stop(); method Step(in UINT); };};

Page 14: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

14

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

CSR DMA Interrupt

Channel IO

CSRInterrupt

Page 15: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

15

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

Page 16: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

16

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

SID 0 SID 1

RRRspecification

files0 0

1 1

rrr_service_ids.bsv

`define CONTROLLER_SERVICE_ID 0`define DECODE_SERVICE_ID 1`define MEMORY_SERVICE_ID 2`define NUM_SERVICES 3

Page 17: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

17

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

SID 0 SID 1

RRRspecification

files 0 0

1 1

Stub Stub

Page 18: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

18

RRR Protocol StackFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

SID 0 SID 1

0 0

1 1

Stub Stub

SID 1

Stub Stub

SID 0

Page 19: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

19

Switching Physical PlatformsFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

SID 0 SID 1

0 0

1 1

Stub Stub

SID 1

Stub Stub

SID 0

Page 20: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

20

PCIe-based Physical PlatformFPGA Modules Software Modules

Kernel Driver

ExecuteDecodeFetch

Func ModelController

Low Level Driver

Controller

Decode

Hardware Channels

Channel IO

RRR Server RRR Client

CSR DMA Interrupt

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

CSR

SID 0 SID 1

0 0

1 1

Stub Stub

SID 1

Stub Stub

SID 0

Page 21: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

21

Simulation Physical PlatformFPGA Modules Software Modules

UNIX inter-process communication

ExecuteDecodeFetch

Func ModelController

BDPI Layer

Controller

Decode

Channel IO

RRR Server RRR Client

Channel IO

RRR Server RRR Client

Channel 0 Channel 1 Channel 1 Channel 0

SID 0 SID 1

0 0

1 1

Stub Stub

SID 1

Stub Stub

SID 0

Page 22: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

22

Dictionaries

// append to STATDEFS.bsh, STATDEFS.hdef STAT.BRANCHES_MISPREDICTED "mispredicted branches = ";

// append to EVENTDEFS.bsh, EVENTDEFS.hdef EVENT.SIM_FAILED "simulation failed";

// append to TRACEDEFS.bsh, TRACEDEFS.hdef TRACE.FETCH "fetch instruction %d"; // note: 1 paramdef TRACE.DECODE "decode inst %d into %d"; // note: 2 params

Page 23: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

23

Infrastructure Summary

Channel IO

RRR Client + Server

FPGA Modules

Virtual Platform

Platform Interface

Channel IO

RRR Client + Server

Hardware Software

Software Modules

MemoryFront Panel

ExeDecodeFetch

FuncModelControl Decode

Front Panel Memory

Page 24: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

24

Conclusion

• Virtual Platform– Multi-layered set of abstractions providing platform-

independent interfaces to platform-dependent devices

• Remote Request/Response– Part of the Virtual Platform hierarchy– Facilitates communication between multiple partitions of

hybrid modules– Tedious HDL plumbing code is auto-generated from

specification files

Page 25: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

Backup Slides

Page 26: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

26

Sample RRR Service Stub

Stub.txt

Page 27: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

27

Outline

• History and Motivation

• Virtual Platforms

• Hybrid Modules and RRR

• Conclusion and Demo

Page 28: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

28

Hybrid Modules

Channel IO

RRR Client + Server

FPGA Modules

Virtual Platform

Platform Interface

Channel IO

RRR Client + Server

Hardware Software

Software Modules

MemoryFront Panel

ExeDecodeFetch

FuncModelControl Decode

Front Panel Memory

HAsim Remote Request/Response (RRR)HAsim Remote Request/Response (RRR)

Page 29: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

29

RRR: Intel FSB

Channel IO

RRR Client + Server

FPGA Modules

Virtual Platform

Platform Interface

Channel IO

RRR Client + Server

Hardware Software

Software Modules

MemoryFront Panel

FSB Driver

ExeDecodeFetch

FuncModelControl Decode

Front Panel Memory

Page 30: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

30

RRR: Simulator

Channel IO

RRR Client + Server

FPGA Modules

Virtual Platform

Platform Interface

Channel IO

RRR Client + Server

Hardware Software

Software Modules

MemoryFront Panel

UNIX pipe

ExeDecodeFetch

FuncModelControl Decode

Front Panel Memory

Page 31: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

31

Hybrid Modules

• Hybrid Modules– Primary points of communication between FPGA

and Host Software– Module functionality can be split between FPGA

and software

• How do partitions of a hybrid module communicate with each other?

Page 32: RAMP/HAsim Status Update Joel Emer Michael Adler Angshuman Parashar Michael Pellauer Murali Vijayaraghavan joel.emer@intel.com michael.adler@intel.com

32

Hybrid Modules (cont.)• Module definition

– hybrid_fetch_unit.awb%sources –t BSV –v PUBLIC hardware_fetch_unit.bsv%sources –t CPP –v PUBLIC software_fetch_unit.h%sources –t CPP –v PRIVATE software_fetch_unit.cpp

• Build process– Collects BSVs and generates “hardware” bitfile or

simulation binary– Collects CPPs and generates “software” binary

• Runtime– Software binary loads bitfile onto FPGA, or forks off

simulation “hardware” binary– Software Controller sends “start” RRR request to

Hardware Controller