AXLM72

Name

AXLM72 -- TCL base class for JTech XLM72 family of devices

Synopsis

package require xlm72

AXLM72 name slot

name GetVariable v

name Read ctlr dev address

name Write ctlr dev address data

name ReadSBLT ctlr dev address words

name ReadNBLT ctlr ndev naddr mask dev addr

name AccessBus ctlr code

name ReleaseBus ctlr

name BootFPGA ctlr

name SetFPGABoot ctlr source

name Configure ctlr filename

name ExecuteLongStack ctlr stack

Stack Building Methods.

name sRead stack dev addr

name sWrite stack dev addr data

name sReadSBLT stack dev addr words

name sReadNBLT stack ndev naddr mask dev addr

name sAccessBus stack code

name sReleaseBus stack code

DESCRIPTION

This is the IncrTcl base class for the family of XLM72 devices. It provides a large number of convenience functions that derived classes can use in their drivers. The JTech XLM72 family of devices are general purpose logic modules that have no real function independent of the firmware loaded onto them. For this reason, derived classed typically handle how to interact with devices that are running a specific firmware.

COMMANDS

AXLM72 name slot

Constructs an AXLM72 object for a device seated in slot slot

name GetVariable v

Returns the value of the variable named v

name Read ctlr dev address

Immediately performs an A32/D32 read from the address $dev+$address. The access is performed through the swig wrapped CVMUSB class provided as ctlr. The method returns the value of read from the device.

name Write ctlr dev address data

Immediately performs an A32/D32 write of data to the address $dev+$address. The access is performed through the swig wrapped CVMUSB class provided as ctlr. The returns the status of the write operation (success = 0, failure otherwise).

name ReadSBLT ctlr dev address words

Immediately performs a block transfer (A32/D32) of words transfers beginning at address $dev+$address. The access is performed through the swig wrapped CVMUSB class provided as ctlr. The method returns a swig wrapped std::vector<uint8_t> so one must use the cvmusb::uint8_vector_get and cvmusb::uint8_vector_size procs to handle it. The VMUSBDriverSupport::convertBytesListToTclList will convert it to a tcl list of 32-bit integer values if that is desired and sensible.

name ReadNBLT ctlr ndev naddr mask dev addr

Immediately performs a block transfer (A32/D32) whose transfer count is determined by read data from the address $ndev+$naddr and applying the mask mask to the result. This read is an unprivileged A32/D32 read. A subsequent block transfer then begins at address $dev+$address. The access is performed through the swig wrapped CVMUSB class provided as ctlr. The method returns a swig wrapped std::vector<uint8_t> so one must use the cvmusb::uint8_vector_get and cvmusb::uint8_vector_size procs to handle it. The VMUSBDriverSupport::convertBytesListToTclList will convert it to a tcl list of 32-bit integer values if that is desired and sensible.

name AccessBus ctlr code

Convenience function for gaining access of an internal bus. This is two single shot operations. The first requests the bus of interest and the second inhibits the FPGA and DSP from gaining mastership. The valid values for code are any bitwise OR of bus A (0x1), bus B (0x2), bus X (0x1000), and bus D (0x2000). The ctlr is a swig cvmusb::CVMUSB object.

name ReleaseBus ctlr

Convenience function for releasing ownership of the internal busses. This is similar to the AccessBus method but writes 0 to both the bus request and bus inhibit addresses. The ctlr is a swig cvmusb::CVMUSB object.

name BootFPGA ctlr

Convenience function for booting the device. The operation only boots the FPGA. This is accomplished by first writing 1's to the reset bits of the FPGA and DSP and then writing a 1 to the DSP and a 0 to the FPGA. This causes the FPGA to boot and the DSP remains in reset mode (i.e. its reset bit is still set). The ctlr is a swig cvmusb::CVMUSB object.

name SetFPGABoot ctlr source

A convenience method for writing to the FPGA boot source register. Valid values for source are : 0x0, 0x1, 0x2, 0x3, and 0x10000. The meanings are as follows:

Boot Source ValueDescription
0x0Sector 0 flash
0x1Sector 1 flash
0x2Sector 2 flash
0x3Sector 3 flash
0x10000SRAM A

The ctlr is a swig cvmusb::CVMUSB object.

name Configure ctlr filename

Loads firmware into SRAMA and then boots the device from SRAMA. The firmware is loaded from filename. The ctlr is a swig cvmusb::CVMUSB object.

name ExecuteLongStack ctlr stack

Converts the stack tcl list of raw stack commands into a cvmusbreadoutlist::CVMUSBReadoutList object that gets subsequently executed. Before returning the value data it is parsed using the VMUSBDriverSupport::convertBytesListToTclList because the executeList command returns a vector of bytes. The ctlr is a swig cvmusb::CVMUSB object.

name sRead stack dev addr

Adds an A32/D32 read from $dev+$addr to stack. stack is a swig cvmusbreadoutlist::CVMUSBReadoutList object.

name sWrite stack dev addr data

Adds a A32/D32 write of data to $dev+$addr to stack. stack is a swig cvmusbreadoutlist::CVMUSBReadoutList object.

name sReadSBLT stack dev addr words

Adds a standard block read of words transfers beginning at dev+addr to stack. stack is a swig cvmusbreadoutlist::CVMUSBReadoutList object.

name sReadNBLT stack ndev naddr mask dev addr words

This adds the same functionality of ReadNBLT to stack. See documentation for ReadNBLT for explanation of its functionality.

name sAccessBus stack code

Adds a bus access command to the stack readoutlist. See documentation for AccessBus for the allowed values.

name sReleaseBus stack

Adds a command to the stack readoutlist to release acquisition of any previously acquired busses.