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

Introduced SignalType for instance type checking on Signal objects

This commit is contained in:
Jan Decaluwe 2010-06-12 09:45:12 +02:00
parent 79a1498e34
commit 0d7a030e26
2 changed files with 8 additions and 5 deletions

View File

@ -567,7 +567,8 @@ class _SignalWrap(object):
def apply(self):
return self.sig._apply(self.next, self.timeStamp)
# for export
SignalType = _Signal
# import _SliceSignal here to avoid circular import of _Signal

View File

@ -23,9 +23,10 @@ This module provides the following myhdl objects:
Simulation -- simulation class
StopStimulation -- exception that stops a simulation
now -- function that returns the current time
Signal -- class to model hardware signals
ConcatSignal -- class that models a concatenation shadow signal
TristateSignal -- class that models a concatenation shadow signal
Signal -- factory function to model hardware signals
SignalType -- Signal base class
ConcatSignal -- factory function that models a concatenation shadow signal
TristateSignal -- factory function that models a tristate shadow signal
delay -- callable to model delay in a yield statement
posedge -- callable to model a rising edge on a signal in a yield statement
negedge -- callable to model a falling edge on a signal in a yield statement
@ -110,7 +111,7 @@ from _bin import bin
from _concat import concat
from _intbv import intbv
from _join import join
from _Signal import posedge, negedge, Signal
from _Signal import posedge, negedge, Signal, SignalType
from _ShadowSignal import ConcatSignal
from _ShadowSignal import TristateSignal
from _simulator import now
@ -138,6 +139,7 @@ __all__ = ["bin",
"posedge",
"negedge",
"Signal",
"SignalType",
"ConcatSignal",
"TristateSignal",
"now",