add docstrings for read/write port connection
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Jun 2020 18:54:36 +0000 (19:54 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Jun 2020 18:54:36 +0000 (19:54 +0100)
src/soc/simple/core.py

index 3846a57ea9969a3db0da683a58e7473c96123fca..35becb0166cadc6b22c40a5299e98d293ac7a325 100644 (file)
@@ -90,6 +90,11 @@ class NonProductionCore(Elaboratable):
         return fu_bitdict
 
     def connect_rdports(self, m, fu_bitdict):
+    """connect read ports
+
+    orders the read regspecs into a dict-of-dicts, by regfile, by regport name,
+    then connects all FUs that want that regport by way of a PriorityPicker.
+    """
         comb, sync = m.d.comb, m.d.sync
         fus = self.fus.fus
         regs = self.regs
@@ -149,6 +154,15 @@ class NonProductionCore(Elaboratable):
                     comb += src.eq(rport.data_o) # all FUs connect to same port
 
     def connect_wrports(self, m, fu_bitdict):
+    """connect write ports
+
+    orders the write regspecs into a dict-of-dicts, by regfile, by regport name,
+    then connects all FUs that want that regport by way of a PriorityPicker.
+
+    note that the write-port wen, write-port data, and go_wr_i all need to
+    be on the exact same clock cycle.  as there is a combinatorial loop bug
+    at the moment, these all use sync.
+    """
         comb, sync = m.d.comb, m.d.sync
         fus = self.fus.fus
         regs = self.regs