Initial Chisel core implementation

This commit is contained in:
abnerhexu
2026-06-26 08:20:25 +00:00
commit 502803c37f
47 changed files with 2342 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import chisel3._
import chisel3.util._
class ReservationStation(p: CoreParams = CoreParams(), entries: Int = 16) extends Module {
val io = IO(new Bundle {
val enqValid = Input(Bool())
val enq = Input(new RenamePacket(p))
val enqReady = Output(Bool())
val issueValid = Output(Bool())
val issue = Output(new RenamePacket(p))
val issueReady = Input(Bool())
val flush = Input(Bool())
})
val q = Module(new Queue(new RenamePacket(p), entries, flow = false, pipe = true))
q.io.enq.valid := io.enqValid
q.io.enq.bits := io.enq
q.io.deq.ready := io.issueReady || io.flush
io.enqReady := q.io.enq.ready
io.issueValid := q.io.deq.valid && !io.flush
io.issue := q.io.deq.bits
}