diff options
| author | Aditya Naik | 2021-08-27 13:10:46 -0400 |
|---|---|---|
| committer | Aditya Naik | 2021-08-27 13:10:46 -0400 |
| commit | 02991927b2071f979f3307533d5876e3fbbdd855 (patch) | |
| tree | 91bd0d2f8f4f0349513810a32212fa4eccf7489e /components.scala | |
| parent | 663e24a3d8f45b4b184b3a4bc3a57bc0f3d6cd78 (diff) | |
This was not needed
Diffstat (limited to 'components.scala')
| -rw-r--r-- | components.scala | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/components.scala b/components.scala index 9942e3a..d92f4ec 100644 --- a/components.scala +++ b/components.scala @@ -71,34 +71,6 @@ class RegisterFile() extends Module { } -class ALU() extends Module { - val io = IO(new Bundle { - val op = Input(UInt(4.W)) - val in1 = Input(UInt(32.W)) - val in2 = Input(UInt(32.W)) - val out = Output(UInt(32.W)) - val output_valid = Output(Bool()) - }) - - io.out := 0.U - io.output_valid := false.B - when(io.op === 0.U) { - io.out := io.in1 & io.in2; - io.output_valid := true.B - }.elsewhen(io.op === 1.U) { - io.out := io.in1 | io.in2; - io.output_valid := true.B - }.elsewhen(io.op === 2.U) { - io.out := io.in1 + io.in2; - io.output_valid := true.B - }.elsewhen(io.op === 6.U) { - io.out := io.in1 - io.in2 - io.output_valid := true.B - }.otherwise { - io.output_valid := false.B - } -} - println(getVerilog(new ALU)) // ChiselStage.emitChirrtl(new RegisterFile()) |
