SlideShare uma empresa Scribd logo
1 de 43
Reverse Engineering
of Rocket-Chip
December 8-10 | Virtual Event
December 8-10 | Virtual Event
Reverse Engineering of Rocket-Chip
Dr. Roomi Naqvi, MERL Researchers & Students
Director
MERL-PAKISTAN
#RISCVSUMMIT
Outline
• Motivation and Goals
• Overview of Rocket Chip Generator1
• Deconstructing the Software Architecture – Rocket Chip Generator
• Putting it all Together - Micro-Architecture and Software Specification Document
(MASS)
• Aghaaz (‫)آغاز‬ Chip SoC framework – A new beginning
• Configuring the Aghaaz SoC
• Summary and Future Directions
1. Asanović, Krste/Avizienis, Rimas/Bachrach, Jonathan et al.
The Rocket Chip Generator. (2016)
Motivation and Goals
• Develop a Robust SoC generator framework for developing customized SoCs
• Demonstrate our indigenous methodology used to reverse engineer Rocket-Chip
for the generation of a custom System on a Chip (SoC).
• An overview of the Micro-Architecture and Software Specification (MASS)
document developed through our methodology that would enable
• Used the MASS document together with Rocket-Chip generator to generate
Aghaaz (‫)آغاز‬ SoC
Overview of Rocket-Chip
SoC Generator
Rocket-Chip Generator Overview
• Collection of SoC building blocks
• Parameterized
• Standard Interfaces
• Chisel: open source hardware construction language embedded
in scala
• FIRRTL is used to emit Verilog from the Chisel Model
• Composes RISC-V ISA based platforms
Cores in-order scalar , out-of-order
Core Tiles FPU, L1 Caches, Custom Accelerators, FPU
Tile Link On chip fabric , Coherent Caches
Peripheral Limited Support
Rocket-Core Micro-Architecture
• Rocket Core : 5-stage in-order scalar core generator
Rocket-Core Modules Description
Module Description
PTW Page table is used to access the virtual memory.nL2TLBEntries parameter is used
by Rocket-Chip PTW for controlling TLB entries.
Priority
Encoder
Priority Encoder take all of the data inputs one at a time and converts them into an equivalent binary code at
its output. Rocket-Chip Priority Encoder takes pins as inputs from BTB and EPC (from all stages) to select
the value of NPC.
EPC The Exception Program Counter (EPC) is used to store the address of the instruction that was executing
when the exception was generated. The size of the EPC register depends upon the XLen which can be of
either [31:0] or [63:0].
NPC New Program Counter (NPC) is used to increment +4 in current PC and store it in a register. The size of the
NPC register depends upon the XLen which can be either [31:0] or [63:0].
NPC-Gen Modules Description
PTW
Priority
Encoder
EPC
NPC
Fetch Modules Description
Module Description
ICache The Instruction Cache acts as a buffer memory between external memory and the core processor. In
Rocket-Chip size of the ICache sets, ways and block can be configured from the Config.scala file in
subsystem directory of Scala files.
Size of ICache is calculated by: nWays x nSets x blockBytes
BTB Branch Target Buffer (BTB) is a cache-like component in processors that is used for branch
prediction. The main concept of the BTB is to store the program counter (PC) of a branch instruction,
and the PC of the target of the branch. The bit size of branch prediction is [1:0].
TLB Translation Lookaside Buffer (TLB) is a memory cache which is used to keep track of recently used
transactions and
reduce the time taken to access a user memory location’s. It is connected with Rocket-Chip PTW
and work as cache for PTW. TLB entries is controlled by PTW of Rocket-Chip.
ICache
BTB
TLB
Module Description
Register File Registers are temporary storage locations that hold data and addresses.The width
of the rocket-Chip file register is fixed by the Xlen parameter either [31:0] or [63:0].
Instruction
buffer
Ibuffer is a temporary register where the opcode of the currently fetched instruction from instruction
memory is stored. The RV32 or RV64 instruction opcode is [6:0] bits.
RVC This Module holds RISC-V Compressed (C-Extension) Instructions. To use the RISC-V Compressed
instructions, useCompressed [Bool], which is present in Rocket-Chip config file, should be true.
Immediate
Generation
Immediate generation module generates immediate for instructions of RISC-V.
This module is located in RocketCore.scala and returns immediate bits depending upon the size of ISA
[31:0] or [63:0].
Instruction
Decode
This module decodes instructions for RISC-V which come from Instruction Memory.
Scoreboard Scoreboards are designed to control the flow of data between registers and multiple arithmetic units in
the presence of conflicts caused by hardware resource limitations (structural hazards) and by
dependencies between instructions (data hazards).Scoreboard module lies in RocketCore.scala.
CSR Control and Status Register (CSR) module contains control registers to enable and handle different
interrupts and exceptions.
Breakpoint A breakpoint is a location in executable code at which the operating system stops execution and breaks
into the debugger. This allows you to analyze the target and issue debugger commands.
Decode Modules Description
Register File
Instruction
buffer
RVC
Immediate
Generation
Instruction
Decode
Scoreboard
CSR
Breakpoint
Module Description
HellaCache HellaCache is the acronym of Level 1 Data cache in Rocket-Chip. L1 Dcache directly built into the microprocessor, which
is used for storing the microprocessor's recently accessed information, thus it is also called the primary cache. The size of the
cache depends upon the width of the ISA.
HellaCache
Arbiter
This module is for accessing L1 Dcache (HellaCache), by means of requests generated from other modules for read and
write operations.
PMP Physical Memory Protection (PMP) is a part of the RISC-V Privileged Architecture Specification which describes the interface
for a standard RISC-V memory protection unit. The PMP defines a finite number of PMP regions which can be individually
configured to enforce access permissions to a range of addresses in memory
AMO-ALU This module is used to perform the A Extension RISCV operations. To use the Rocket Core
Atomic ALU module, useAtmoics [Bool],which is in the rocket-Chip config file, should be true.
Dcache This Module is used to hold the data for temporary period of time.Size of the Dcache sets, ways and block can be configured
from the Config.scala file in subsystem directory of Scala files. Size of DCache is calculated by: nWays x nSets x blockBytes.
Scratchpad (SPRAM) is a high-speed internal memory directly connected to the CPU core and used for temporary storage to hold very
small items of data for rapid retrieval. To add the scratchpad in our SoC we need to call the scratchpad class in our config file
which lies in system directory of Scala.
Memory/ Write-Back Modules Description
Module Description
Multiplier This module is present inside the Rocket-Core execute stage and is used to perform M-Type Instructions. Multiplier operation
is parameterizable and depends upon the XLen width (Width of the operands of Multiplier). XLen either [31:0] or [63:0].
ALU An arithmetic logic unit (ALU) used to perform arithmetic and logic operations in Rocket-Core. ALU operands is
parameterizable depends upon the XLen width either [31:0] or [63:0].
Execute Modules Description
HellaCache
HellaCacheArbiter
PMP
AMO-ALU
Dcache
Scratchpad
Multiplier
ALU
De-constructing Software
Architecture Rocket-Chip
Code Complexity
• The complexity of code of Rocket-Chip is high, because it contains 372 files in 73
directories, after the submodules the numbers increase to 151,613 files in 8,625
directories and after running the build script to generate an SoC the numbers
grow to 185,049 files in 10,780 directories1
• The Rocket-Chip implementation code includes many variable names and
hundreds of lines of code without any meaningful comments
• This lack of documentation aggravates the ability to understand and results in
difficulty in modifying Rocket-Core or its component as for customized
requirements
1 Durrum, J., Bryant, A. and Porter, J., 2019. Reverse Engineering RISC-V Generator-Based Designs for Trust and Assurance.
AFRL/RYDT WPAFB United States.
Our Approach
• Object Oriented Programming (OOP) and high-level Functional
Programming concepts helps in understanding the code of Rocket-Chip.
• Code complexity is reduced by means of Flowcharts, UML Class
Diagrams and Block Diagrams of each modules of Rocket-Chip
• Assigned a team of undergraduate CS students to go through the code
line-by line
• Develop a detailed document fusing the Software Architecture of the
implementation with the MASS of Rocket-Chip
Branch Target Buffer (BTB)
Instruction Buffer
Code Construction – Class Diagram
Class name: IBuf
Class name BTBResp
Public attributes of class IBuf
Public Methods of class IBuf
Class IBuf has an instance of
BTBResp initialized by the variable
ibufBTBResp
Class BTBResp is inherited from
its parent class (BtbBundle), therefore
it uses the methods of its parent class.
Class Diagram Details
Object Oriented Code of Rocket-Chip
Inheritance
Polymorphism
Encapsulation
Abstraction
Abstraction is achieved by abstract keyword,
creating an abstract trait of
DecodeConstants.
Private access modifier is used to
encapsulate/hide method ‘access’ from other
extended classes.
Keyword extend is used to extend/inherit the
PMP class with parent class PMPReg
Keyword override is used to override method
getOMSRAMs, which is already defined in its
parent class.
Putting it all Together
(MASS: Hardware and Software)
Code Explanation and Back-tracing
by Flowcharts
• Class RegFile: initiated with three parameters n, w and zero
• Mem function creates memory/register file
• Private method access is defined for accessing the
register file data by taking the address as its input parameter
• Private variable reads
• Private variable canRead true for read state, false for write state
• “read” method : read data from register file , addr is parameter
regAddrMask [n] = depth/entry of
register file m
xLen[w] = 32bit/64 bit
raddr = address [4:0]
write data = data to be written in the
register [31:0] / [63:0]
rdata = data output from
register file [31:0] / [63:0]
RegFile – Block Diagram View
Class Parameters is imported
from directory config of rocket-
chip
Class CoreModule is imported from
directory tile of rocket-chip
Input/Output of class ALU are defined
Object ALU is defined
ALU operation bits are defined in method
SZ_ALU_FN
ALU operations are defined
Importing all properties of Chisel
Deep Dive into ALU Code View
Rocket-Core ALU: Code block performs addition/subtraction
• adder out: Result of the Addition/ Substraction
• in2_inv : initialized with Mux function which has parameters, isSub function
with parameter io.fn as selector, Not of io.in2 as input1 of Mux, and io.in2 as
input2 of Mux
• in1_xor_in2: initialized with io.in1 XOR’ed ( ^ ) with in2_inv.
• io.adder_out: wired to io.in1 + in2_inv + isSub of io.fn
ALU Code Explanation
ALU I/O Description
dw Data width is an input of ALU which can be 32bit or 64 bit
fn fn (ALU operation Bits) as input, width is predefined by 4
in2 Second input, here xLen can be changed to 32 or 64bits
in1 First input, here xLen can be changed to 32 or 64bits
out ALU output for logical operators, generated by the ALU
adder_out ALU output for mathematical operators, generated by the ALU
cmp_out ALU output indicating branch taken or not taken
ALU: Class Diagram to Block Diagram
dw = datawidth [31:0]/[63:0]
fn = ALUop bit [3:0]
In1 = Operand B
[31:0]/[63:0]
In2 = Operand A
[31:0]/[63:0]
out = logical operators [31:0]/[63:0]
adder_out = mathematical
operations [31:0]/[63:0]
cmp_out = branch result
output [Bool]
How did we do
it?
Using Reverse Engineered MASS Document, which includes
in depth knowledge of all Rocket-Chip modules.
Rocket-Core MASS Document
• This MASS Document is invaluable for those who have fundamental
knowledge of Scala, Chisel and SoC hardware
• This MASS document offers in-depth knowledge of Rocket-Core building
blocks and their chisel implementation
• Using Block Diagrams, Class Diagrams, Flowcharts, and describing all the
keywords found in the code, description of modules
is achieved
Aghaaz (‫)آغاز‬
SoC The
Beginning
Specifications of Aghaaz (‫)آغاز‬ SoC
• RV-32 (32-bit)
• I, M & C extensions
• 64-KB Instruction and Data Cache
• CLINT – Core Local Interrupt Controller
• PLIC – Peripheral Local Interrupt Controller
• Privileged( Machine)
Configuring the Aghaaz SoC and Core
• Create a Aghaaz Core Class with requisite configuration
• Add the Aghaaz Core class in the System configuration
Configuring Aghaaz Core in Rocket-Chip
Rocket-Core
parameters
Data Cache
parameters
Instruction Cache
parameters
Class named AghazCore, contains the configurations for the core level functionality. This class is created
in Rocket-chip/src/main/scala/subsystem/Config.scala
Path to Default Configuration Scala File
Aghaaz Core Params – Default Configuration
• In the RocketCoreParams, useCompressed is true, means C extension is enabled by default
• Extension I is the base extension and is supported by default as well.
useCompressed true
useCompressed is for C-extension, it is true by default, means our Core
will have C-extension enabled implicitly.
Configuring RV32M Core
RocketCoreParams has the parameters for configuring our Core.
We added MulDiv(Multiplier) with MulDivParms, having
default values, in the RocketCoreParams, in order to
enable M extension in our Core.
We updated the value of useAtomics to false, to disable
A extension.
Used to estimate of no of cycles per multiplication
mulEarlyOut will make the multiplier's latency data-
dependent, i.e., it will take fewer cycles to multiply
small numbers than large ones.
divEarlyOut is analogous to mulEarlyOut (smaller
numbers divide more quickly than larger ones).
We updated fpu
(Floating-Point
unit) to None, to
disable F and D
extensions in our
core.
Configuring the icache and dcache in
Aghaaz Core
Parameters Value Description
nMSHRs 0 There are no MSHRs (Miss Status Handling Registers)
nWays 16 There are 16 Ways of Cache in DCache
nSets 64 There are 64 Sets of Cache in DCache
blockBytes 64 There are 64 blockBytes in DCache
Parameters Value Description
nWays 4 There are 4 Ways of Cache in ICache
nSets 256 There are 256 Sets of Cache in ICache
blockBytes 64 There are 64 blockBytes in ICache
DCacheParams : sets the Data Cache parameters
ICacheParams : sets the Instruction Cache parameters
Size of DCache = nWays x nSets x blockBytes : 16 x 64 x 64 = 64KB)
Size of ICache =:4 x 256 x 64 =64KB
Blocks of Core
Aghaaz Core provides extensions
for I, M and C with 32bit compatibility
How did we know, which parameter is
doing what?
The MASS Document describes the full set of parameters,
their description and modules that are managed by that
parameter
Blocks of Tile
Rocket-Tile of Aghaaz SoC contains Aghaaz Core,
Branch Target Buffer,
L1 Icache & DCache of 64-KB.
Initializing Aghaaz Core to Default Configuration
• oldDefaultConfig is inherited by the class Config.
• Class Config (Parent Class) includes the key configurations, from which all configurations must be inherited.
• AghaazCore object is generated as a parameter with ’1’ indicating that there is only one(1) core in our AghaazCore.
• AghaazCore object is further added to the WithCoherentBusTopology object, which includes configurations for the Bus level.
• These objects are further added by the newBaseConfig object, which contains the base configurations.
Default Configuration is created in Rocket-chip/src/main/scala/system/Config.scala
Path to Default Configuration Scala File
Customizing AghazCore to 32-bit Configuration
Blocks of SoC
At this point our Aghaaz SoC
is successfully configured
and ready to be built
Summary and Future Direction
 Presented an overview of the methodology used to Reverse engineer the Rocket Chip
 Used the prescribed methodology to develop a Micro-Architecture and Software Specification
Document (MASS) with more than 400 pages and growing
 Used the MASS document to configure the Aghaaz SoC
 Continue the Reverse Engineering Effort to cover diplomacy
 Enhance the capabilities of Rocket Chip SoC framework to include I/O peripherals and the
ability to built a full SoC ready for CHISEL-to-GDS
 Work on improving the software architecture of the Rocket Chip
Acknowledgements
This Research was made possible with the counselling, guidance and
support of Dr.Roomi Naqvi, Dr Ali Ahmed Ansari, and Farhan Ahmed
Karim. Without their encouragement and guidance, this could not be
possible.
This presentation was created under the Lead of Uzair Khan, along
with the team of collaborators/ interns under him that gave their level
best under the supervision of such experienced mentors.
Team Members
Waleed Waseem
Shahzaib Kashif
Talha Ahmed
Mohsin Raza
Muhammad Shahzaib
Syeda Fizza Jaffery
Almas Ibrahim
Ubab Nadeem
MERL-UIT Rocket-Chip Team
December 8-10 | Virtual Event
Thank you for joining us.
Contribute to the RISC-V conversation on social!
#RISCVSUMMIT @risc_v

Mais conteúdo relacionado

Mais procurados

Soc architecture and design
Soc architecture and designSoc architecture and design
Soc architecture and designSatya Harish
 
Timing and Design Closure in Physical Design Flows
Timing and Design Closure in Physical Design Flows Timing and Design Closure in Physical Design Flows
Timing and Design Closure in Physical Design Flows Olivier Coudert
 
Riscv 20160507-patterson
Riscv 20160507-pattersonRiscv 20160507-patterson
Riscv 20160507-pattersonKrste Asanovic
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Aananth C N
 
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_FinalGopi Krishnamurthy
 
Implementing Useful Clock Skew Using Skew Groups
Implementing Useful Clock Skew Using Skew GroupsImplementing Useful Clock Skew Using Skew Groups
Implementing Useful Clock Skew Using Skew GroupsM Mei
 
Andes RISC-V vector extension demystified-tutorial
Andes RISC-V vector extension demystified-tutorialAndes RISC-V vector extension demystified-tutorial
Andes RISC-V vector extension demystified-tutorialRISC-V International
 
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010Creating Your Own PCI Express System Using FPGAs: Embedded World 2010
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010Altera Corporation
 
Slideshare - PCIe
Slideshare - PCIeSlideshare - PCIe
Slideshare - PCIeJin Wu
 
OIF CEI-112G at OFC 2020 Presentation
OIF CEI-112G at OFC 2020 PresentationOIF CEI-112G at OFC 2020 Presentation
OIF CEI-112G at OFC 2020 PresentationLeah Wilkinson
 
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...VLSI SYSTEM Design
 
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53KarthiSugumar
 
Timing closure document
Timing closure documentTiming closure document
Timing closure documentAlan Tran
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoMarco Cavallini
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
Physical design
Physical design Physical design
Physical design Mantra VLSI
 

Mais procurados (20)

Soc architecture and design
Soc architecture and designSoc architecture and design
Soc architecture and design
 
Timing and Design Closure in Physical Design Flows
Timing and Design Closure in Physical Design Flows Timing and Design Closure in Physical Design Flows
Timing and Design Closure in Physical Design Flows
 
PCI Drivers
PCI DriversPCI Drivers
PCI Drivers
 
Riscv 20160507-patterson
Riscv 20160507-pattersonRiscv 20160507-patterson
Riscv 20160507-patterson
 
ASIC DESIGN FLOW
ASIC DESIGN FLOWASIC DESIGN FLOW
ASIC DESIGN FLOW
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+
 
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
 
Implementing Useful Clock Skew Using Skew Groups
Implementing Useful Clock Skew Using Skew GroupsImplementing Useful Clock Skew Using Skew Groups
Implementing Useful Clock Skew Using Skew Groups
 
Andes RISC-V vector extension demystified-tutorial
Andes RISC-V vector extension demystified-tutorialAndes RISC-V vector extension demystified-tutorial
Andes RISC-V vector extension demystified-tutorial
 
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010Creating Your Own PCI Express System Using FPGAs: Embedded World 2010
Creating Your Own PCI Express System Using FPGAs: Embedded World 2010
 
Slideshare - PCIe
Slideshare - PCIeSlideshare - PCIe
Slideshare - PCIe
 
OIF CEI-112G at OFC 2020 Presentation
OIF CEI-112G at OFC 2020 PresentationOIF CEI-112G at OFC 2020 Presentation
OIF CEI-112G at OFC 2020 Presentation
 
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
 
Soc lect1
Soc lect1Soc lect1
Soc lect1
 
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53
Architecture Exploration of RISC-V Processor and Comparison with ARM Cortex-A53
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
Timing closure document
Timing closure documentTiming closure document
Timing closure document
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using Yocto
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Physical design
Physical design Physical design
Physical design
 

Semelhante a Reverse Engineering of Rocket-Chip SoC

Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Deepak Kumar
 
Microcontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsMicrocontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsNilesh Bhaskarrao Bahadure
 
Crussoe proc
Crussoe procCrussoe proc
Crussoe proctyadi
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!Linaro
 
Design of a low power processor for Embedded system applications
Design of a low power processor for Embedded system applicationsDesign of a low power processor for Embedded system applications
Design of a low power processor for Embedded system applicationsROHIT89352
 
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Talal Khaliq
 
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSnehaLatha68
 
Mirabilis_Design AMD Versal System-Level IP Library
Mirabilis_Design AMD Versal System-Level IP LibraryMirabilis_Design AMD Versal System-Level IP Library
Mirabilis_Design AMD Versal System-Level IP LibraryDeepak Shankar
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture Abdullaziz Tagawy
 
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...IDES Editor
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architectureTaha Malampatti
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLinaro
 
Spie2006 Paperpdf
Spie2006 PaperpdfSpie2006 Paperpdf
Spie2006 PaperpdfFalascoj
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on LabMichelle Holley
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J GreavesSatya Harish
 
BigDL webinar - Deep Learning Library for Spark
BigDL webinar - Deep Learning Library for SparkBigDL webinar - Deep Learning Library for Spark
BigDL webinar - Deep Learning Library for SparkDESMOND YUEN
 

Semelhante a Reverse Engineering of Rocket-Chip SoC (20)

Typesafe spark- Zalando meetup
Typesafe spark- Zalando meetupTypesafe spark- Zalando meetup
Typesafe spark- Zalando meetup
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
 
Unit I_MT2301.pdf
Unit I_MT2301.pdfUnit I_MT2301.pdf
Unit I_MT2301.pdf
 
Microcontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsMicrocontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basics
 
Crussoe proc
Crussoe procCrussoe proc
Crussoe proc
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Design of a low power processor for Embedded system applications
Design of a low power processor for Embedded system applicationsDesign of a low power processor for Embedded system applications
Design of a low power processor for Embedded system applications
 
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
 
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
 
Mirabilis_Design AMD Versal System-Level IP Library
Mirabilis_Design AMD Versal System-Level IP LibraryMirabilis_Design AMD Versal System-Level IP Library
Mirabilis_Design AMD Versal System-Level IP Library
 
IJCRT2006062.pdf
IJCRT2006062.pdfIJCRT2006062.pdf
IJCRT2006062.pdf
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture
 
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...
A PIC compatible RISC CPU core Implementation for FPGA based Configurable SOC...
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
 
Spie2006 Paperpdf
Spie2006 PaperpdfSpie2006 Paperpdf
Spie2006 Paperpdf
 
chameleon chip
chameleon chipchameleon chip
chameleon chip
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J Greaves
 
BigDL webinar - Deep Learning Library for Spark
BigDL webinar - Deep Learning Library for SparkBigDL webinar - Deep Learning Library for Spark
BigDL webinar - Deep Learning Library for Spark
 

Mais de RISC-V International

London Open Source Meetup for RISC-V
London Open Source Meetup for RISC-VLondon Open Source Meetup for RISC-V
London Open Source Meetup for RISC-VRISC-V International
 
Ziptillion boosting RISC-V with an efficient and os transparent memory comp...
Ziptillion   boosting RISC-V with an efficient and os transparent memory comp...Ziptillion   boosting RISC-V with an efficient and os transparent memory comp...
Ziptillion boosting RISC-V with an efficient and os transparent memory comp...RISC-V International
 
Standardizing the tee with global platform and RISC-V
Standardizing the tee with global platform and RISC-VStandardizing the tee with global platform and RISC-V
Standardizing the tee with global platform and RISC-VRISC-V International
 
Semi dynamics high bandwidth vector capable RISC-V cores
Semi dynamics high bandwidth vector capable RISC-V coresSemi dynamics high bandwidth vector capable RISC-V cores
Semi dynamics high bandwidth vector capable RISC-V coresRISC-V International
 
RISC-V NOEL-V - A new high performance RISC-V Processor Family
RISC-V NOEL-V - A new high performance RISC-V Processor FamilyRISC-V NOEL-V - A new high performance RISC-V Processor Family
RISC-V NOEL-V - A new high performance RISC-V Processor FamilyRISC-V International
 
RISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V International
 
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V International
 
RISC-V 30906 hex five multi_zone iot firmware
RISC-V 30906 hex five multi_zone iot firmwareRISC-V 30906 hex five multi_zone iot firmware
RISC-V 30906 hex five multi_zone iot firmwareRISC-V International
 
RISC-V 30946 manuel_offenberg_v3_notes
RISC-V 30946 manuel_offenberg_v3_notesRISC-V 30946 manuel_offenberg_v3_notes
RISC-V 30946 manuel_offenberg_v3_notesRISC-V International
 
RISC-V software state of the union
RISC-V software state of the unionRISC-V software state of the union
RISC-V software state of the unionRISC-V International
 
Ripes tracking computer architecture throught visual and interactive simula...
Ripes   tracking computer architecture throught visual and interactive simula...Ripes   tracking computer architecture throught visual and interactive simula...
Ripes tracking computer architecture throught visual and interactive simula...RISC-V International
 
Open source manufacturable pdk for sky water 130nm process node
Open source manufacturable pdk for sky water 130nm process nodeOpen source manufacturable pdk for sky water 130nm process node
Open source manufacturable pdk for sky water 130nm process nodeRISC-V International
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...Klessydra t - designing vector coprocessors for multi-threaded edge-computing...
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...RISC-V International
 

Mais de RISC-V International (20)

WD RISC-V inliner work effort
WD RISC-V inliner work effortWD RISC-V inliner work effort
WD RISC-V inliner work effort
 
RISC-V Zce Extension
RISC-V Zce ExtensionRISC-V Zce Extension
RISC-V Zce Extension
 
London Open Source Meetup for RISC-V
London Open Source Meetup for RISC-VLondon Open Source Meetup for RISC-V
London Open Source Meetup for RISC-V
 
Ziptillion boosting RISC-V with an efficient and os transparent memory comp...
Ziptillion   boosting RISC-V with an efficient and os transparent memory comp...Ziptillion   boosting RISC-V with an efficient and os transparent memory comp...
Ziptillion boosting RISC-V with an efficient and os transparent memory comp...
 
Standardizing the tee with global platform and RISC-V
Standardizing the tee with global platform and RISC-VStandardizing the tee with global platform and RISC-V
Standardizing the tee with global platform and RISC-V
 
Semi dynamics high bandwidth vector capable RISC-V cores
Semi dynamics high bandwidth vector capable RISC-V coresSemi dynamics high bandwidth vector capable RISC-V cores
Semi dynamics high bandwidth vector capable RISC-V cores
 
Security and functional safety
Security and functional safetySecurity and functional safety
Security and functional safety
 
RISC-V NOEL-V - A new high performance RISC-V Processor Family
RISC-V NOEL-V - A new high performance RISC-V Processor FamilyRISC-V NOEL-V - A new high performance RISC-V Processor Family
RISC-V NOEL-V - A new high performance RISC-V Processor Family
 
RISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_gen
 
RISC-V 30908 patra
RISC-V 30908 patraRISC-V 30908 patra
RISC-V 30908 patra
 
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentor
 
RISC-V 30906 hex five multi_zone iot firmware
RISC-V 30906 hex five multi_zone iot firmwareRISC-V 30906 hex five multi_zone iot firmware
RISC-V 30906 hex five multi_zone iot firmware
 
RISC-V 30946 manuel_offenberg_v3_notes
RISC-V 30946 manuel_offenberg_v3_notesRISC-V 30946 manuel_offenberg_v3_notes
RISC-V 30946 manuel_offenberg_v3_notes
 
RISC-V software state of the union
RISC-V software state of the unionRISC-V software state of the union
RISC-V software state of the union
 
Ripes tracking computer architecture throught visual and interactive simula...
Ripes   tracking computer architecture throught visual and interactive simula...Ripes   tracking computer architecture throught visual and interactive simula...
Ripes tracking computer architecture throught visual and interactive simula...
 
Porting tock to open titan
Porting tock to open titanPorting tock to open titan
Porting tock to open titan
 
Open j9 jdk on RISC-V
Open j9 jdk on RISC-VOpen j9 jdk on RISC-V
Open j9 jdk on RISC-V
 
Open source manufacturable pdk for sky water 130nm process node
Open source manufacturable pdk for sky water 130nm process nodeOpen source manufacturable pdk for sky water 130nm process node
Open source manufacturable pdk for sky water 130nm process node
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...Klessydra t - designing vector coprocessors for multi-threaded edge-computing...
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Reverse Engineering of Rocket-Chip SoC

  • 2. December 8-10 | Virtual Event Reverse Engineering of Rocket-Chip Dr. Roomi Naqvi, MERL Researchers & Students Director MERL-PAKISTAN #RISCVSUMMIT
  • 3. Outline • Motivation and Goals • Overview of Rocket Chip Generator1 • Deconstructing the Software Architecture – Rocket Chip Generator • Putting it all Together - Micro-Architecture and Software Specification Document (MASS) • Aghaaz (‫)آغاز‬ Chip SoC framework – A new beginning • Configuring the Aghaaz SoC • Summary and Future Directions 1. Asanović, Krste/Avizienis, Rimas/Bachrach, Jonathan et al. The Rocket Chip Generator. (2016)
  • 4. Motivation and Goals • Develop a Robust SoC generator framework for developing customized SoCs • Demonstrate our indigenous methodology used to reverse engineer Rocket-Chip for the generation of a custom System on a Chip (SoC). • An overview of the Micro-Architecture and Software Specification (MASS) document developed through our methodology that would enable • Used the MASS document together with Rocket-Chip generator to generate Aghaaz (‫)آغاز‬ SoC
  • 6. Rocket-Chip Generator Overview • Collection of SoC building blocks • Parameterized • Standard Interfaces • Chisel: open source hardware construction language embedded in scala • FIRRTL is used to emit Verilog from the Chisel Model • Composes RISC-V ISA based platforms Cores in-order scalar , out-of-order Core Tiles FPU, L1 Caches, Custom Accelerators, FPU Tile Link On chip fabric , Coherent Caches Peripheral Limited Support
  • 7. Rocket-Core Micro-Architecture • Rocket Core : 5-stage in-order scalar core generator
  • 8. Rocket-Core Modules Description Module Description PTW Page table is used to access the virtual memory.nL2TLBEntries parameter is used by Rocket-Chip PTW for controlling TLB entries. Priority Encoder Priority Encoder take all of the data inputs one at a time and converts them into an equivalent binary code at its output. Rocket-Chip Priority Encoder takes pins as inputs from BTB and EPC (from all stages) to select the value of NPC. EPC The Exception Program Counter (EPC) is used to store the address of the instruction that was executing when the exception was generated. The size of the EPC register depends upon the XLen which can be of either [31:0] or [63:0]. NPC New Program Counter (NPC) is used to increment +4 in current PC and store it in a register. The size of the NPC register depends upon the XLen which can be either [31:0] or [63:0]. NPC-Gen Modules Description PTW Priority Encoder EPC NPC
  • 9. Fetch Modules Description Module Description ICache The Instruction Cache acts as a buffer memory between external memory and the core processor. In Rocket-Chip size of the ICache sets, ways and block can be configured from the Config.scala file in subsystem directory of Scala files. Size of ICache is calculated by: nWays x nSets x blockBytes BTB Branch Target Buffer (BTB) is a cache-like component in processors that is used for branch prediction. The main concept of the BTB is to store the program counter (PC) of a branch instruction, and the PC of the target of the branch. The bit size of branch prediction is [1:0]. TLB Translation Lookaside Buffer (TLB) is a memory cache which is used to keep track of recently used transactions and reduce the time taken to access a user memory location’s. It is connected with Rocket-Chip PTW and work as cache for PTW. TLB entries is controlled by PTW of Rocket-Chip. ICache BTB TLB
  • 10. Module Description Register File Registers are temporary storage locations that hold data and addresses.The width of the rocket-Chip file register is fixed by the Xlen parameter either [31:0] or [63:0]. Instruction buffer Ibuffer is a temporary register where the opcode of the currently fetched instruction from instruction memory is stored. The RV32 or RV64 instruction opcode is [6:0] bits. RVC This Module holds RISC-V Compressed (C-Extension) Instructions. To use the RISC-V Compressed instructions, useCompressed [Bool], which is present in Rocket-Chip config file, should be true. Immediate Generation Immediate generation module generates immediate for instructions of RISC-V. This module is located in RocketCore.scala and returns immediate bits depending upon the size of ISA [31:0] or [63:0]. Instruction Decode This module decodes instructions for RISC-V which come from Instruction Memory. Scoreboard Scoreboards are designed to control the flow of data between registers and multiple arithmetic units in the presence of conflicts caused by hardware resource limitations (structural hazards) and by dependencies between instructions (data hazards).Scoreboard module lies in RocketCore.scala. CSR Control and Status Register (CSR) module contains control registers to enable and handle different interrupts and exceptions. Breakpoint A breakpoint is a location in executable code at which the operating system stops execution and breaks into the debugger. This allows you to analyze the target and issue debugger commands. Decode Modules Description Register File Instruction buffer RVC Immediate Generation Instruction Decode Scoreboard CSR Breakpoint
  • 11. Module Description HellaCache HellaCache is the acronym of Level 1 Data cache in Rocket-Chip. L1 Dcache directly built into the microprocessor, which is used for storing the microprocessor's recently accessed information, thus it is also called the primary cache. The size of the cache depends upon the width of the ISA. HellaCache Arbiter This module is for accessing L1 Dcache (HellaCache), by means of requests generated from other modules for read and write operations. PMP Physical Memory Protection (PMP) is a part of the RISC-V Privileged Architecture Specification which describes the interface for a standard RISC-V memory protection unit. The PMP defines a finite number of PMP regions which can be individually configured to enforce access permissions to a range of addresses in memory AMO-ALU This module is used to perform the A Extension RISCV operations. To use the Rocket Core Atomic ALU module, useAtmoics [Bool],which is in the rocket-Chip config file, should be true. Dcache This Module is used to hold the data for temporary period of time.Size of the Dcache sets, ways and block can be configured from the Config.scala file in subsystem directory of Scala files. Size of DCache is calculated by: nWays x nSets x blockBytes. Scratchpad (SPRAM) is a high-speed internal memory directly connected to the CPU core and used for temporary storage to hold very small items of data for rapid retrieval. To add the scratchpad in our SoC we need to call the scratchpad class in our config file which lies in system directory of Scala. Memory/ Write-Back Modules Description Module Description Multiplier This module is present inside the Rocket-Core execute stage and is used to perform M-Type Instructions. Multiplier operation is parameterizable and depends upon the XLen width (Width of the operands of Multiplier). XLen either [31:0] or [63:0]. ALU An arithmetic logic unit (ALU) used to perform arithmetic and logic operations in Rocket-Core. ALU operands is parameterizable depends upon the XLen width either [31:0] or [63:0]. Execute Modules Description HellaCache HellaCacheArbiter PMP AMO-ALU Dcache Scratchpad Multiplier ALU
  • 13. Code Complexity • The complexity of code of Rocket-Chip is high, because it contains 372 files in 73 directories, after the submodules the numbers increase to 151,613 files in 8,625 directories and after running the build script to generate an SoC the numbers grow to 185,049 files in 10,780 directories1 • The Rocket-Chip implementation code includes many variable names and hundreds of lines of code without any meaningful comments • This lack of documentation aggravates the ability to understand and results in difficulty in modifying Rocket-Core or its component as for customized requirements 1 Durrum, J., Bryant, A. and Porter, J., 2019. Reverse Engineering RISC-V Generator-Based Designs for Trust and Assurance. AFRL/RYDT WPAFB United States.
  • 14. Our Approach • Object Oriented Programming (OOP) and high-level Functional Programming concepts helps in understanding the code of Rocket-Chip. • Code complexity is reduced by means of Flowcharts, UML Class Diagrams and Block Diagrams of each modules of Rocket-Chip • Assigned a team of undergraduate CS students to go through the code line-by line • Develop a detailed document fusing the Software Architecture of the implementation with the MASS of Rocket-Chip
  • 15. Branch Target Buffer (BTB) Instruction Buffer Code Construction – Class Diagram
  • 16. Class name: IBuf Class name BTBResp Public attributes of class IBuf Public Methods of class IBuf Class IBuf has an instance of BTBResp initialized by the variable ibufBTBResp Class BTBResp is inherited from its parent class (BtbBundle), therefore it uses the methods of its parent class. Class Diagram Details
  • 17. Object Oriented Code of Rocket-Chip Inheritance Polymorphism Encapsulation Abstraction Abstraction is achieved by abstract keyword, creating an abstract trait of DecodeConstants. Private access modifier is used to encapsulate/hide method ‘access’ from other extended classes. Keyword extend is used to extend/inherit the PMP class with parent class PMPReg Keyword override is used to override method getOMSRAMs, which is already defined in its parent class.
  • 18. Putting it all Together (MASS: Hardware and Software)
  • 19. Code Explanation and Back-tracing by Flowcharts • Class RegFile: initiated with three parameters n, w and zero • Mem function creates memory/register file • Private method access is defined for accessing the register file data by taking the address as its input parameter • Private variable reads • Private variable canRead true for read state, false for write state • “read” method : read data from register file , addr is parameter
  • 20. regAddrMask [n] = depth/entry of register file m xLen[w] = 32bit/64 bit raddr = address [4:0] write data = data to be written in the register [31:0] / [63:0] rdata = data output from register file [31:0] / [63:0] RegFile – Block Diagram View
  • 21. Class Parameters is imported from directory config of rocket- chip Class CoreModule is imported from directory tile of rocket-chip Input/Output of class ALU are defined Object ALU is defined ALU operation bits are defined in method SZ_ALU_FN ALU operations are defined Importing all properties of Chisel Deep Dive into ALU Code View
  • 22. Rocket-Core ALU: Code block performs addition/subtraction • adder out: Result of the Addition/ Substraction • in2_inv : initialized with Mux function which has parameters, isSub function with parameter io.fn as selector, Not of io.in2 as input1 of Mux, and io.in2 as input2 of Mux • in1_xor_in2: initialized with io.in1 XOR’ed ( ^ ) with in2_inv. • io.adder_out: wired to io.in1 + in2_inv + isSub of io.fn ALU Code Explanation
  • 23. ALU I/O Description dw Data width is an input of ALU which can be 32bit or 64 bit fn fn (ALU operation Bits) as input, width is predefined by 4 in2 Second input, here xLen can be changed to 32 or 64bits in1 First input, here xLen can be changed to 32 or 64bits out ALU output for logical operators, generated by the ALU adder_out ALU output for mathematical operators, generated by the ALU cmp_out ALU output indicating branch taken or not taken ALU: Class Diagram to Block Diagram dw = datawidth [31:0]/[63:0] fn = ALUop bit [3:0] In1 = Operand B [31:0]/[63:0] In2 = Operand A [31:0]/[63:0] out = logical operators [31:0]/[63:0] adder_out = mathematical operations [31:0]/[63:0] cmp_out = branch result output [Bool]
  • 24. How did we do it? Using Reverse Engineered MASS Document, which includes in depth knowledge of all Rocket-Chip modules.
  • 25. Rocket-Core MASS Document • This MASS Document is invaluable for those who have fundamental knowledge of Scala, Chisel and SoC hardware • This MASS document offers in-depth knowledge of Rocket-Core building blocks and their chisel implementation • Using Block Diagrams, Class Diagrams, Flowcharts, and describing all the keywords found in the code, description of modules is achieved
  • 27. Specifications of Aghaaz (‫)آغاز‬ SoC • RV-32 (32-bit) • I, M & C extensions • 64-KB Instruction and Data Cache • CLINT – Core Local Interrupt Controller • PLIC – Peripheral Local Interrupt Controller • Privileged( Machine)
  • 28. Configuring the Aghaaz SoC and Core • Create a Aghaaz Core Class with requisite configuration • Add the Aghaaz Core class in the System configuration
  • 29. Configuring Aghaaz Core in Rocket-Chip Rocket-Core parameters Data Cache parameters Instruction Cache parameters Class named AghazCore, contains the configurations for the core level functionality. This class is created in Rocket-chip/src/main/scala/subsystem/Config.scala Path to Default Configuration Scala File
  • 30. Aghaaz Core Params – Default Configuration • In the RocketCoreParams, useCompressed is true, means C extension is enabled by default • Extension I is the base extension and is supported by default as well. useCompressed true useCompressed is for C-extension, it is true by default, means our Core will have C-extension enabled implicitly.
  • 31. Configuring RV32M Core RocketCoreParams has the parameters for configuring our Core. We added MulDiv(Multiplier) with MulDivParms, having default values, in the RocketCoreParams, in order to enable M extension in our Core. We updated the value of useAtomics to false, to disable A extension. Used to estimate of no of cycles per multiplication mulEarlyOut will make the multiplier's latency data- dependent, i.e., it will take fewer cycles to multiply small numbers than large ones. divEarlyOut is analogous to mulEarlyOut (smaller numbers divide more quickly than larger ones). We updated fpu (Floating-Point unit) to None, to disable F and D extensions in our core.
  • 32. Configuring the icache and dcache in Aghaaz Core Parameters Value Description nMSHRs 0 There are no MSHRs (Miss Status Handling Registers) nWays 16 There are 16 Ways of Cache in DCache nSets 64 There are 64 Sets of Cache in DCache blockBytes 64 There are 64 blockBytes in DCache Parameters Value Description nWays 4 There are 4 Ways of Cache in ICache nSets 256 There are 256 Sets of Cache in ICache blockBytes 64 There are 64 blockBytes in ICache DCacheParams : sets the Data Cache parameters ICacheParams : sets the Instruction Cache parameters Size of DCache = nWays x nSets x blockBytes : 16 x 64 x 64 = 64KB) Size of ICache =:4 x 256 x 64 =64KB
  • 33. Blocks of Core Aghaaz Core provides extensions for I, M and C with 32bit compatibility
  • 34. How did we know, which parameter is doing what? The MASS Document describes the full set of parameters, their description and modules that are managed by that parameter
  • 35. Blocks of Tile Rocket-Tile of Aghaaz SoC contains Aghaaz Core, Branch Target Buffer, L1 Icache & DCache of 64-KB.
  • 36. Initializing Aghaaz Core to Default Configuration • oldDefaultConfig is inherited by the class Config. • Class Config (Parent Class) includes the key configurations, from which all configurations must be inherited. • AghaazCore object is generated as a parameter with ’1’ indicating that there is only one(1) core in our AghaazCore. • AghaazCore object is further added to the WithCoherentBusTopology object, which includes configurations for the Bus level. • These objects are further added by the newBaseConfig object, which contains the base configurations. Default Configuration is created in Rocket-chip/src/main/scala/system/Config.scala Path to Default Configuration Scala File
  • 37. Customizing AghazCore to 32-bit Configuration
  • 39. At this point our Aghaaz SoC is successfully configured and ready to be built
  • 40. Summary and Future Direction  Presented an overview of the methodology used to Reverse engineer the Rocket Chip  Used the prescribed methodology to develop a Micro-Architecture and Software Specification Document (MASS) with more than 400 pages and growing  Used the MASS document to configure the Aghaaz SoC  Continue the Reverse Engineering Effort to cover diplomacy  Enhance the capabilities of Rocket Chip SoC framework to include I/O peripherals and the ability to built a full SoC ready for CHISEL-to-GDS  Work on improving the software architecture of the Rocket Chip
  • 41. Acknowledgements This Research was made possible with the counselling, guidance and support of Dr.Roomi Naqvi, Dr Ali Ahmed Ansari, and Farhan Ahmed Karim. Without their encouragement and guidance, this could not be possible. This presentation was created under the Lead of Uzair Khan, along with the team of collaborators/ interns under him that gave their level best under the supervision of such experienced mentors. Team Members Waleed Waseem Shahzaib Kashif Talha Ahmed Mohsin Raza Muhammad Shahzaib Syeda Fizza Jaffery Almas Ibrahim Ubab Nadeem
  • 43. December 8-10 | Virtual Event Thank you for joining us. Contribute to the RISC-V conversation on social! #RISCVSUMMIT @risc_v