Writing the outgoing control words, Writing the outgoing control words –44 – Altera CPRI IP Core User Manual

Page 76

Advertising
background image

4–44

Chapter 4: Functional Description

CPU Interface

CPRI MegaCore Function

December 2013

Altera Corporation

User Guide

access the full control word when the CPRI line rate is 9.8304 Gbps, or from zero to
two when the CPRI line rate is 6.144 Gbps, for example. Refer to

“Control Word

Retrieval Example” on page 4–47

for an example.

Table 4–14

shows the positions of the control word bytes in

CPRI_RX_CTRL[31:0]

. Each

control word nibble appears in the table as 0xF. For example, at the CPRI line rate of
614.4 Mbps, when you access control receive table entry X by reading from the

CPRI_RX_CTRL

register, the 8-bit control word from hyperframe position #Z.X.0 is in

bits [31:24] of the register. At the CPRI line rate of 1228.8 Mbps, 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 rate of 3072.0 Mbps, when you access a control
receive table entry by reading from the

CPRI_RX_CTRL

register, you must read twice. In

the first read, you access the 32 bits of the control word from 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 read, you access the eight bits of the
control word from position #Z.X.0.4 in bits [31:24] of the register.

Writing the Outgoing Control Words

A control transmit table contains an 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

CPRI_CONFIG

register is set, the low-level transmitter

writes the appropriate control transmit table entry to the CPRI frame’s control word.

You write to a control transmit table entry through the

CPRI_TX_CTRL

register. This

register access method requires that you write the control word in 32-bit sections. Use
the

cpri_ctrl_position

field of the

CPRI_CTRL_INDEX

register to specify the 32-bit

section you are currently writing to the

CPRI_TX_CTRL

register.

Table 4–14

applies to

the

CPRI_TX_CTRL

register as well as the

CPRI_RX_CTRL

register. Refer to

Table 4–14

for

control word byte location in the

CPRI_TX_CTRL

register and how to use the

cpri_ctrl_position

field.

To write a control word in the control transmit table, perform the following steps:

1. Write the control word number X to the

cpri_ctrl_index

field of the

CPRI_CTRL_INDEX

register.

2. Reset the

cpri_ctrl_position

field of the

CPRI_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

CPRI_TX_CTRL

register, as shown in

Table 4–14

.

Table 4–14. Control Word Byte Positions in CPRI_RX_CTRL Register

cpri_ctrl_position

CPRI Line Rate (Mbps)

614.4

1228.8

2457.6

3072.0

4915.2

6144.0

9830.4

0

FF000000

FFFF0000

FFFFFFFF

FFFFFFFF

FFFFFFFF

FFFFFFFF

FFFFFFFF

1

0

0

0

FF000000

FFFFFFFF

FFFFFFFF

FFFFFFFF

2

0

0

0

0

0

FFFF0000

FFFFFFFF

3

0

0

0

0

0

0

FFFFFFFF

Advertising