From b1c1ac38e94ec233986067558efb07de83d854c7 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 26 Jul 2018 09:33:37 +0100 Subject: [PATCH] create flexbus interface --- src/bsv/interface_decl.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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}) -- 2.30.2