add flexbus as fast interface
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Jul 2018 08:26:18 +0000 (09:26 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Jul 2018 08:26:18 +0000 (09:26 +0100)
src/bsv/bsv_lib/soc_template.bsv
src/bsv/peripheral_gen/base.py
src/bsv/peripheral_gen/jtag.py
src/spec/i_class.py

index 9d853f7f93c4a13b9a7ba6be806541939cfcf34b..e99b9b149839fd4d13e27e87b9b111b615ab5768 100644 (file)
@@ -109,9 +109,6 @@ package Soc;
              interface Vme_out  proc_ifc;
              interface Data_bus_inf proc_dbus;
         `endif
-        `ifdef FlexBus
-             interface FlexBus_Master_IFC flexbus_out;
-        `endif
 {1}
     endinterface
 
@@ -147,10 +144,6 @@ package Soc;
             `ifdef VME
             Ifc_vme_top             vme             <-mkvme_top();
             `endif     
-        `ifdef FlexBus
-            AXI4_Slave_to_FlexBus_Master_Xactor_IFC #(32, 64,0)
-                            flexbus <- mkAXI4_Slave_to_FlexBus_Master_Xactor;
-        `endif
         Ifc_slow_peripherals slow_peripherals <-mkslow_peripherals(
                           core_clock, core_reset, uart_clock, 
                           uart_reset, clocked_by slow_clock ,
@@ -219,11 +212,6 @@ package Soc;
                               [fromInteger(valueOf(VME_slave_num))],
                               vme.slave_axi_vme);
             `endif
-            `ifdef FlexBus
-                mkConnection (fabric.v_to_slaves
-                              [fromInteger(valueOf(FlexBus_slave_num))],
-                              flexbus.axi_side);
-            `endif
 
             // fabric connections
 {5}
@@ -306,9 +294,6 @@ package Soc;
         `ifdef VME
             interface  proc_ifc = vme.proc_ifc;
             interface   proc_dbus = vme.proc_dbus;
-        `endif 
-        `ifdef FlexBus
-            interface flexbus_out = flexbus.flexbus_side;
         `endif 
          method Action boot_sequence(Bit#(1) bootseq) = 
                             core.boot_sequence(bootseq);
index caad20f510c8ea4fb4d708953f3002cc28d05dc0..0e450f457ba562e962bdc88c272245d7eb7867e1 100644 (file)
@@ -266,14 +266,17 @@ else"""
     def extfastifinstance(self, name, count):
         return ''
 
-    def _extifinstance(self, name, count, suffix, prefix, samename=False):
+    def _extifinstance(self, name, count, suffix, prefix, samename=False,
+                       ifsuffix=None):
+        if ifsuffix is None:
+            ifsuffix = ''
         pname = self.get_iname(count)
         if samename:
             sname = pname
         else:
             sname = self.peripheral.iname().format(count)
-        template = "interface {0}{3} = {2}{1};"
-        return template.format(pname, sname, prefix, suffix)
+        template = "interface {0}{3} = {2}{1}{4};"
+        return template.format(pname, sname, prefix, suffix, ifsuffix)
 
     def extifinstance2(self, name, count):
         return ''
@@ -715,6 +718,7 @@ class PFactory(object):
         from qspi import qspi, mqspi
         from gpio import gpio
         from rgbttl import rgbttl
+        from flexbus import flexbus
 
         for k, v in {'uart': uart,
                      'rs232': rs232,
@@ -729,6 +733,7 @@ class PFactory(object):
                      'sd': sdmmc,
                      'jtag': jtag,
                      'lcd': rgbttl,
+                     'fb': flexbus,
                      'gpio': gpio
                      }.items():
             if name.startswith(k):
index bfebe074562fae87eea6f1819f5cd6ceeab4ff55..dd3e2fa10f4043062e6005295c8d59a21953abbe 100644 (file)
@@ -11,7 +11,7 @@ class jtag(PBase):
 
     def fastifdecl(self, name, count):
         # YUK!
-        return "Ifc_jtagdtm jtag{0}_out;".format(count)
+        return "interface Ifc_jtagdtm jtag{0}_out;".format(count)
 
     def mkfast_peripheral(self):
         return """\
index 99c8359f0c806d29cbd586974a51a9d47fdd7854..88cbdcf5936b168ff6a9175dffd05e3752547a42 100644 (file)
@@ -60,7 +60,7 @@ def pinspec():
                       }
 
     ps = PinSpec(pinbanks, fixedpins, function_names,
-                 ['lcd', 'jtag', 'flexbus' ])
+                 ['lcd', 'jtag', 'fb' ])
 
     # Bank A, 0-27
     ps.gpio("", ('A', 0), 0, 0, 28)