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
|
||||
}
|
||||
|
||||
memory plug new Area {
|
||||
import memory._
|
||||
val injectionStage = if(pipeline.memory != null) pipeline.memory else pipeline.execute
|
||||
injectionStage plug new Area {
|
||||
import injectionStage._
|
||||
|
||||
insert(MUL) := (input(MUL_OPA) * input(MUL_OPB))(63 downto 0).asBits
|
||||
}
|
||||
|
||||
writeBack plug new Area {
|
||||
import writeBack._
|
||||
val memStage = stages.last
|
||||
memStage plug new Area {
|
||||
import memStage._
|
||||
|
||||
when(arbitration.isValid && input(IS_MUL)){
|
||||
switch(input(INSTRUCTION)(13 downto 12)){
|
||||
|
|
Loading…
Reference in New Issue