CAEN
Electronic Instrumentation
UM5175
–
V2495/VX2495 User Manual rev. 1
49
11
Demo Firmware
11.1
Introduction
This chapter describes a set of UFPGA demos that CAEN provides as demonstration of the V2495 functionalities and as
a guide for developing customized user application firmware.
The demos can be loaded on the UFPGA from a 6-page FLASH memory through the SW5 rotary switch (see Sect.
Selecting the User FPGA Firmware
). The switch position 0 loads the Factory firmware, while positions 1 to 5 load
different demo firmware described in the following paragraphs. Positions higher than 5 load the Factory firmware (i.e.
they are functionally equivalent to position 0).
T
o run a firmware “as it is”, it is required to use the
functions of the CAEN PLULib library to access the proper (refer to
Sect.
). To modify the demos and upload the new firmware on the FPGA, a basic knowledge of VHDL
language and Altera Quartus II software are required.
In what follows, the features of the four demos loaded in the UFPG
A’s flash memory will be described.
By default, each demo lights front panel user LED with the following configurations:
Demo
Description
Demo1
LED 0 ON; others OFF
Demo2
LED 1 ON; others OFF
Demo3
LED 1 and LED 0 ON; others OFF
Demo4
LED 2 ON; others OFF
11.2
Demo Structure
All demo projects feature a common file structure:
•
A configuration file (
V2495_package.vhd
), allowing to set the number of CONFIG and MONITOR registers, their
respective base address, the demo ID and the firmware revision. The CONFIG registers are mapped between
0x1000 and 0x17FC, while the MONITOR registers are mapped between 0x1800 and 0x1FFC.
•
A gate and delay block (
gd_control.vhd
), acting as a controller for the GDG (the example in Sect.
specifically focuses on the configuration of GDG delays);
•
The local bus slave (
lb_int.vhd
), allowing to read/write the registers needed in the demo operations;
•
The SPI master (
spi_master.vhd
) and interface (
spi_interface.vhd
), allowing the communication to/from the
GDG to be serialized;
•
A demo-specific part, containing core demonstration logic.
11.3
Demo Setup
In order to run one of the demo firmware, the following instructions should be followed:
•
Select the desired position of the rotary switch and then restart the crate
•
Connect to the V2495 board to read/write registers
•
Set the required configuration through the control register(s).