# ============================================================
digits = maketrans('0123456789', ' '*10) # delete space later
+
def cn(idx):
return "cell%s_mux" % str(idx)
+
def init(p):
p.pinmux = ' '
global dedicated_wire
from UserDict import UserDict
-from wire_def import generic_io # special case
-from wire_def import muxwire # special case
+from wire_def import generic_io # special case
+from wire_def import muxwire # special case
+
class Pin(object):
""" pin interface declaration.
res = res.format(*args)
return '\n' + res + '\n'
+
class MuxInterface(Interface):
def wirefmt(self, *args):
return muxwire.format(*args)
+
class IOInterface(Interface):
def ifacefmtoutfn(self, name):
# ========= Interface declarations ================ #
mux_interface = MuxInterface('cell', [{'name': 'mux', 'ready': False,
- 'enabled': False,
- 'bitspec': '{1}', 'action': True}])
+ 'enabled': False,
+ 'bitspec': '{1}', 'action': True}])
io_interface = IOInterface('io',
[{'name': 'outputval', 'enabled': False},
import math
+
def missing_numbers(num_list):
original_list = [x for x in range(num_list[0], num_list[-1] + 1)]
num_list = set(num_list)
return (list(num_list ^ set(original_list)))
+
class Parse(object):
# == Parameters == #
N_MUX = 1 # number of selection lines for the mux per io
print("Dedicated IOs: " + str(len(dedicated_cells)))
# ============================================ #
+
if __name__ == '__main__':
p = Parse()
print p.N_IO