JMDC Application Software JAP Xudong CAI MIT Sep

  • Slides: 10
Download presentation
JMDC Application Software (JAP) Xudong CAI / MIT Sep. 1, 2009 @ CERN

JMDC Application Software (JAP) Xudong CAI / MIT Sep. 1, 2009 @ CERN

Current Status § Communication: • All AMSWire and CAN master slave modes are implemented

Current Status § Communication: • All AMSWire and CAN master slave modes are implemented and tested except JIMCAN “bypass” mode. • All HRDL and 1553 communications are implemented and tested. They are in use. • RS 422 has implemented but not tested yet. • JBUX/JBU has partly implemented under debugging. § Flash file system and file control: • File system is implemented and compatible with JROM • The file system operations are also compatible with JROM (the support for the data types). • AMS file transfer protocol has been modified and unified between JAP and JROM. • Support file copy between JMDCs § Node address control: • Node addresses can be controlled by commands now. • Node address timeout counter and disable function not yet finished. (Proposed by Alexei) Sep. 1, 2009 JMDC Application Software (JAP) 2

Current Status (continued) § Q-List: • Counter based Q-List has completed (AMS-1 style) •

Current Status (continued) § Q-List: • Counter based Q-List has completed (AMS-1 style) • Time based Q-List is under discussion § Envelop commands: • AMSWire and CAN envelop commands are implemented. • Envelop AMS blocks are implemented and under tests. § Command file execution: • Command file execution is implemented and under tests • There is a way to execute command file with new node address. (Proposed by Alexei) § Flash file as block data: • A data type is implemented to use a flash file as part of data append at the end of command. (Proposed by Paolo) § It is ready to implement DAQ and Slow Control tasks whenever the procedures are defined. Sep. 1, 2009 JMDC Application Software (JAP) 3

Node Address Control Node Address Table Item (Total 512 items) Word 0 1 2

Node Address Control Node Address Table Item (Total 512 items) Word 0 1 2 3 4 5 6 7 15 14 13 12 11 Type 10 9 8 7 6 5 Error Count 4 3 2 1 0 Size Comments CAN: 2 words CAN Message ID AMSW: 0 x. Cnnn is used to copy pathes from node "nnn". Address Node Types Name Code Undefined 0 x 00 Node is not defined. Self 0 x 55 It is used for JMDC itself. For example, HRDL owner will have 0 x 10 address marked as itself. Alias 0 x 77 It makes one node equal to another node. For example, JINJ-PA = JINJ-0 AMSW 0 x. AA It marks address for AMSW and address area gives the path starting from JMDC ports. CAN 0 x. CC It marks address for CAN and CAN message ID is in the first two words of address area. External 0 x. EE It's JMDC external addresses for HRDL/RS 422/1553 and ACOP/DDRS 2. Sep. 1, 2009 Comments JMDC Application Software (JAP) 4

Nodes Address Control (continued) JMDC AMSWire Path Table Nodes JMDC-0 JMDC-1 JMDC-2 JMDC-3 JINJ-0

Nodes Address Control (continued) JMDC AMSWire Path Table Nodes JMDC-0 JMDC-1 JMDC-2 JMDC-3 JINJ-0 0 x 0001 JINJ-1 0 x 0102 JINJ-2 0 x 0204 JINJ-3 0 x 0308 JMDC-0 0 x 0411 JMDC-1 0 x 0412 JMDC-2 0 x 0412 0 x 0414 JMDC-3 0 x 0414 - § The real AMSW path has to start from JMDC links. § There is a special way to define the path to be copied from another node. For example: • • JINJ-0 (0 x 80) : 0 x 0001 JINJ-P (0 x 84) : equal to JINJ-0 JINF-T 0 -A (0 x. A 6) : 0 x. C 084 0 x 033 F JINF-T 0 -P (0 x. A 8) : equal to JINF-T 0 -A TDR 0 -00 -A (0 x 11 A) : 0 x. C 0 A 8 0 x 003 F Real address of JINF-T 0 -A : 0 x 0001 0 x 033 F Real address of TDR 0 -00 -A: 0 x 0001 0 x 033 F 0 x 003 F § It is also possible to define a group address for AMSW. For example all TDRs in T-0. Sep. 1, 2009 JMDC Application Software (JAP) 5

Command file / Envelop AMS Block Encapsulated AMS Block Request Bits AMS Block Header

Command file / Envelop AMS Block Encapsulated AMS Block Request Bits AMS Block Header (Envelop) 15 L 14 13 0 0 RW 0 0 FBI 0 L AMS Block 0 (Encapsulated) 0 RW FBI IE 12 11 10 9 8 7 6 5 4 3 2 Size (number of bytes) of the block exclude "size" and "size extension" word Size extension if "L" = 1 Node Address 1 1 1 0 0 0 0 0 NL 1 0 1 0 Data type=0 x 1 F 0380 IR: Include request in reply NL: No HK-1553 reply May not exist IE - Ignore error May not alinged to 16 -bit word May not exist Secondary header tag Size (number of bytes) of the block exclude "size" and "size extension" word Size extension if "L" = 1 Node Address Data Type Data type extension if "Data type" = 0 x 1 F 0 Secondary header tag (maybe the same as envelop) Request Data Bytes … More AMS Blocks Comments May not exist … … Encapsulated AMS Block Reply Bits AMS Block Header (Envelop) 15 L 14 13 1 0 RW 0 0 Status L RR AMS Block 0 (Encapsulated) RW Status 12 11 10 9 8 7 6 5 4 3 2 1 Size (number of bytes) of the block exclude "size" and "size extension" word Size extension if "L" = 1 Node Address 1 1 0 0 0 1 1 1 0 0 0 Secondary header tag Secondary header time tag (MSB) Secondary header time tag (LSB) Size (number of bytes) of the block exclude "size" and "size extension" word Size extension if "L" = 1 Node Address Data Type Data type extension if "Data type" = 0 x 1 F Secondary header tag Secondary header time tag (MSB) Secondary header time tag (LSB) More AMS Blocks Sep. 1, 2009 Reply Data Bytes … … … JMDC Application Software (JAP) 0 Comments May not exist 1 0 Data type=0 x 1 F 0380 May not exist Reply only and can be different from the envelop May not exist 6

Command File / Envelop AMS Blocks § Envelop AMS block will put replies from

Command File / Envelop AMS Blocks § Envelop AMS block will put replies from sub blocks in a envelop and send together. You will not get replies until all sub-blocks are executed. § Command file will be executed in separate tasks (there are five of them). The command is replied if command file execution started. All blocks in command file will be executed one by one. The reply will not be packed and will be sent to HK streams not depend on the command source. § The current status of command file executions can be obtained from JMDC. § Command file execution can be stopped by command. § One level nesting is allowed and will be executed by the same task as the original command file. This is under debugging. § Alexei has provided graphic tools to control the command file executions Sep. 1, 2009 JMDC Application Software (JAP) 7

Counter based Q-List § There are two parameters to control the execution frequency of

Counter based Q-List § There are two parameters to control the execution frequency of the Q-List. • Wait time between items (32 -bit word defines time in ms) • Wait time at the end of loop (32 -bit word defines time in ms) § Each item has a 16 -bit word which defines the priority (in how many loops the command to be executed once). § The Q-List table can be read or write by command. The table items cannot be modified by command. (Proposed by Alexei) § The item priority can be changed by command. Priority 0 means the item is disabled. § Q-List is a system task now (was belong to MCT and related to the MCT ownership). All JMDC can have its own Q-List. § Alexei has provided graphic tool to control the Q-List. Sep. 1, 2009 JMDC Application Software (JAP) 8

AMS File Transfer Protocol § Alessandro is working on the graphic interface to support

AMS File Transfer Protocol § Alessandro is working on the graphic interface to support it. § I have made a command line program can be used from our ground support computers. Usage: jftp [options] Options: {-? {-d {-v {-a {-s {-f {-n {-h {-g {-p {-e {-c --help} --debug} --server} --port} --segsize} --name} --node} --handle} --get} --put} --exec} --continue} debug server port seg_size jname node handle gname Show this listing. Bigger is more. Server computer name or IP string (def: localhost) e. Ass server port name or number (def: hrdl) Segment length for transfer in byte (def: 4000) File name at JMDC (def: jap_test. img) JMDC node address (def: 4) Transfer handle (def: random) Get file (downlink) and file (def: put) Put file (uplink) and file (def: ~/jmdcfiles/jap. img) Execute after uplink transfer (def: save) Continue uncompleted transfer (def: new) For example: jftp –v pcgsc 13 –a hrdl –s 4000 –f test. dat –n 7 –p /home/ams/config/test. dat jftp –v pcgsc 10 –a 1553 –s 400 –f test. dat –n 7 –g /home/ams/config/test. dat Sep. 1, 2009 JMDC Application Software (JAP) 9

Document § There is a “AMS-02_datatypes. xls” file on AMS web site which is

Document § There is a “AMS-02_datatypes. xls” file on AMS web site which is updated automatically every night. The address is http: //ams. cern. ch/AMS/DAQ/AMS-02_datatypes. xls § I try to keep all information and formats inside. The data types marked with green color are implemented in the current version of JAP. Sep. 1, 2009 JMDC Application Software (JAP) 10