xilinxvc707pciex1: better wrapper for AXI4-Lite control node (#12)
[sifive-blocks.git] / src / main / scala / devices / xilinxvc707pciex1 / XilinxVC707PCIeX1.scala
index bd3b1ef9fd8c818a87b940cda88e0cd3c67274c7..ae7cca535f477e347cbe5b106366708c9c343d51 100644 (file)
@@ -23,12 +23,33 @@ class XilinxVC707PCIeX1(implicit p: Parameters) extends LazyModule {
   val slave = TLInputNode()
   val control = TLInputNode()
   val master = TLOutputNode()
-  val intnode = IntSourceNode(1)
+  val intnode = IntOutputNode()
 
   val axi_to_pcie_x1 = LazyModule(new VC707AXIToPCIeX1)
-  axi_to_pcie_x1.slave   := TLToAXI4(idBits=4)(slave)
-  axi_to_pcie_x1.control := AXI4Fragmenter(lite=true, maxInFlight=4)(TLToAXI4(idBits=0)(control))
-  master := TLWidthWidget(8)(AXI4ToTL()(AXI4Fragmenter()(axi_to_pcie_x1.master)))
+
+  axi_to_pcie_x1.slave :=
+    AXI4Buffer()(
+    AXI4UserYanker()(
+    AXI4Deinterleaver(p(coreplex.CacheBlockBytes))(
+    AXI4IdIndexer(idBits=4)(
+    TLToAXI4(beatBytes=8)(
+    slave)))))
+
+  axi_to_pcie_x1.control :=
+    AXI4Buffer()(
+    AXI4UserYanker()(
+    TLToAXI4(beatBytes=4)(
+    TLFragmenter(4, p(coreplex.CacheBlockBytes))(
+    control))))
+
+  master :=
+    TLWidthWidget(8)(
+    AXI4ToTL()(
+    AXI4UserYanker(capMaxFlight=Some(8))(
+    AXI4Fragmenter()(
+    axi_to_pcie_x1.master))))
+
+  intnode := axi_to_pcie_x1.intnode
 
   lazy val module = new LazyModuleImp(this) {
     val io = new Bundle {
@@ -40,7 +61,6 @@ class XilinxVC707PCIeX1(implicit p: Parameters) extends LazyModule {
     }
 
     io.port <> axi_to_pcie_x1.module.io.port
-    io.interrupt(0)(0) := axi_to_pcie_x1.module.io.interrupt_out
 
     //PCIe Reference Clock
     val ibufds_gte2 = Module(new IBUFDS_GTE2)