A Tango server running on the PiLCs service CPU allows communication with the FPGA and the IO modules attached to it. This page describes the commands provided by the server and their particular purpose
Startup, shutdown, and programming commands
Before using the PiLC it has to be initialized with the InitPiLC() command. This command starts the FPGA and configures the IO boards. In order to deactivate the PiLC use the DeinitPiLC() command which shuts down the FPGA and the USV.
A new program can be loaded by means of the EPCSProgram(path to file) command. Its only argument is the path to the *.rbf file with the new program.
As the programming process lasts for about 15 seconds this should not be done from within Jive as it would result in a timout.
The communication with the FPGA is done by reading and writing to one of its registers. Three Tango commands are available for this purpose
- ReadFPGA(reg_addr) – reads data from a single register
- WriteFPGA([reg_addr,data]) – writes data to a single register (where data must be a 32Bit integer value)
- FPGAReadBurst([first_reg_addr,n_registers]) – read data of n_registers starting at the register at address first_reg_addr
Please note, that the WriteFPGA() function can only be used with the IO_XX_Data_In_Register registers. Furthermore, the FPGAReadBurst() command only acts on the subsequent In or Out registers depending on the register referenced by first_reg_addr.
As a Tango command can take only a single argument, multiple arguments must be wrapped in a list. Please note the last line in the previous code snippet: only the Out registers are affected by this command as the first register is an Out register.
IO card communication
To read and write data from and to an IO card use
IO board communication
Data can be read and written from and to the IO board with
where value_1, value_2, and value_3 are 8Bit values.
The display board can be accessed via
where value is an 8Bit value.
The mainboard registers can be accessed via
where value is again an 8Bit value.