ps_ = ps + '_out'
else:
ps_ = ps
- n_ = "{0}{1}".format(n, count)
+ if not n.startswith('gpio'): # XXX EURGH! horrible hack
+ n_ = "{0}{1}".format(n, count)
+ else:
+ n_ = n
ret.append(" {0}({1}.{2});".format(ps_, n_, fname))
fname = None
if p.get('outen'):
ret.append(
" rule con_%s%d_%s_in;" %
(name, count, pname))
- ret.append(" {1}.{2}({0});".format(ps_, n, fname))
+ n_ = "{0}{1}".format(n, count)
+ ret.append(" {1}.{2}({0});".format(ps_, n_, fname))
ret.append(" endrule")
return '\n'.join(ret)
'scl': 'out.scl_in'}.get(pname, '')
def pinname_outen(self, pname):
- return {'sda': 'out.sda_outen',
- 'scl': 'out.scl_outen'}.get(pname, '')
+ return {'sda': 'out.sda_out_en',
+ 'scl': 'out.scl_out_en'}.get(pname, '')
def pinname_tweak(self, pname, typ, txt):
if typ == 'outen':
return " import pwm::*;"
def slowifdecl(self):
- return " interface PWMIO pwm{0}_o;"
+ return " interface PWMIO pwm{0};"
def num_axi_regs32(self):
return 4