From 5fe971efe5cdc84cd3ce184183a449da55c18c69 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 09:29:31 -0700 Subject: [PATCH 01/21] Rocket core vs Rocket Chip --- docs/Generators/Rocket.rst | 7 ++++--- docs/Generators/RocketChip.rst | 16 ++++++++-------- docs/Generators/index.rst | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/Generators/Rocket.rst b/docs/Generators/Rocket.rst index 401b9e36..53ff0575 100644 --- a/docs/Generators/Rocket.rst +++ b/docs/Generators/Rocket.rst @@ -1,8 +1,9 @@ -Rocket +Rocket Core ==================================== -`Rocket `__ is a 5-stage in-order scalar core generator that is supported by `SiFive `__. -It supports the open source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. +`Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley an currently supported by `SiFive `__. The Rocket core is used as a component (a `tile`) within the Rocket Chip SoC generator. + +The Rocket core supports the open source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. It has an MMU that supports page-based virtual memory, a non-blocking data cache, and a front-end with branch prediction. Branch prediction is configurable and provided by a branch target buffer (BTB), branch history table (BHT), and a return address stack (RAS). For floating-point, Rocket makes use of Berkeley’s Chisel implementations of floating-point units. diff --git a/docs/Generators/RocketChip.rst b/docs/Generators/RocketChip.rst index b6050534..8ef12746 100644 --- a/docs/Generators/RocketChip.rst +++ b/docs/Generators/RocketChip.rst @@ -1,15 +1,15 @@ -RocketChip -========== +Rocket Chip +=========== -RocketChip is an SoC generator developed at Berkeley and now supported by -SiFive. Chipyard uses RocketChip as the basis for producing a RISC-V SoC. +Rocket Chip generator is an SoC generator developed at Berkeley and now supported by +SiFive. Chipyard uses the Rocket Chip generator as the basis for producing a RISC-V SoC. -RocketChip is distinct from Rocket, the in-order RISC-V CPU generator. -RocketChip includes many parts of the SoC besides the CPU. Though RocketChip -uses Rocket CPUs by default, it can also be configured to use the BOOM +`Rocket Chip` is distinct from `Rocket core`, the in-order RISC-V CPU generator. +Rocket Chip includes many parts of the SoC besides the CPU. Though Rocket Chip +uses Rocket core CPUs by default, it can also be configured to use the BOOM out-of-order core generator or some other custom CPU generator instead. -A detailed diagram of a typical RocketChip system is shown below. +A detailed diagram of a typical Rocket Chip system is shown below. .. image:: ../_static/images/rocketchip-diagram.png diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index a147ffeb..cd7d55ec 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -11,7 +11,7 @@ The following pages introduce the generators integrated with the Chipyard framew :maxdepth: 2 :caption: Generators: - Rocket - BOOM + Rocket Chip + Rocket Core + BOOM Core Hwacha - RocketChip From d04661194320e21291a080123bdd74e70fe18eb5 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 10:20:03 -0700 Subject: [PATCH 02/21] hwacha update --- docs/Generators/Hwacha.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/Generators/Hwacha.rst b/docs/Generators/Hwacha.rst index d040d35d..cf31d1b4 100644 --- a/docs/Generators/Hwacha.rst +++ b/docs/Generators/Hwacha.rst @@ -2,7 +2,12 @@ Hwacha ==================================== The Hwacha project is developing a new vector architecture for future computer systems that are constrained in their power and energy consumption. -Inspired by traditional vector machines from the 70s and 80s, and lessons learned from our previous vector-thread architectures Scale and Maven, we are bringing back elegant, performant, and energy-efficient aspects of vector processing to modern data-parallel architectures. -We propose a new vector-fetch architectural paradigm, which focuses on the following aspects for higher performance, better energy efficiency, and lower complexity. +The Hwacha project is inspired by traditional vector machines from the 70s and 80s, and lessons learned from our previous vector-thread architectures such as Scale and Maven +The Hwacha project includes the Hwacha microarchitecture generator, as well as the Hwacha non-standard RISC-V extension. Hwacha does not implement the RISC-V standard vector extension proposal. -For more information, please visit the `Hwacha website `__. +For more information on the Hwacha project, please visit the `Hwacha website `__. + +To add the Hwacha vector unit to an SoC, you should add the ``hwacha.DefaultHwachaConfig`` config mixin to the SoC configurations. + +Since Hwacha implements a non-standard RISC-V extension, it requires a unique software toolchain to be able to compile and asseble its vector instructions. +To install the Hwacha toolchain, run the ``./scripts/build-toolchains.sh esp-tools`` command within the root Chipyard directory. This may take a while, and it will install the ``esp-tools-install`` directory within your Chipyard root directory. ``esp-tools`` are a fork of ``riscv-tools`` (formelty a collection of relevant software RISC-V tools) that were enhanced with the additional non-standard vector instructions. However, due to the upstreaming of the equivalent RISC-V toolchains, esp-tools may not be up-to-date with the latest mainline version of the tools included in it. From eae76451594a8d7aca9f4079ace11a9ae87ac8ca Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 11:56:26 -0700 Subject: [PATCH 03/21] sifive generators --- docs/Customization/Memory-Hierarchy.rst | 2 + docs/Generators/SiFive-Generators.rst | 43 +++++++++++++++++++ .../example/src/main/scala/ConfigMixins.scala | 4 ++ .../src/main/scala/RocketConfigs.scala | 2 + 4 files changed, 51 insertions(+) create mode 100644 docs/Generators/SiFive-Generators.rst diff --git a/docs/Customization/Memory-Hierarchy.rst b/docs/Customization/Memory-Hierarchy.rst index 39955310..207e0775 100644 --- a/docs/Customization/Memory-Hierarchy.rst +++ b/docs/Customization/Memory-Hierarchy.rst @@ -1,3 +1,5 @@ +.. _memory-hierarchy: + Memory Hierarchy =============================== diff --git a/docs/Generators/SiFive-Generators.rst b/docs/Generators/SiFive-Generators.rst new file mode 100644 index 00000000..1ddab4f2 --- /dev/null +++ b/docs/Generators/SiFive-Generators.rst @@ -0,0 +1,43 @@ +SiFive Generators +================== + +Chipyard includes several open-source generators developed and maintained by `SiFive `__. +These are currently organized within two submodules named ``sifive-blocks`` and ``sifive-cache``. + +L2 Cache +--------- + +``sifive-cache`` includes an L2 cache geneator. To use this L2 cache, you should add the ``freechips.rocketchip.subsystem.WithInclusiveCache`` mixin to your SoC configuration. +To learn more about configuring this L2, please refer to the :ref:`memory-hierarchy` section. + + +Perihperal Devices +------------------- +``sifive-blocks`` includes multiple peripheral device generators. These include UART, SPI, PWM, JTAG, GPIO and more. + +These peripheral devices usually affect the memory map of the SoC, and its top-level IO as well. +To integrate one of these devices in your SoC, you will need to define a custom mixin with the approriate address for the device using the Rocket Chip parameter system. As an example, for a GPIO device you could add the following mixin to set the GPIO address to ``0x10012000``. + +.. literalinclude:: ../../generators/example/src/main/scala/ConfigMixins.scala + :language: scala + :start-after: DOC include start: WithGPIO + :end-before: DOC include end: WithGPIO + +Additionally, if the device requires top-level IOs, you will need to define a mixin to change the top-level configuration of your SoC. +When adding a top-level IO, you should also be aware of whether it interacts with the test-harness. +For example, a GPIO device would require a GPIO pin, and therefore we would write a mixin to augment the top level as follows: + +.. literalinclude:: ../../generators/example/src/main/scala/ConfigMixins.scala + :language: scala + :start-after: DOC include start: WithGPIOTop + :end-before: DOC include end: WithGPIOTop + + +Finally, you add the relevant config mixin to the SoC config. For example: + +.. literalinclude:: ../../generators/example/src/main/scala/RocketConfigs.scala + :language: scala + :start-after: DOC include start: GPIORocketConfig + :end-before: DOC include end: GPIORocketConfig + +Some of the devices in ``sifive-blocks`` (such as GPIO) may already have pre-defined mixins within the Chipyard example project. You may be able to use these config mixin directly, but you should be aware of their addresses within the SoC address map. diff --git a/generators/example/src/main/scala/ConfigMixins.scala b/generators/example/src/main/scala/ConfigMixins.scala index a829db22..9d92d896 100644 --- a/generators/example/src/main/scala/ConfigMixins.scala +++ b/generators/example/src/main/scala/ConfigMixins.scala @@ -37,6 +37,7 @@ class WithBootROM extends Config((site, here, up) => { contentFileName = s"./bootrom/bootrom.rv${site(XLen)}.img") }) +// DOC include start: WithGPIO /** * Class to add in GPIO */ @@ -44,6 +45,7 @@ class WithGPIO extends Config((site, here, up) => { case PeripheryGPIOKey => List( GPIOParams(address = 0x10012000, width = 4, includeIOF = false)) }) +// DOC include end: WithGPIO // ----------------------------------------------- // BOOM and/or Rocket Top Level System Parameter Mixins @@ -107,6 +109,7 @@ class WithSimBlockDeviceTop extends Config((site, here, up) => { } }) +// DOC include start: WithGPIOTop /** * Class to specify a top level BOOM and/or Rocket system with GPIO */ @@ -121,6 +124,7 @@ class WithGPIOTop extends Config((site, here, up) => { top } }) +// DOC include end: WithGPIOTop // ------------------ // Multi-RoCC Support diff --git a/generators/example/src/main/scala/RocketConfigs.scala b/generators/example/src/main/scala/RocketConfigs.scala index 2275549f..a50ad4a7 100644 --- a/generators/example/src/main/scala/RocketConfigs.scala +++ b/generators/example/src/main/scala/RocketConfigs.scala @@ -73,6 +73,7 @@ class BlockDeviceModelRocketConfig extends Config( new freechips.rocketchip.subsystem.WithNBigCores(1) ++ new freechips.rocketchip.system.BaseConfig) +// DOC include start: GPIORocketConfig class GPIORocketConfig extends Config( new WithGPIO ++ // add GPIOs to the peripherybus new WithGPIOTop ++ // use top with GPIOs @@ -80,6 +81,7 @@ class GPIORocketConfig extends Config( new freechips.rocketchip.subsystem.WithInclusiveCache ++ new freechips.rocketchip.subsystem.WithNBigCores(1) ++ new freechips.rocketchip.system.BaseConfig) +// DOC include end: GPIORocketConfig class DualCoreRocketConfig extends Config( new WithTop ++ From 9af3391f87b7890e4819351e24f7ffb818556c9c Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 11:56:34 -0700 Subject: [PATCH 04/21] fix index --- docs/Generators/index.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index cd7d55ec..a08d6bb2 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -11,7 +11,8 @@ The following pages introduce the generators integrated with the Chipyard framew :maxdepth: 2 :caption: Generators: - Rocket Chip - Rocket Core + RocketChip + Rocket BOOM Core Hwacha + SiFive-Generators From 8fbf02c8fe703da109be194e5409ccf56816ba92 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 11:58:50 -0700 Subject: [PATCH 05/21] fix index --- docs/Generators/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index a08d6bb2..1b9f56c8 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -13,6 +13,6 @@ The following pages introduce the generators integrated with the Chipyard framew RocketChip Rocket - BOOM Core + BOOM Hwacha SiFive-Generators From 80328d0c4da4784dbd638b397aeed6c347e04450 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 12:08:08 -0700 Subject: [PATCH 06/21] clarify GPIO top example --- docs/Generators/SiFive-Generators.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Generators/SiFive-Generators.rst b/docs/Generators/SiFive-Generators.rst index 1ddab4f2..7777a766 100644 --- a/docs/Generators/SiFive-Generators.rst +++ b/docs/Generators/SiFive-Generators.rst @@ -32,6 +32,8 @@ For example, a GPIO device would require a GPIO pin, and therefore we would writ :start-after: DOC include start: WithGPIOTop :end-before: DOC include end: WithGPIOTop +This example instantiates a top-level module with include GPIO ports (``TopWithGPIO``), and then ties-off the GPIO port inputs to 0 (``false.B``). + Finally, you add the relevant config mixin to the SoC config. For example: From c6f57559002b1d41fe3360ca3e03f88414272ccf Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 12:18:56 -0700 Subject: [PATCH 07/21] some more hwacha info --- docs/Generators/Hwacha.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Generators/Hwacha.rst b/docs/Generators/Hwacha.rst index cf31d1b4..60549ddb 100644 --- a/docs/Generators/Hwacha.rst +++ b/docs/Generators/Hwacha.rst @@ -7,7 +7,9 @@ The Hwacha project includes the Hwacha microarchitecture generator, as well as t For more information on the Hwacha project, please visit the `Hwacha website `__. -To add the Hwacha vector unit to an SoC, you should add the ``hwacha.DefaultHwachaConfig`` config mixin to the SoC configurations. +To add the Hwacha vector unit to an SoC, you should add the ``hwacha.DefaultHwachaConfig`` config mixin to the SoC configurations. The Hwacha vector unit uses the RoCC port of a `Rocket Chip tile`, and by default connects to the memory system through the `System Bus` (i.e., directly to the L2 cache). + +To change to configuration of the Hwacha vector unit, you can write a custom configuration to replace the ``DefaultHwachaConfig``. You can view the ``DefaultHwachaConfig`` under ``generators/hwacha/src/main/scala/configs.scala`` to see the possible configuration parameters. Since Hwacha implements a non-standard RISC-V extension, it requires a unique software toolchain to be able to compile and asseble its vector instructions. To install the Hwacha toolchain, run the ``./scripts/build-toolchains.sh esp-tools`` command within the root Chipyard directory. This may take a while, and it will install the ``esp-tools-install`` directory within your Chipyard root directory. ``esp-tools`` are a fork of ``riscv-tools`` (formelty a collection of relevant software RISC-V tools) that were enhanced with the additional non-standard vector instructions. However, due to the upstreaming of the equivalent RISC-V toolchains, esp-tools may not be up-to-date with the latest mainline version of the tools included in it. From b858c76f0952ac72bf1d57246ee7f6debfe3b9f9 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 12:28:39 -0700 Subject: [PATCH 08/21] fix rocket core ref --- docs/Chipyard-Basics/Chipyard-Components.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Chipyard-Basics/Chipyard-Components.rst b/docs/Chipyard-Basics/Chipyard-Components.rst index 250beb85..6d54ad94 100644 --- a/docs/Chipyard-Basics/Chipyard-Components.rst +++ b/docs/Chipyard-Basics/Chipyard-Components.rst @@ -8,12 +8,13 @@ Generators The Chipyard Framework currently consists of the following RTL generators: + Processor Cores ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -**Rocket** +**Rocket Core** An in-order RISC-V core. - See :ref:`Rocket` for more information. + See :ref:`Rocket Core` for more information. **BOOM (Berkeley Out-of-Order Machine)** An out-of-order RISC-V core. From fc0e86d74417d73e713a7846b381d7464ddf8f4f Mon Sep 17 00:00:00 2001 From: Albert Magyar Date: Wed, 25 Sep 2019 13:37:59 -0700 Subject: [PATCH 09/21] Fix typo in tutorial config --- generators/example/src/main/scala/RocketConfigs.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/example/src/main/scala/RocketConfigs.scala b/generators/example/src/main/scala/RocketConfigs.scala index 2275549f..dcd2d01c 100644 --- a/generators/example/src/main/scala/RocketConfigs.scala +++ b/generators/example/src/main/scala/RocketConfigs.scala @@ -50,7 +50,7 @@ class PWMRocketConfig extends Config( new freechips.rocketchip.system.BaseConfig) // DOC include end: PWMRocketConfig -class PWMRAXI4ocketConfig extends Config( +class PWMAXI4RocketConfig extends Config( new WithPWMAXI4Top ++ // use top with axi4-controlled PWM new WithBootROM ++ new freechips.rocketchip.subsystem.WithInclusiveCache ++ From 38fef1782f48f8870c27594431294990ca792a5f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 25 Sep 2019 13:50:22 -0700 Subject: [PATCH 10/21] add firrtl interpreter to the docs [ci skip] --- docs/Tools/Treadle.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/Tools/Treadle.rst b/docs/Tools/Treadle.rst index 19df75de..9e3d6154 100644 --- a/docs/Tools/Treadle.rst +++ b/docs/Tools/Treadle.rst @@ -1,5 +1,7 @@ -Treadle +Treadle and FIRRTL Interpreter ============================== -`Treadle `__ is a circuit simulator that directly executes FIRRTL. -It is especially useful for interactive debugging and small unit tests that benefit from a low-overhead simulator. +`Treadle `__ and `FIRRTL Interpreter `__ +are circuit simulators that directly execute FIRRTL (specifically low-firrtl IR). +They are especially useful for interactive debugging and many of projects within Chipyard +use them for a low-overhead simulator. From 318cccd541136da0c58885745b311162198683e4 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 14:03:54 -0700 Subject: [PATCH 11/21] docs reorg --- docs/Chipyard-Basics/index.rst | 2 - docs/Quick-Start.rst | 16 +-- .../Running-A-Simulation.rst | 8 ++ docs/Simulation/Software-RTL-Simulation.rst | 134 ++++++++++++++++++ docs/Simulation/Software-RTL-Simulators.rst | 75 ---------- docs/Simulation/index.rst | 8 +- .../Building-A-Chip.rst | 0 docs/VLSI/index.rst | 1 + 8 files changed, 156 insertions(+), 88 deletions(-) rename docs/{Chipyard-Basics => Simulation}/Running-A-Simulation.rst (99%) create mode 100644 docs/Simulation/Software-RTL-Simulation.rst delete mode 100644 docs/Simulation/Software-RTL-Simulators.rst rename docs/{Chipyard-Basics => VLSI}/Building-A-Chip.rst (100%) diff --git a/docs/Chipyard-Basics/index.rst b/docs/Chipyard-Basics/index.rst index be46c627..3c05c864 100644 --- a/docs/Chipyard-Basics/index.rst +++ b/docs/Chipyard-Basics/index.rst @@ -20,5 +20,3 @@ Hit next to get started! Chipyard-Components Configs-Parameters-Mixins Initial-Repo-Setup - Running-A-Simulation - Building-A-Chip diff --git a/docs/Quick-Start.rst b/docs/Quick-Start.rst index 936597e6..0c76f369 100644 --- a/docs/Quick-Start.rst +++ b/docs/Quick-Start.rst @@ -34,16 +34,16 @@ What's Next? This depends on what you are planning to do with Chipyard. +* If you intend to run a simulation of one of the vanilla Chipyard examples, go to :ref:`sw-rtl-sim-intro` and follow the instructions. + +* If you intend to run a simulation of a custom Chipyard SoC Configuration, go to :ref:`sw-sim-custom` and follow the instructions. + +* If you intend to run a full-system FireSim simulation, go to :ref:`firesim-sim-intro` and follow the instructions. + +* If you intend to add a new accelerator, go to :ref:`adding-an-accelerator` and follow the instructions. + * If you want to learn about the structure of Chipyard, go to :ref:`chipyard-components`. * If you intend to build one of the vanilla Chipyard examples, go to :ref:`build-a-chip` and follow the instructions. -* If you intend to add a new accelerator, go to :ref:`adding-an-accelerator` and follow the instructions. - -* If you intend to run a simulation of one of the vanilla Chipyard examples, go to :ref:`sw-rtl-sim-intro` and follow the instructions. - -* If you intend to run a simulation of a custom Chipyard SoC Configuration, go to <> and follow the instructions. - -* If you intend to run a full-system FireSim simulation, go to :ref:`firesim-sim-intro` and follow the instructions. - * If you intend to run a VLSI flow using one of the vanilla Chipyard examples, go to <> and follow the instructions. diff --git a/docs/Chipyard-Basics/Running-A-Simulation.rst b/docs/Simulation/Running-A-Simulation.rst similarity index 99% rename from docs/Chipyard-Basics/Running-A-Simulation.rst rename to docs/Simulation/Running-A-Simulation.rst index 76eb0acb..a4346ed5 100644 --- a/docs/Chipyard-Basics/Running-A-Simulation.rst +++ b/docs/Simulation/Running-A-Simulation.rst @@ -39,13 +39,21 @@ In order to construct the simulator with our custom design, we run the following make SBT_PROJECT=... MODEL=... VLOG_MODEL=... MODEL_PACKAGE=... CONFIG=... CONFIG_PACKAGE=... GENERATOR_PACKAGE=... TB=... TOP=... Each of these make variables correspond to a particular part of the design/codebase and are needed so that the make system can correctly build and make a RTL simulation. + The ``SBT_PROJECT`` is the ``build.sbt`` project that holds all of the source files and that will be run during the RTL build. + The ``MODEL`` and ``VLOG_MODEL`` are the top-level class names of the design. + Normally, these are the same, but in some cases these can differ (if the Chisel class differs than what is emitted in the Verilog). + The ``MODEL_PACKAGE`` is the Scala package (in the Scala code that says ``package ...``) that holds the ``MODEL`` class. + The ``CONFIG`` is the name of the class used for the parameter Config while the ``CONFIG_PACKAGE`` is the Scala package it resides in. + The ``GENERATOR_PACKAGE`` is the Scala package that holds the Generator class that elaborates the design. + The ``TB`` is the name of the Verilog wrapper that connects the ``TestHarness`` to VCS/Verilator for simulation. + Finally, the ``TOP`` variable is used to distinguish between the top-level of the design and the ``TestHarness`` in our system. For example, in the normal case, the ``MODEL`` variable specifies the ``TestHarness`` as the top-level of the design. However, the true top-level design, the SoC being simulated, is pointed to by the ``TOP`` variable. diff --git a/docs/Simulation/Software-RTL-Simulation.rst b/docs/Simulation/Software-RTL-Simulation.rst new file mode 100644 index 00000000..490fece4 --- /dev/null +++ b/docs/Simulation/Software-RTL-Simulation.rst @@ -0,0 +1,134 @@ +.. _sw-rtl-sim-intro: + +Software RTL Simulation +=================================== + +Verilator (Open-Source) +----------------------- + +`Verilator `__ is an open-source LGPL-Licensed simulator maintained by `Veripool `__. +The Chipyard framework can download, build, and execute simulations using Verilator. + + +Synopsys VCS (License Required) +-------------------------------- + +`VCS `__ is a commercial RTL simulator developed by Synopsys. +It requires commercial licenses. +The Chipyard framework can compile and execute simulations using VCS. +VCS simulation will generally compile faster than Verilator simulations. + +To run a VCS simulation, make sure that the VCS simulator is on your ``PATH``. + + +Choice of Simulator +------------------------------- + +First, we will start by entering the Verilator or VCS directory: + +For an open-source Verilator simulation, enter the ``sims/verilator`` directory +.. code-block:: shell + + # Enter Verilator directory + cd sims/verilator + +For a proprietry VCS simulation, enter the ``sims/vcs`` directory + +.. code-block:: shell + + # Enter VCS directory + cd sims/vcs + + +.. _sim-default: +Simulating The Default Example +------------------------------- + +To compile the example design, run ``make`` in the selected verilator or VCS directory. +This will elaborate the ``RocketConfig`` in the example project. + +An executable called ``simulator-example-RocketConfig`` will be produced. +This executable is a simulator that has been compiled based on the design that was built. +You can then use this executable to run any compatible RV64 code. +For instance, to run one of the riscv-tools assembly tests. + +.. code-block:: shell + + ./simulator-example-RocketConfig $RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv64ui-p-simple + +Alternatively, we can run a pre-packaged suite of RISC-V assembly or benchmark tests, by adding the make target ``run-asm-tests`` or ``run-bmark-tests``. +For example: + +.. code-block:: shell + + make run-asm-tests + make run-bmark-tests + + +.. _sw-sim-custom: +Simulating A Custom Project +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you later create your own project, you can use environment variables to build an alternate configuration. + +In order to construct the simulator with our custom design, we run the following command within the simulator directory: + +.. code-block:: shell + + make SBT_PROJECT=... MODEL=... VLOG_MODEL=... MODEL_PACKAGE=... CONFIG=... CONFIG_PACKAGE=... GENERATOR_PACKAGE=... TB=... TOP=... + +Each of these make variables correspond to a particular part of the design/codebase and are needed so that the make system can correctly build and make a RTL simulation. + +The ``SBT_PROJECT`` is the ``build.sbt`` project that holds all of the source files and that will be run during the RTL build. + +The ``MODEL`` and ``VLOG_MODEL`` are the top-level class names of the design. + +Normally, these are the same, but in some cases these can differ (if the Chisel class differs than what is emitted in the Verilog). + +The ``MODEL_PACKAGE`` is the Scala package (in the Scala code that says ``package ...``) that holds the ``MODEL`` class. + +The ``CONFIG`` is the name of the class used for the parameter Config while the ``CONFIG_PACKAGE`` is the Scala package it resides in. + +The ``GENERATOR_PACKAGE`` is the Scala package that holds the Generator class that elaborates the design. + +The ``TB`` is the name of the Verilog wrapper that connects the ``TestHarness`` to VCS/Verilator for simulation. + +Finally, the ``TOP`` variable is used to distinguish between the top-level of the design and the ``TestHarness`` in our system. +For example, in the normal case, the ``MODEL`` variable specifies the ``TestHarness`` as the top-level of the design. +However, the true top-level design, the SoC being simulated, is pointed to by the ``TOP`` variable. +This separation allows the infrastructure to separate files based on the harness or the SoC top level. + +Common configurations of all these variables are packaged using a ``SUB_PROJECT`` make variable. +Therefore, in order to simulate a simple Rocket-based example system we can use: + + +.. code-block:: shell + + make SUB_PROJECT=yourproject + ./simulator-- ... + + +All `Make` targets that can be applied to the default example, can also be applied to custom project using the custom environment variables. For example, the following code example will run the RISC-V assembly benchmark suite on the BOOM subproject: + +.. code-block:: shell + + make SUB_PROJECT=boom run-asm-tests + + +Finally, in the ``generated-src/<...>--/`` directory resides all of the collateral and Verilog source files for the build/simulation. +Specifically, the SoC top-level (``TOP``) Verilog file is denoted with ``*.top.v`` while the ``TestHarness`` file is denoted with ``*.harness.v``. + + +Generating Waveforms +----------------------- + +If you would like to extract waveforms from the simulation, run the command ``make debug`` instead of just ``make``. + + +For a Verilator simulation, this will generate a vcd file (vcd is a standard waveform representation file format) that can be loaded to any common waveform viewer. +An open-source vcd-capable waveform viewer is `GTKWave `__. + + +For a VCS simulation, this will generate a vpd file (this is a proprietary waveform representation format used by Synopsys) that can be loaded to vpd-supported waveform viewers. +If you have Synopsys licenses, we recommend using the DVE waveform viewer. + diff --git a/docs/Simulation/Software-RTL-Simulators.rst b/docs/Simulation/Software-RTL-Simulators.rst deleted file mode 100644 index 5dd4e527..00000000 --- a/docs/Simulation/Software-RTL-Simulators.rst +++ /dev/null @@ -1,75 +0,0 @@ -.. _sw-rtl-sim-intro: - -Software RTL Simulators -=================================== - -Verilator (Open-Source) ------------------------ - -`Verilator `__ is an open-source LGPL-Licensed simulator maintained by `Veripool `__. -The Chipyard framework can download, build, and execute simulations using Verilator. - -To run a simulation using Verilator, perform the following steps: - -To compile the example design, run ``make`` in the ``sims/verilator`` directory. -This will elaborate the ``RocketConfig`` in the example project. - -An executable called ``simulator-example-RocketConfig`` will be produced. -This executable is a simulator that has been compiled based on the design that was built. -You can then use this executable to run any compatible RV64 code. -For instance, to run one of the riscv-tools assembly tests. - -.. code-block:: shell - - ./simulator-example-RocketConfig $RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv64ui-p-simple - -If you later create your own project, you can use environment variables to build an alternate configuration. - -.. code-block:: shell - - make SUB_PROJECT=yourproject - ./simulator-- ... - -If you would like to extract waveforms from the simulation, run the command ``make debug`` instead of just ``make``. -This will generate a vcd file (vcd is a standard waveform representation file format) that can be loaded to any common waveform viewer. -An open-source vcd-capable waveform viewer is `GTKWave `__. - -Please refer to :ref:`Running A Simulation` for a step by step tutorial on how to get a simulator up and running. -Commercial Software RTL Simulators - -Synopsys VCS (License Required) --------------------------------- - -`VCS `__ is a commercial RTL simulator developed by Synopsys. -It requires commercial licenses. -The Chipyard framework can compile and execute simulations using VCS. -VCS simulation will generally compile faster than Verilator simulations. - -To run a simulation using VCS, perform the following steps: - -Make sure that the VCS simulator is on your ``PATH``. - -To compile the example design, run make in the ``sims/vcs`` directory. -This will elaborate the ``RocketConfig`` in the example project. - -An executable called ``simulator-example-RocketConfig`` will be produced. -This executable is a simulator that has been compiled based on the design that was built. -You can then use this executable to run any compatible RV64 code. -For instance, to run one of the riscv-tools assembly tests. - -.. code-block:: shell - - ./simulator-example-RocketConfig $RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv64ui-p-simple - -If you later create your own project, you can use environment variables to build an alternate configuration. - -.. code-block:: shell - - make SUB_PROJECT=yourproject - ./simulator-- ... - -If you would like to extract waveforms from the simulation, run the command ``make debug`` instead of just ``make``. -This will generate a vpd file (this is a proprietary waveform representation format used by Synopsys) that can be loaded to vpd-supported waveform viewers. -If you have Synopsys licenses, we recommend using the DVE waveform viewer. - -Please refer to :ref:`Running A Simulation` for a step by step tutorial on how to get a simulator up and running. diff --git a/docs/Simulation/index.rst b/docs/Simulation/index.rst index 50dbb57e..fe0fa161 100644 --- a/docs/Simulation/index.rst +++ b/docs/Simulation/index.rst @@ -1,4 +1,4 @@ -Simulators +Simulation ======================= Chipyard supports two classes of simulation: @@ -12,9 +12,11 @@ at O(100 MHz), making them appropriate for booting an operating system and running a complete workload, but have multi-hour compile times and poorer debug visability. +Click next to see how to run a simulation. + .. toctree:: :maxdepth: 2 - :caption: Simulators: + :caption: Simulation: - Software-RTL-Simulators + Software-RTL-Simulation FPGA-Accelerated-Simulators diff --git a/docs/Chipyard-Basics/Building-A-Chip.rst b/docs/VLSI/Building-A-Chip.rst similarity index 100% rename from docs/Chipyard-Basics/Building-A-Chip.rst rename to docs/VLSI/Building-A-Chip.rst diff --git a/docs/VLSI/index.rst b/docs/VLSI/index.rst index f8bdb7a8..44303769 100644 --- a/docs/VLSI/index.rst +++ b/docs/VLSI/index.rst @@ -8,4 +8,5 @@ In particular, we aim to support the HAMMER physical design generator flow. :maxdepth: 2 :caption: VLSI Flow: + Building-A-Chip HAMMER From beae2cfcf9de642a1d8ed58254c6157f41855780 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 25 Sep 2019 16:38:09 -0700 Subject: [PATCH 12/21] emphasize that firrtl-interpreter is deprecated | mention smaller modules [ci skip] --- docs/Tools/Treadle.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/Tools/Treadle.rst b/docs/Tools/Treadle.rst index 9e3d6154..4c6d016c 100644 --- a/docs/Tools/Treadle.rst +++ b/docs/Tools/Treadle.rst @@ -1,7 +1,9 @@ Treadle and FIRRTL Interpreter ============================== -`Treadle `__ and `FIRRTL Interpreter `__ +`Treadle `__ and +`FIRRTL Interpreter `__ are circuit simulators that directly execute FIRRTL (specifically low-firrtl IR). -They are especially useful for interactive debugging and many of projects within Chipyard -use them for a low-overhead simulator. +Treadle is the replacement for FIRRTL Interpreter but FIRRTL Interpreter is still used within some +projects. Treadle is useful for simulating modules in a larger SoC design. Many projects +use Treadle for interactive debugging and a low-overhead simulator. From 2524b02806bc6657caaecf8b5c6a32dcbcd47a08 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 16:52:54 -0700 Subject: [PATCH 13/21] PR comments --- docs/Generators/Hwacha.rst | 8 ++++---- docs/Generators/{RocketChip.rst => Rocket-Chip.rst} | 0 docs/Generators/Rocket.rst | 2 +- docs/Generators/SiFive-Generators.rst | 12 ++++++------ docs/Generators/index.rst | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) rename docs/Generators/{RocketChip.rst => Rocket-Chip.rst} (100%) diff --git a/docs/Generators/Hwacha.rst b/docs/Generators/Hwacha.rst index 60549ddb..5d3e7e4f 100644 --- a/docs/Generators/Hwacha.rst +++ b/docs/Generators/Hwacha.rst @@ -3,13 +3,13 @@ Hwacha The Hwacha project is developing a new vector architecture for future computer systems that are constrained in their power and energy consumption. The Hwacha project is inspired by traditional vector machines from the 70s and 80s, and lessons learned from our previous vector-thread architectures such as Scale and Maven -The Hwacha project includes the Hwacha microarchitecture generator, as well as the Hwacha non-standard RISC-V extension. Hwacha does not implement the RISC-V standard vector extension proposal. +The Hwacha project includes the Hwacha microarchitecture generator, as well as the ``XHwacha`` non-standard RISC-V extension. Hwacha does not implement the RISC-V standard vector extension proposal. For more information on the Hwacha project, please visit the `Hwacha website `__. -To add the Hwacha vector unit to an SoC, you should add the ``hwacha.DefaultHwachaConfig`` config mixin to the SoC configurations. The Hwacha vector unit uses the RoCC port of a `Rocket Chip tile`, and by default connects to the memory system through the `System Bus` (i.e., directly to the L2 cache). +To add the Hwacha vector unit to an SoC, you should add the ``hwacha.DefaultHwachaConfig`` config mixin to the SoC configurations. The Hwacha vector unit uses the RoCC port of a Rocket or BOOM `tile`, and by default connects to the memory system through the `System Bus` (i.e., directly to the L2 cache). -To change to configuration of the Hwacha vector unit, you can write a custom configuration to replace the ``DefaultHwachaConfig``. You can view the ``DefaultHwachaConfig`` under ``generators/hwacha/src/main/scala/configs.scala`` to see the possible configuration parameters. +To change the configuration of the Hwacha vector unit, you can write a custom configuration to replace the ``DefaultHwachaConfig``. You can view the ``DefaultHwachaConfig`` under ``generators/hwacha/src/main/scala/configs.scala`` to see the possible configuration parameters. Since Hwacha implements a non-standard RISC-V extension, it requires a unique software toolchain to be able to compile and asseble its vector instructions. -To install the Hwacha toolchain, run the ``./scripts/build-toolchains.sh esp-tools`` command within the root Chipyard directory. This may take a while, and it will install the ``esp-tools-install`` directory within your Chipyard root directory. ``esp-tools`` are a fork of ``riscv-tools`` (formelty a collection of relevant software RISC-V tools) that were enhanced with the additional non-standard vector instructions. However, due to the upstreaming of the equivalent RISC-V toolchains, esp-tools may not be up-to-date with the latest mainline version of the tools included in it. +To install the Hwacha toolchain, run the ``./scripts/build-toolchains.sh esp-tools`` command within the root Chipyard directory. This may take a while, and it will install the ``esp-tools-install`` directory within your Chipyard root directory. ``esp-tools`` is a fork of ``riscv-tools`` (formerly a collection of relevant software RISC-V tools) that was enhanced with additional non-standard vector instructions. However, due to the upstreaming of the equivalent RISC-V toolchains, ``esp-tools`` may not be up-to-date with the latest mainline version of the tools included in it. diff --git a/docs/Generators/RocketChip.rst b/docs/Generators/Rocket-Chip.rst similarity index 100% rename from docs/Generators/RocketChip.rst rename to docs/Generators/Rocket-Chip.rst diff --git a/docs/Generators/Rocket.rst b/docs/Generators/Rocket.rst index 53ff0575..50da2777 100644 --- a/docs/Generators/Rocket.rst +++ b/docs/Generators/Rocket.rst @@ -1,7 +1,7 @@ Rocket Core ==================================== -`Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley an currently supported by `SiFive `__. The Rocket core is used as a component (a `tile`) within the Rocket Chip SoC generator. +`Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley an currently supported by `SiFive `__. The `Rocket core` is used as a component within the `Rocket Chip SoC generator`. A Rocket core combined with L1 caches (data and instruction caches) form a `Rocket tile`. The `Rocket tile` is the replicable component of the `Rocket Chip SoC generator`. The Rocket core supports the open source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. It has an MMU that supports page-based virtual memory, a non-blocking data cache, and a front-end with branch prediction. diff --git a/docs/Generators/SiFive-Generators.rst b/docs/Generators/SiFive-Generators.rst index 7777a766..bed61769 100644 --- a/docs/Generators/SiFive-Generators.rst +++ b/docs/Generators/SiFive-Generators.rst @@ -4,16 +4,16 @@ SiFive Generators Chipyard includes several open-source generators developed and maintained by `SiFive `__. These are currently organized within two submodules named ``sifive-blocks`` and ``sifive-cache``. -L2 Cache ---------- +Last-Level Cache Generator +----------------------------- -``sifive-cache`` includes an L2 cache geneator. To use this L2 cache, you should add the ``freechips.rocketchip.subsystem.WithInclusiveCache`` mixin to your SoC configuration. -To learn more about configuring this L2, please refer to the :ref:`memory-hierarchy` section. +``sifive-cache`` includes last-level cache geneator. The Chipyard framework uses this last-level cache as an L2 cache. To use this L2 cache, you should add the ``freechips.rocketchip.subsystem.WithInclusiveCache`` mixin to your SoC configuration. +To learn more about configuring this L2 cache, please refer to the :ref:`memory-hierarchy` section. Perihperal Devices ------------------- -``sifive-blocks`` includes multiple peripheral device generators. These include UART, SPI, PWM, JTAG, GPIO and more. +``sifive-blocks`` includes multiple peripheral device generators, such as UART, SPI, PWM, JTAG, GPIO and more. These peripheral devices usually affect the memory map of the SoC, and its top-level IO as well. To integrate one of these devices in your SoC, you will need to define a custom mixin with the approriate address for the device using the Rocket Chip parameter system. As an example, for a GPIO device you could add the following mixin to set the GPIO address to ``0x10012000``. @@ -42,4 +42,4 @@ Finally, you add the relevant config mixin to the SoC config. For example: :start-after: DOC include start: GPIORocketConfig :end-before: DOC include end: GPIORocketConfig -Some of the devices in ``sifive-blocks`` (such as GPIO) may already have pre-defined mixins within the Chipyard example project. You may be able to use these config mixin directly, but you should be aware of their addresses within the SoC address map. +Some of the devices in ``sifive-blocks`` (such as GPIO) may already have pre-defined mixins within the Chipyard example project. You may be able to use these config mixins directly, but you should be aware of their addresses within the SoC address map. diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index 1b9f56c8..32d799d7 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -11,7 +11,7 @@ The following pages introduce the generators integrated with the Chipyard framew :maxdepth: 2 :caption: Generators: - RocketChip + Rocket-Chip Rocket BOOM Hwacha From bb819cfbbf93552722ee172978b7d8e9e882dd7e Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 16:56:32 -0700 Subject: [PATCH 14/21] hwacha link --- docs/Generators/Hwacha.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/Hwacha.rst b/docs/Generators/Hwacha.rst index 5d3e7e4f..240d6fc9 100644 --- a/docs/Generators/Hwacha.rst +++ b/docs/Generators/Hwacha.rst @@ -9,7 +9,7 @@ For more information on the Hwacha project, please visit the `Hwacha website `__ to see the possible configuration parameters. Since Hwacha implements a non-standard RISC-V extension, it requires a unique software toolchain to be able to compile and asseble its vector instructions. To install the Hwacha toolchain, run the ``./scripts/build-toolchains.sh esp-tools`` command within the root Chipyard directory. This may take a while, and it will install the ``esp-tools-install`` directory within your Chipyard root directory. ``esp-tools`` is a fork of ``riscv-tools`` (formerly a collection of relevant software RISC-V tools) that was enhanced with additional non-standard vector instructions. However, due to the upstreaming of the equivalent RISC-V toolchains, ``esp-tools`` may not be up-to-date with the latest mainline version of the tools included in it. From 0f793bfb0777431d52f453000dd8b216d424f51d Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 17:16:38 -0700 Subject: [PATCH 15/21] add makefile asm-tests note --- docs/Simulation/Software-RTL-Simulation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Simulation/Software-RTL-Simulation.rst b/docs/Simulation/Software-RTL-Simulation.rst index 490fece4..becd9ce8 100644 --- a/docs/Simulation/Software-RTL-Simulation.rst +++ b/docs/Simulation/Software-RTL-Simulation.rst @@ -65,6 +65,9 @@ For example: make run-bmark-tests +.. Note:: Before running the pre-packaged suites, you must run the plain ``make`` command, since the elaboration command generates a Makefile fragment that contains the target for the pre-packaged test suites. Otherwise, you will likely encounter a Makefile target error. + + .. _sw-sim-custom: Simulating A Custom Project ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From db1d84d9f8e52878c47f29a89cfbf871d08dda4f Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 17:57:49 -0700 Subject: [PATCH 16/21] typo --- docs/Generators/Rocket.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/Rocket.rst b/docs/Generators/Rocket.rst index 50da2777..96796738 100644 --- a/docs/Generators/Rocket.rst +++ b/docs/Generators/Rocket.rst @@ -1,7 +1,7 @@ Rocket Core ==================================== -`Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley an currently supported by `SiFive `__. The `Rocket core` is used as a component within the `Rocket Chip SoC generator`. A Rocket core combined with L1 caches (data and instruction caches) form a `Rocket tile`. The `Rocket tile` is the replicable component of the `Rocket Chip SoC generator`. +`Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley and currently supported by `SiFive `__. The `Rocket core` is used as a component within the `Rocket Chip SoC generator`. A Rocket core combined with L1 caches (data and instruction caches) form a `Rocket tile`. The `Rocket tile` is the replicable component of the `Rocket Chip SoC generator`. The Rocket core supports the open source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. It has an MMU that supports page-based virtual memory, a non-blocking data cache, and a front-end with branch prediction. From d908192bde1f8188d316c7577b314e8e4379827b Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 17:59:18 -0700 Subject: [PATCH 17/21] typo --- docs/Generators/Rocket.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/Rocket.rst b/docs/Generators/Rocket.rst index 96796738..6c55b761 100644 --- a/docs/Generators/Rocket.rst +++ b/docs/Generators/Rocket.rst @@ -3,7 +3,7 @@ Rocket Core `Rocket `__ is a 5-stage in-order scalar processor core generator, originally developed at UC Berkeley and currently supported by `SiFive `__. The `Rocket core` is used as a component within the `Rocket Chip SoC generator`. A Rocket core combined with L1 caches (data and instruction caches) form a `Rocket tile`. The `Rocket tile` is the replicable component of the `Rocket Chip SoC generator`. -The Rocket core supports the open source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. +The Rocket core supports the open-source RV64GC RISC-V instruction set and is written in the Chisel hardware construction language. It has an MMU that supports page-based virtual memory, a non-blocking data cache, and a front-end with branch prediction. Branch prediction is configurable and provided by a branch target buffer (BTB), branch history table (BHT), and a return address stack (RAS). For floating-point, Rocket makes use of Berkeley’s Chisel implementations of floating-point units. From 90bafa64099ff5cb41d070f232edce968c564e69 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 18:01:38 -0700 Subject: [PATCH 18/21] GPIO clarification --- docs/Generators/SiFive-Generators.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/SiFive-Generators.rst b/docs/Generators/SiFive-Generators.rst index bed61769..17776b6e 100644 --- a/docs/Generators/SiFive-Generators.rst +++ b/docs/Generators/SiFive-Generators.rst @@ -16,7 +16,7 @@ Perihperal Devices ``sifive-blocks`` includes multiple peripheral device generators, such as UART, SPI, PWM, JTAG, GPIO and more. These peripheral devices usually affect the memory map of the SoC, and its top-level IO as well. -To integrate one of these devices in your SoC, you will need to define a custom mixin with the approriate address for the device using the Rocket Chip parameter system. As an example, for a GPIO device you could add the following mixin to set the GPIO address to ``0x10012000``. +To integrate one of these devices in your SoC, you will need to define a custom mixin with the approriate address for the device using the Rocket Chip parameter system. As an example, for a GPIO device you could add the following mixin to set the GPIO address to ``0x10012000``. This address is the start address for the GPIO configuration registers. .. literalinclude:: ../../generators/example/src/main/scala/ConfigMixins.scala :language: scala From a33b716504b0b86caf571d4ab6ae64429683052c Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 18:07:44 -0700 Subject: [PATCH 19/21] typo --- docs/Generators/SiFive-Generators.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Generators/SiFive-Generators.rst b/docs/Generators/SiFive-Generators.rst index 17776b6e..8f2202b0 100644 --- a/docs/Generators/SiFive-Generators.rst +++ b/docs/Generators/SiFive-Generators.rst @@ -11,7 +11,7 @@ Last-Level Cache Generator To learn more about configuring this L2 cache, please refer to the :ref:`memory-hierarchy` section. -Perihperal Devices +Peripheral Devices ------------------- ``sifive-blocks`` includes multiple peripheral device generators, such as UART, SPI, PWM, JTAG, GPIO and more. From 4443f72f378516c66e2e5c5d0fbf2c97f4ae09e7 Mon Sep 17 00:00:00 2001 From: alonamid Date: Wed, 25 Sep 2019 18:12:25 -0700 Subject: [PATCH 20/21] simulator name update --- docs/Simulation/Software-RTL-Simulation.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Simulation/Software-RTL-Simulation.rst b/docs/Simulation/Software-RTL-Simulation.rst index becd9ce8..fcae121b 100644 --- a/docs/Simulation/Software-RTL-Simulation.rst +++ b/docs/Simulation/Software-RTL-Simulation.rst @@ -56,6 +56,8 @@ For instance, to run one of the riscv-tools assembly tests. ./simulator-example-RocketConfig $RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv64ui-p-simple +.. Note:: in a VCS simulator, the simulator name will be ``simv-example-RocketConfig`` ``instead of simulator-example-RocketConfig``. + Alternatively, we can run a pre-packaged suite of RISC-V assembly or benchmark tests, by adding the make target ``run-asm-tests`` or ``run-bmark-tests``. For example: From 4bbc1f8b0630b64a2718d4c0338e771b1726b7ec Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 25 Sep 2019 18:45:51 -0700 Subject: [PATCH 21/21] change example subproject to hwacha [ci skip] --- docs/Simulation/Software-RTL-Simulation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Simulation/Software-RTL-Simulation.rst b/docs/Simulation/Software-RTL-Simulation.rst index fcae121b..b9da8e3d 100644 --- a/docs/Simulation/Software-RTL-Simulation.rst +++ b/docs/Simulation/Software-RTL-Simulation.rst @@ -67,7 +67,7 @@ For example: make run-bmark-tests -.. Note:: Before running the pre-packaged suites, you must run the plain ``make`` command, since the elaboration command generates a Makefile fragment that contains the target for the pre-packaged test suites. Otherwise, you will likely encounter a Makefile target error. +.. Note:: Before running the pre-packaged suites, you must run the plain ``make`` command, since the elaboration command generates a Makefile fragment that contains the target for the pre-packaged test suites. Otherwise, you will likely encounter a Makefile target error. .. _sw-sim-custom: @@ -113,11 +113,11 @@ Therefore, in order to simulate a simple Rocket-based example system we can use: ./simulator-- ... -All `Make` targets that can be applied to the default example, can also be applied to custom project using the custom environment variables. For example, the following code example will run the RISC-V assembly benchmark suite on the BOOM subproject: +All `Make` targets that can be applied to the default example, can also be applied to custom project using the custom environment variables. For example, the following code example will run the RISC-V assembly benchmark suite on the Hwacha subproject: .. code-block:: shell - make SUB_PROJECT=boom run-asm-tests + make SUB_PROJECT=hwacha run-asm-tests Finally, in the ``generated-src/<...>--/`` directory resides all of the collateral and Verilog source files for the build/simulation.