litesata: pep8 (E261, E271)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Apr 2015 13:51:17 +0000 (15:51 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Apr 2015 13:51:17 +0000 (15:51 +0200)
misoclib/mem/litesata/common.py
misoclib/mem/litesata/core/link/scrambler.py
misoclib/mem/litesata/example_designs/targets/bist.py
misoclib/mem/litesata/example_designs/test/bist.py
misoclib/mem/litesata/frontend/bist.py
misoclib/mem/litesata/phy/ctrl.py
misoclib/mem/litesata/phy/k7/trx.py
misoclib/mem/litesata/test/hdd.py

index 6c28da749764df0fe5e71d9e63c1b06b9c6d40a3..92e59ca39e42ac6f9312e91fbc1c30ba92ed9a88 100644 (file)
@@ -254,7 +254,7 @@ def command_rx_data_description(dw):
     return EndpointDescription(layout, packetized=True)
 
 # HDD
-logical_sector_size = 512 # constant since all HDDs use this
+logical_sector_size = 512  # constant since all HDDs use this
 
 
 def dwords2sectors(n):
index 45b01949634e74fc7cf3cec82253227bfc7f4c67..948c5379abf9ae0ea35b14eed70cd79a53613edd 100644 (file)
@@ -24,7 +24,7 @@ class Scrambler(Module):
         # XXX: from SATA specification, replace it with
         # a generic implementation using polynoms.
         lfsr_coefs = (
-            (15, 13, 4, 0), #0
+            (15, 13, 4, 0),  # 0
             (15, 14, 13, 5, 4, 1, 0),
             (14, 13, 6, 5, 4, 2, 1, 0),
             (15, 14, 7, 6, 5, 3, 2, 1),
@@ -41,7 +41,7 @@ class Scrambler(Module):
             (15, 13, 12, 11, 9, 5, 3, 2),
             (15, 14, 12, 10, 6, 3, 0),
 
-            (11, 7, 1, 0), #16
+            (11, 7, 1, 0),  # 16
             (12, 8, 2, 1),
             (13, 9, 3, 2),
             (14, 10, 4, 3),
index 806019b618165bcd0451861c7a3426f1a6869def..e52e85471ab4903c558bdfe91f8dcaa9c99aea5d 100644 (file)
@@ -105,7 +105,7 @@ class BISTSoC(SoC, AutoCSR):
 
         # SATA PHY/Core/Frontend
         self.submodules.sata_phy = LiteSATAPHY(platform.device, platform.request("sata"), "sata_gen2", clk_freq)
-        self.comb += self.crg.reset.eq(self.sata_phy.ctrl.need_reset) # XXX FIXME
+        self.comb += self.crg.reset.eq(self.sata_phy.ctrl.need_reset)  # XXX FIXME
         self.submodules.sata = LiteSATA(self.sata_phy, with_bist=True, with_bist_csr=True)
 
         # Status Leds
index 40cf51770f85b8747519aa980d3705e1be0ad52e..019e736a995302ea010844903e04d304031f01b1 100644 (file)
@@ -86,7 +86,7 @@ class LiteSATABISTIdentifyDriver:
             self.source_ack.write(1)
 
     def run(self, blocking=True):
-        self.read_fifo() # flush the fifo before we start
+        self.read_fifo()  # flush the fifo before we start
         self.start.write(1)
         if blocking:
             while (self.done.read() == 0):
index fe675fbff7fded22d2817d7dfe6b3992db2c91ac..6924a1bb933da9f0c6585cebfa01080feaca4ceb 100644 (file)
@@ -13,7 +13,7 @@ class LiteSATABISTGenerator(Module):
 
         self.done = Signal()
         self.aborted = Signal()
-        self.errors = Signal(32) # Note: Not used for writes
+        self.errors = Signal(32)  # Note: Not used for writes
 
         ###
 
index 63ebbf7cabd119d0216fe1fa947c1a286e257b09..719067002746cd08270478ca70657f372df9470b 100644 (file)
@@ -91,7 +91,7 @@ class LiteSATAPHYCtrl(Module):
         )
         fsm.act("AWAIT_NO_RX_IDLE",
             trx.tx_idle.eq(0),
-            source.data.eq(0x4A4A4A4A), #D10.2
+            source.data.eq(0x4A4A4A4A),  # D10.2
             source.charisk.eq(0b0000),
             If(~trx.rx_idle,
                 NextState("AWAIT_ALIGN"),
@@ -101,7 +101,7 @@ class LiteSATAPHYCtrl(Module):
         )
         fsm.act("AWAIT_ALIGN",
             trx.tx_idle.eq(0),
-            source.data.eq(0x4A4A4A4A), #D10.2
+            source.data.eq(0x4A4A4A4A),  # D10.2
             source.charisk.eq(0b0000),
             trx.rx_align.eq(1),
             align_timeout.ce.eq(1),
index 72da64bf674e7529942bd2acf60981719dde73ed..deae5d1b30de60dbe8c6aa50b30bc064c0e2c4b7 100644 (file)
@@ -815,7 +815,7 @@ class K7LiteSATAPHYTRX(Module):
                     o_TXOUTCLK=self.txoutclk,
                     #o_TXOUTCLKFABRIC=,
                     #o_TXOUTCLKPCS=,
-                    i_TXOUTCLKSEL=0b11, #??
+                    i_TXOUTCLKSEL=0b11,  # ??
                     #o_TXRATEDONE=,
                 # Transmit Ports - TX Gearbox Ports
                     i_TXCHARISK=self.txcharisk,
index c1b9c3d4601f7a3f00119ef0af2738929f586f11..e75bbff02003ae3a53919e03c75446739df28494 100644 (file)
@@ -152,7 +152,7 @@ class LinkTXPacket(LinkPacket):
 
 
 class LinkLayer(Module):
-    def  __init__(self, phy, debug=False, random_level=0):
+    def __init__(self, phy, debug=False, random_level=0):
         self.phy = phy
         self.debug = debug
         self.random_level = random_level