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

factored out StopSimulation

This commit is contained in:
jand 2003-05-26 20:43:55 +00:00
parent 512754a017
commit ee85b17502
3 changed files with 13 additions and 13 deletions

View File

@ -26,7 +26,6 @@ __date__ = "$Date$"
from __future__ import generators
import sys
import os
import exceptions
from warnings import warn
import _simulator
@ -37,6 +36,7 @@ from types import GeneratorType
from Cosimulation import Cosimulation
from join import join
from _Waiter import _Waiter
from util import StopSimulation, SuspendSimulation
schedule = _futureEvents.append
@ -222,13 +222,3 @@ def _flatten(*args):
waiters.extend(w)
return waiters, cosim
class StopSimulation(exceptions.Exception):
""" Basic exception to stop a Simulation """
pass
class SuspendSimulation(exceptions.Exception):
""" Basic exception to suspend a Simulation """
pass

View File

@ -43,12 +43,12 @@ __date__ = "$Date$"
# import intbv as a class first; it's used in other classes
from intbv import intbv
from Simulation import StopSimulation, Simulation
from Simulation import Simulation
from join import join
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
from util import downrange, bin, Error, StopSimulation

View File

@ -32,6 +32,8 @@ __author__ = "Jan Decaluwe <jan@jandecaluwe.com>"
__version__ = "$Revision$"
__date__ = "$Date$"
import exceptions
def downrange(start, stop=0):
""" Return a downward range. """
@ -60,6 +62,14 @@ def bin(num, width=0):
class Error(Exception):
pass
class StopSimulation(exceptions.Exception):
""" Basic exception to stop a Simulation """
pass
class SuspendSimulation(exceptions.Exception):
""" Basic exception to suspend a Simulation """
pass