Skip to content
/ midas Public

FPGA-Accelerated Simulation Framework Automatically Transforming Arbitrary RTL

License

Notifications You must be signed in to change notification settings

ucb-bar/midas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golden Gate (MIDAS II)

Golden Gate is an optimizing FIRRTL compiler for generating FPGA-accelerated simulators automatically from Chisel-based RTL design, and is the basis for simulator compilation in FireSim.

Golden Gate is the successor to MIDAS, which was originally based off the Strober sample-based energy simulation framework. Golden Gate differs from prior work in that it is, to our knowledge, the first compiler to support automatic multi-model composition: it can break apart a block of RTL into a graph of models. Golden Gate uses this feature to identify and replace FPGA-hostile blocks with multi-host-cycle models that consume fewer FPGA resources while still exactly representing the behavior of the source RTL. In our ICCAD 2019 paper, we leverage this feature optimize multi-ported RAMs in order to fit an extra two BOOM cores (6 up from 4) on a Xilinx VU9P.

Changes From MIDAS

Golden Gate inherits nearly all of the features of MIDAS, including, FASED memory timing models, assertion synthesis, and printf synthesis, but there are some notable changes:

1. Support for Resource Optimizations

As mentioned above, Golden Gate can identify and optimize FPGA-hostile structures in the target RTL. This is described at length in our ICCAD2019 paper. Currently Golden Gate only supports optimizing multi-ported memories, but other resource-reducing optimizations are under development.

2. Different Inputs and Invocation Model (FIRRTL Stage).

Golden Gate is not invoked in the same process as the target generator. instead it's invoked as a seperate process and provided with three inputs:

  1. FIRRTL for the target-design
  2. Associated FIRRTL annotations for that design
  3. A compiler parameterization (derived from Rocket Chip's Config system). annotations. This permits decoupling the target Generator from the compiler, and enables the resuse of the same FIRRTL between multiple simulation or EDA backends. midas.Compiler will be removed in the next release.

3. Endpoints Have Been Replaced With Target-to-Host Bridges.

Unlike Endpoints, which were instantiated by matching on a Chisel I/O type, target-to-host bridges (or bridges, for short) are instantiated directly in the target's RTL (i.e., in Chisel). Unlike endpoints, bridges can be instantiated anywhere in the module heirachy, and can more effectively capture module-hierarchy-dependent parameterization information from the target. This makes it easier to have multiple instances of the same bridge with difference parameterizations.

4. The Input Target Design Must Be Closed

The FIRRTL passed to Golden Gate must expose no dangling I/O (with the exception of one input clock): instead the target should be wrapped in a module that instantiates the appropriate bridges. This wrapper module is directly analogous to a test harness used in software-based RTL simulation. How these bridges are instantiated is left to the user, but multiple different examples can be found in FireSim. One benefit of this "closed-world" approach is that the topology of the simulator (as a network of simulation models) is guaranteed to match the topology of the input design.

5. Different Underlying Dataflow Network Formalism

Golden Gate uses the Latency-Insensitive Bounded-Dataflow Network (LI-BDN) target formalism. This makes it possible to model combinational paths that span multiple models, and to prove that properties about target-cycle exactness and deadlock freedom in the resulting simulator.

Documentation

Golden Gate's documentation is hosted in FireSim's Read-The-Docs

Related Publications

  • Albert Magyar, David T. Biancolin, Jack Koenig, Sanjit Seshia, Jonathan Bachrach, Krste Asanović, Golden Gate: Bridging The Resource-Efficiency Gap Between ASICs and FPGA Prototypes, To appear at ICCAD '19.(Paper PDF)
  • David Biancolin, Sagar Karandikar, Donggyu Kim, Jack Koenig, Andrew Waterman, Jonathan Bachrach, Krste Asanović, “FASED: FPGA-Accelerated Simulation and Evaluation of DRAM”, In proceedings of the 27th ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, Seaside, CA, February 2019. (Paper PDF)
  • Donggyu Kim, Christopher Celio, Sagar Karandikar, David Biancolin, Jonathan Bachrach, and Krste Asanović, “DESSERT: Debugging RTL Effectively with State Snapshotting for Error Replays across Trillions of cycles”, In proceedings of the 28th International Conference on Field Programmable Logic & Applications (FPL 2018), Dublin, Ireland, August 2018. (IEEE Xplore)
  • Sagar Karandikar, Howard Mao, Donggyu Kim, David Biancolin, Alon Amid, Dayeol Lee, Nathan Pemberton, Emmanuel Amaro, Colin Schmidt, Aditya Chopra, Qijing Huang, Kyle Kovacs, Borivoje Nikolić, Randy Katz, Jonathan Bachrach, and Krste Asanović, “FireSim: FPGA-Accelerated Cycle-Exact Scale-Out System Simulation in the Public Cloud”, In proceedings of the 45th ACM/IEEE International Symposium on Computer Architecture (ISCA 2018), Los Angeles, June 2018. (Paper PDF, IEEE Xplore) Selected as one of IEEE Micro’s “Top Picks from Computer Architecture Conferences, 2018”.
  • Donggyu Kim, Christopher Celio, David Biancolin, Jonathan Bachrach, and Krste Asanović, "Evaluation of RISC-V RTL with FPGA-Accelerated Simulation", The First Workshop on Computer Architecture Research with RISC-V (CARRV 2017), Boston, MA, USA, Oct 2017. (Paper PDF)
  • Donggyu Kim, Adam Izraelevitz, Christopher Celio, Hokeun Kim, Brian Zimmer, Yunsup Lee, Jonathan Bachrach, and Krste Asanović, "Strober: Fast and Accurate Sample-Based Energy Simulation for Arbitrary RTL", International Symposium on Computer Architecture (ISCA-2016), Seoul, Korea, June 2016. (ACM DL, Slides)

Dependencies

This repository depends on the following projects:

  • Chisel: Target-RTL that MIDAS transformed must be written in Chisel RTL in the current version. Additionally, MIDAS RTL libraries are all written in Chisel.
  • FIRRTL: Transformations of target-RTL are performed using FIRRTL compiler passes.
  • RocketChip: Rocket Chip is not only a chip generator, but also a collection of useful libraries for various hardware designs.
  • barstools: Some additional technology-dependent custom transforms(e.g. macro compiler) are required when Strober energy modelling is enabled.

About

FPGA-Accelerated Simulation Framework Automatically Transforming Arbitrary RTL

Resources

License

Stars

Watchers

Forks

Packages

No packages published