Working adder.
This commit is contained in:
parent
88cab777f9
commit
44ccf12cad
9 changed files with 214 additions and 42 deletions
|
@ -23,7 +23,8 @@ class InstructionFetch extends MultiIOModule {
|
|||
*/
|
||||
val io = IO(
|
||||
new Bundle {
|
||||
val PC = Output(UInt())
|
||||
val PC = Output(UInt(32.W))
|
||||
val instruction = Output(new Instruction)
|
||||
})
|
||||
|
||||
val IMEM = Module(new IMEM)
|
||||
|
@ -44,12 +45,11 @@ class InstructionFetch extends MultiIOModule {
|
|||
*/
|
||||
io.PC := PC
|
||||
IMEM.io.instructionAddress := PC
|
||||
|
||||
// PC := PC + 4.U
|
||||
PC := PC + 4.U
|
||||
|
||||
val instruction = Wire(new Instruction)
|
||||
instruction := IMEM.io.instruction.asTypeOf(new Instruction)
|
||||
|
||||
io.instruction := instruction
|
||||
|
||||
/**
|
||||
* Setup. You should not change this code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue