mvlclist

Name

mvlclist -- List memorizor for vmvlcgenerator

Synopsis


mvlclist subcommand ...
                    

DESCRIPTION

mvlclist is a command ensemble that is passed to the addReadoutList method of a Tcl driver. It is intended to look very much like the VMUSBReadoutList command ensemble that is passed to VMUSBReadout Tcl drivers. Note that, as with the VMUSBReadout, the driver should not explicitly invoke the mvlclist but use the variable passed in to addReadoutList. In this way it is possible to write Tcl drivers that will work in either mvlcgenerate or under VMUSBReadout

SUBCOMMANDS/METHODS

The mvlclist is a command ensemble. This is the normal implementation of an object in Tcl object oriented extensions. Classes are commands that can generate command ensembles. The subcommands of the ensembles are then the methods of the object.

The mvlclist provides the following subcommands/methods:

mvlclist addWrite32 address amod datum

Adds a 32 bit wide write operation to the list of operations being memorized. The address and amod identifier the address and address space for the write target while datum is the 32 bit data that will be written.

mvlclist addWrite32 address amod datum

Same as addWrite32 but the write is only 16 bits wide.

mvlclist addRead32 address amod

Adds a read to the list of operations being memorized. address and amod specify the address and address space from which the read will be done. The data fromt he read will be put into the data for the trigger bieng processed by the list being generated.

mvlclist addRead16 address amod

Same as addRead32 but the read is only 16 bits wide. This results in a 16 bit item being placed in the data for the trigger being processed by this list.

mvlclist addBlockRead32 base-address amod numxfers

Adds a read of a block of numxfers 32 bit items beginning at base-address in the address space amod After each transfer, the address increments to the next 32 bit location. It is best to use one of the block transfer address modifiers as that will trigger a more efficient bock transfer which does not require an address cycle for each transfer.

If the slave module raises BERR the transfer will terminate. Note that the VMUSB will insert a 32 bit item with all bits set if it terminates on a BERR the MVLC will not insert this termination flag. Normally that item is not necessary as the module being read will structure the data in such a way that the end of the readout can be deduced by the software.

mvlclist addFifoRead32 address amod numxfers

Same as addBlockRead32, however all the reads are directed at the same address.

mvlclist addBlockCountRead16 address mask amod

Sometimes, modules will have a register that has a field that indicates how many items of data it can produce from e.g. a FIFO. In this case, reading the module is a two step process. First the transfer count is extracted from the register and then it is used to drive block read.

This method does a 16 bit read from address in the address space specified by amod. The mask idenifies the bits that make up the transfer count field. For exmample, suppose the read operation returned 0x1234 and the mask was 0x0ff0 The transfer count will be 0x23. Note that the data read by thi operation will be discarded and will not appera in the event.

mvlclist addBlockCountRead32 address mask amod

Same as addBlockCountRead16 but the read is 32 bits wide.

mvlclist addMaskedCountBlockRead32 address amod

This is the second part of the variable sized read operation. This operation reads a block of 32 bit data starting at address in the address space amod. The number of transfers attempted is determined by the block count extracted from the most recent addBlockCountReadxx operation.

addMaskedCountFifoRead32 address amod

Same as addMaskedCountBLockRead32, but all reads are directed at the same address.

mvlclist addDelay how-long

Adds a delay to the list of operations. The delay will last how-long*200nsec. Note that the MVLC"s delay units have a granularity of 62.5nsec. The length parameter is converted from the 200ns units on the command line to a delay of at least how-long*200ns long. The actual delay will not be any more than 62.5ns longer than the requested delay.

mvlclist addMarker value

Adds an operation that will insert value into the event. Note that while VMUSB markers are 16 bits wide, MVLC markers are 32 bits wide.

mvlclist addLoopUntil32 address amod mask value

This essentially adds a wait until some condition is true in the module. This operation is not supported in VMUBSReadout. An operation is added to the stack that does a 32 bit read from address in the address space specified by amod. The value read is bitwise anded with mask and, if the result is not equal to value the operation repeats until it is. One use for this is to e.g. initiate an operation in the module via a write and wait on a status bit that indicates the operation completed.

mvlclist addLoopUntil16 address amod mask value

Same as addLoopUntil32 above but the read is only 16 bits wide.