def _mk_connection(self, name=None, count=0):
return "fb{0}.axi_side"
+ def pinname_in(self, pname):
+ return {'ta': 'flexbus_side.tAn',
+ }.get(pname, '')
+
def pinname_out(self, pname):
- if pname in ['cmd', 'clk']:
- return pname
- return ''
+ return {'ale': 'flexbus_side.m_ALE',
+ 'oe' : 'flexbus_side.m_OEn',
+ 'rw' : 'flexbus_side.m_R_Wn',
+ }.get(pname, '')
def mk_pincon(self, name, count):
ret = [PBase.mk_pincon(self, name, count)]
# special-case for gpio in, store in a temporary vector
plen = len(self.peripheral.pinspecs)
- template = "mkConnection({0}.{1},\n\t\t\t{2}.{1});"
+ template = "mkConnection({0}.{3},\n\t\t\t{2}.flexbus_side.{1});"
sname = self.peripheral.iname().format(count)
name = self.get_iname(count)
ps = "pinmux.peripheral_side.%s" % sname
n = "{0}".format(name)
- for ptype in ['out', 'out_en', 'in']:
- ret.append(template.format(ps, ptype, n))
+ for stype, ptype in [
+ ('cs', 'm_FBCSn'),
+ ('bwe', 'm_BWEn'),
+ ('tbst', 'm_TBSTn'),
+ ('tsiz', 'm_TSIZ'),
+ ('ad_in', 'm_AD'),
+ ('ad_out', 'm_din'),
+ ('ad_en', 'm_OE32n'),
+ ]:
+ ret.append(template.format(ps, ptype, n, stype))
return '\n'.join(ret)
bsv_file.write(soct.format(imports, ifdecl, mkfast,
slavedecl, mastdecl, mkcon,
inst, dma, num_dmachannels,
+ pincon,
))
# see comment in spec.interfaces.PinGen, this is complicated.
flexspec = {
- 'FB_TS': ('FB_ALE', 2),
+ #'FB_TS': ('FB_ALE', 2), # commented out for now
'FB_CS2': ('FB_BWE2', 2),
'FB_AD0': ('FB_BWE2', 3),
'FB_CS3': ('FB_BWE3', 2),
for i in range(2):
buspins.append("CS%d+" % i)
buspins += ['ALE+', 'OE+', 'RW+', 'TA-',
- 'TS+', 'TBST+',
+ # 'TS+', commented out for now, mirrors ALE, for mux'd mode
+ 'TBST+',
'TSIZ0+', 'TSIZ1+']
for i in range(4):
buspins.append("BWE%d+" % i)