beautypg.com

Specifying the position in the control word, Retrieving the hyperframe control words – Altera CPRI v6.0 MegaCore Function User Manual

Page 68

background image

Specifying the Position in the Control Word

You can access only 32 bits in a single register access. Depending on the CPRI line bit rate, a control word

may have multiple 32-bit sections. Therefore, in addition to specifying the control word location in the

CPRI frame, you must also specify a 32-bit aligned position in the control word.

Table 3-13: Control Word Byte Positions in RX_CTRL and TX_CTRL Registers

In this table, each control word nibble is indicated with 0xF. The presence of 0xF or 0x0 indicates whether the

nibble within the register is populated with a valid control word nibble.

CPRI Bit Rate (Gbps)

Register Access Sequence Number ({rx,tx}_ctrl_seq)

0

(first access)

1

(2nd access)

2

(3rd access)

3

4th access)

4

(5th access)

0.6144

FF000000

0

0

0

0

1.2288

FFFF0000

0

0

0

0

2.4576

FFFFFFFF

0

0

0

0

3.072

FFFFFFFF

FF000000

0

0

0

4.9152

FFFFFFFF

FFFFFFFF

0

0

0

6.144

FFFFFFFF

FFFFFFFF

FFFF0000

0

0

9.8034

FFFFFFFF

FFFFFFFF

FFFFFFFF

FFFFFFFF

0

10.1376

FFFFFFFF

FFFFFFFF

FFFFFFFF

FFFFFFFF

FF000000

However, the table does not clarify which control word byte occupies which position in the register. The

following examples indicate the correspondence between register bytes and control word bytes:
• At the CPRI line bit rate of 0.6144 Gbps, when you access hyperframe control word X, the 8-bit control

word from hyperframe position #Z.X.0 is in bits [31:24] of the register.

• At the CPRI line bit rate of 1.2288 Gbps, the byte from position #Z.X.0.0 is in bits [31:24] of the

register and the byte from position #Z.X.0.1 is in bits [23:16] of the register.

• At the CPRI line bit rate of 3.072 Gbps, you must access the register twice to retrieve or write the full

control word. In the first access operation, you access the 32 bits of the control word in positions #Z.X.

0.0 (in register bits [31:24]), #Z.X.0.1 (in register bits [23:16]), #Z.X.0.2 (in register bits [15:8]), and

#Z.X.0.3 (in register bits [7:0]). In the second access operation, you access the eight bits of the control

word in position #Z.X.0.4 in bits [31:24] of the register.

Retrieving the Hyperframe Control Words

A control receive table contains one entry for each of the 256 control words in the current hyperframe. To

read a control word, your application must write the control word number X to the

rx_ctrl_x

field of the

CTRL_INDEX

register and then read the last received #Z.X control word from the

RX_CTRL

register. Because

the register can hold only 32 bits at a time, depending on the CPRI line bit rate, reading the full control

word may require multiple register accesses. Increment the value in the

rx_ctrl_seq

field of the

CTRL_INDEX

register from zero to four to access the full control word when the CPRI line bit rate is

10.1376 Gbps, or from zero to two when the CPRi line bit rate is 6.144 Gbps, for example.

3-38

Specifying the Position in the Control Word

UG-01156

2014.08.18

Altera Corporation

Functional Description

Send Feedback