8
******************************************************************** ***** Raspberry Pi 3 OS Installation ******************************************************************** ***** Download NOOBS from https://www.raspberrypi.org/downloads/noobs/ Format a microSD card to FAT using the Mac format utility (make sure this is true for cards > 32 GB), the disk will be automatically extended to the full memory size at the moment of the OS installation Copy the downloaded files (extracted from NOOBS_v*.zip file) into the newly formatted disk using simple copy utility (i.e. the Finder on Mac) Install the microSD card in the RPI3 Boot the RPI3 Here the RPI3 will self-install the system. This will take about 10 minutes. ******************************************************************** ***** OS Configuration ******************************************************************** ***** Enable the connection to the network by providing the WPA password On the RPI3, go to Preferences-> RaspberryPi Configuration and configure: - System - Boot: To Desktop or to Command Line Interface - Splash Screen: disable - Overscan: Disable - Interfaces - SSH: Enable - VNC: Enable (this will use RealVNC), - all others disabled (for now)

twiki.ihep.ac.cntwiki.ihep.ac.cn/pub/CMS/ModuleTesting/teststand_readme.docx · Web viewTeststand and Hexaboard FPGA programming ***** The teststand is provided with the programming

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

*************************************************************************

Raspberry Pi 3 OS Installation

*************************************************************************

Download NOOBS from https://www.raspberrypi.org/downloads/noobs/

Format a microSD card to FAT using the Mac format utility (make sure this is true for cards > 32 GB), the disk will be automatically extended to the full memory size at the moment of the OS installation

Copy the downloaded files (extracted from NOOBS_v*.zip file) into the newly formatted disk using simple copy utility (i.e. the Finder on Mac)

Install the microSD card in the RPI3

Boot the RPI3

Here the RPI3 will self-install the system. This will take about 10 minutes.

*************************************************************************

OS Configuration

*************************************************************************

Enable the connection to the network by providing the WPA password

On the RPI3, go to Preferences-> RaspberryPi Configuration and configure:

    - System

        - Boot: To Desktop or to Command Line Interface

        - Splash Screen: disable

        - Overscan: Disable

    - Interfaces

        - SSH: Enable

        - VNC: Enable  (this will use RealVNC),

        - all others disabled (for now)

    - Performance

    - Localisation

        - Set Locale

        - Set Timezone; Europe, Paris

To change the password for the user “pi” on the terminal:

$ sudo raspi-config

If date and time are incorrect, shut down ntpd with:

$ /etc/init.d/ntp stop

Then use raspi-config to get the timezone set correctly (Option 4 change Localization Options from the main menu, then Option I2 set timezone from the submenu).

When ntpd starts it should do an initial sync with the time server to set the clock, but if your clock is off by too many days it won't work.

So reset the clock with:

$ date -s "day month year hh:mm:ss"

Then restart ntp with: /etc/init.d/ntp start

*************************************************************************

SSH Configuration

*************************************************************************

To access the RPI3 from VNC login using ssh on RPI3 and then type:

$  vncserver -Authentication None -geometry 1920x1080 -depth 24

Note down the VNC server address and the display number

(e.g. X.X.X.X:display_number).

Use a viewer software (e.g. VNC Viewer) for connection

*************************************************************************

Teststand and Hexaboard setup

*************************************************************************

The picture shows the basic connections of the test-stand. The HDMI-uHDMI cable brings power, signals and clocks whereas the USB-uUSB cable is involved the in Hexaboard FPGA programming only (can be left unconnected after the initial programming).

As an alternative to the custom HDMI-uHDMI cable a standard HDMI-HDMI cable can be used jointly with the “Hexaboard/Interposer HDMI Interface” board.

*************************************************************************

Teststand and Hexaboard FPGA programming

*************************************************************************

The teststand is provided with the programming files (.pof) for both the FPGAs (on the teststand and on the Hexaboard) and the acquisition software. The programming files can be installed into the flash memory inside the FPGAs using the download cable (USB Blaster) and the Quartus Prime software. The following picture shows how to connect the programming cable. The highlighted jumper has to be properly installed according to the number of devices under programming. It’s indeed possible to program the teststand FPGA in a standalone way or the chain of teststand + Hexaboard.

· ST1 on TDO_INT for standalone programming

· ST1 on TDO for teststand + Hexaboard programming

For the standalone programming the Quartus Prime Programmer interface has to be set in as in the following picture. Press on the Add File… button and select the teststand.pof file. Tick Program/Configure, Verify, Blank-Check and then press the Start button.

To program the chain of teststand plus Hexaboard configure the Programmer interface as shown by the following picture. Be sure that the order between the FPGAs has to be respected. The first must be the 10M16DCU324 (on teststand) and then the 10M08SAM153 (on Hexaboard). To change the order drag&drop the symbol of the FPGA in the desired position.

*************************************************************************

Hexaboard Acquisition Software

*************************************************************************

The folder “Hexaboard_Acqt” contains three files (main.c, gpiolib.c and Makefile) and two subfolders (RPI_software and Data). The only file which should be modified (if needed) is the main.c. Each acquisition produces two text files (RUN__.txt and RUN__.raw.txt) which are stored in the Data folder. The raw data file contains the packets directly sent by the Hexaboard, without any data post-processing.

Every time that the main.c file is modified and saved, the following command must to be run into the terminal (in ./Hexaboard_Acqt) to update the executable file.

$ make

To start the acquisition run the following command (in ./Hexaboard_Acqt folder):

$ ./acquisition

Then the following choices will be prompted:

1) How many events ?

Insert the desired number of events to be acquired

2) Save raw data ? [Y/N]

Type Y or N to save or not the raw data

3) Use Program of Ext Trigger? [P/E]

Choose the Trigger type with P (for Program) or E (for External)

4) Sweep Pulse Amplitude ? [Y/N]

Enable the sweep on the amplitude of the pulse injected at each acquisition

The trigger for the acquisition can be provided to the Hexaboard in two ways:

· Sending the trigger command trough the main.c code (function of the RPI3 processor scheduling).

· Generating the trigger request with the FPGA on the teststand.

The first way has been basically thought for noise acquisitions, where no pulses are injected and no timing constraints are needed whereas the second option is useful when a fixed (and programmable) delay between signal injection (from the on-board DAC) and trigger request is wanted.

If “N” in entered at choice #4 the pulse amplitude of the injected signal is fixed and it’s determined by the following two parameters:

DAC_HIGH_WORD, DAC_LOW_WORD.

In the table the values for both parameters can be found as function of the desired step amplitude.

STEP AMPLITUDE

DAC_HIGH_WORD

DAC_LOW_WORD

10 mV

0x01

0x5

50 mV

0x06

0xA

100 mV

0x0D

0x5

200 mV

0x1A

0xA

300 mV

0x28

0x0

400 mV

0x35

0x5

500 mV

0x42

0xA

The TRIGGER_DELAY parameter is set to control the delay between the pulse generation time and the trigger request. Eight values can be set, from 0X00 to 0X07, with a step of 6.25 ns.

*************************************************************************

Hexaboard Quick Test

*************************************************************************

A quick reliability test can be performed as follows. The software will look at the structure of the incoming data (from Hexaboard) checking if the communication protocol is respected and if the converted data are under a certain threshold (true for noise acquisitions).

How many events ?1000Save raw data ? [Y/N]NUse Program or Ext Trigger ? [P/E]PSweep Pulse Amplitude ? [Y/N]N

If none of the following error messages is displayed the communication between the teststand and the Hexaboard and the Hexaboard noise are OK.

Error messages:

“Wrong MSB at ….”, “Noisy Channel at …”, “Wrong Trailer”