Home

Awesome

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

Dependencies

This repository depends on the following projects: