File tree Expand file tree Collapse file tree
src/main/scala/magicore/isa/riscv/soc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ import magicore.lib.mas.Axi4MicroarchSamplerCtrl
1818import spinal .lib .misc .InterruptCtrl
1919import spinal .lib .misc .plic .PlicMapping
2020
21+ case class MagiSoC_MonitorPort () extends Bundle {
22+ val retire = Vec (Flow (UInt (32 bits)), 2 )
23+ }
24+
2125class MagiSoC (
2226 debug : Boolean ,
2327 rv64 : Boolean ,
@@ -132,6 +136,13 @@ class MagiSoC(
132136 val masCtrl =
133137 new Axi4MicroarchSamplerCtrl (sampler = mas, idWidth = slaveIdWidth)
134138
139+ val monitor = MagiSoC_MonitorPort ()
140+ monitor.retire := Vec (
141+ processor.pipeline.dispatch.io.writebackMonitor.map(x =>
142+ x.translateWith(x.payload.lookup[FetchPacket ].pc)
143+ )
144+ )
145+
135146 val io = new Bundle {
136147 val bus = master(
137148 Axi4 (
@@ -144,7 +155,9 @@ class MagiSoC(
144155 )
145156 val interrupts = in(Bits (numExternalInterrupts bits))
146157 val uart = master(Uart ())
158+ val monitor = out(MagiSoC_MonitorPort ())
147159 }
160+ io.monitor := monitor
148161
149162 val plicInterruptLine = Bool ()
150163 val plic = Axi4PlicGenerator (
You can’t perform that action at this time.
0 commit comments