1 / 29

Control software

Control software. M. Sozzi Pisa - January 30/31, 2014. Mainz 2011. Software. The firmware is to be controlled – initialized – monitored from the CCPC (access during data taking possible) Use only low-level libraries from LHCb (JTAG, glue, I2C, …) with frozen source code

farrah
Télécharger la présentation

Control software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Control software M. SozziPisa - January 30/31, 2014

  2. Mainz 2011 Software • The firmware is to be controlled – initialized – monitored from the CCPC (access during data taking possible) • Use only low-level libraries from LHCb (JTAG, glue, I2C, …) with frozen source code • Command-line control program (with scripting and macros) made available by Pisa: - tightly linked to firmware version- to be customized for sub-detector firmware versions- to be used both for test/monitoring and real data-taking- initialization via XML files • Scientific Linux version: to be frozen • TEL62 firmware loading requires JAM-file player: existing LHCb version not working: to be solved – Perugia

  3. Low-level libraries I2C handling (LHCb) Glue card handling (LHCb) Local bus handling (LHCb) EPROM programming (LHCb) → NA62 modified JTAG handling (LHCb) → NA62 modified JAM file handling (LHCb) → NA62 modifiedJBI file handling (LHCb) → NA62 modifiedFutex implementation (CERN) i2clib.c gluelib.c lblib.c fproglib.c jtaglib.c jamlib.c jbilib.c exclulib.c

  4. Low-level commands Some standalone (LHCb-provided) utilities are installed together with the libraries, such as: lbread <address> lbwrite <address> <value>for writing to TEL62 local bus (e.g. FPGAs) jtagscan to identify JTAG devices on TEL62 EPC16Handling to load a firmware (pof) file (on TELL1 EEPROM only)

  5. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  6. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code Core functions tdspyreq.c tdsyslib.c tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  7. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h TDC boardspecific code TEL62 boardspecific code Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  8. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c System (TEL62+TDCB)functions tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  9. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c TDSPY interactive program code tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  10. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c TDSPY default printout functions tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  11. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c TDSPY remote control code tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  12. tdcode software suite (NA62) tdspy.h tel62.h tdc.h td.h tdspy.c tdlib.c tel62lib.c tdclib.c tdtab.c tel62tab.c tdctab.c tdspytab.c tdsys.h tdspyreq.h Completely written in standard C~44K lines of code tdspyreq.c tdsyslib.c XML configuration code tdtabcomplete.c tdxml.h tdspycom.h tdmsgdef.c tdxmllib.c tdspycomlib.c

  13. TDSPY program TDSPY is the interactive control program for the tdcode suite Command-line driven console program running on the TEL62 CCPC under Linux No GUIQuite flexible control allowing- scripting- user macro definition- remote control Some commands are tightly linked to the firmware versionIt still changes almost daily without any notice

  14. Tdspy use Meant to be the unique access point to the hardware, for- board development- board testing- expert debugging- standard user control- hardware configuration and database interaction- operation during data-taking (under run control) (ssh) pipe/socket Otherprocess tdspy DIM Runcontrol

  15. SVN • Na62tdaq repository @CERN contains: • TDCC firmware • TEL62 firmware • tdcode software suite w. scripts • some utilities • How to use it: • Create a CERN service account such as “na62to”, “na62bham”, etc. • Ask Pisa to create a new (empty) sub-detector firmware structure (if needed) • Ask na62tdaq@cern.ch for access • (Read-)accessible from browser via WebSVN

  16. Compilation Compile on the server (much faster), currently SLC4 Current quirk (to be fixed): su chroot /opt/ccpc/root cd <directory> make chown cc:na62 tdspy prompt>tdspyFloating point exception → You did not do the above

  17. Invocation [tel62-10] /home> tdspy -h TDSpy: TDAQ control program Usage: tdspy [-f<file>][-l<file>][-u<file>][-d [-b] [-o[<file>]] [-p[<pipe>]] [-s[<port>]]] -f : alternate startup file (default tdstart.spy) -l : alternate log file (default tdspy.log) -u : alternate users file (default tdspy.usr) -d : daemon mode -b : blocking (for daemon mode) -o : output file name (for daemon mode) -p : pipe mode and name (for daemon mode) -q : quiet mode (for daemon mode) -s : socket mode and port (for daemon mode)

  18. Online help [IDLE]TDSpy>help Use help <command> for individual command usage. Use @<filename> for file input, ! for recall. A dot (.) terminates most interactive commands. In most commands 99 stands for ALL and a list such as n1,n2-n3 is allowed. Macro definitions need () and optional formal arguments of the form %<letter>; definition ends with a dot line. automask mask non-responsive daughter-cards boardinfo show TEL62 information boardinitialize reset and initialize TEL62 boardreload reload all TEL62 devices ...

  19. Online command help [IDLE]TDSpy>help ppwrite ppwrite <id> <tag> <val> [<nloc>] [<first>] write PP-FPGA register id: PP-FPGA id tag: PP-FPGA register val: Value (hex) nloc: Number of locations first: First location (hex) Command (and register, memory, etc.) completion using <TAB>

  20. Some tdspy concepts The basic abstracted action is reading/writing into «registers»: - actual hardware registers- bit fields in hardware registers- FIFOs- memories This can actually happen through the local bus, I2C (for registers in the TDCB), JTAG (for internal HPTDC registers), Intel bus (for GbE MAC registers) etc., with direct or indirect addressing, bit masking, single or multiple accesses etc. (all this is hidden from the user) Most command names start with the target:e.g. ppwrite (PP-FPGA), slread (SL-FPGA), tdccstatus (TDC controller FPGA), tdcdump (TDC chip), ttcrxinfo (TTCrx chip), ddrtest (DDR memory), gbeinfo (GbE card), portmask (GbE port) Commands can have both mandatory and optional arguments (easy mode). 99 usually stands for “all” devices of a kind

  21. A single PP register TDSPY>ppwrite 2 CONTROL 0x10TDSPY>ppwrite 2 FREEZE 1 Reserved means reserved!

  22. More tdspy concepts Some «setup» variables can change the way the program workssetup <variable> <value> e.g. verbose, debug (control level of printing), cwd (directory in which to look for files), echo (write commands to screen), log (log commands to a file) A script file (ASCII text) can be executed with @<filename> User macros (with variables) can be defined with macro <name>(a,b)

  23. Some little known commands • automask • check • hello • setup • shell • tdccemudump • tdcdecode, ttcrxdecode • users

  24. Remote communication DIM (from run control):compile with –DDIMlaunch with –c <server name>send commands via DIM Pipe/socket: launch with –d –s <port> (for socket)send commands by: - Using tdtalk standalone program - Using the API provided in tdspycom.h and tdspycomlib within your code

  25. Hardware configuration Eventually all hardware should be configured through XML files (from online database) Common routines for XML file handling are under development:For each «object» (PP, TDC, etc.) one needs:- a routine to actually load constants to hardware - a routine to read constants from hardware (eventually generating a new XML file for the database) Not ready yet

  26. Todo • XML/configuration code • Default hardcoded init-start-end routines • Fix cross-compilation quirk • Prepare NA62 RPMs (w. NA62-improved JTAG libs) • Migrate to SLC5-6 • More test functions • Hardware access locking during run • Hardware status reporting function (to run control) • User privilege levels • EOB data debugging functions • Burst report loop function • More automatic check functions • ...

  27. More todo • Public standalone data reading PC program • Complete NA62-aware Wireshark module • ...

More Related