• Keine Ergebnisse gefunden

Documentation for the GET4 Read-Out Controller

B.2. Basic Functionality

B.2.1. Slow Control

GET/PUT Commands and Multi Oper Lists

The ROC can be configured with GET and PUT commands, GET commands are 32 bit wide, PUT commands consist of 64 bit. Those commands are part of what is known as Multi-Oper-List protocolwhich defines seven commands in total:

CMD Hex code Bin code Comment

NOP 0x00 00000000 (32 bit, not acked) N 0x01 00000001 (32 bit, not acked) PUT 0x02 00000010 (64 bit)

GET 0x04 00000100 (32 bit) ACK-PUT 0x0A 00001010 (64 bit) ACK-GET 0x0C 00001100 (64 bit) NACK 0x10 00010000 (64 bit)

They are either 32 bit or 64 bit wide, the meaning of the bits is illustrated in figure B.2.

NACK ACK−PUT

ACK−GET PUT

GET N NOP

63 0

0 0 0

0 0 0

63 63 63 31

31

31

24 bit

8 bit 32 bit

DATA

undefined

DATA

undefined ADDRESS

ADDRESS ADDRESS ADDRESS ADDRESS undefined

number of commands

0x10 0x0C 0x0A 0x04 0x02 0x01 0x00

Figure B.2.: Bit organization of the GET/PUT commands.

The multi oper lists are build by using these commands. The following rules apply:

• The first command of a multi oper list is N. N defines the number of commands (GET/PUT/NOP) that will follow in the list.

• A multi oper list is always transmitted in oneCBMNetpacket and therefore, due to the 64 byte limitation ofCBMNet, a maximum of 7 commands per multi oper list is possible.1

• Since CBMNetrequires the granularity on the control path to be 64 bit, there is a 32-bit NOP padded at the end if necessary. Note that the NOP also counts for the referring N command.

1Note that in software you can issue multi oper lists with more than 7 commands. But they will be split to multiple multi oper lists by theABBdaemon(the driver for the PCI express board). So if you need to ensure that the commands in your multi oper list are executed within a very short time period, do not use more than 7 commands or use the cmd-lists feature.

• All commands of a multi oper list are executed and all the referring ACKs/NACKs are send back in one packet.

• Since the number of expected ACKs/NACKs is known, the replying packet does not contain the preceding N command.

• Since the ACKs/NACKs are all 64 bit, it does not contain a NOP either.

• A NOP will not cause a ACK or NACK.

• If one command fails, a NACK will be replied. All subsequent commands of the multi oper list will not be executed and a NACK will be replied for them.

• A single GET or PUT command is just a multi oper list withN=1.

Slow Control Addresses

The address space of the Modular ROC is divided in several address subspaces. One subspace for each module and one subspace for common functionality (see section C for all addresses).

The following address subspaces are defined:

0x0XXXXX:common functionality

0x1XXXXX:Ethernet specific functionality 0x2XXXXX:Optics specific functionality 0x3XXXXX:reserved

0x4XXXXX:nXYTER specific functionality 0x5XXXXX:FEET/GET4 specific functionality

Hardware Identification To identify which combination of frontend module and trans-port module is present, address0x 00 00 00returns a 32 bit value. The upper 16 bit indi-cate the type of frontend module and the lower 16 bit the type of transport module that is used.

The following values are defined:

• Frontend Module:

0x0001: The nXYTER readout.

0x0002: The FEET readout (old GET4s). Support dropped.

0x0003: The GET4 v1.x readout.

• Transport Module:

0x0001: Transport via Optics

0x0002: Transport via Ethernet (for the Virtex4-FX20 FPGA)

0x0003: Transport via Ethernet (for the Virtex4-FX40 FPGA) 0x0004: Transport via Ethernet (for the Virtex4-FX60 FPGA) 0x0005: Transport via USB

So, for example the firmware for the readout of the GET4 v1.x chips via Optics would return: 0x0003 0001.

Hardware Versioning

The mostly independent development of different modules requires an independent ver-sioning of the different modules. In each module, address 0x X0 00 00 must return it’s hardware version. An exception is the address subspace of the common functionality since here0x 00 00 00is already used to identify the combination of frontend module and transport module. 0x 00 00 04 is used for the version of the interface between the two modules.

Command Lists

Eight programmableCommand Listsare available on the ROC. They can be used for com-mand sequences that need to be repeated frequently, and for time critical comcom-mand se-quences. Time critical means that the commands in the list are executed within a few clock cycles but also that execution of the lists can be started by DLMs, i.e. on multiple ROCs simultaneously.

0x0 0x4 0x8 0xC 0x10 0x14 0x18 0x1C 0x20 0x24 Offset

List 0 List 1 List 2 List 3 List 4 List 5 List 6 List 7

32 0

0x200 0x100

0x300

0x400

0x500

0x600

0x700 0x000

0xFC

BRAM) (Size of one

2048 Byte 8 bit

CMD

24 bit 32 bit

ADDRESS DATA

Figure B.3.:CMD-Lists memory (2kB) is mapped into PUT/GET-address-space

• There are 8 Lists available, each list provides a maximum of 32 commands

• Execution of a list can be issued by a PUT command, alternatively, DLMs 8-15 trig-ger list 0-7 respectively.

• GET commands can also be programmed but are of limited use as ACKs/NACKs of list-commands are not stored

• In case of GET, proceed with 64 bit alignment after the GET command.

• The last CMD has to be the command to deactivate list processing ...

• ... except if you want to chain lists (careful)

• Predefined list commands:

List 0: Start DAQ, then deactivate list processing List 1: Stop DAQ, then deactivate list processing Lists 2-7: just deactivate list processing

Example

rocutil-command what happens

Example sequence (initialize a GET4 chip and send back a DLM):

put 0x501000 0x8 enable readout from port 4 (8="1000", 4th bit enables 4th port) put 0x510000 0x0 Send command to GET4:activate dll and ro-rst

put 0x510000 0x10 Send command to GET4:enable GET4 readout put 0x201000 0xA Generate a DLM with pattern "1010" (=0xA)

Commands to store the above sequence in CMD-List No. 5:

put 0x021500 0x02501000 Store CMD and ADR of 1st cmd put 0x021504 0x8 Store DATA of 1st cmd

put 0x021508 0x02510000 Store CMD and ADR of 2nd cmd put 0x02150C 0x0 Store DATA of 2nd cmd

put 0x021510 0x02510000 Store CMD and ADR of 3rd cmd put 0x021514 0x10 Store DATA of 3rd cmd

put 0x021518 0x02201000 Store CMD and ADR of 4th cmd put 0x02151C 0xA Store DATA of 4th cmd

put 0x021520 0x02020004 Store CMD and ADR of “deactivate list-processing”-cmd put 0x021524 0x0 Store DATA of “deactivate list-processing”-cmd

Select list No. 5 and activate processing:

put 0x020000 0x5 Activate list No. 5

(An incoming DLM ("1101") will trigger the processing of list No. 5 as well.)