Types
Sample Blocks
Utilities for dealing with contiguous blocks of samples.
- class tiliqua.block.Block(shape)
data.StructLayout
representing a ‘Block’ of samples.- shapeShape
Shape of the
sample
payload of elements in this block.
This is normally used in combination with
stream.Signature
, wherevalid
,ready
andpayload.first
are used to delineate samples inside. Blocks are transferred one sample at a time - a practical example with blocks of length 8:|-- block 1 --| |-- block 2 --| |--- payload.sample: 0 1 2 3 4 5 6 7 8 A B C D E F G H I ... payload.first: -_______________-_______________-__ valid: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ready: (all ones)
Most cores here are assuming they are working with blocks of some predefined size - that is, each producer/consumer must expect the same size of
Block
.- Members:
first (
unsigned(1)
) – Strobe asserted for first sample in a block, deasserted otherwise.sample (
shape
) – Payload of this sample in the block.
Complex Numbers
Utilities for dealing with fixed-point complex numbers.
- class tiliqua.complex.CQ(shape)
data.StructLayout
representing a complex number, formed by a pair of numbers.- shapefixed.SQ
Shape of the fixed-point types used for real and imaginary components.
- Members:
real (
shape
) – Real component of complex number.imag (
shape
) – Imaginary component of complex number.
- class tiliqua.complex.Polar(shape)
data.StructLayout
representing a complex number in polar form.- shapefixed.SQ
Shape of the fixed-point types used for magnitude and phase components.
- Members:
magnitude (
shape
) – Magnitude component of complex number.phase (
shape
) – Phase component of complex number.
- tiliqua.complex.connect_sq_to_real(m, stream_o, stream_i)
Adapter: connect a real
stream_o
to a complexstream_i
, forwarding only the real component.
- tiliqua.complex.connect_real_to_sq(m, stream_o, stream_i)
Adapter: connect a complex
stream_o
to a realstream_i
, forwarding only the real component.
- tiliqua.complex.connect_magnitude_to_sq(m, stream_o, stream_i)
Adapter: connect a polar
stream_o
to a realstream_i
, forwarding only the magnitude component.