250 likes | 340 Views
ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):.
E N D
ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts): (1) CCPC/PVSS Interface: - few comments on the server - quick guided tour on the client(2) Modelling Hardware:- introduction to FwHw - distributing datapoint types - Configuration DB(3) Finite State Machines:- putting hands on challenging Tell CCPC/TELL1 Tutorial
What we generally provide : • A PVSS framework for CCPC and SPECS – software packages hiding the • DIM/PVSS interface and the access to the configuration database: • A generic DIM server for CCPC as well as SPECS – hides all the complexity and varieties of the different hardware types. • A PVSS framework providing functions to access hardware and create registers. (CCPC and SPECS have similar naming conventions) • Basic panels for testing the connectivity between client (PVSS) and server (hardware) – useful for debugging hardware (&demonstrating the framework). • A tool to define registers (hardware) in terms of datapoints (PVSS) – once these registers are defined they are accessible by their name. User don’t need to have the datasheets at hand for addresses etc. The same tool allows for defining recipes. (a selection of registers to be written with certain values) • Finite State Machines – a fully equipped control unit and a template for a device unit, with which you can build your ECS tree. It is distinguished between a simple device unit for lab setups and the final one ending up in the experiment. Panels for the Tell1 are developed in collaboration with Lausanne. in a nutshell… CCPC/TELL1 Tutorial
CCPC/PVSS Interface: - Ccpc server:A generic DIM server (ccserv)running in a credit-card PC, which allows access to all features of the CCPC/glue card including access to any chips over I2C, JTAG and parallel bus.- Ccpc Client:A generic interface to allow access to all the features provided by the Ccpc server now remotely from any PC via PVSS panels and scripts (using a fwCcpc PVSS library). “Es kann der Frömmste nicht in Frieden leben, wenn es dem bösen Nachbarn nicht gefällt.” CCPC/TELL1 Tutorial
CCPC/PVSS Interface: Server runs on embedded PC (i486 compatible,133 MHz).Access to three bus types via gluecard: - parallel bus (8/16/32 bits) - I2C bus (4 busses) - JTAG (3 chains) Server is built on various software layers with the aim to hide as much complexity as possible. CCPC/TELL1 Tutorial
CCPC/PVSS Interface: Communication between server and ECS (PVSS-client) established via DIM. Server (Tell1 boards) publish services to DIM Name Server (DNS) from where the client (PVSS) retrieves information about server. Data exchange goes directly between server and client:Services (register data) are sent from server to clients, which have subscribed to them. Commands (write/read) are sent from client to server. e.g. write: writing data to PVSS datapoint (connected to DIM) executes DIM command. Data received on server is written to hardware. Service data (status) is sent back to client (PVSS datapoint). CCPC/TELL1 Tutorial
in a nutshell… • Get a board with a creditcard pc on it and connect it to the network. It automatically reboots and starts the server (check with your network administrator or Niko). (2) Get the dns.exe and start it on a PC (can be the same where your PVSS project is running) DIM DNS node publish (what services are available) (3) Create your PVSS project. Install DIM and fwCcpc inside your project and start playing with the panels. subscribes (what services are of interest and where to get them from) commands (what to do) (4) Complain if something does not work … services (register data) PVSS/CCPCClient CCPC DIM server CCPC/TELL1 Tutorial
in a nutshell… • This design brings two advantages: • (1) If a server crashes the connection to the client breaks down. When it comes back it publishes to the dns node and the client reconnects to all services. • (thus servers would also be easily portable to another machine …) • (2) A PVSS project can be reinstalled on another PC without taking care of the connectivity. Just the dns node has to be specified where the client shall look for services. DIM DNS node CCPC DIM server PVSS/CCPCClient CCPC/TELL1 Tutorial
Further Information: Niko Neufeld: The CCPC Software developers guidehttp://lhcb-daq.web.cern.ch/lhcb-daq/ccpc/development/guide.pdfClara Gaspar: Distributed Information Management Systemhttp://dim.web.cern.ch/dimNote dedicated to the ccpc-server itself might appear in late autumn.The server is distributed using the yum tool (please follow the updates).It starts automatically after rebooting the ccpc. In addition you can use: sudo service ccserv (start/stop/status)(DIM DNS node to be specified in ‘/etc/dim.conf’.)Or start server manually (in debug mode) with: sudo ./ccserv -d -f- -v7 (export DIM_DNS_NODE as shell parameter. –v7 is the highest degree of verbosity for debug messages.)More information on installing the CCPC-interface can be found on:http://lhcb-online.web.cern.ch/lhcb-online/ecs/PVSS_CCPC/default.html CCPC/TELL1 Tutorial
PVSS Client (LBUS): In general: mouse pointer above data field additional information pops up Soft Reset: calls ‘glue_default_init()’ on server WriteRead: writes data and reads back the register in one go Indicates if client could find a running server publishing on the DNS node CCPC/TELL1 Tutorial
PVSS Client (LBUS): Choose ccpc from the list of running servers Choose type (width) of local bus 32,16,8 bits Determines number of words (e.g. 4 bytes for 32 bit bus) to be read or written. ‘Data in’ (to be written) must have the exact size. Masked write operation can be defined (e.g. used for the reset registers on FPGAs). Leave it empty if not required. Indicates success of operation CCPC/TELL1 Tutorial
PVSS Client (LBUS): ‘Memory’: facilitates block operations on FPGAs After clicking ‘Display’ the whole memory block (e.g. 16 words) is read from server and displayed Single fields can be edited and are written to server after pressing ‘return’. CCPC/TELL1 Tutorial
PVSS Client (LBUS): Registers can be created for monitoring: the currently edited specific settings (address etc.) are applied specify refresh rate of selected registers. (datapoints are updated periodically) if checkbox is ticked, the register datapoint is refreshed just when it changes on hardware. (server polls and compares with old value) select from list of created registers start and stop monitoring of selected register CCPC/TELL1 Tutorial
PVSS Client (LBUS): data of register: field is also editable, write command launched after pressing ‘enter’ shows refresh rate in seconds indicates if currently monitored (at the moment this has become obsolete) launches list of created registers CCPC/TELL1 Tutorial
PVSS Client (GBE): Gigabit Ethernet card accessed over a 16 bit bus. MAC registers however 32 bits. Interface to be used as if it were a 32 bit bus. (1 word = 4 bytes) The addresses to be given in the address field correspond to the addresses given in the Intel MAC data sheet (same functionalities as LBUS) CCPC/TELL1 Tutorial
PVSS Client (I2C): Some hardware can just be written in pages (e.g. EEPROMs on Tell1 with a pagesize of 16 bytes) This will be respected on the server side. Leave empty if no pagesize is required. Combined: Subaddress and data is written in one go (usually). Separated: Subaddress is written first to pointer register. (it is the one you have to provide in the address field) Shift register: One byte has to be specified. This is shifted then by the server. (periodic pattern) CCPC/TELL1 Tutorial
PVSS Client (I2C): Scans hardware on selected bus by checking acknowledgement after putting address on the bus. (read or write bit can be selected) Hardware with long distance I2C drivers might suffer under timing problems. If checkbox is ticked no acknowledgement from hardware is expected. (this means also the loss of info, whether access was successful) CCPC/TELL1 Tutorial
PVSS Client (JTAG): Select JTAG chain Number of bits to be shifted Data is shifted with the least significant bits first. Missing MSBs are replaced by zeros. Data must be a multiple of 2 to represent byte stream. Indicates the state of the state machine. CCPC/TELL1 Tutorial
PVSS Client (JTAG): Calls OPCode_StateMove and moves to the state Reset or Idle Calls LbJTAG_ChainReset on server Scans chain for hardware and plots ID. (DRScan after reset) CCPC/TELL1 Tutorial
PVSS Client (GPIO): Interface to the 9 GPIO lines should be used by experts only! (click and try could harm hardware) Declaring and enabling GPIO lines Apply value to GPIO lines (high, low) Get current status of GPIO lines CCPC/TELL1 Tutorial
PVSS Client (Command): Emulates a shell on the Ccpc: Commandline tools of the ccpc can be launched to crosscheck the results obtained from the server. Everlasting commands like ‘ping’ are timed out after 10 seconds. Does not follow change of directories. CCPC/TELL1 Tutorial
PVSS Client (Advanced): CONTROL scripts using the PVSS or framework libraries can be edited and executed directly. CCPC/TELL1 Tutorial
PVSS Client (Advanced): Downloads firmware to EPC16 (pof and jam is provided) Actions for jam can be propagated. Loads FPGAs directly from EPC16 Content of the registers and memory blocks is written from the .cfg file to the FPGAs PS: Jumper can be set such that FPGAs can be programmed directly without EPC16! CCPC/TELL1 Tutorial
From User to User: Please send comments about useful information, which you were missing in the slides before! It will be posted here. CCPC/TELL1 Tutorial
Conclusion: Interface already in use by some collaborators. Some modifications were required to keep it generic: e.g. server identifies gluecard and links to the appropriate libraries. NACK flag is introduced for long distance I2C driver. The interface covers all functionalities of the Tell1 board. (GPIO lines and masked write operation introduced since last release.) The development of the user interface is considered to be final!(?) Although the interface appears to be stable, more effort will be spent to optimize and document the PVSS framework functions. (e.g. conversion functions and write/read access) A design change for the monitoring part has reduced the number of services per register from 3 to 2. “Das Alte stürzt, es ändert sich die Zeit, / Und neues Leben blüht aus den Ruinen.“ CCPC/TELL1 Tutorial
Note: • Documentation on the framework functions can be found under: • http://lhcb-online.web.cern.ch/lhcb-online/ecs/PVSS_CCPC/default.html It should be pointed out that the panels are mainly to demonstrate the framework behind and to allow remote low-level access to the hardware. It is the framework on which you should base your own developments and not the panels. Thus the main focus for further improvements will be the framework itself. “So will ich Euch die Wahrheit gründlich sagen. Mit diesem zweiten Pfeil durchschoß ich - Euch, Wenn ich mein liebes Kind getroffen hätte, Und Eurer - wahrlich! hätt' ich nicht gefehlt.” CCPC/TELL1 Tutorial