rename spi to consistent name format
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 22 Mar 2018 03:48:36 +0000 (03:48 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 22 Mar 2018 03:48:36 +0000 (03:48 +0000)
src/interface_decl.py
src/interface_def.py

index 122de2d1d1da469011491babdeb7f9b4d808d5a6..3bc5e9b8b8dc874d05206230a157f2fe586b1da6 100644 (file)
@@ -157,10 +157,10 @@ uartinterface_decl = Interface([{'name': 'rx_{0}'},
                                 {'name': 'tx_{0}', 'action': True},
                                 ])
 
-spiinterface_decl = Interface([{'name': 'sclk_{0}', 'action': True},
-                               {'name': 'mosi_{0}', 'action': True},
-                               {'name': 'ss_{0}', 'action': True},
-                               {'name': 'miso_{0}'},
+spiinterface_decl = Interface([{'name': 'spi{0}_sclk', 'action': True},
+                               {'name': 'spi{0}_mosi', 'action': True},
+                               {'name': 'spi{0}_nss', 'action': True},
+                               {'name': 'spi{0}_miso'},
                                ])
 
 twiinterface_decl = Interface([{'name': 'sda{0}', 'outen': True},
index e27ab68c8bee8c0d173402fe17ffcd55deeab98a..283e6c2b52bf03b7b63234c65ee7335d5045bbb5 100644 (file)
@@ -24,16 +24,16 @@ uartinterface_def = '''
       endmethod
 '''
 spiinterface_def = '''
-      method Action sclk_{0} (Bit#(1) in);
+      method Action spi{0}_sclk (Bit#(1) in);
          wrspi{0}_sclk<=in;
       endmethod
-      method Action mosi_{0} (Bit#(1) in);
+      method Action spi{0}_mosi (Bit#(1) in);
          wrspi{0}_mosi<=in;
       endmethod
-      method Action ss_{0}   (Bit#(1) in);
-         wrspi{0}_ss<=in;
+      method Action spi{0}_nss   (Bit#(1) in);
+         wrspi{0}_nss<=in;
       endmethod
-      method Bit#(1) miso_{0}=wrspi{0}_miso;
+      method Bit#(1) spi{0}_miso=wrspi{0}_miso;
 '''
 
 twiinterface_def = '''