1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00

Fix 'long' compatiblity

This commit is contained in:
Jan Decaluwe 2015-05-23 22:48:02 +02:00
parent 082847ee3a
commit d38a452ae6
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@ from __future__ import absolute_import
import warnings
from copy import deepcopy
from myhdl._compat import long
from myhdl._Signal import _Signal
from myhdl._Waiter import _SignalWaiter, _SignalTupleWaiter
from myhdl._intbv import intbv
@ -148,7 +149,7 @@ class ConcatSignal(_ShadowSignal):
v = long(a, 2)
else:
raise TypeError("ConcatSignal: inappropriate argument type: %s" \
% type(arg))
% type(a))
nrbits += w
val = val << w | v & (long(1) << w)-1
self._initval = val

View File

@ -1,5 +1,6 @@
from __future__ import absolute_import
from myhdl import *
from myhdl._compat import long
def bench_SliceSignal():