Difference between revisions of "Testing Clock Cards"

From MCEWiki
(Created page with "== Setup == The following equipments are needed: * mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software. * 2-slot backplane with Clock Card plugged i…")
 
Line 2: Line 2:
 
The following equipments are needed:
 
The following equipments are needed:
 
* mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.
 
* mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.
* 2-slot backplane with Clock Card plugged in: Device under test (DUT) is plugged into this backplane during testing.
+
* A fully populated 5-MDM MCE subrack with Device under test (DUT) plugged into this backplane during testing.
 
* fibre-optic cable: connects mas-PC to Clock Card.
 
* fibre-optic cable: connects mas-PC to Clock Card.
 
* set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)
 
* set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)
Line 10: Line 10:
  
 
If you have all the above and '''if your DUT has already been smoke tested''', you are ready to start:
 
If you have all the above and '''if your DUT has already been smoke tested''', you are ready to start:
 +
# Connect all the cables.
 +
#unplug all cards from Subrack except Clock card unit under test, (just pull out, so they are not inserted)
 +
# Power on the MCE and if the clock card is not progammed, the red led should be on.
 +
 
== Configuring Clock Card ==
 
== Configuring Clock Card ==
 
The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.
 
The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.
Line 15: Line 19:
 
The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector.  
 
The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector.  
  
 
+
=== Programming via Front-panel JTAG connector===
# connect them up an power up the 2-slot backplane.
 
 
# Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see 4 devices. The part at the bottom of the list corresponts to Clock card FPGA. Load following firmware from the above directory: '''CC firmware 5.0.7''', '''BC firmware bc_v05030001_12apr2012.sof'''
 
# Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see 4 devices. The part at the bottom of the list corresponts to Clock card FPGA. Load following firmware from the above directory: '''CC firmware 5.0.7''', '''BC firmware bc_v05030001_12apr2012.sof'''
 
# On the 2-slot backplane there are two sets of dip switches. You need to set the one on the Bias card side to '''1110 (0xe)''', otherwise bc1 replies do not come back, because the card is not identified properly.
 
# On the 2-slot backplane there are two sets of dip switches. You need to set the one on the Bias card side to '''1110 (0xe)''', otherwise bc1 replies do not come back, because the card is not identified properly.
Line 49: Line 52:
  
 
copy the results into the test logfile and record the card_id on [[MCE CARD Serial-Number Lookup]]
 
copy the results into the test logfile and record the card_id on [[MCE CARD Serial-Number Lookup]]
 
== Testing DACS ==
 
In this stage, we test the 16-bit serial DACs: 32 single-ended bias lines and 12 differential bias lines (ln_bias). For serial DACs, the script only tries loading 3 values: 0, midrange, full-range.
 
 
To run the test, on mas PC, connect the multiplexer board via USB,  HP 34401A multimeter via RS-232, and run the '''bc_ate.py''' script by typing '''python bc_ate.py SBC-nnn'''  where nnn is the card number.  This will create a CSV file named SBC-nnn.csv with the test results.
 
 
When the '''bc_ate.py''' script is run, DACs are loaded with a set of fixed values that are measured by the RS232-connected multimeter and recorded in the CSV file.  Follow the instructions given by the python script and flip the switches on the multiplexer when prompted.
 
 
After the fixed value tests are completed, a ramp is applied to the DACs and outputs need to be probed in all cases.
 
 
Here is a PASS criteria for the serial DACs. Verify that the numbers are within this range and save the generated CSV file in the same directory as the test log.
 
 
{| border="1" class="Serial DACs codes"
 
|-
 
! Output
 
! 0x0000
 
! 0x8000
 
! 0xffff
 
! 0-2.5V Ramp
 
|-
 
| D00
 
| +-100mV
 
| 1.25V +-10mV
 
| 2.5V +-10mV
 
| OK
 
|-
 
| LN0 (in Rev D)
 
| +-100mV
 
| 1.25V +-10mV
 
| 2.5V +-10mV
 
| OK
 
|-
 
| LN0 (in Rev F)
 
| -2.5V +-10mV
 
| +-100mV
 
| 2.5V +-10mV
 
| OK
 
|}
 
  
 
== Testing Serial Configuration device and FPGA reconfiguration ==
 
== Testing Serial Configuration device and FPGA reconfiguration ==
 
Load firmware into the configuration device as oppose to the FPGA now. The parallel configuration device, EPC16, is programmed through the JTAG port on the Clock-Card front panel. Here are the steps:
 
Load firmware into the configuration device as oppose to the FPGA now. The parallel configuration device, EPC16, is programmed through the JTAG port on the Clock-Card front panel. Here are the steps:
 
* Run Quartus programmer and click on auto-detect. You should see 4 devices in the list.  
 
* Run Quartus programmer and click on auto-detect. You should see 4 devices in the list.  
* Select EPC16 device on top and click on change file to choose ''' bc_v05030001_12apr2012.pof''' (found in http://e-mode.phas.ubc.ca/mce_firmware/ )
+
* Select EPC16 device on top and click on change file to choose ''' cc_v05030001_12apr2012.pof''' (found in http://e-mode.phas.ubc.ca/mce_firmware/ )
 
* Now select the device and click on program.
 
* Now select the device and click on program.
 
* When programming is done, turn off the power and turn it back on. If the Green Light is on, it means that you have successfully programmed the configuration device.  
 
* When programming is done, turn off the power and turn it back on. If the Green Light is on, it means that you have successfully programmed the configuration device.  

Revision as of 17:05, 4 June 2013

Setup

The following equipments are needed:

  • mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.
  • A fully populated 5-MDM MCE subrack with Device under test (DUT) plugged into this backplane during testing.
  • fibre-optic cable: connects mas-PC to Clock Card.
  • set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)
  • Altera USB programmer: attached to the JTAG connector in Clock card front panel.
  • PC with Quartus installed: used to program FPGA and configuration devices on Readout Card.
  • Sync Box with a fiber-optic cable connecting a fiber output to the sync input of the Clock Card.

If you have all the above and if your DUT has already been smoke tested, you are ready to start:

  1. Connect all the cables.
  2. unplug all cards from Subrack except Clock card unit under test, (just pull out, so they are not inserted)
  3. Power on the MCE and if the clock card is not progammed, the red led should be on.

Configuring Clock Card

The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.

The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector.

Programming via Front-panel JTAG connector

  1. Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see 4 devices. The part at the bottom of the list corresponts to Clock card FPGA. Load following firmware from the above directory: CC firmware 5.0.7, BC firmware bc_v05030001_12apr2012.sof
  2. On the 2-slot backplane there are two sets of dip switches. You need to set the one on the Bias card side to 1110 (0xe), otherwise bc1 replies do not come back, because the card is not identified properly.
  3. Now make sure both cards communicate with the PC. ssh to the PC running mas and connected to the 2-slot backplane trhough fibre cables and run the following command:
 mce_cmd -x rb cc fw_rev

and you will see:

 Line   0 : ok : 0x5000007

and then type:

 mce_cmd -x rb bc1 fw_rev

and you will see

 Line   0 : ok : 0x5000005

Testing General Features (card_all_test)

We run a scrip on the mas PC to issue commands over the fibre to test the Readout Card unit under test. In this script, the following circuits are tested: LEDs, silicon ID chip, slot-id and pcb-revision identification pins, FPGA and board temperature sense circuitry, LVDS communication pairs.

On mas PC, type: card_all_test

The output should look like:

 ****** Check to make sure the LEDs on the target card switched status! ****
 Unit Under Test  :  rc1
 Serial Number    :  SRC-216
 Firmware Revision:  -0xfffa
 card_id          :  0x20be502
 slot_id          :  [4]
 card_type        :  [2]
 card_rev         :  0
 fpga_temp        :  34 C pass
 card_temp        :  28 C pass
 results are in   :  /data/cryo/current_data/SRC-216_1285959943_all_test

copy the results into the test logfile and record the card_id on MCE CARD Serial-Number Lookup

Testing Serial Configuration device and FPGA reconfiguration

Load firmware into the configuration device as oppose to the FPGA now. The parallel configuration device, EPC16, is programmed through the JTAG port on the Clock-Card front panel. Here are the steps:

  • Run Quartus programmer and click on auto-detect. You should see 4 devices in the list.
  • Select EPC16 device on top and click on change file to choose cc_v05030001_12apr2012.pof (found in http://e-mode.phas.ubc.ca/mce_firmware/ )
  • Now select the device and click on program.
  • When programming is done, turn off the power and turn it back on. If the Green Light is on, it means that you have successfully programmed the configuration device.
  • on mas prompt, type: mce_cmd -x rb bc1 fw_rev and you should see the firmware revision of the firmware you loaded. This is usually noted in the filename of the file you chose.

Record the result in logfile.

log results