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

1560 Commits

Author SHA1 Message Date
Shen Chen
58e3376700 fix: Tristate signals' value may be None. Handle this situation in VCD dumps, by using _orival of TristateSignal. 2015-03-24 04:21:23 +08:00
Jan Decaluwe
47af2b72e4 Merge branch 'master' of github.com:jandecaluwe/myhdl 2015-03-18 20:28:00 +01:00
Jan Decaluwe
b3e51a5528 Merge branch 'jck-pytest' 2015-03-18 20:27:06 +01:00
Jan Decaluwe
8b75ae6702 Merge branch 'pytest' of https://github.com/jck/myhdl into jck-pytest 2015-03-18 20:26:39 +01:00
jandecaluwe
9e39f81a02 Merge pull request #32 from josyb/reference
corrected URL for MEP-107 in 'What’s new in MyHDL 0.9'
2015-03-18 20:21:54 +01:00
Jan Decaluwe
5934e06383 Merge branch 'jck-py3-conv' 2015-03-18 20:17:12 +01:00
Jan Decaluwe
cdf97c10e0 Merge branch 'py3-conv' of https://github.com/jck/myhdl into jck-py3-conv 2015-03-18 20:15:53 +01:00
Jan Decaluwe
5167afa8fa Merge branch 'jck-cosim' 2015-03-18 20:05:18 +01:00
Keerthan Jaic
43b5f18e67 fix tests which fail on python2 because they try to print a tuple 2015-03-18 05:43:28 -04:00
Keerthan Jaic
1be1f77f64 use parantheses in print statements of remaining general conv tests 2015-03-18 05:20:19 -04:00
Keerthan Jaic
bb1fdfe904 fix inferVhdlObj behaviour when obj.min is None
In python 2, None < 0 returns True
However, in py3, None cannot be compared with zero. This commit ensures
identical behaviour in py2,3 when obj.min is None
2015-03-18 05:15:46 -04:00
Keerthan Jaic
2870652844 Implement __hash__ for EnumItem
In python 3, if a class defines __eq__, the inheritance of __hash__ is
blocked. Therefore, __hash__ needs to be defined explicitly.

For EnumItem, we use self._type and self._index since they are sufficent
for uniquely identifying any particular EnumItem.
2015-03-18 05:15:46 -04:00
Keerthan Jaic
cafe06382d fix long literals in test_hec 2015-03-18 05:15:46 -04:00
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
55b6cbfed9 make comsimulation py3 compatible 2015-03-18 00:49:34 -04:00
jmgc
36e98b6fbf make icarus cosim tests py3 compatible 2015-03-17 23:57:17 -04:00
Keerthan Jaic
7e21a01796 travis: run icarus cosim tests 2015-03-17 23:16:20 -04:00
Keerthan Jaic
ea8f703e1b add makefile for icarus cosim test 2015-03-17 23:15:39 -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
Josy Boelen
2b220aac4a corrected URL for MEP-107 2015-03-14 13:30:40 +01: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
Keerthan Jaic
962d1c1f31 use pytest for toVerilog tests 2015-03-13 03:47:06 -04: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