Tristate 8 bit bi-directional
Edward Vidal <[email protected]> Fri, 13 May 2016 14:23:49 +0000 (UTC)
| Newsgroups | gmane.comp.python.myhdl |
|---|---|
| Message-ID | <[email protected]> |
Hello All I came across Josy Boelen simpletristateexample.py. Josy code works great. I started from his code and created mul_ts.py https://gist.github.com/441d86f67d3fdac12d53d1f93e44fcea.git in hopes of getting to a 8 bit Bi-directional Signal. I import his simpletristateexample.py https://gist.github.com/c816d585e12ae397627b.git My code converts and I can simulate with the following cmds python mul_ts.py --convert & python mul_ts.py --trace When I uncoment lines 73-75 my code. ''' @always_comb def rtl2(): t_rpi2B.next = concat(ts7,ts6,ts5,ts4,ts3,ts2,ts1,ts0) ''' My code will not convert or trace. This is the error that I get. t_rpi2B.next = concat(ts7,ts6,ts5,ts4,ts3,ts2,ts1,ts0) File "/usr/local/lib/python2.7/dist-packages/myhdl-1.0dev-py2.7.egg/myhdl/_concat.py", line 79, in concat val = val << w | v & (long(1) << w)-1 TypeError: unsupported operand type(s) for <<: 'NoneType' and 'int' I have also tried which converts but will not trace @always_comb def rtl2(): t_rpi2B.next = ts7*128+ts6*64+ts5*32+ts4*16+ts3*8+ts2*4+ts1*2+ts0 With this error t_rpi2B.next = ts7*128+ts6*64+ts5*32+ts4*16+ts3*8+ts2*4+ts1*2+ts0 File "/usr/local/lib/python2.7/dist-packages/myhdl-1.0dev-py2.7.egg/myhdl/_Signal.py", line 379, in __mul__ return self._val * other TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' My issue is that I can not combine the 8 tristate signals to a bus. I appreciate any help. Edward Vidal Jr. e-mail [email protected] 915-595-1613 ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ myhdl-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/myhdl-list