From: Luke Kenneth Casson Leighton Date: Mon, 25 Jun 2018 13:14:27 +0000 (+0100) Subject: remove GenericIOType and FunctionType for now X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4fcd67acda9bd7fd59405a94e71eee8dfc702c4;p=pinmux.git remove GenericIOType and FunctionType for now --- diff --git a/src/bsv/interface_decl.py b/src/bsv/interface_decl.py index 02975a8..0741de0 100644 --- a/src/bsv/interface_decl.py +++ b/src/bsv/interface_decl.py @@ -162,31 +162,6 @@ class Interface(object): res = '\n'.join(map(self.wirefmtpin, self.pins)).format(*args) res += '\n' return '\n' + res - for p in self.pinspecs: - name = self.pname(p['name']) - typ = self.getifacetype(name.format("")) - name = name.format(*args) - res += " // declare %s_io set up as type '%s'\n" % (name, typ) - res += " GenericIOType %s_io = GenericIOType{\n" % name - params = [] - if typ == 'inout': - outname = self.ifacefmtoutfn(name) - params.append('outputval:%s_out,' % outname) - params.append('output_en:%s_outen,' % outname) # match busfmt - params.append('input_en:~%s_outen,' % outname) - elif typ == 'out': - outname = self.ifacefmtoutfn(name) - params.append('outputval:%s,' % outname) - params.append('output_en:1,') - params.append('input_en:0,') - else: # input - params.append('outputval:0,') - params.append('output_en:0,') - params.append('input_en:1,') - for param in params: - res += ' %s\n' % param - res += ' };\n' - return '\n' + res def ifacefmt(self, *args): res = '\n'.join(map(self.ifacefmtdecpin, self.pins)).format(*args) diff --git a/src/bsv/pinmux_generator.py b/src/bsv/pinmux_generator.py index 68b1896..d19cb38 100644 --- a/src/bsv/pinmux_generator.py +++ b/src/bsv/pinmux_generator.py @@ -39,21 +39,6 @@ copyright = ''' header = copyright + ''' package pinmux; - // FunctionType: contains the active wires of a function. That INCLUDES - // GPIO (as GPIO is also a "Function"). These are what get muxed. - // However, only GPIO "Functions" will end up with Register SRAMs. - typedef struct{ - Bit#(1) outputval; // output from function to pad bit2 - Bit#(1) inputval; // input from pad to function bit1 - Bit#(1) output_en; // output enable from core to pad bit0 - } FunctionType deriving(Eq,Bits,FShow); - - typedef struct{ - Bit#(1) outputval; // output from core to pad bit7 - Bit#(1) output_en; // output enable from core to pad bit6 - Bit#(1) input_en; // input enable from core to io_cell bit5 - } GenericIOType deriving(Eq,Bits,FShow); - ''' footer = ''' endinterface; diff --git a/src/test_bsv/pinmux.bsv b/src/test_bsv/pinmux.bsv index d843c3a..f18f90f 100644 --- a/src/test_bsv/pinmux.bsv +++ b/src/test_bsv/pinmux.bsv @@ -9,21 +9,6 @@ package pinmux; - // FunctionType: contains the active wires of a function. That INCLUDES - // GPIO (as GPIO is also a "Function"). These are what get muxed. - // However, only GPIO "Functions" will end up with Register SRAMs. - typedef struct{ - Bit#(1) outputval; // output from function to pad bit2 - Bit#(1) inputval; // input from pad to function bit1 - Bit#(1) output_en; // output enable from core to pad bit0 - } FunctionType deriving(Eq,Bits,FShow); - - typedef struct{ - Bit#(1) outputval; // output from core to pad bit7 - Bit#(1) output_en; // output enable from core to pad bit6 - Bit#(1) input_en; // input enable from core to io_cell bit5 - } GenericIOType deriving(Eq,Bits,FShow); - interface MuxSelectionLines; // declare the method which will capture the user pin-mux