Writing the hyperframe control words – Altera CPRI v6.0 MegaCore Function User Manual
Page 69
Example 3-1: Control Word Retrieval Example
To retrieve the vendor-specific portion of a control word in the most recent received hyperframe,
perform the following steps:
1. Identify the indices for the vendor-specific portion of the transmit control table, using the
formula X = Ns + 64 + Xs.
In the example, Ns = 16 and Xs = 0, 1, 2, and 3. Therefore, the indices to be read are 16, 80,
144, and 208.
2. For each value X in 16, 80, 144, and 208, perform the following steps:
a. Write the value X to the
rx_ctrl_x
field of the
CTRL_INDEX
register.
b. Reset the
rx_ctrl_seq
field of the
CTRL_INDEX
register to the value of zero.
c. In the following
cpu_clk
cycle, read the first 32-bit section of the control word from the
RX_CTRL
register.
d. If the CPRI line bit rate is greater than 2.4576 Gbps, increment the
rx_ctrl_seq
field of
the
CTRL_INDEX
register to the value of 1 and in the following
cpu_clk
cycle, read the
second 32-bit section of the #Z.X control word from the
RX_CTRL
register.
e. If the CPRI line bit rate is greater than 4.9152 Gbps, increment the
rx_ctrl_seq
field of
the
CTRL_INDEX
register to the value of 2 and in the following
cpu_clk
cycle, read the third
32-bit section of the #Z.X control word from the
RX_CTRL
register.
f. If the CPRI line bit rate is greater than 6.144 Gbps, increment the
rx_ctrl_seq
field of the
CTRL_INDEX
register to the value of 3 and in the following
cpu_clk
cycle, read the fourth
32-bit section of the #Z.X control word from the
RX_CTRL
register.
g. If the CPRI line bit rate is 10.1376 Gbps, increment the
rx_ctrl_seq
field of the
CTRL_INDEX
register to the value of 4 and in the following
cpu_clk
cycle, read the fifth 32-
bit section of the #Z.X control word (the real-time vendor specific bytes) from the
RX_CTRL
register.
Writing the Hyperframe Control Words
A control transmit table contains one entry for each of the 256 control words in the current hyperframe.
Each control transmit table entry contains a control word and an enable bit. As the frame is created, if a
control word entry is enabled, and the global
tx_ctrl_insert_en
bit in the
L1_CONFIG
register is set, the
IP core writes the appropriate control transmit table entry to the CPRI frame's control word.
You write to a control transmit table entry through the
TX_CTRL
register. This register access method
requires that you write the control word in 32-bit sections. Use the
tx_ctrl_seq
field of the
CTRL_INDEX
register to specify the 32-bit section you are currently writing to the
TX_CTRL
register.
To write a control word in the control transmit table, perform the following steps:
1. Write the control word number X to the
tx_ctrl_x
field of the
CTRL_INDEX
register.
2. Reset the
tx_ctrl_seq
field of the
CTRL_INDEX
register to the value of zero.
3. Write the first 32-bit section of the next intended #Z.X control word to the
TX_CTRL
register.
4. If the CPRI line bit rate is greater than 2.4576 Gbps, increment the
tx_ctrl_seq
field of the
CTRL_INDEX
register to the value of 1 and write the second 32-bit section of the next intended #Z.X
control word to the
TX_CTRL
register.
5. If the CPRI line bit rate is greater than 4.9152 Gbps, increment the
tx_ctrl_seq
field of the
CTRL_INDEX
register to the value of 2 and write the third 32-bit section of the next intended #Z.X
control word to the
TX_CTRL
register.
UG-01156
2014.08.18
Writing the Hyperframe Control Words
3-39
Functional Description
Altera Corporation