package execute
- Alphabetic
- Public
- All
Type Members
-
class
BarrelShifterPlugin extends ExecutionUnitElementSimple
Implements the RISC-V integer shift instructions use a single left barrel shifter pre/post bit reverse for right shifts
-
class
BranchPlugin extends ExecutionUnitElementSimple with LearnSource
Implement the branch/jump handeling in the execute stage.
Implement the branch/jump handeling in the execute stage. Depending if the CPU has a BTB it work completly differently. - If there is no BTB, then the plugin work very "normaly" and just execute the incoming instructions - If there is a BTB, then the goal of the plugin is to check if the predictions done were right, and correct if necessary
In the case there is multiple BranchPlugin on a given execution lane, they will share quite a bit of hardware via the PcCalc Area. Also, only the last instance of BranchPlugin on a given execution lane will feed the LearnPlugin via its LearnSource service. This reduce the hardware area aswell as reducing the possibility of multiple BranchPlugin providing LearnSource request at the same time.
- case class CompletionPayload() extends Bundle with Product with Serializable
-
trait
CompletionService extends AnyRef
Allows a plugin to publish a list of interface which provide micro-op completion notifications
-
class
CsrAccessPlugin extends FiberPlugin with CsrService
Implements the RISC-V CSR read/write instructions, aswell as provide an API for other plugin to populate the CSR space.
Implements the RISC-V CSR read/write instructions, aswell as provide an API for other plugin to populate the CSR space. In other words, this plugin do not define any CSR, but provide an API to define them (that API is defined in CsrService).
To help with the FMax, CSR accesses are implemented by using a state-machine. Accesses are done over 4 cycles : idle -> read -> write -> completion
This maybe a bit overkilled, but as the CSR access isn't critical for the IPC, better to much cycles than not enough.
- case class CsrBus() extends Bundle with Product with Serializable
- case class CsrDecode() extends Bundle with Product with Serializable
- class CsrHartApi extends AnyRef
- case class CsrIsReadingCsr(csrFilter: Any, value: Bool) extends CsrSpec with Product with Serializable
- case class CsrIsReadingHartId(hartId: Int, value: Bool) extends Product with Serializable
- case class CsrListFilter(mapping: Seq[Int]) extends Nameable with Product with Serializable
- case class CsrOnDecode(csrFilter: Any, priority: Int, body: () ⇒ Unit) extends CsrSpec with Product with Serializable
- case class CsrOnRead(csrFilter: Any, onlyOnFire: Boolean, body: () ⇒ Unit) extends CsrSpec with Product with Serializable
- case class CsrOnReadData(bitOffset: Int, value: Bits) extends Product with Serializable
- case class CsrOnReadToWrite(csrFilter: Any, body: () ⇒ Unit) extends CsrSpec with Product with Serializable
- case class CsrOnWrite(csrFilter: Any, onlyOnFire: Boolean, body: () ⇒ Unit) extends CsrSpec with Product with Serializable
- class CsrRamAllocation extends AnyRef
-
class
CsrRamPlugin extends FiberPlugin with CsrRamService with InitService
Implement a RAM and provide an API (CsrRamService) that allows other plugins to : - Staticaly allocate memory space - Map the allocated memory space on the CPU CSR instruction - Create new read/write access ports to the memory.
Implement a RAM and provide an API (CsrRamService) that allows other plugins to : - Staticaly allocate memory space - Map the allocated memory space on the CPU CSR instruction - Create new read/write access ports to the memory.
This plugin is used mostly to implement large CSR as mepc, mtval, aswell as for implementing the performance counters
- case class CsrRamRead(addressWidth: Int, dataWidth: Int, priority: Int) extends Bundle with Product with Serializable
- trait CsrRamService extends Area
- case class CsrRamWrite(addressWidth: Int, dataWidth: Int, priority: Int) extends Bundle with Product with Serializable
- case class CsrRead() extends Bundle with Product with Serializable
-
trait
CsrService extends AnyRef
Service which provide a bunch of primitives allowing to map some hardware to the CSR address space
- class CsrSpec extends AnyRef
- case class CsrWrite() extends Bundle with Product with Serializable
- case class CsrWriteCancel(csrFilter: Any, cond: Bool) extends CsrSpec with Product with Serializable
-
class
DivPlugin extends ExecutionUnitElementSimple with DivReuse
Implement the RISC-V division instruction using an unsigned divider.
Implement the RISC-V division instruction using an unsigned divider. but the actual division hardware is provided through a landa function parameter.
- trait DivReuse extends AnyRef
-
class
EnvPlugin extends ExecutionUnitElementSimple
Implements a bunch of special instruction which always traps into the TrapPlugin.
Implements a bunch of special instruction which always traps into the TrapPlugin. (ecall, ebreak, mret, fences, efi, ...)
-
class
ExecuteLanePlugin extends FiberPlugin with ExecuteLaneService with CompletionService with InflightService
Implements an execution lane : - Read the register files - Implement register files bypass logic - Register which execution layer are working on that lane - ...
-
trait
ExecuteLaneService extends Area
Provide an API to access an exeuction lanes.
-
class
ExecutePipelinePlugin extends FiberPlugin with PipelineService
Provide the execution pipeline skeleton for the ExecuteLanePlugin
Provide the execution pipeline skeleton for the ExecuteLanePlugin
The flow control of the whole execute pipeline is interlocked / do not collapse bubbles (freezeIt/isFreezed) The reason is to preserve the relative timings between the instruction as the dispatcher requires it.
-
abstract
class
ExecutionUnitElementSimple extends FiberPlugin
This is a simple skeleton to ease the implementation of simple execution plugins.
This is a simple skeleton to ease the implementation of simple execution plugins. It assume a single writeback and a single completion For a simple example, look at the IntAluPlugin.
-
class
IntAluPlugin extends ExecutionUnitElementSimple
Implements most of the integer processing instructions (but not the shift/mul/div)
-
class
IntFormatPlugin extends FiberPlugin
This plugin provide an API which allows other plugins to generate an hardware interface to writeback integer results back to the register file with some specified hardware formating : - sign extension - zero extension
This plugin provide an API which allows other plugins to generate an hardware interface to writeback integer results back to the register file with some specified hardware formating : - sign extension - zero extension
One nice thing is that the hardware which does the formating is shared between all the instructions which opperate in the same stage.
-
class
IterativeShifterPlugin extends ExecutionUnitElementSimple
Iterative Shifter
Iterative Shifter
The default parameters are optimized for 6-input LUT devices (since it will use 4:1 muxes (load/shift 1/shift 8/flip), but additional shifts can be added to increase performance. Only 2**n shift distances are well supported, other distances will lead to suboptimal shift sequence if needed multiple times.
lateResult can be used to make the done logic slighly smaller, which should not be needed for the default configuration. Enabling it costs 1 cycle for all shifts.
-
class
LaneLayer extends AnyRef
Used to model an execution lane layer.
Used to model an execution lane layer. For isntance if you have a dual issue pipeline with early and late ALUs, then you will have 4 LaneLayers
So, this class will store the model of every micro-op that it supports, aswell as the timing that they have (when do they use RS1/RS2, when do they provide a RD value, ..., by using the UopLayerSpec class.
-
case class
LsuL1Bus(p: LsuL1BusParameter) extends Bundle with IMasterSlave with Product with Serializable
Define the VexiiRiscv LsuL1 native memory bus.
Define the VexiiRiscv LsuL1 native memory bus. Its memory coherency protocol is close to tilelink, but has a few minor twists : - probe request may fail in Vexii, and so, need to be retried - probe request which produce a permition downgrade will be acknoledged on the probe.rsp bus, but will also generate a write.cmd writeback (which can be data-less)
All memory transaction are assumed to be the size of a cache line, including probes.
- case class LsuL1BusParameter(addressWidth: Int, dataWidth: Int, readIdCount: Int, writeIdCount: Int, probeIdWidth: Int, ackIdWidth: Int, lineSize: Int, withReducedBandwidth: Boolean, withCoherency: Boolean) extends Product with Serializable
- case class LsuL1ProbeBus(p: LsuL1BusParameter) extends Bundle with IMasterSlave with Product with Serializable
- case class LsuL1ProbeCmd(p: LsuL1BusParameter) extends Bundle with Product with Serializable
- case class LsuL1ProbeRsp(p: LsuL1BusParameter, fromProbe: Boolean) extends Bundle with Product with Serializable
- case class LsuL1ReadAck(p: LsuL1BusParameter) extends Bundle with Product with Serializable
- case class LsuL1ReadBus(p: LsuL1BusParameter) extends Bundle with IMasterSlave with Product with Serializable
- case class LsuL1ReadCmd(p: LsuL1BusParameter) extends Bundle with Product with Serializable
- case class LsuL1ReadRsp(p: LsuL1BusParameter) extends Bundle with Product with Serializable
- case class LsuL1WriteBus(p: LsuL1BusParameter) extends Bundle with IMasterSlave with Product with Serializable
- case class LsuL1WriteCmd(p: LsuL1BusParameter) extends Bundle with Product with Serializable
- case class LsuL1WriteRsp(p: LsuL1BusParameter) extends Bundle with Product with Serializable
-
class
MulPlugin extends ExecutionUnitElementSimple with MulReuse
Implement RISC-V multiplication instructions by subdividing them into partial ones.
Implement RISC-V multiplication instructions by subdividing them into partial ones. For instance, 32bits x 32 bits = a[15: 0]*b[15: 0] + a[15: 0]*b[31:16] + a[31:16]*b[15: 0] + a[31:16]*b[31:16]
This calculation is splited over multiple stages to get a good FMax on FPGA (in general)
bufferedHigh can be used to buffer the mulh instruction one extra cycle on the stage to improve the FMax at the cost of one idle cycle.
- trait MulReuse extends AnyRef
- class OpKeys extends SrcKeys
- class PcCalc extends Area
-
case class
RdSpec(rf: RegfileSpec, DATA: Payload[Bits], broadcastedFrom: Int, rfReadableFrom: Int) extends Product with Serializable
Used to model the RISC-V RD usage of a given micro-op
-
case class
RsSpec(rf: RegfileSpec, rs: RfRead) extends Product with Serializable
Used to model the RISC-V RS1/RS2 usage of a given micro-op
-
class
RsUnsignedPlugin extends FiberPlugin
This plugin takes the integer RS1/RS2 and unsigne them.
This plugin takes the integer RS1/RS2 and unsigne them. This can be used by other plugins to share that hardware. ex : unsigned divider, unsigned multiplier, ...
- class SimdAddPlugin extends ExecutionUnitElementSimple
-
class
SimdAddRawPlugin extends FiberPlugin
Same as SimdAddPlugin, but wihtout the help of the ExecutionUnitElementSimple skeleton.
- class Src1Keys extends SrcKeys
- class Src2Keys extends SrcKeys
- class SrcKeys extends AnyRef
-
class
SrcPlugin extends FiberPlugin
This plugin takes the RS1/RS2/Instruction values early in the execute pipeline and produce SRC1/SRC2/ADD_SUB/LESS values out of it.
This plugin takes the RS1/RS2/Instruction values early in the execute pipeline and produce SRC1/SRC2/ADD_SUB/LESS values out of it.
Other plugins can specify what processing they are interrested for SRC1/SRC2 in function of which instruction is being executed. SRC1/SRC2 are muxed values between RS1/RS2 and literals in the instruction. ADD_SUB can be either the addition or substraction between SRC1 and SRC2 LESS specifies if SRC1 is less than SRC2 (unsigned or signed comparison)
- case class UopImplKey(uop: MicroOp, name: LaneLayer) extends Product with Serializable
-
class
UopLayerSpec extends AnyRef
Specfies how a given MicroOp is implemented in a given LaneLayer - RD/RS1/RS2 timings and usages - Completion timing - Flush supported/behaviour - Additional decoding required - Shared hardware reservations
-
class
WriteBackPlugin extends FiberPlugin with RegFileWriterService
This plugin allows other plugins to create interface to write in the register file from where they want in the pipeline.
This plugin allows other plugins to create interface to write in the register file from where they want in the pipeline. The trick is that this plugin will only instanciate one register file write port at the last stage, and pipeline all the write interface created for the other plugins to that point.
- class ZbaPlugin extends ExecutionUnitElementSimple
- class ZbbByteReversePlugin extends ExecutionUnitElementSimple
- class ZbbCountPlugin extends ExecutionUnitElementSimple
- class ZbbExtendPlugin extends ExecutionUnitElementSimple
- class ZbbLogicPlugin extends ExecutionUnitElementSimple
- class ZbbMinMaxPlugin extends ExecutionUnitElementSimple
- class ZbbOrPlugin extends ExecutionUnitElementSimple
- class ZbbRotatePlugin extends ExecutionUnitElementSimple
- class ZbcPlugin extends ExecutionUnitElementSimple
- class ZbsPlugin extends ExecutionUnitElementSimple
Value Members
- object BarrelShifterPlugin extends AreaObject
- object BranchPlugin extends AreaObject
- object CsrFsm
- object CsrRamService
- object DivPlugin extends AreaObject
- object EnvPluginOp extends SpinalEnum
- object Execute extends AreaRoot
- object ExecuteUnitElementSimple
- object IntAluPlugin extends AreaObject
- object IterativeShifterPlugin extends AreaObject
- object MulPlugin extends AreaObject
- object RsUnsignedPlugin extends AreaObject
- object SimdAddPlugin
- object SimdAddRaw
- object SrcKeys extends AreaObject
- object SrcStageables extends AreaObject
- object VexiiSimdAddGen extends App
- object VexiiSimdAddSim extends App
- object ZbPlugin
- object ZbaPlugin
- object ZbbCountPlugin extends AreaObject
- object ZbbLogicPlugin
- object ZbbMinMaxPlugin
- object ZbbRotatePlugin
- object ZbcPlugin
- object ZbsPlugin