1006e1884SZihao Yupackage system 2006e1884SZihao Yu 3006e1884SZihao Yuimport noop.{NOOP, NOOPConfig} 4006e1884SZihao Yuimport bus.axi4.{AXI4, AXI4Lite} 58f36f779SZihao Yuimport bus.simplebus._ 6006e1884SZihao Yu 7006e1884SZihao Yuimport chisel3._ 8*fe820c3dSZihao Yuimport chisel3.util.experimental.BoringUtils 9006e1884SZihao Yu 10006e1884SZihao Yuclass NOOPSoC(implicit val p: NOOPConfig) extends Module { 11006e1884SZihao Yu val io = IO(new Bundle{ 12cdd59e9fSZihao Yu val mem = new AXI4 13ad255e6cSZihao Yu val mmio = (if (p.FPGAPlatform) { new AXI4Lite } else { new SimpleBusUC }) 14*fe820c3dSZihao Yu val mtip = Input(Bool()) 15006e1884SZihao Yu }) 16006e1884SZihao Yu 17006e1884SZihao Yu val noop = Module(new NOOP) 18cdd59e9fSZihao Yu val cohMg = Module(new CoherenceInterconnect) 19cdd59e9fSZihao Yu cohMg.io.in(0) <> noop.io.imem 20cdd59e9fSZihao Yu cohMg.io.in(1) <> noop.io.dmem 21cdd59e9fSZihao Yu io.mem <> cohMg.io.out.toAXI4() 22006e1884SZihao Yu 23ad255e6cSZihao Yu if (p.FPGAPlatform) io.mmio <> noop.io.mmio.toAXI4Lite() 24006e1884SZihao Yu else io.mmio <> noop.io.mmio 25*fe820c3dSZihao Yu 26*fe820c3dSZihao Yu BoringUtils.addSource(io.mtip, "mtip") 27006e1884SZihao Yu} 28