1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

1541 Commits

Author SHA1 Message Date
Keerthan Jaic
608a233ba0 handle nameconstants
In py2, True False and None are instances of ast.Name with ctx=load.
However, in py3.4, they are instances of ast.NameConstant and the value
attribute holds one of these constants.
2015-03-18 05:15:24 -04:00
Keerthan Jaic
302c78fc30 support converting print functions 2015-03-18 04:59:20 -04:00
Keerthan Jaic
2672e9a4c6 verify: create tmpfiles in text mode 2015-03-17 18:45:07 -04:00
Keerthan Jaic
efce0a3e4f use key instead of cmp while sorting list
the cmp kwarg of list.sort method is deprecated in py3
2015-03-17 18:06:07 -04:00
Keerthan Jaic
7f500d1ec0 Add parentheses to print statements in most general conv tests
NOTE: This is equavalent to using a print statement on a tuple in py2.
In py3, it is a print function.
2015-03-17 17:44:55 -04:00
Keerthan Jaic
2cb885283c replace iteritems with items in toverilog 2015-03-17 17:25:37 -04:00
Keerthan Jaic
9cb4b23ef9 handle py3's renaming of argument names in the ast
In python3, arg is a raw string of the argument name. In python2,
arguments are represented as Name nodes. The _get_argnames function is
introduced for accessing argument names in a version agnostic way.
2015-03-17 15:15:29 -04:00
jandecaluwe
4349b6169c Merge pull request #21 from cogenda/issue_19
fix Issue 19
2015-03-13 23:03:41 +01:00
Shen Chen
ce81dd7253 In co-simulation, map 4-value logic of external simulator to 0/1/None in MyHDL:
0 -> 0
  1 -> 1
  Z -> None
  X -> s._init   # None for tristate, 0/1 for others.
2015-03-13 22:59:31 +08:00
Shen Chen
b35aadad0b fix portmap when tristate signals are present: cosimulatin should connect to the driver of the tristate signal. 2015-03-13 22:59:31 +08:00
Shen Chen
6d0e555ad0 test case of tristate output buffer, using interface. 2015-03-13 22:59:31 +08:00
Shen Chen
9eff8fcc61 In co-simulation, if external simulator returns X, the signal's next value is set to its initial value.
In the case of tri-state signals, this means next value being None, which is appropriate.
2015-03-13 22:59:31 +08:00
Shen Chen
e0ff30860e fixes jandecaluwe/myhdl#19 : mark tristate signal as driven if its driver is driven. 2015-03-13 22:59:31 +08:00
Shen Chen
913a80a61f test case to demonstrate tristate output buffer conversion error
(issue @jandecaluwe/myhdl#19).
2015-03-13 22:57:54 +08:00
Jan Decaluwe
62b3867441 Merge branch 'jck-py3-core' 2015-03-12 18:53:25 +01:00
Keerthan Jaic
a2fd9c94a8 test_Signal: use set to check equality of lists
fixes jandecaluwe#23
2015-03-11 18:37:57 -04:00
Keerthan Jaic
b3416d49c8 fix intbv.signed behavior when min is None
In python 2, None >= 0 returns false.
However, in py3, None cannot be compared with zero. This commit ensures
identical behaviour in py2,3 when min is none.
2015-03-11 18:13:09 -04:00
Keerthan Jaic
b2948f4843 use future division in signal, intbv
Also, remove the __div__ and __rdiv__ magic methods
2015-03-11 18:12:57 -04:00
Keerthan Jaic
f2274bd730 replace __nonzero__ with __bool__
python3 deprecates __nonzero__ and introduces __bool__
This commit introduces __bool__ while maintaining python2 compatibility
2015-03-11 18:12:19 -04:00
Keerthan Jaic
8137e6ce6b replace backqote with repr everywhere excpt conversion test 2015-03-11 18:06:34 -04:00
Keerthan Jaic
969c122c8c use py3 compatible method of merging dicts 2015-03-11 17:55:13 -04:00
Keerthan Jaic
d0dc39dc21 fix usage of x in integer_types,.. 2015-03-11 17:54:59 -04:00
Keerthan Jaic
79704daa15 more long->integer_types fixes 2015-03-11 17:53:24 -04:00
Keerthan Jaic
a213fa4792 test_concat import reduce, long for python3 2015-03-11 17:51:39 -04:00
Keerthan Jaic
e6bf9e0e0c make list range before assigning in test_sim 2015-03-11 17:51:16 -04:00
Keerthan Jaic
adcd90ee0d correctly sort _futureevents 2015-03-11 17:51:13 -04:00
Keerthan Jaic
0671c4f143 make test_Signal use operator rather than exec 2015-03-11 17:50:29 -04:00
Keerthan Jaic
aec0ee62bb import compat long to test_Signal 2015-03-11 17:50:26 -04:00
Keerthan Jaic
64e477cb38 make test_intbv use operator rather than exec 2015-03-11 17:50:18 -04:00
Keerthan Jaic
15305854ef fix long references in _signal 2015-03-11 17:49:42 -04:00
Keerthan Jaic
0009d7b139 Remove deprecated _unparse module
delete module, disable test it is not used anywhere
2015-03-11 17:47:57 -04:00
Keerthan Jaic
1c7fe1f728 Fix iterator next() methods for python3 2015-03-11 17:46:22 -04:00
Keerthan Jaic
8ec439d3f4 fix dict.has_key usage for python3 2015-03-11 17:37:15 -04:00
Keerthan Jaic
5c8a291c26 Use sys.maxsize instead of maxint in core tests 2015-03-11 17:37:11 -04:00
Keerthan Jaic
64be5700d8 fix long compat in _bin.py 2015-03-11 17:36:56 -04:00
Keerthan Jaic
185d0ddeba fix __builtin__ references in _analyze 2015-03-11 17:36:49 -04:00
Keerthan Jaic
cb4785ada7 move classtype to compat 2015-03-11 17:36:17 -04:00
Keerthan Jaic
ebeb57ea22 move StringIO to compat 2015-03-11 17:34:42 -04:00
Keerthan Jaic
475b3e7e48 remove unused import, var 2015-03-11 17:34:39 -04:00
Keerthan Jaic
d9e7105550 fix string_types in _compat 2015-03-11 17:34:37 -04:00
Keerthan Jaic
a8def5451a fix typo in _compat 2015-03-11 17:34:34 -04:00
Keerthan Jaic
1c3a05d070 fix builtins import 2015-03-11 17:34:26 -04:00
Keerthan Jaic
9887ad3427 add string_types to _compat 2015-03-11 17:32:50 -04:00
Keerthan Jaic
9e756bfbf9 add builtins to _compat 2015-03-11 17:32:48 -04:00
Keerthan Jaic
43b0653c8f Add compatibility layer for dealing with long 2015-03-11 17:32:45 -04:00
Keerthan Jaic
154d0ec983 fix isinstance long, int checks for python3 2015-03-11 17:32:42 -04:00
Jan Decaluwe
4b70a481e6 Merge branch 'jck-refactoring' 2015-03-11 21:58:54 +01:00
Keerthan Jaic
697d7bc353 replace assert_ method with assertTrue
The assert_ alias has been deprecated since python 2.7
https://docs.python.org/2/library/unittest.html#deprecated-aliases
2015-03-11 10:23:02 -04:00
Keerthan Jaic
53bf27e0e5 always use _makeAST in _analyze.py 2015-03-11 09:24:42 -04:00
Keerthan Jaic
41d47667ce fix func attrs for python3 2015-03-11 08:58:38 -04:00