mulsimpleplugin: fix build for short pipelines
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
b91df10b21
commit
0b79c637b6
|
@ -66,14 +66,16 @@ class MulSimplePlugin extends Plugin[VexRiscv]{
|
||||||
insert(MUL_OPB) := ((bSigned ? b.msb | False) ## b).asSInt
|
insert(MUL_OPB) := ((bSigned ? b.msb | False) ## b).asSInt
|
||||||
}
|
}
|
||||||
|
|
||||||
memory plug new Area {
|
val injectionStage = if(pipeline.memory != null) pipeline.memory else pipeline.execute
|
||||||
import memory._
|
injectionStage plug new Area {
|
||||||
|
import injectionStage._
|
||||||
|
|
||||||
insert(MUL) := (input(MUL_OPA) * input(MUL_OPB))(63 downto 0).asBits
|
insert(MUL) := (input(MUL_OPA) * input(MUL_OPB))(63 downto 0).asBits
|
||||||
}
|
}
|
||||||
|
|
||||||
writeBack plug new Area {
|
val memStage = stages.last
|
||||||
import writeBack._
|
memStage plug new Area {
|
||||||
|
import memStage._
|
||||||
|
|
||||||
when(arbitration.isValid && input(IS_MUL)){
|
when(arbitration.isValid && input(IS_MUL)){
|
||||||
switch(input(INSTRUCTION)(13 downto 12)){
|
switch(input(INSTRUCTION)(13 downto 12)){
|
||||||
|
|
Loading…
Reference in New Issue