Nuke
This commit is contained in:
commit
932413bb3d
61 changed files with 7249 additions and 0 deletions
49
src/main/scala/ID.scala
Normal file
49
src/main/scala/ID.scala
Normal file
|
@ -0,0 +1,49 @@
|
|||
package FiveStage
|
||||
import chisel3._
|
||||
import chisel3.util.{ BitPat, MuxCase }
|
||||
import chisel3.experimental.MultiIOModule
|
||||
|
||||
|
||||
class InstructionDecode extends MultiIOModule {
|
||||
|
||||
// Don't touch the test harness
|
||||
val testHarness = IO(
|
||||
new Bundle {
|
||||
val registerSetup = Input(new RegisterSetupSignals)
|
||||
val registerPeek = Output(UInt(32.W))
|
||||
|
||||
val testUpdates = Output(new RegisterUpdates)
|
||||
})
|
||||
|
||||
|
||||
val io = IO(
|
||||
new Bundle {
|
||||
/**
|
||||
* TODO: Your code here.
|
||||
*/
|
||||
}
|
||||
)
|
||||
|
||||
val registers = Module(new Registers)
|
||||
val decoder = Module(new Decoder).io
|
||||
|
||||
|
||||
/**
|
||||
* Setup. You should not change this code
|
||||
*/
|
||||
registers.testHarness.setup := testHarness.registerSetup
|
||||
testHarness.registerPeek := registers.io.readData1
|
||||
testHarness.testUpdates := registers.testHarness.testUpdates
|
||||
|
||||
|
||||
/**
|
||||
* TODO: Your code here.
|
||||
*/
|
||||
registers.io.readAddress1 := 0.U
|
||||
registers.io.readAddress2 := 0.U
|
||||
registers.io.writeEnable := false.B
|
||||
registers.io.writeAddress := 0.U
|
||||
registers.io.writeData := 0.U
|
||||
|
||||
decoder.instruction := 0.U.asTypeOf(new Instruction)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue