Initial Chisel core implementation
This commit is contained in:
24
src/main/scala/issue/ReservationStation.scala
Normal file
24
src/main/scala/issue/ReservationStation.scala
Normal 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user