Skip to content

Commit

Permalink
VexRiscvSmpClusterGen withMulDiv / withBarrelShifter added
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Aug 17, 2023
1 parent 760a0fc commit a275d7b
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ object VexRiscvSmpClusterGen {
prediction : BranchPrediction = vexriscv.plugin.NONE,
withDataCache : Boolean = true,
withInstructionCache : Boolean = true,
withBarrelShifter : Boolean = true,
withMulDiv : Boolean = true,
forceMisa : Boolean = false,
forceMscratch : Boolean = false,
privilegedDebug : Boolean = false,
Expand Down Expand Up @@ -334,8 +336,10 @@ object VexRiscvSmpClusterGen {
new SrcPlugin(
separatedAddSub = false
),
new FullBarrelShifterPlugin(earlyInjection = earlyShifterInjection),
// new LightShifterPlugin,
if(withBarrelShifter)
new FullBarrelShifterPlugin(earlyInjection = earlyShifterInjection)
else
new LightShifterPlugin,
new HazardSimplePlugin(
bypassExecute = true,
bypassMemory = true,
Expand All @@ -345,13 +349,6 @@ object VexRiscvSmpClusterGen {
pessimisticWriteRegFile = false,
pessimisticAddressMatch = false
),
new MulPlugin,
new MulDivIterativePlugin(
genMul = false,
genDiv = true,
mulUnrollFactor = 32,
divUnrollFactor = 1
),
new CsrPlugin(csrConfig),
new BranchPlugin(
earlyBranch = earlyBranch,
Expand All @@ -362,6 +359,16 @@ object VexRiscvSmpClusterGen {
)
)

if(withMulDiv) config.plugins ++= List(
new MulPlugin,
new MulDivIterativePlugin(
genMul = false,
genDiv = true,
mulUnrollFactor = 32,
divUnrollFactor = 1
)
)

if(withFloat) config.plugins += new FpuPlugin(
externalFpu = externalFpu,
simHalt = simHalt,
Expand Down

0 comments on commit a275d7b

Please sign in to comment.