These instructions assume you have successfully installed and tested your software. See AMC13CppGettingStarted for instructions if you haven't

ActionsSorted descending
Update Firmware
Fake Data Readout

Update Firmware using AMC13Tool2

Make sure that you have the latest firmware files for both the Spartan and Kintex chips by downloading the latest '.mcs' files from here. To be safe, download all of the MCS files for the latest versions (the tool will pick the correct file where there is more than one choice). Put the firmware files in your current directory.

Use the pk command to program the T1 (Kintex) and ps to program the T2 (Spartan). Then use reconfigureFPGAs to force a reload from flash.

Here is an example session where we program the Kintex and Spartan and then reload:

[ehazen@cms1 amc13_mcs]$ ../tools/bin/AMC13Tool2.exe -c ../amc13/etc/amc13/connectionSN43.xml 
Using AMC13 software ver:30757

>fv      # check current firmware versions
Connected AMC13s
*0: SN:  43 T1v: 0209 T2v: 0021 cf: ../amc13/etc/amc13/connectionSN43.xml

>pk    # program the Kintex
chip_type not specified, using default from serial number...
Searching for files with T1 and 7K325T...

1. AMC13T1v0x020d_7k325t.mcs

Enter number for MCS file to select (0 to exit): 1
Programming against file: AMC13T1v0x020d_7k325t.mcs...
Programming AMC13T1v0x020d_7k325t.mcs to flash address 0x400000...
Erasing flash sector at address 0x400000
Erasing flash sector at address 0x440000
programming flash at address 0xee9e00
programming flash at address 0xe2e700	 % done = 6
programming flash at address 0xd72f00	 % done = 13
programming flash at address 0x564700	 % done = 87
programming flash at address 0x4a8f00	 % done = 94

>ps    # program the Spartan
chip_type not specified, using default from serial number...
Searching for files with T2, and 6SLX25T...

1. AMC13T2v0x0021_6slx25t.mcs

Enter number for MCS file to select (0 to exit): 1
Programming against file: AMC13T2v0x0021_6slx25t.mcs...
Programming AMC13T2v0x0021_6slx25t.mcs to flash address 0x200000...
Erasing flash sector at address 0x200000
Erasing flash sector at address 0x240000
programming flash at address 0x2c3b00
programming flash at address 0x208400	 % done = 97

>reconfigureFPGAs     # force reload from flash
Best exit/restart tool after 10s or so

[ehazen@cms1 amc13_mcs]$ ../tools/bin/AMC13Tool2.exe -c ../amc13/etc/amc13/connectionSN43.xml 
Using AMC13 software ver:30757
>fv   # check versions again
Connected AMC13s
*0: SN:  43 T1v: 020d T2v: 0021 cf: ../amc13/etc/amc13/connectionSN43.xml

Fake Data Readout

This recipe tells you how to generate fake events in the AMC13 and read them out over IPBus. Required equipment:

  • AMC13XG module installed in upper "MCH2" site in center of crate
  • SFP transceiver installed in TTC (bottom) site in AMC13XG
  • Loop-back optical fiber connected between Tx and Rx of TTC SFP

Here's the recipe (example below is for SN 86, make sure use the IP address or connection files that correspond to your board):

1. Connect to the AMC13 either by connection file or by spartan (T2) IP address (assuming T1 IP address is 1 higher than the T2 address).

[hazen@cms4 scripts]$ AMC13Tool2.exe -c connectionSN86.xml
$ AMC13Tool2.exe -c
Address table path "/home/hazen/work/amc13/amc13/etc/amc13" set from AMC13_ADDRESS_TABLE_PATH
Using AMC13 software ver:32678

2. Reset AMC13 (general and counter).

> rg
> rc

3. Enable link with fake events ('f') and TTC loopback ('t') options and start run (part of enable command by default).

NOTE: If we are building fake events, these are generated internally, so in this case, the actual numbers denoted are unimportant. But when building events from actual AMCs, you would denote the slot numbers corresponding to the modules you will be reading event data from.

>en 1-4 f t
parsed list "1-4" as mask 0xf
Enabling fake data
Enabling TTS as TTC for loop-back
AMC13 out of run mode
AMC13 is back in run mode and ready
4. Set up local triggers. There are various options how you would like triggers to be sent (number of triggers per bunch, rate, etc.), for help use 'h localL1A'. In this example we will just send 1 trigger per orbit.
>localL1A o 1 1
Configure LocalL1A enabled mode=0 burst=1 rate=1 rules=0
5. Send Triggers
>lt 5
detected number after 'lt'
Sending 5 local triggers
Trigger: 4 left
Trigger: 3 left
Trigger: 2 left
Trigger: 1 left
Trigger: 0 left
6. Use status command to check to see that L1As were sent+received and that events were built.
            Board| SERIALNO| T1_VER| T2_REV| T2_SERNO|
             INFO|     0x56| 0x400A|   0x21|     0x56|

          Control| DAQ| FAKE| LTRIG| RUN| TTCLOOP|
            REG_1| 0x0|  0x1|   0x1| 0x1|     0x1|

        AMC_Links| AMC01| AMC02| AMC03| AMC04|
   AMC_LINK_READY|   0x0|   0x0|   0x0|   0x0|
     LOSS_OF_SYNC|   0x1|   0x1|   0x1|   0x1|

    Event_Builder| COUNT|
              L1A|   0x5|

   Monitor_Buffer| COUNT|
       UNREAD_EVT|   0x5|

     State_Timers|       COUNT|
             BUSY| 0x000000001|
 OVERFLOW_WARNING| 0x000000001|
            READY| 0x1B8E4CA11|
              RUN| 0x1B8E4CA0F|

           TTC_Rx| ENC| RAW|
            STATE| RDY| RDY|
7. Read out events.
calling readEvent...AOK
Read 16400 words
   0: 510000011f400008
   1: 104401000060d780
   2: 0f00100200010000
   3: 0f00100200020000
   4: 0f00100200030000
   5: 0f00100200040000
   6: 010000011f401002
   7: 000700060d780000
   8: 000b000a00090008
   9: 000f000e000d000c
16395: 3fff3ffe3ffd3ffc
16396: 4003400240014000
16397: 7122902601001002
16398: 0f2fe8ab000011f4
16399: a0004010fc520000

-- EricHazen - 18 Nov 2014

Edit | Attach | Watch | Print version | History: r13 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 29 May 2015 - DavidZou
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback