Stream Types
Streaming Types.
Classes:
| Name | Description |
|---|---|
ValidType |
Valid Type. |
AcceptType |
Accept Type. |
AStreamType |
Abstract Stream Type. |
StreamType |
Simple Stream Type with one |
AnyStreamType |
Any Stream Type. |
ValidType
Bases: AEnumType
Valid Type.
A signal of that type indicates if the related data is valid, driven by the transmitter.
>>> import ucdp_glbl
>>> valid = ucdp_glbl.stream.ValidType()
>>> valid
ValidType()
>>> valid.width
1
>>> for item in valid.values(): print(item)
EnumItem(0, 'invalid')
EnumItem(1, 'valid')
AcceptType
Bases: AEnumType
Accept Type.
A signal of that type indicates if the related data is taken over, driven by the receiver.
>>> import ucdp_glbl
>>> accept = ucdp_glbl.stream.AcceptType()
>>> accept
AcceptType()
>>> accept.width
1
>>> for item in accept.values(): print(item)
EnumItem(0, 'busy')
EnumItem(1, 'ready')
AStreamType
Bases: AStructType
Abstract Stream Type.
A stream contains at least a valid and accept member.
It is up to the child classes to define the corresponding data.
StreamType
Bases: AStreamType
Simple Stream Type with one data signal.
>>> import ucdp_glbl
>>> stream = ucdp_glbl.stream.StreamType(8)
>>> for item in stream.values(): print(item)
StructItem('valid', ValidType())
StructItem('accept', AcceptType(), orientation=BWD)
StructItem('data', UintType(8))
AnyStreamType
Bases: AStreamType
Any Stream Type.
>>> import ucdp_glbl
>>> stream = ucdp_glbl.stream.AnyStreamType(u.SintType(16))
>>> for item in stream.values(): print(item)
StructItem('valid', ValidType())
StructItem('accept', AcceptType(), orientation=BWD)
StructItem('data', SintType(16))