Address generator unification PR reviews
This commit is contained in:
@@ -9,89 +9,30 @@ The L1 Caches
|
||||
Each CPU tile has an L1 instruction cache and L1 data cache. The size and
|
||||
associativity of these caches can be configured. The default ``RocketConfig``
|
||||
uses 16 KiB, 4-way set-associative instruction and data caches. However,
|
||||
if you use the ``NMedCores`` or ``NSmallCores`` configurations, you can
|
||||
if you use the ``WithNMedCores`` or ``WithNSmallCores`` configurations, you can
|
||||
configure 4 KiB direct-mapped caches for L1I and L1D.
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
class SmallRocketConfig extends Config(
|
||||
new chipyard.iobinders.WithUARTAdapter ++
|
||||
new chipyard.iobinders.WithTieOffInterrupts ++
|
||||
new chipyard.iobinders.WithSimAXIMem ++
|
||||
new chipyard.iobinders.WithTiedOffDebug ++
|
||||
new chipyard.iobinders.WithSimSerial ++
|
||||
new testchipip.WithTSI ++
|
||||
new chipyard.config.WithNoGPIO ++
|
||||
new chipyard.config.WithBootROM ++
|
||||
new chipyard.config.WithUART ++
|
||||
new chipyard.config.WithL2TLBs(1024) ++
|
||||
new freechips.rocketchip.subsystem.WithNoMMIOPort ++
|
||||
new freechips.rocketchip.subsystem.WithNoSlavePort ++
|
||||
new freechips.rocketchip.subsystem.WithInclusiveCache ++
|
||||
new freechips.rocketchip.subsystem.WithNExtTopInterrupts(0) ++
|
||||
new freechips.rocketchip.subsystem.WithNSmallCores(1) ++ // small rocket cores
|
||||
new freechips.rocketchip.system.BaseConfig)
|
||||
|
||||
class MediumRocketConfig extends Config(
|
||||
new chipyard.iobinders.WithUARTAdapter ++
|
||||
new chipyard.iobinders.WithTieOffInterrupts ++
|
||||
new chipyard.iobinders.WithSimAXIMem ++
|
||||
new chipyard.iobinders.WithTiedOffDebug ++
|
||||
new chipyard.iobinders.WithSimSerial ++
|
||||
new testchipip.WithTSI ++
|
||||
new chipyard.config.WithNoGPIO ++
|
||||
new chipyard.config.WithBootROM ++
|
||||
new chipyard.config.WithUART ++
|
||||
new chipyard.config.WithL2TLBs(1024) ++
|
||||
new freechips.rocketchip.subsystem.WithNoMMIOPort ++
|
||||
new freechips.rocketchip.subsystem.WithNoSlavePort ++
|
||||
new freechips.rocketchip.subsystem.WithInclusiveCache ++
|
||||
new freechips.rocketchip.subsystem.WithNExtTopInterrupts(0) ++
|
||||
new freechips.rocketchip.subsystem.WithNMediumCores(1) ++ // Medium rocket cores
|
||||
new freechips.rocketchip.system.BaseConfig)
|
||||
|
||||
|
||||
|
||||
If you only want to change the size or associativity, there are configuration
|
||||
mixins for those too.
|
||||
mixins for those too. See :ref:`Mixins` for how to add these to a custom ``Config``
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
import freechips.rocketchip.subsystem.{WithL1ICacheSets, WithL1DCacheSets, WithL1ICacheWays, WithL1DCacheWays}
|
||||
|
||||
class MyL1RocketConfig extends Config(
|
||||
new freechips.rocketchip.subsystem.WithL1ICacheSets(128) ++ // change rocket I$
|
||||
new freechips.rocketchip.subsystem.WithL1ICacheWays(2) ++ // change rocket I$
|
||||
new freechips.rocketchip.subsystem.WithL1DCacheSets(128) ++ // change rocket D$
|
||||
new freechips.rocketchip.subsystem.WithL1DCacheWays(2) ++ // change rocket D$
|
||||
new RocketConfig)
|
||||
|
||||
|
||||
You can also configure the L1 data cache as an data scratchpad instead.
|
||||
However, there are some limitations on this. If you are using a data scratchpad,
|
||||
you can only use a single core and you cannot give the design an external DRAM.
|
||||
Note that these configurations fully remove the L2 cache and mbus.
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
class ScratchpadSmallRocketConfig extends Config(
|
||||
new chipyard.iobinders.WithUARTAdapter ++
|
||||
new chipyard.iobinders.WithTieOffInterrupts ++
|
||||
new chipyard.iobinders.WithSimAXIMem ++
|
||||
new chipyard.iobinders.WithTiedOffDebug ++
|
||||
new chipyard.iobinders.WithSimSerial ++
|
||||
new testchipip.WithTSI ++
|
||||
new chipyard.config.WithNoGPIO ++
|
||||
new chipyard.config.WithBootROM ++
|
||||
new chipyard.config.WithUART ++
|
||||
new chipyard.config.WithL2TLBs(1024) ++
|
||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(0) ++
|
||||
new freechips.rocketchip.subsystem.WithNBanks(0) ++
|
||||
new freechips.rocketchip.subsystem.WithScratchpadsOnly ++
|
||||
new freechips.rocketchip.subsystem.WithNoMMIOPort ++
|
||||
new freechips.rocketchip.subsystem.WithNoSlavePort ++
|
||||
new freechips.rocketchip.subsystem.WithNExtTopInterrupts(0) ++
|
||||
new freechips.rocketchip.subsystem.WithNSmallCores(1) ++
|
||||
new freechips.rocketchip.system.BaseConfig)
|
||||
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
|
||||
:language: scala
|
||||
:start-after: DOC include start: scratchpadrocket
|
||||
:end-before: DOC include end: scratchpadrocket
|
||||
|
||||
|
||||
This configuration fully removes the L2 cache and memory bus by setting the
|
||||
@@ -121,27 +62,8 @@ To make such a configuration, you can just copy the definition of
|
||||
list of included mixims.
|
||||
|
||||
If you want to reduce the resources used even further, you can configure
|
||||
the Broadcast Hub to use a bufferless design.
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
class NoL2SmallRocketConfig extends Config(
|
||||
new chipyard.iobinders.WithUARTAdapter ++
|
||||
new chipyard.iobinders.WithTieOffInterrupts ++
|
||||
new chipyard.iobinders.WithSimAXIMem ++
|
||||
new chipyard.iobinders.WithTiedOffDebug ++
|
||||
new chipyard.iobinders.WithSimSerial ++
|
||||
new testchipip.WithTSI ++
|
||||
new chipyard.config.WithNoGPIO ++
|
||||
new chipyard.config.WithBootROM ++
|
||||
new chipyard.config.WithUART ++
|
||||
new chipyard.config.WithL2TLBs(1024) ++
|
||||
new freechips.rocketchip.subsystem.WithBufferlessBroadcastHub ++
|
||||
new freechips.rocketchip.subsystem.WithNoMMIOPort ++
|
||||
new freechips.rocketchip.subsystem.WithNoSlavePort ++
|
||||
new freechips.rocketchip.subsystem.WithNExtTopInterrupts(0) ++
|
||||
new freechips.rocketchip.subsystem.WithNSmallCores(1) ++
|
||||
new freechips.rocketchip.system.BaseConfig)
|
||||
the Broadcast Hub to use a bufferless design. This mixin is
|
||||
``freechips.rocketchip.subsystem.WithBufferlessBroadcastHub``.
|
||||
|
||||
|
||||
The Outer Memory System
|
||||
@@ -156,11 +78,7 @@ number of DRAM channels is restricted to powers of two.
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
import freechips.rocketchip.subsystem.WithNMemoryChannels
|
||||
|
||||
class DualChannelRocketConfig extends Config(
|
||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(2) ++
|
||||
new RocketConfig)
|
||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(2)
|
||||
|
||||
|
||||
In VCS and Verilator simulation, the DRAM is simulated using the
|
||||
|
||||
Reference in New Issue
Block a user