25
Stefan Koestner LHCb week March 7th 2005 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

ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

  • Upload
    ebony

  • View
    22

  • Download
    0

Embed Size (px)

DESCRIPTION

ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):. - PowerPoint PPT Presentation

Citation preview

Page 1: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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

Page 2: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

(1) A PVSS framework for CCPC and SPECS – an abstraction layer hiding the DIM/PVSS interface and the access to the configuration database.

(2) A generic DIM server for CCPC as well as SPECS – hides all the complexity and varieties of the different hardware.

(3) Basic panels for testing the connectivity between client (PVSS) and server (hardware) – useful for debugging hardware (&demonstrating the framework).

(4) 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 associated to certain values)

(5) 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.

What we generally provide :

in a nutshell…

Page 3: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

“Es kann der Frömmste nicht in Frieden leben, wenn es dem bösen Nachbarn nicht gefällt.”

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).

Page 4: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

CCPC/PVSS Interface:

- parallel bus (8/16/32 bits) - I2C bus (4 busses) - JTAG (3 chains)

Server runs on embedded PC (i486 compatible,133 MHz).Access to three bus types via gluecard:

Server is built on various software layers with the aim to hide as much complexity as possible.

Page 5: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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 client retrieves information about server (e.g. IP) upon request.

Data exchange directly between server and client:Services sent from server to clients, which have subscribed to them. Commands sent from client to server.

e.g. write: writing data to PVSS datapoint (connected to DIM) executes DIM command. Data received on server and written to hardware. Service data sent back to client to update the PVSS datapoint.

Page 6: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

(1) Get a board with a creditcard pc on it and connect to the network. It automatically reboots and starts the server (check with your network administrator or Niko).

in a nutshell…

PVSS/CCPCClient

DIM DNS node

CCPC DIM server

services (register data)

commands (what to do)

publi

sh (w

hat s

ervic

es

are

ava

ilable

)

subscribes (what services

are of interest and where

to get them from

)

(2) Get the dns.exe and start it on a PC (can be the same where your PVSS project is running)

(3) Create your PVSS project. Install DIM and fwCcpc inside your project and

start playing with the panels.

(4) Complain if something does not work …

Page 7: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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.

in a nutshell…

PVSS/CCPCClient

DIM DNS node

CCPC DIM server

Page 8: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

Further Information:

Niko Neufeld: The CCPC Software developers guide http://lhcb-daq.web.cern.ch/lhcb-daq/ccpc/development/guide.pdf

Clara Gaspar: Distributed Information Management System http://dim.web.cern.ch/dim

Note dedicated to the ccpc-server itself might appear in 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.)More information on installing the CCPC-interface can be found on:http://lhcb-online.web.cern.ch/lhcb-online/ecs/PVSS_CCPC/default.html

Page 9: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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

Page 10: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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. reset registers on fpga). leave empty if not required

Indicates success of operation

Page 11: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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’.

Page 12: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (LBUS): Registers can be created for monitoring: the currently edited specific settings (address etc.) are applied

select from list of created registers

specify refresh rate of selected registers. (datapoints are updated periodically)

if checkbox is ticked, the register datapoint is refreshed when it changes on hardware. (server polls and compares with old value)

start and stop monitoring of selected register

Page 13: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (LBUS):

launches list of created registers

indicates if currently monitored

data of register:field is also editable,write command launched after pressing ‘enter’

shows refresh rate in seconds

Page 14: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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)

Page 15: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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 (usual).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)

Page 16: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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)

Page 17: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (JTAG):

Number of bits to be shifted

Indicates the state of the state machine.

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.

Select JTAG chain

Page 18: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (JTAG):

Scans chain for hardware and plots ID. (DRScan after reset)

Calls LbJTAG_ChainReset on server

Calls OPCode_StateMoveand moves to the stateReset or Idle

Page 19: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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

Page 20: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (Command):

Emulates a shell on the Ccpc:

Commandline tools of the ccpc can be launchedto crosscheck the results obtained from the server.

Everlasting commands like‘ping’ are timed out after 10seconds.

Does not follow change of directories.

Page 21: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

PVSS Client (Advanced):

CONTROL scripts using the PVSS or framework librariescan be edited and executed directly.

Page 22: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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!

Page 23: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

From User to User: Please send comments about useful information, which you were missing in the slides before! It will be posted here.

Page 24: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

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.

“Das Alte stürzt, es ändert sich die Zeit, / Und neues Leben blüht aus den Ruinen.“

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)

Design changes on the server side will reduce the number of services per register from 3 to 2.

Page 25: ECS-tools for the CCPC/Tell1 (a tutorial in 3 acts):

Stefan Koestner LHCb week March 7th 2005

Note:

“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.”

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 (and surely the documentation!!!)

• Documentation on the framework functions can be found under: http://lhcb-online.web.cern.ch/lhcb-online/ecs/PVSS_CCPC/default.html