use sets for leave_out
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 5 Jul 2015 20:49:23 +0000 (22:49 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 5 Jul 2015 20:49:23 +0000 (22:49 +0200)
misoclib/com/liteeth/core/mac/core/preamble.py
misoclib/mem/litesata/frontend/mirroring.py
misoclib/mem/litesata/frontend/striping.py

index b761a673e6fbe4484aac7545425d7f535af736cc..e4d73469d3749079fc9f9c521b006c8788bcb2fe 100644 (file)
@@ -47,7 +47,7 @@ class LiteEthMACPreambleInserter(Module):
             self.source.last_be.eq(self.sink.last_be)
         ]
         fsm.act("COPY",
-            Record.connect(self.sink, self.source, leave_out=["data", "last_be"]),
+            Record.connect(self.sink, self.source, leave_out=set(["data", "last_be"])),
             self.source.sop.eq(0),
 
             If(self.sink.stb & self.sink.eop & self.source.ack,
@@ -140,7 +140,7 @@ class LiteEthMACPreambleChecker(Module):
             self.source.last_be.eq(self.sink.last_be)
         ]
         fsm.act("COPY",
-            Record.connect(self.sink, self.source, leave_out=["data", "last_be"]),
+            Record.connect(self.sink, self.source, leave_out=set(["data", "last_be"])),
             self.source.sop.eq(sop),
             clr_sop.eq(self.source.stb & self.source.ack),
 
index 67d60a892ea276cdd298aeb5e6d5901f3e5f408f..ef1e626f7b6ee1005e71512095081638b029c113 100644 (file)
@@ -59,8 +59,8 @@ class LiteSATAMirroringTX(Module):
             read_status = Status(read)
             self.submodules += read_status
             self.comb += [
-                Record.connect(sink, read, leave_out=["stb", "ack"]),
-                Record.connect(sink, write, leave_out=["stb", "ack"]),
+                Record.connect(sink, read, leave_out=set(["stb", "ack"])),
+                Record.connect(sink, write, leave_out=set(["stb", "ack"])),
                 read.stb.eq(sink.stb & (sink.read | sink.identify) & ~read_stall),
                 write.stb.eq(sink.stb & sink.write),
                 If(sink.read | sink.identify,
@@ -127,8 +127,8 @@ class LiteSATAMirroringRX(Module):
             sink_status = Status(sinks[i])
             self.submodules += sink_status
             self.comb += [
-                Record.connect(sinks[i], reads[i], leave_out=["stb", "ack"]),
-                Record.connect(sinks[i], write_striper.sinks[i], leave_out=["stb", "ack"]),
+                Record.connect(sinks[i], reads[i], leave_out=set(["stb", "ack"])),
+                Record.connect(sinks[i], write_striper.sinks[i], leave_out=set(["stb", "ack"])),
                 reads[i].stb.eq(sinks[i].stb & ctrl.reading),
                 write_striper.sinks[i].stb.eq(sinks[i].stb & ctrl.writing),
                 sinks[i].ack.eq(reads[i].ack | write_striper.sinks[i].ack),
index 8c8cba0dd438824d11f81f25051dfb6f6c3bc1cc..35edd7e870456e9ab8029595368ee6af9be6b94c 100644 (file)
@@ -39,7 +39,7 @@ class LiteSATAStripingTX(Module):
 
         # split data and ctrl signals (except stb & ack managed in fsm)
         for i, s in enumerate(sources):
-            self.comb += Record.connect(sink, s, leave_out=["stb", "ack", "data"])
+            self.comb += Record.connect(sink, s, leave_out=set(["stb", "ack", "data"]))
             if mirroring_mode:
                 self.comb += s.data.eq(sink.data)
             else:
@@ -82,7 +82,7 @@ class LiteSATAStripingRX(Module):
         )
 
         # use first sink for ctrl signals (except for stb, ack & failed)
-        self.comb += Record.connect(sinks[0], source, leave_out=["stb", "ack", "failed", "data"])
+        self.comb += Record.connect(sinks[0], source, leave_out=set(["stb", "ack", "failed", "data"]))
                # combine datas
         if mirroring_mode:
             self.comb += source.data.eq(0) # mirroring only used for writes