mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
Fixed issues with intbv importing
This commit is contained in:
parent
cb80e903be
commit
a37cf288a0
@ -29,11 +29,9 @@ import os
|
||||
import exceptions
|
||||
|
||||
from Signal import Signal
|
||||
import myhdl
|
||||
import _simulator
|
||||
from myhdl import intbv
|
||||
|
||||
|
||||
_MAXLINE = 4096
|
||||
|
||||
class Error(Exception):
|
||||
@ -166,7 +164,7 @@ class Cosimulation(object):
|
||||
os.write(self._wf, buf)
|
||||
|
||||
def _waiter(self):
|
||||
sigs = tuple(self._fromSignals)
|
||||
sigs = tuple(self._fromSigs)
|
||||
while 1:
|
||||
yield sigs
|
||||
self._changeFlag = 1
|
||||
|
@ -35,8 +35,7 @@ from copy import deepcopy as copy
|
||||
|
||||
import _simulator
|
||||
from _simulator import _siglist, _futureEvents, now
|
||||
from intbv import intbv
|
||||
|
||||
from myhdl import intbv
|
||||
|
||||
_schedule = _futureEvents.append
|
||||
|
||||
@ -116,6 +115,7 @@ class Signal(object):
|
||||
def _set_next(self, val):
|
||||
if isinstance(val, Signal):
|
||||
val = val._val
|
||||
# print self._type
|
||||
if not isinstance(val, self._type):
|
||||
raise TypeError, "Incompatible type(v) for sig.next = v\n" \
|
||||
" Expected %s, got %s" % (self._type, type(val))
|
||||
|
@ -173,7 +173,7 @@ def _flatten(*args):
|
||||
if cosim:
|
||||
raise MultipleCosimError
|
||||
cosim = arg
|
||||
waiters.append(_Waiter(cosim._waiter))
|
||||
waiters.append(_Waiter(cosim._waiter()))
|
||||
else:
|
||||
for item in arg:
|
||||
w, c = _flatten(item)
|
||||
|
@ -41,25 +41,13 @@ __author__ = "Jan Decaluwe <jan@jandecaluwe.com>"
|
||||
__version__ = "$Revision$"
|
||||
__date__ = "$Date$"
|
||||
|
||||
import Signal
|
||||
import Simulation
|
||||
import delay
|
||||
import intbv
|
||||
import _simulator
|
||||
import Cosimulation
|
||||
import util
|
||||
|
||||
StopSimulation = Simulation.StopSimulation
|
||||
join = Simulation.join
|
||||
Simulation = Simulation.Simulation
|
||||
posedge = Signal.posedge
|
||||
negedge = Signal.negedge
|
||||
Signal = Signal.Signal
|
||||
now = _simulator.now
|
||||
delay = delay.delay
|
||||
intbv = intbv.intbv
|
||||
Cosimulation = Cosimulation.Cosimulation
|
||||
downrange = util.downrange
|
||||
bin = util.bin
|
||||
Error = util.Error
|
||||
# import intbv as a class first; it's used in other classes
|
||||
from intbv import intbv
|
||||
from Simulation import StopSimulation, join, Simulation
|
||||
from Signal import posedge, negedge, Signal
|
||||
from _simulator import now
|
||||
from delay import delay
|
||||
from intbv import intbv
|
||||
from Cosimulation import Cosimulation
|
||||
from util import downrange, bin, Error
|
||||
|
||||
|
@ -35,7 +35,7 @@ from unittest import TestCase
|
||||
|
||||
from Signal import Signal
|
||||
from _simulator import _siglist
|
||||
from intbv import intbv
|
||||
from myhdl import intbv
|
||||
|
||||
|
||||
class SigTest(TestCase):
|
||||
|
Loading…
x
Reference in New Issue
Block a user