Double empty lines between top level definitions.
authorStaf Verhaegen <staf@stafverhaegen.be>
Thu, 22 Apr 2021 08:55:33 +0000 (10:55 +0200)
committerStaf Verhaegen <staf@stafverhaegen.be>
Thu, 22 Apr 2021 09:04:25 +0000 (11:04 +0200)
c4m/cocotb/jtag/c4m_jtag.py
c4m/cocotb/jtag/c4m_jtag_svfcocotb.py
c4m/cocotb/jtag/c4m_jtag_svfgrammar.py
test/nmigen/gen/controller/generate.py

index 2cf99819f77dfa51828a17436a710a901f6fe051..ac97ce3e00d8face513e79846ad7198a326fe4d5 100644 (file)
@@ -2,9 +2,11 @@ import cocotb
 from cocotb.triggers import Timer
 from cocotb.binary import BinaryValue
 
+
 class JTAGException(Exception):
     pass
 
+
 class JTAG_Clock(object):
     """
     Class for the JTAG clock, run cycle by cycle
@@ -28,6 +30,7 @@ class JTAG_Clock(object):
             self.signal <= 0
             yield self.t
 
+
 class JTAG_Master(object):
     """
     Class that will run JTAG commands, shift in and out data
index ff5107740a1364f0395a2e97654ec56e9aba2bbf..9028961caeaaf73158ed5ef0db5332551683f1a2 100755 (executable)
@@ -5,6 +5,7 @@ from cocotb.binary import BinaryValue
 
 from  .c4m_jtag_svfgrammar import *
 
+
 def decodescanspec(node):
     length = int(str(node[2]))
     fstr = "{:0"+str(node[2])+"b}"
index 8bc949df9da2c44c2bd747741395c85e45499f4a..e09c793998f2305f982c2db91ae71efbc2426453 100644 (file)
@@ -3,25 +3,31 @@ from modgrammar import *
 grammar_whitespace_mode = 'explicit'
 grammar_whitespace = WS_NOEOL
 
+
 class SVFEol(Grammar):
     grammar = (OPTIONAL(SPACE), EOL)
     grammar_collapse = True
 
+
 class SemicolonEol(Grammar):
     grammar = (OPTIONAL(SPACE), L(";"), SVFEol)
     grammar_collapse = True
 
+
 class Integer(Grammar):
     grammar = WORD("0-9")
     grammar_collapse = True
 
+
 class Float(Grammar):
     grammar = (Integer, (L("."), OPTIONAL(Integer)), OPTIONAL(L("E"), Integer))
 
+
 class Hexadecimal(Grammar):
     grammar = (L("("), WORD("0-9A-Fa-f"), L(")"))
     grammar_collapse = True
 
+
 class StableState(Grammar):
     grammar = (L("IRPAUSE") | L("DRPAUSE") | L("RESET") | L("IDLE"))
     grammar_collapse = True
@@ -41,26 +47,34 @@ class ScanSpec(Grammar):
 class EmptyLine(Grammar):
     grammar = SVFEol
 
+
 class Comment(Grammar):
     grammar = (L("!"), REST_OF_LINE, SVFEol)
 
+
 class EndDR(Grammar):
     grammar = (L("ENDDR"), SPACE, StableState, SemicolonEol)
 
+
 class EndIR(Grammar):
     grammar = (L("ENDIR"), SPACE, StableState, SemicolonEol)
 
+
 class Frequency(Grammar):
     grammar = (L("FREQUENCY"), OPTIONAL(SPACE, Float, OPTIONAL(SPACE), L("HZ")), OPTIONAL(SPACE), SemicolonEol)
 
+
 class HDR(Grammar):
     grammar = (L("HDR"), ScanSpec, SemicolonEol)
 
+
 class HIR(Grammar):
     grammar = (L("HIR"), ScanSpec, SemicolonEol)
 
+
 #TODO: PIO, PIOMAP
 
+
 class Runtest(Grammar):
     grammar = (
         L("RUNTEST"),
@@ -72,22 +86,28 @@ class Runtest(Grammar):
         SemicolonEol
     )
 
+
 class SDR(Grammar):
     grammar = (L("SDR"), ScanSpec, SemicolonEol)
 
+
 class SIR(Grammar):
     grammar = (L("SIR"), ScanSpec, SemicolonEol)
 
+
 class State(Grammar):
     # TODO: Path to reach state
     grammar = (L("STATE"), SPACE, StableState, SemicolonEol)
 
+
 class TDR(Grammar):
     grammar = (L("TDR"), ScanSpec, SemicolonEol)
 
+
 class TIR(Grammar):
     grammar = (L("TIR"), ScanSpec, SemicolonEol)
 
+
 class Trst(Grammar):
     grammar = (L("TRST"), SPACE, (L("ON") | L("OFF") | L("Z") | L("ABSENT")), SemicolonEol)
 
index fbd724a7ba0e45ce2d69972ad3cf17c8c6422ff1..e66a22770b3c120700e2345669ef3881545128cc 100755 (executable)
@@ -5,6 +5,7 @@ from nmigen.build import Platform
 
 from c4m.nmigen.jtag import TAP
 
+
 class DummyPlatform(Platform):
     resources = []
     connectors = []
@@ -13,6 +14,7 @@ class DummyPlatform(Platform):
     def toolchain_prepare(self, fragment, name, **kwargs):
         raise NotImplementedError
 
+
 tap = TAP(ir_width=2)
 f = open("top.v", "w")
 f.write(convert(tap, platform=DummyPlatform()))