1*006e1884SZihao Yupackage system 2*006e1884SZihao Yu 3*006e1884SZihao Yuimport noop.{NOOP, NOOPConfig} 4*006e1884SZihao Yuimport bus.axi4.{AXI4, AXI4Lite} 5*006e1884SZihao Yuimport bus.simplebus.SimpleBus 6*006e1884SZihao Yu 7*006e1884SZihao Yuimport chisel3._ 8*006e1884SZihao Yu 9*006e1884SZihao Yuclass NOOPSoC(implicit val p: NOOPConfig) extends Module { 10*006e1884SZihao Yu val io = IO(new Bundle{ 11*006e1884SZihao Yu val imem = new AXI4 12*006e1884SZihao Yu val dmem = new AXI4 13*006e1884SZihao Yu val mmio = (if (p.FPGAPlatform) { new AXI4Lite } else { new SimpleBus }) 14*006e1884SZihao Yu }) 15*006e1884SZihao Yu 16*006e1884SZihao Yu val noop = Module(new NOOP) 17*006e1884SZihao Yu io.imem <> noop.io.imem.toAXI4() 18*006e1884SZihao Yu io.dmem <> noop.io.dmem.toAXI4() 19*006e1884SZihao Yu 20*006e1884SZihao Yu if (p.FPGAPlatform) io.mmio <> noop.io.mmio.toAXI4(new AXI4Lite) 21*006e1884SZihao Yu else io.mmio <> noop.io.mmio 22*006e1884SZihao Yu} 23