From: Luke Kenneth Casson Leighton Date: Thu, 26 Jul 2018 08:33:37 +0000 (+0100) Subject: create flexbus interface X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1c1ac38e94ec233986067558efb07de83d854c7;p=pinmux.git create flexbus interface --- diff --git a/src/bsv/interface_decl.py b/src/bsv/interface_decl.py index 1efeac1..ad14139 100644 --- a/src/bsv/interface_decl.py +++ b/src/bsv/interface_decl.py @@ -488,6 +488,17 @@ class InterfaceLCD(InterfaceBus, Interface): return len(pins) +class InterfaceFlexBus(InterfaceBus, Interface): + + def __init__(self, *args): + InterfaceBus.__init__(self, ['ad_out', 'ad_out_en', 'ad_in'], + "Bit#({0})", "ad") + Interface.__init__(self, *args) + + def get_n_iopins(self, pins): # HACK! assume in/out/outen so div by 3 + return len(pins) / 3 + + class InterfaceSD(InterfaceBus, Interface): def __init__(self, *args): @@ -547,6 +558,7 @@ class Interfaces(InterfacesBase, PeripheralInterfaces): 'mspi': InterfaceNSPI, 'lcd': InterfaceLCD, 'sd': InterfaceSD, + 'fb': InterfaceFlexBus, 'qspi': InterfaceNSPI, 'mqspi': InterfaceNSPI, 'eint': InterfaceEINT})