Tcl command "rockm"


The tcl command "rockm" is a general purpose tcl command. It is the interface to the ROCKM library. Everything but the FIFO decode is implemented here.


Index


ROCKM id

The access to the ROCKM is implemented via channels. Each channel have its own ROCKM id. In this way one application can access many different rocks simply using different ids.

All the routines present in rockm have a parameter of this type.


Query ROCKM presence

Sometimes it is usefull to check if a ROCKM is present. Use
rockm ispresent for this task.


Initialization

As stated before, the access to the ROCKM is implemented via a ROCKM id. To obtain such an id you have to open a channel to the ROCKM using
rockm open. This id will than be used for all the accesses to the ROCKM.
Each id should identify a different ROCKM.

When you finish using the ROCKM, please call rockm close to close the channel associated to the id.


Reset ROCKM

At power-up, ROCKM needs a general reset. Use
rockm do reset for this task.


Get a filed

To get a field simply call
rockm get, followed by the field name and the ROCKM id.


Set a filed

To set a field simply call
rockm set, followed by the field name, the ROCKM id and the new value.

If the value is out of range, an and will be applied.


Read a register

There are two different ways to read a register:
rockm raw read implements the first way, while rockm read reset, rockm read FIFO, rockm read Watchdog, rockm read CSR0, rockm read CSR1, rockm read CSR2, rockm read Elapsed, rockm read Trigger, rockm read TQUE, rockm read TNOW, rockm read Chainadd, rockm read Golden, rockm read WordCnt, rockm read infohub, rockm read infomicro, rockm read microstat, rockm read microword, rockm read DFIFO implement the second way.


Write a register

There are two different ways to write a register:
rockm raw write implements the first way, while rockm write reset, rockm write Watchdog, rockm write CSR0, rockm write CSR2, rockm write Trigger, rockm write Chainadd, rockm write Golden, rockm write microword implement the second way.

Note:
FIFO can only be written as a natural.


Read a page

As with registers, there are two different ways to read a page:
rockm raw readpage internal and rockm raw readpage info implement the first way, while rockm readpage internal and rockm readpage info implement the second way.


An example

#open the ROCKM
set rid [rockm open 5]
...
# reset the board
rockm do reset $rid
...
#get boe bit
set aboe [rockm get boe $rid]
...
#close the rockm
rockm close $rid


Top of the page. ROCKM documention.
Send comments to: Igor Sfiligoi

Created:19.8.1997
Last modified:19.8.1997