framer16 HDL Worker
Wraps a single-channel IQ sample stream into 16-sample positional frames for simulation testing of the folded demod chain.
Detail
The worker contains two processes clocked on ctl_in.clk plus a
combinational output process.
Reset
The synchronous reset condition is:
rst <= '1' when (ctl_in.reset = '1' or props_in.init = '1') else '0';
Asserting the init property provides a software-controlled flush without a
full OpenCPI control-plane reset, useful when re-running test cases.
Input take
input_out.take <= input_in.ready and (not busy);
The input is consumed (taken) only when the worker is idle. This ensures the current sample is not consumed until the previous 16-beat frame has been fully emitted downstream.
I/Q swap
When props_in.swap_iq = '1', the input data word is byte-swapped at the
16-bit boundary before latching:
in_iq <= input_in.data(15 downto 0) & input_in.data(31 downto 16)
when props_in.swap_iq = '1' else input_in.data;
This matches the cr_x16 convention (I/real = data[31:16]).
Sequential state (p_seq)
When busy = '0' and an input beat arrives with the correct opcode, the
sample is latched into lat_iq, pos_cnt is reset to zero, and
busy is set. While busy = '1', each cycle that downstream asserts
ready, pos_cnt is incremented. When pos_cnt reaches N_CH - 1
(15), busy is cleared, completing the frame.
Output drive (p_out)
The combinational output process drives:
validandgivehigh wheneverbusy = '1'.dataequal tolat_iqwhenpos_cnt = sel, zero otherwise.somhigh on beat 0,eomhigh on beat 15.opcodefixed tocomplex_short_timed_sample_sample_op_e.eofasserted (fromeof_seen) only afterbusyhas cleared.
The sel signal is resize(unsigned(props_in.position), 4), a 4-bit
unsigned comparison against pos_cnt.
Latency
One input clock cycle of latency is introduced by the lat_iq register.
The first output beat of each frame appears on the clock edge after the input
sample is taken.
Worker Properties
ocpi_buffer_size_outputType:
ushortAccess:
Parameter:
FalseWritable:
FalseInitial:
TrueVolatile:
FalseRead back:
False
Default value:
0
ocpi_blocked_outputType:
ulongAccess:
Parameter:
FalseWritable:
FalseInitial:
FalseVolatile:
TrueRead back:
False
Default value:
None
ocpi_max_latency_outputType:
ushortAccess:
Parameter:
TrueWritable:
FalseInitial:
FalseVolatile:
FalseRead back:
False
Default value:
None
ocpi_latency_outputType:
ushortAccess:
Parameter:
FalseWritable:
FalseInitial:
FalseVolatile:
TrueRead back:
False
Default value:
None
ocpi_messages_outputType:
ulongAccess:
Parameter:
FalseWritable:
FalseInitial:
FalseVolatile:
TrueRead back:
False
Default value:
None
ocpi_bytes_outputType:
ulongAccess:
Parameter:
FalseWritable:
FalseInitial:
FalseVolatile:
TrueRead back:
False
Default value:
None
Worker Ports
inputProtocol:
complex_short_timed_sampleOptional:
False
outputProtocol:
complex_short_timed_sampleOptional:
False
Inputs:
Outputs:
Worker Ports
Inputs:
input:Type:
StreamInterfaceProtocol:
complex_short_timed_sample-protClockDirection:
inData width:
32
Outputs:
output:Type:
StreamInterfaceProtocol:
complex_short_timed_sample-protWorker EOF:
trueClock:
inputData width:
32
Utilisation
Utilization reporting is not currently implemented.