> configure(npc)

ysyx_22040000 李心杨
 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
  13:17:13  up 1 day 22:03,  2 users,  load average: 1.36, 2.08, 1.73
This commit is contained in:
tracer-ysyx 2024-01-06 13:17:13 +08:00 committed by xinyangli
parent dada9884cd
commit 70168608dd

View file

@ -1,6 +1,7 @@
package npc package npc
import chisel3._ import chisel3._
import chisel3.utils.{MuxLookup}
import chisel3.stage.ChiselOption import chisel3.stage.ChiselOption
class RegisterFile(readPorts: Int) extends Module { class RegisterFile(readPorts: Int) extends Module {
@ -34,7 +35,7 @@ class ALUGenerator(width: Int) extends Module {
val out = Output(UInt(width.W)) val out = Output(UInt(width.W))
}) })
val adder_b = fill(width)(io.op(0)) ^ io.b // take (-b) if sub val adder_b = Fill(width)(io.op(0)) ^ io.b // take (-b) if sub
val add = io.a + adder_b val add = io.a + adder_b
val and = io.a & io.b val and = io.a & io.b
val not = ~io.a val not = ~io.a