Difference: AMC13ToolRecipes (1 vs. 24)

Revision 2416 Jan 2015 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 12 to 12
 

Update Firmware using AMC13Tool2

Changed:
<
<
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.
>
>
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.

Revision 2309 Sep 2014 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Actions
Changed:
<
<
Update Firmware
Initialize AMC13
Send Local Triggers
Send Data over the DAQLink
Read Out Data
>
>
Update Firmware Updated for AMC13Tool2
Initialize AMC13 Need updating for AMC13Tool2
Send Local Triggers Need updating for AMC13Tool2
Send Data over the DAQLink Need updating for AMC13Tool2
Read Out Data Need updating for AMC13Tool2
 
Changed:
<
<

Update Firmware using AMC13Tool

  • Make sure that you have the latest firmware files for both the Spartan and Virtex chips by downloading the latest '.mcs' files from here, if needed e.g.
       cd ~/amc13_mcs
       wget http://physics.bu.edu/~wusx/download/AMC13/AMC13T1v0x0017_6vlx130t.mcs
       
  • Go to the directory which contains the desired firmware files and run AMC13Tool from this directory e.g.
       cd ~/amc13_mcs 
       AMC13Tool.exe
       
    • NOTE: Remember this executable can be run from any directory, as long as the path to it is correctly specified. If you don't want to specify the path every time, copy the executable to your user directory's /bin folder.
            (from directory which contains AMC13Tool)
            $ cp AMC13Tool ~/bin
            
  • Program the new firmware to flash memory and then load the flash to both chips:
       Pick an action (h for menu): pv
       Current Virtex firmware version: 0x14
>
>

Update Firmware using AMC13Tool2

 
Changed:
<
<
  1. ) AMC13T1v0x000f_6vlx130t.mcs
  2. ) AMC13T1v0x0010_6vlx130t.mcs
  3. ) AMC13T1v0x0012_6vlx130t.mcs
  4. ) AMC13T1v0x0013_6v130t.mcs
  5. ) AMC13T1v0x0014_6vlx130t.mcs
  6. ) *AMC13T1v0x0017_6vlx130t.mcs*
>
>
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:

 
Deleted:
<
<
Select desired MCS file. Hit to select best highlighted option Type '1-6' to select or '0' for menu:
  • Check to make sure that the Current Virtex Firmware Version is not already the latest! If it is, then your firmware does not need to be updated; type '0' to return to the main menu
  • Type <CR> to select the highlighted file, which is the latest-version firmware file found in the current directory
        ./AMC13T1v0x0017_6vlx130t.mcs
        WARNING: you are about to reprogram flash memory. Are you sure? (y)
       
  • Type 'y' to program the flash or hit any other key to quit flash programming
  • After the flash has been programmed, you should see the following message:
       Flash successfully programmed and verified.
       Load the new flash memory to the chips to complete firmware update
       
  • This message indicates that the flash has been successfully programmed and verified! You are now ready to load the new firmware to the chip from flash memory.
  • The same exact process should be followed to program the Spartan Flash memory, using the initial command:
        Pick an action (h for menu): ps
       
  • Now that your flash memory has been successfully programmed, you are ready to load the flash to your Spartan and Virtex FPGAs:
 

Changed:
<
<
Pick an action (h for menu): L
WARNING
you are about to reconfigure both spartan and virtex from flash memory. Are you sure? (y) y Wait 10 seconds to ensure the reconfiguration's completion: 0 Spartan and Virtex have been reconfigured from flash
>
>
[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

>q
[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 >

 
Changed:
<
<
  • Finally, to check and make sure that the flash has been successfully loaded to the AMC13:
       Pick an action (h for menu): fv
       Virtex Firmware Version: 0x17
       Spartan Firmware Version: 0xb
    
    
>
>
 
Deleted:
<
<
  • As we can see, the Virtex Firmware version has been updated to 0x17. Our AMC13 now has new Firmware!
 

Initialize AMC13

Revision 2220 Aug 2014 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 172 to 172
 
    • (various firmware include these special firmware located in Wu's Directory ) (as of July 10,2014 the latest DAQLDC firmware: AMC13T1v0x00fb_7k325t.mcs)
    • Sending board should have latest "normal" firmware
  1. Connect hardware correctly
Changed:
<
<
    • The DAQ Link optical fiber cable should be connected to the SFP2 slot (3rd from top, may be labelled DAQ2 or Spare) on the sending AMC13 module
>
>
    • The DAQ Link optical fiber cable should be connected to the SFP slot on the sending AMC13 module (in this example SFP2 slot, 3rd from top, may be labelled DAQ2 or Spare) (NOTE: in xdaq software 12.0.1 or newer SFP0 (top) will be automatically enable, so please us that)
 
    • If an AMC13 is also being used as the receiving module, the other end of the DAQ Link optical fiber cable should be connected to the SFP0 (top slot, may be labelled DAQ0 or DAQ1) on that receiving AMC13 module
    • The sender module should also be setup to receive triggers and build events. The below example will use internal L1As and fake events, so you will only need to have a loopback in the TTC SFP (in order to send L1As to itself).
  1. Initialize your sender AMC13 (detailed information found here) with the 'd' flag (in addition to other desired init flags) to enable the DAQ link. For example:

Revision 2108 Aug 2014 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 166 to 166
 

Sending Data Over the DAQLink

Changed:
<
<
Recipe based on Mr. Wu instructions and spec file: AMC13XG_DAQLDCK0xfbS0x1c.txt
>
>
Recipe based on Mr. Wu instructions and spec file: AMC13XG_DAQLDCK0xfbS0x1c.txt (the file name has T2 with version 0x1c, but use the latest T2, which as of 2014/8/8 is 0x21)
 
  1. Make sure receiving and sending boards have up-to-date firmware
    • Receiving boards needs special DAQLDC firmware
    • (various firmware include these special firmware located in Wu's Directory ) (as of July 10,2014 the latest DAQLDC firmware: AMC13T1v0x00fb_7k325t.mcs)
Line: 186 to 186
  Enable Local L1A generation
'CONTROL1'
00208187
Changed:
<
<
  1. (sender) Enable SFP that is connected (in this example SFP2):
>
>
  1. (sender) Enable SFP that is connected (in this example SFP2) (NOTE: in the newest xdaq software 12.0.1, SFP0 is automatically enable w/ 'd' option from above command):
 
      Pick an action (h for menu): wv 3 0x4fff
      Writing to T1:
Line: 242 to 242
  Generate Internal L1A DAQ Link Enabled Run Mode
Changed:
<
<
AMC Link Status: 30004fff
>
>
AMC Link Status: 30001fff
  AMC13 Enabled Inputs: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11 --No AMC links locked-- AMC Port Status: 0fff0000

Revision 2011 Jul 2014 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 165 to 166
 

Sending Data Over the DAQLink

Changed:
<
<
  • DAQLink (LSC and LDC) does not yet exist for the current AMC13XG (updated Sept. 19, 2013).
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, the previous Twiki text is located here.
  • Twiki page
>
>
Recipe based on Mr. Wu instructions and spec file: AMC13XG_DAQLDCK0xfbS0x1c.txt
  1. Make sure receiving and sending boards have up-to-date firmware
    • Receiving boards needs special DAQLDC firmware
    • (various firmware include these special firmware located in Wu's Directory ) (as of July 10,2014 the latest DAQLDC firmware: AMC13T1v0x00fb_7k325t.mcs)
    • Sending board should have latest "normal" firmware
  2. Connect hardware correctly
    • The DAQ Link optical fiber cable should be connected to the SFP2 slot (3rd from top, may be labelled DAQ2 or Spare) on the sending AMC13 module
    • If an AMC13 is also being used as the receiving module, the other end of the DAQ Link optical fiber cable should be connected to the SFP0 (top slot, may be labelled DAQ0 or DAQ1) on that receiving AMC13 module
    • The sender module should also be setup to receive triggers and build events. The below example will use internal L1As and fake events, so you will only need to have a loopback in the TTC SFP (in order to send L1As to itself).
  3. Initialize your sender AMC13 (detailed information found here) with the 'd' flag (in addition to other desired init flags) to enable the DAQ link. For example:
          Pick an action (h for menu): en 0-11 f t l d
          Enabling AMC inputs from list: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
          Link status: 04100fff
          Enable DAQ Link
          Enable Fake Event Generator
          Enable Local TTC Input Signal
          Enable Local L1A generation
          'CONTROL1': 00208187
          
  4. (sender) Enable SFP that is connected (in this example SFP2):
          Pick an action (h for menu): wv 3 0x4fff
          Writing to T1:
            00000003: 00004fff
          
  5. Reload the receiver AMC13 firmware to reset defaults (DAQLDC enable and run mode on)
                Pick an action (h for menu): L
                WARNING: you are about to reconfigure both spartan and virtex from flash memory. Are you sure? (y) y
                
  6. If you check register address 1 now, the lowest two bits should be set (hex digit 3):
          Pick an action (h for menu): rv 1
          Reading T1:
            00000001: 00fb0003
          
  7. (receiver) Enable SFP that is connected (in this example top SFP, SFP0):
          Pick an action (h for menu): wv 3 0x1000
          Writing to T1:
            00000003: 00001000
          
  8. Reset receiver AMC13 then reset sender AMC13: (In receiver):
          Pick an action (h for menu): wv 0 1
          
    (Now do the same for the sender)
  9. (In receiver AMC13) Setup SFP for receiving
          wv 0x80 0x80010006
          wv 0x81 0
          
  10. At this point, if everything has been setup correctly, you can check the DAQlink is up in the sender module (first hex digit in reg address 0x3 should no longer read 0x7):
          rv 0x3
          Reading T1:
            00000003: 30003fff
          
    (The left most hex digit (3) in this example signifies that SFP2 is up [bits are set if links are down])
  11. (sender) Send triggers (example sending 5 L1As):
          Pick an action (h for menu): lt 5
    
          Pick an action (h for menu): st
    
          *****AMC13 Status*****
          Status display detail level: 1
          Control 0: 5d000000
          Control 1: 01090187
            TTS out is TTC signal out
            Create fake event at L1A
            Generate Internal L1A
            DAQ Link Enabled
            Run Mode
          AMC Link Status: 30004fff
            AMC13 Enabled Inputs: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11
            --No AMC links locked--
          AMC Port Status: 0fff0000
            --All AMC Link Versions Correct--
            Unsynced AMC Ports: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11
          AMC Bc0 Status: 00000018
            --No BC0s locked--
          Local Trigger Control: 00000000
            Periodic L1A every 0x1 orbit at BX = 500
            0x1 trigger per burst
          EVB Counters:
                     SDRAM Word Ct [000d]:          0000183e
                 Unread SDRAM Evts [000e]:          00000005
                           L1A Ctr [0046]: 00000000 00000005
                          Run time [0048]: 00000006 1b1fe710
                        Ready time [004a]: 00000006 1b20d212
                         Busy time [004c]: 00000000 00000001
                L1A ovfl warn time [0050]: 00000000 00000001
                 Tot evs monitored [0056]: 00000000 00000005
          
  12. Check that events are in receiver AMC13:
          Pick an action (h for menu): st
    
          *****AMC13 Status*****
          Status display detail level: 1
          Control 0: 68000020
            TTC Not Ready
          Control 1: 00fb0003
            DAQ Link Enabled
            Run Mode
          AMC Link Status: 00001000
            --No AMC inputs enabled--
            --No AMC links locked--
          AMC Port Status: 0fff0000
            --All AMC Link Versions Correct--
            Unsynced AMC Ports: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11
          AMC Bc0 Status: 00000018
            --No BC0s locked--
          EVB Counters:
                     SDRAM Word Ct [000d]:          0000183e
                 Unread SDRAM Evts [000e]:          00000005
                          Run time [0048]: 0000000a 2fb6a60f
                        Ready time [004a]: 0000000a 2fb79791
                         Busy time [004c]: 00000000 00000001
                L1A ovfl warn time [0050]: 00000000 00000001
          
 

Reading out Events

Revision 1906 Dec 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 166 to 166
 

Sending Data Over the DAQLink

  • DAQLink (LSC and LDC) does not yet exist for the current AMC13XG (updated Sept. 19, 2013).
Changed:
<
<
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, the previous Twiki text is located here
>
>
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, the previous Twiki text is located here.
  • Twiki page
 

Reading out Events

Revision 1808 Oct 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 166 to 166
 

Sending Data Over the DAQLink

  • DAQLink (LSC and LDC) does not yet exist for the current AMC13XG (updated Sept. 19, 2013).
Changed:
<
<
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, please contact David Zou (dzou@bu.edu)
>
>
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, the previous Twiki text is located here
 

Reading out Events

Revision 1708 Oct 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 21 to 21
  cd ~/amc13_mcs AMC13Tool.exe
Added:
>
>
    • NOTE: Remember this executable can be run from any directory, as long as the path to it is correctly specified. If you don't want to specify the path every time, copy the executable to your user directory's /bin folder.
            (from directory which contains AMC13Tool)
            $ cp AMC13Tool ~/bin
            
 
  • Program the new firmware to flash memory and then load the flash to both chips:
       Pick an action (h for menu): pv

Revision 1626 Sep 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 165 to 165
 

Reading out Events

Added:
>
>
ATTENTION: All owners of AMC13XG boards: Please upgrade your firmware to the latest build. All Virtex firmware versions older than 0x94 have a bug in the DDR readout controller, which may cause an IPBus transaction failure during block reads and consequently, while reading out (dumping) events.
 
  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
  • After sending 100 L1As (instructions on how to generate local triggers here), the status display should now look something like (but not exactly):

Revision 1519 Sep 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 160 to 160
 

Sending Data Over the DAQLink

Changed:
<
<
  • Connect the hardware correctly
    • The DAQ Link optical fiber cable should be connected to the second-from-the-top SFP on the sending AMC13 module
    • If an AMC13 is also being used as the receiving module, the other end of the DAQ Link optical fiber cable should be connected to the top-most SFP on that receiving AMC13 module
    • A single AMC13 can be used as both the sending and receiving DAQ module, with the optical fiber cable looped from the second-to-the-top SFP to the topmost SFP on that AMC13
  • Initialize your AMC13 (detailed information found here) with the 'd' flag (in addition to other desired init flags) to enable the DAQ link. For example:
          Pick an action (h for menu): en 0-11 f t l d
          Enabling AMC inputs from list: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
          Link status: 04100fff
          Enable DAQ Link
          Enable Fake Event Generator
          Enable Local TTC Input Signal
          Enable Local L1A generation
          'CONTROL1': 00208187
          
  • Enable the DAQ Link from the receiving module!! If your receiving module is an AMC13, enable the module and the DAQ link using the commands:
          Pick an action (h for menu): en
          No AMC inputs specified. No AMC links will be enabled.
          Link status: 00000000
    
          Pick an action (h for menu): de
            DAQ Link Enabled
          
  • If your receiving module is an AMC13 , use the following command from the receiving module to save incoming DAQ data to the SDRAM buffer:
          Pick an action (h for menu): dsv e
            Saving incoming DAQ data to SDRAM
          
  • You should now be ready to send events over the DAQ Link. For example:
    1. Send 100 local triggers on the sending AMC13 module
               Pick an action (h for menu): lt 100
               
    2. Check the Link Status Display DAQLSC Counters on the sending AMC13 module. Make sure the Events sent equals the number of L1As generated
               Pick an action (h for menu): lst
      
               ***AMC13 SFP Status***
               [...]
               DAQLSC Counters:
                                          ACK [0010]: 000002bd
                                 Packets Seen [0011]: 000002bc
                                       Events [0013]: 00000064
                                        Words [0014]: 0004bc1c
               [...]
               
    3. If your receiving module is also an AMC13, you can check its Link Status Display to make sure its DAQLDC Counters match the sender's LSC Counters
               Pick an action (h for menu): lst
      
               ***AMC13 SFP Status***
               [...]
               DAQLDC Counters:
                                        Words [0090]: 0004bc1c
                              Control Counter [0091]: 000000c8
                                       Events [0092]: 00000064
                               Words Received [0093]: 0004bc1c
                            Controls Received [0094]: 000000c8
                              Events Received [0095]: 00000064
                                  ACK Counter [0099]: 000002be
                                Valid Packets [009a]: 000002bd
                                Total Packets [009b]: 00000252
               [...]
               

>
>
  • DAQLink (LSC and LDC) does not yet exist for the current AMC13XG (updated Sept. 19, 2013).
  • Instruction for sending data over the DAQLink has been taken down to avoid confusion. If you require this information, please contact David Zou (dzou@bu.edu)
 

Reading out Events

Revision 1415 Jul 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Revision 1312 Jul 2013 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 289 to 289
 
  • This writes the events to the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here
Changed:
<
<
>
>

Building Events from uHTR

  • Step-by-step recipe for high rates (5Gb) test w/ AMC13 and uHTR using TTT on RatesTest page
 

-- CharlieHill - 19 Sep 2012

Revision 1231 Jan 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 227 to 227
 

Changed:
<
<
>
>
 

Reading out Events

  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.

Revision 1116 Jan 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 19 to 19
 
  • Go to the directory which contains the desired firmware files and run AMC13Tool from this directory e.g.
       cd ~/amc13_mcs 
Changed:
<
<
~/src/11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
>
>
AMC13Tool.exe
 
  • Program the new firmware to flash memory and then load the flash to both chips:

Revision 1016 Nov 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 175 to 175
  Enable Local L1A generation
'CONTROL1'
00208187
Changed:
<
<
  • Enable the DAQ Link from the receiving module!! If your receiving module is an AMC13, enable the DAQ link using the command:
>
>
  • Enable the DAQ Link from the receiving module!! If your receiving module is an AMC13, enable the module and the DAQ link using the commands:
 
Added:
>
>
Pick an action (h for menu): en No AMC inputs specified. No AMC links will be enabled. Link status: 00000000
  Pick an action (h for menu): de DAQ Link Enabled

Revision 915 Nov 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 6 to 6
 
Update Firmware
Initialize AMC13
Send Local Triggers
Added:
>
>
Send Data over the DAQLink
 
Read Out Data

Line: 157 to 158
  Pick an action (h for menu): lt 100
Added:
>
>

Sending Data Over the DAQLink

  • Connect the hardware correctly
    • The DAQ Link optical fiber cable should be connected to the second-from-the-top SFP on the sending AMC13 module
    • If an AMC13 is also being used as the receiving module, the other end of the DAQ Link optical fiber cable should be connected to the top-most SFP on that receiving AMC13 module
    • A single AMC13 can be used as both the sending and receiving DAQ module, with the optical fiber cable looped from the second-to-the-top SFP to the topmost SFP on that AMC13
  • Initialize your AMC13 (detailed information found here) with the 'd' flag (in addition to other desired init flags) to enable the DAQ link. For example:
          Pick an action (h for menu): en 0-11 f t l d
          Enabling AMC inputs from list: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
          Link status: 04100fff
          Enable DAQ Link
          Enable Fake Event Generator
          Enable Local TTC Input Signal
          Enable Local L1A generation
          'CONTROL1': 00208187
          
  • Enable the DAQ Link from the receiving module!! If your receiving module is an AMC13, enable the DAQ link using the command:
          Pick an action (h for menu): de
            DAQ Link Enabled
          
  • If your receiving module is an AMC13 , use the following command from the receiving module to save incoming DAQ data to the SDRAM buffer:
          Pick an action (h for menu): dsv e
            Saving incoming DAQ data to SDRAM
          
  • You should now be ready to send events over the DAQ Link. For example:
    1. Send 100 local triggers on the sending AMC13 module
               Pick an action (h for menu): lt 100
               
    2. Check the Link Status Display DAQLSC Counters on the sending AMC13 module. Make sure the Events sent equals the number of L1As generated
               Pick an action (h for menu): lst
      
               ***AMC13 SFP Status***
               [...]
               DAQLSC Counters:
                                          ACK [0010]: 000002bd
                                 Packets Seen [0011]: 000002bc
                                       Events [0013]: 00000064
                                        Words [0014]: 0004bc1c
               [...]
               
    3. If your receiving module is also an AMC13, you can check its Link Status Display to make sure its DAQLDC Counters match the sender's LSC Counters
               Pick an action (h for menu): lst
      
               ***AMC13 SFP Status***
               [...]
               DAQLDC Counters:
                                        Words [0090]: 0004bc1c
                              Control Counter [0091]: 000000c8
                                       Events [0092]: 00000064
                               Words Received [0093]: 0004bc1c
                            Controls Received [0094]: 000000c8
                              Events Received [0095]: 00000064
                                  ACK Counter [0099]: 000002be
                                Valid Packets [009a]: 000002bd
                                Total Packets [009b]: 00000252
               [...]
               

 

Reading out Events

Line: 218 to 283
 
  1. events to go, current size= 134 Wrote 100 to file 'test.dat'
Changed:
<
<
  • This writes the events t the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here
>
>
  • This writes the events to the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here
 

Revision 815 Nov 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 78 to 78
  * Virtex Counters have been issued a reset *
  • To enable the AMC13 from a list of inputs, use the command 'i' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here).
Changed:
<
<
    • For example, to initialize AMCs 4 and 10 and to assert TTS backpressure, enable fake data, and enable local triggers, the command looks like:
>
>
    • For example, to initialize AMCs 4 and 10 and to assert TTS backpressure, the command looks like:
 

Changed:
<
<
Pick an action (h for menu): en 4 10 b f l
>
>
Pick an action (h for menu): i 4 10 b
  Enabling AMC inputs from list: 4, 10
Changed:
<
<
Link status: 00000410 Enable Fake Event Generator Enable Local L1A generation
>
>
Link status: 04100410
  Stop EvB when Mon Buf Full
Changed:
<
<
'CONTROL1'
00214085
>
>
'CONTROL1'
00174001
 
  • Check the status of the AMC13 counters and Control registers. It should look something like this (but not exactly):
    
    
Line: 94 to 92
  ****AMC13 Status**** Status display detail level: 1
Changed:
<
<
Control 0: 0400002b DAQLSC Link Down DAQLSC Almost Full
>
>
Control 0: 0300000b DAQ Link Down DAQ Link Almost Full
  Monitor Buffer Empty
Changed:
<
<
TTC Not Ready Control 1: 00214085
>
>
Control 1: 00174001
  MonBuff full stops EVB
Deleted:
<
<
Create fake event at L1A Generate Internal L1A
  Run Mode
Changed:
<
<
Control 2: 00000000 (All bits read 0x0) AMC Link Status: 00000410
>
>
AMC Link Status: 04100410
  AMC Enabled Inputs: 04, 10
Changed:
<
<
--No AMC links locked-- AMC Port Status: 0ffb0000
>
>
AMC Input links locked: 04, 10 AMC Port Status: 0be90000
  --All AMC Link Versions Correct--
Changed:
<
<
Unsynced AMC Ports: 00, 01, 03, 04, 05, 06, 07, 08, 09, 10, 11 AMC Bc0 Status: 00000018 --No BC0s locked-- Local Trigger Control: 00000000 Periodic L1A every 0x1 orbit at BX = 500 0x1 trigger per burst EVB Counters: (All 32-bit counters read 0x0) Run time [0048]: 00000000 0d626312 Ready time [004a]: 00000000 0d62d214
>
>
Unsynced AMC Ports: 00, 03, 05, 06, 07, 08, 09, 11 EVB Counters: LSCDAQ status [001b]: 000031ac Run time [0048]: 00000000 04307312 Ready time [004a]: 00000000 0430ab94
  Busy time [004c]: 00000000 00000001 L1A ovfl warn time [0050]: 00000000 00000001 AMC Counters: <---Link 04-----> <---Link 10----->
Changed:
<
<
******All counters read 0x0******
>
>
AMC Ctr ACK [000e]: 00000000 00000860 00000000 00000861 Resend [004a]: 00000000 00000001 00000000 00000001 Ctr Accept [004e]: 00000000 0000086b 00000000 0000086c AMC13 ACK [0050]: 00000000 00000001 00000000 00000001
 
  • As you can see, 'Run Mode' is enabled and our 'Run time' counter is ticking away. We are now ready to accept triggers and create events
Line: 131 to 124
 

Send Local L1As

Changed:
<
<
  • Use local TTC signal for TTS input
    • Loop back an optical fiber to the bottom-most SFP connection on the front panel of your AMC13
    • Enable the local TTC input when initializing the AMC13 by including the flag 't' after the command 'en'. For instance, to initialize the AMC13 by enabling AMC ports 4 and 10, the local TTC input, and local triggers:
>
>
  • Make sure that the proper functionalities are enabled on the AMC13
    • To enable local triggers (and all AMC ports):
 
Changed:
<
<
Pick an action (h for menu): en 4 10 t l Enabling AMC inputs from list: 4, 10 Link status: 04100410 Enable Local TTC Input Signal Enable Local L1A generation
'CONTROL1'
00208105
  • Use external TTC input
    • Connect TTC fiber optic cable to the bottom-most SFP on the front panel of your AMC13
    • To check whether the connection is sound, use the command 'lst'. You should see no TTC SFP connection errors:
            Pick an action (h for menu): lst
      
            ***AMC13 SFP Status***
            [...]
            TTC Link Errors:  (All bits read 0x0)
            [...]
>
>
Pick an action (h for menu): en 0-11 L
 
Changed:
<
<
  • Send Periodic Local L1As
    1. Make sure that your AMC13 is receiving a TTS input via the bottom-most SFP connection
    2. Set the Orbit/Bunch-crossing/random number spacing between L1A generations.
      • For example, to send an L1A every 0x100th orbit, do:
>
>
    • To use the local TTC signal, loop back an optical fiber cable to the bottom-most SFP connection on the AMC13 and enable the input, as well as local triggers:
 
Changed:
<
<
Pick an action (h for menu): tsp o 100 OrN spacing: 0x64 Pick an action (h for menu): st

****AMC13 Status**** [...] Local Trigger Control: 00000063 Periodic L1A every 0x64 orbit at BX = 500 0x1 trigger per burst [...]

>
>
Pick an action (h for menu): en 0-11 T L
 
Changed:
<
<
      • As another example, to send random L1As an average of every 100 orbits, do:
>
>
    • If you are not using the local signal, make sure that your external TTC fiber optic cable properly connected to the bottom-most SFP site on the front panel of your AMC13
  • Send Periodic Local L1As
    1. Set the Orbit/Bunch-count/random Number spacing between L1A generations.
      • For example to send an L1A every 0x100th orbit:
 
Changed:
<
<
Pick an action (h for menu): tsp r 100 Random avg spacing: 0x64 Pick an action (h for menu): st

****AMC13 Status**** [...] Local Trigger Control: c0000063 Random L1As with average frequency 0x64 Trigger Rules 1-4 enforced 0x1 trigger per burst [...]

>
>
Pick an action (h for menu): tsp 0x100
 
Changed:
<
<
    1. Enable periodic local L1As:
>
>
As you can see, 0x100 has been written to register 0x1c, which controls OrN trigger spacing
    1. Enable local L1As:
 
         Pick an action (h for menu): lt e
         
Line: 204 to 162
 

Reading out Events

  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
Changed:
<
<
  • After sending 100 L1As, the status display should now look something like (but not exactly):
>
>
  • After sending 100 L1As (instructions on how to generate local triggers here), the status display should now look something like (but not exactly):
 
   Pick an action (h for menu): st

Revision 715 Nov 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 78 to 78
  * Virtex Counters have been issued a reset *
  • To enable the AMC13 from a list of inputs, use the command 'i' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here).
Changed:
<
<
    • For example, to initialize AMCs 4 and 10 and to assert TTS backpressure, the command looks like:
>
>
    • For example, to initialize AMCs 4 and 10 and to assert TTS backpressure, enable fake data, and enable local triggers, the command looks like:
 

Changed:
<
<
Pick an action (h for menu): i 4 10 b
>
>
Pick an action (h for menu): en 4 10 b f l
  Enabling AMC inputs from list: 4, 10
Changed:
<
<
Link status: 04100410
>
>
Link status: 00000410 Enable Fake Event Generator Enable Local L1A generation
  Stop EvB when Mon Buf Full
Changed:
<
<
'CONTROL1'
00174001
>
>
'CONTROL1'
00214085
 
  • Check the status of the AMC13 counters and Control registers. It should look something like this (but not exactly):
    
    
Line: 92 to 94
  ****AMC13 Status**** Status display detail level: 1
Changed:
<
<
Control 0: 0300000b DAQ Link Down DAQ Link Almost Full
>
>
Control 0: 0400002b DAQLSC Link Down DAQLSC Almost Full
  Monitor Buffer Empty
Changed:
<
<
Control 1: 00174001
>
>
TTC Not Ready Control 1: 00214085
  MonBuff full stops EVB
Added:
>
>
Create fake event at L1A Generate Internal L1A
  Run Mode
Changed:
<
<
AMC Link Status: 04100410
>
>
Control 2: 00000000 (All bits read 0x0) AMC Link Status: 00000410
  AMC Enabled Inputs: 04, 10
Changed:
<
<
AMC Input links locked: 04, 10 AMC Port Status: 0be90000
>
>
--No AMC links locked-- AMC Port Status: 0ffb0000
  --All AMC Link Versions Correct--
Changed:
<
<
Unsynced AMC Ports: 00, 03, 05, 06, 07, 08, 09, 11 EVB Counters: LSCDAQ status [001b]: 000031ac Run time [0048]: 00000000 04307312 Ready time [004a]: 00000000 0430ab94
>
>
Unsynced AMC Ports: 00, 01, 03, 04, 05, 06, 07, 08, 09, 10, 11 AMC Bc0 Status: 00000018 --No BC0s locked-- Local Trigger Control: 00000000 Periodic L1A every 0x1 orbit at BX = 500 0x1 trigger per burst EVB Counters: (All 32-bit counters read 0x0) Run time [0048]: 00000000 0d626312 Ready time [004a]: 00000000 0d62d214
  Busy time [004c]: 00000000 00000001 L1A ovfl warn time [0050]: 00000000 00000001 AMC Counters: <---Link 04-----> <---Link 10----->
Changed:
<
<
AMC Ctr ACK [000e]: 00000000 00000860 00000000 00000861 Resend [004a]: 00000000 00000001 00000000 00000001 Ctr Accept [004e]: 00000000 0000086b 00000000 0000086c AMC13 ACK [0050]: 00000000 00000001 00000000 00000001
>
>
******All counters read 0x0******
 
  • As you can see, 'Run Mode' is enabled and our 'Run time' counter is ticking away. We are now ready to accept triggers and create events
Line: 124 to 131
 

Send Local L1As

Added:
>
>
  • Use local TTC signal for TTS input
    • Loop back an optical fiber to the bottom-most SFP connection on the front panel of your AMC13
    • Enable the local TTC input when initializing the AMC13 by including the flag 't' after the command 'en'. For instance, to initialize the AMC13 by enabling AMC ports 4 and 10, the local TTC input, and local triggers:
               Pick an action (h for menu): en 4 10 t l
               Enabling AMC inputs from list: 4, 10
               Link status: 04100410
               Enable Local TTC Input Signal
               Enable Local L1A generation
               'CONTROL1': 00208105
               
  • Use external TTC input
    • Connect TTC fiber optic cable to the bottom-most SFP on the front panel of your AMC13
    • To check whether the connection is sound, use the command 'lst'. You should see no TTC SFP connection errors:
            Pick an action (h for menu): lst
      
            ***AMC13 SFP Status***
            [...]
            TTC Link Errors:  (All bits read 0x0)
            [...]
            
 
  • Send Periodic Local L1As
    1. Make sure that your AMC13 is receiving a TTS input via the bottom-most SFP connection
Changed:
<
<
    1. Set the Orbit Number spacing between L1A generations. For example to send an L1A every 0x100th orbit:
>
>
    1. Set the Orbit/Bunch-crossing/random number spacing between L1A generations.
      • For example, to send an L1A every 0x100th orbit, do:
                 Pick an action (h for menu): tsp o 100
                   OrN spacing: 0x64
                 Pick an action (h for menu): st
        
                 *****AMC13 Status*****
                 [...]
                 Local Trigger Control: 00000063
                   Periodic L1A every 0x64 orbit at BX = 500
                   0x1 trigger per burst
                 [...]
                 
      • As another example, to send random L1As an average of every 100 orbits, do:
 
Changed:
<
<
Pick an action (h for menu): tsp 0x100
>
>
Pick an action (h for menu): tsp r 100 Random avg spacing: 0x64 Pick an action (h for menu): st
 
Changed:
<
<
Pick an action (h for menu): rv 0x1c Reading T1: 0000001c: 00000100
>
>
****AMC13 Status**** [...] Local Trigger Control: c0000063 Random L1As with average frequency 0x64 Trigger Rules 1-4 enforced 0x1 trigger per burst [...]
 
Changed:
<
<
As you can see, 0x100 has been written to register 0x1c, which controls OrN trigger spacing
    1. Enable local L1As:
>
>
    1. Enable periodic local L1As:
 
         Pick an action (h for menu): lt e
         
Line: 156 to 204
 

Reading out Events

  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
Changed:
<
<
  • After sending 100 L1As, the status display should now look something like (but exactly):
>
>
  • After sending 100 L1As, the status display should now look something like (but not exactly):
 
   Pick an action (h for menu): st

Revision 608 Nov 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Actions
<-- -->
Sorted ascending
Initialize AMC13
Update Firmware
Added:
>
>
Send Local Triggers
 
Read Out Data

Line: 121 to 122
 
  • As you can see, 'Run Mode' is enabled and our 'Run time' counter is ticking away. We are now ready to accept triggers and create events
  • A complete list and description of the AMC13 registers, counters, and control bits can be found here
Added:
>
>

Send Local L1As

  • Send Periodic Local L1As
    1. Make sure that your AMC13 is receiving a TTS input via the bottom-most SFP connection
    2. Set the Orbit Number spacing between L1A generations. For example to send an L1A every 0x100th orbit:
               Pick an action (h for menu): tsp 0x100
      
               Pick an action (h for menu): rv 0x1c
               Reading T1:
                 0000001c: 00000100
               
      As you can see, 0x100 has been written to register 0x1c, which controls OrN trigger spacing
    3. Enable local L1As:
               Pick an action (h for menu): lt e
               
      You should now see the AMC13 L1A counter (register 0x46) incrementing
    4. To disable periodically generated local L1As:
               Pick an action (h for menu): lt d
               
      The AMC13 L1A counter should now stop incrementing
  • Send Single non-periodic L1As
    1. Use the lt command followed by the number of non-periodic triggers you want to send (default to 1):
               Pick an action (h for menu): lt 100
               
 

Reading out Events

  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.

Revision 527 Sep 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 8 to 8
 
Read Out Data

Changed:
<
<

Update Firmware

>
>

Update Firmware using AMC13Tool

 
  • Make sure that you have the latest firmware files for both the Spartan and Virtex chips by downloading the latest '.mcs' files from here, if needed e.g.
       cd ~/amc13_mcs

Revision 427 Sep 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Added:
>
>
Actions
Update Firmware
Initialize AMC13
Read Out Data

 

Update Firmware

Changed:
<
<
  • Make sure that you have the latest firmware files for both the Spartan and Virtex chips by downloading the latest '.mcs' files from here, if needed e.g.
>
>
  • Make sure that you have the latest firmware files for both the Spartan and Virtex chips by downloading the latest '.mcs' files from here, if needed e.g.
 
   cd ~/amc13_mcs
   wget http://physics.bu.edu/~wusx/download/AMC13/AMC13T1v0x0017_6vlx130t.mcs
   
Changed:
<
<
  • Go to the directory which contains the desired firmware files and run AMC13Tool from this directory e.g.
>
>
  • Go to the directory which contains the desired firmware files and run AMC13Tool from this directory e.g.
 
   cd ~/amc13_mcs 
   ~/src/11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
Line: 18 to 24
  Pick an action (h for menu): pv Current Virtex firmware version: 0x14
Deleted:
<
<
Invalid file name: AMC13T1v0x00gy_6slx130t.mcs Version number is not a hex integer!
 
  1. ) AMC13T1v0x000f_6vlx130t.mcs
  2. ) AMC13T1v0x0010_6vlx130t.mcs
  3. ) AMC13T1v0x0012_6vlx130t.mcs
Line: 31 to 34
  Select desired MCS file. Hit to select best highlighted option Type '1-6' to select or '0' for menu:
Changed:
<
<
  • Check to make sure that the Current Virtex Firmware Version is not already the latest. If it is, then your firmware does not need to be updated; type '0' to return to the main menu
  • Hit enter to select the highlighted file, which is the latest-version firmware file found in the current directory
>
>
  • Check to make sure that the Current Virtex Firmware Version is not already the latest! If it is, then your firmware does not need to be updated; type '0' to return to the main menu
  • Type <CR> to select the highlighted file, which is the latest-version firmware file found in the current directory
 

Changed:
<
<
./AMC13T1v0x0017_6vlx130t.mcs=
>
>
./AMC13T1v0x0017_6vlx130t.mcs
  WARNING: you are about to reprogram flash memory. Are you sure? (y)
Changed:
<
<
  • Type 'y' to program the flash or hit enter (or any other key) to quit flash programming
>
>
  • Type 'y' to program the flash or hit any other key to quit flash programming
 
  • After the flash has been programmed, you should see the following message:
       Flash successfully programmed and verified.
       Load the new flash memory to the chips to complete firmware update
       
  • This message indicates that the flash has been successfully programmed and verified! You are now ready to load the new firmware to the chip from flash memory.
Changed:
<
<
  • The same exact process should be followed to program the Spartan Flash memory, using the initial command
    • Pick an action (h for menu): ps
  • Now that your flash memory has been successfully programmed, you are ready to load the flash to your Spartan and Virtex FPGAs.
>
>
  • The same exact process should be followed to program the Spartan Flash memory, using the initial command:
        Pick an action (h for menu): ps
       
  • Now that your flash memory has been successfully programmed, you are ready to load the flash to your Spartan and Virtex FPGAs:
 
   Pick an action (h for menu): L
   WARNING: you are about to reconfigure both spartan and virtex from flash memory. Are you sure? (y) y

Line: 61 to 66
 
  • As we can see, the Virtex Firmware version has been updated to 0x17. Our AMC13 now has new Firmware!
Added:
>
>
 

Initialize AMC13

  • Before enabling your AMC13, it is a good idea to reset both chips and all counters:
    
    
Line: 70 to 76
  Pick an action (h for menu): rc * Virtex Counters have been issued a reset *
Changed:
<
<
  • To enable the AMC13 from a list of inputs, use the command 'en' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here), e.g.
>
>
  • To enable the AMC13 from a list of inputs, use the command 'i' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here).
    • For example, to initialize AMCs 4 and 10 and to assert TTS backpressure, the command looks like:
 

Changed:
<
<
Pick an action (h for menu): en 4 10 b
>
>
Pick an action (h for menu): i 4 10 b
  Enabling AMC inputs from list: 4, 10 Link status: 04100410 Stop EvB when Mon Buf Full
'CONTROL1'
00174001
Changed:
<
<
  • Check the status of the AMC13 counters and Control registers. It should look something like this (but not exactly!):
>
>
  • Check the status of the AMC13 counters and Control registers. It should look something like this (but not exactly):
 
   Pick an action (h for menu): st

   *****AMC13 Status*****
   Status display detail level: 1

Changed:
<
<
Control 0: 03002013
>
>
Control 0: 0300000b
  DAQ Link Down DAQ Link Almost Full
Changed:
<
<
Memory in fifo for ev ovfl L1A Overflow Warning
>
>
Monitor Buffer Empty
  Control 1: 00174001 MonBuff full stops EVB Run Mode
Line: 99 to 105
  --All AMC Link Versions Correct-- Unsynced AMC Ports: 00, 03, 05, 06, 07, 08, 09, 11 EVB Counters:
Changed:
<
<
LSCDAQ status [001b]: 0000c1ac Run time [0048]: 00000000 03889192 Ready time [004a]: 00000000 0388cd14
>
>
LSCDAQ status [001b]: 000031ac Run time [0048]: 00000000 04307312 Ready time [004a]: 00000000 0430ab94
  Busy time [004c]: 00000000 00000001 L1A ovfl warn time [0050]: 00000000 00000001 AMC Counters: <---Link 04-----> <---Link 10----->
Changed:
<
<
AMC Ctr ACK [000e]: 00000000 00000712 00000000 00000713
>
>
AMC Ctr ACK [000e]: 00000000 00000860 00000000 00000861
  Resend [004a]: 00000000 00000001 00000000 00000001
Changed:
<
<
Ctr Accept [004e]: 00000000 0000071d 00000000 0000071d
>
>
Ctr Accept [004e]: 00000000 0000086b 00000000 0000086c
  AMC13 ACK [0050]: 00000000 00000001 00000000 00000001
Added:
>
>
 
  • As you can see, 'Run Mode' is enabled and our 'Run time' counter is ticking away. We are now ready to accept triggers and create events
Added:
>
>
  • A complete list and description of the AMC13 registers, counters, and control bits can be found here
 
Added:
>
>
 

Reading out Events

Changed:
<
<
  • After you have initialized your AMC13, you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
  • After sending 100 L1As, the status display should now look something like (but not exactly!):
>
>
  • After you have initialized your AMC13 (as instructed here), you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
  • After sending 100 L1As, the status display should now look something like (but exactly):
 
   Pick an action (h for menu): st

Line: 162 to 171
  Received Evts [0052]: 00000000 00000064 00000000 00000064 Read Evts [0054]: 00000000 00000064 00000000 00000064
Added:
>
>
  • Descriptions of the AMC13 registers, counters, and control bits, can be found here
 
  • You can see that we now have '0x64' events in the SDRAM buffer, ready to be read out
  • In order to read out these events to a file for examination and further analysis use the 'df' command (whose specifics can be found here):
    
    

Revision 325 Sep 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Update Firmware

Changed:
<
<
  • Go to the directory where all of the firmware files are kept e.g. cd ~/amc13_mcs
  • Make sure that you have the latest versions of both the Spartan and Virtex firmware in this directory by checking the link Wu's Directory and using wget to download the latest MCS files to your mcs directory e.g.
    
    
>
>
  • Make sure that you have the latest firmware files for both the Spartan and Virtex chips by downloading the latest '.mcs' files from here, if needed e.g.

  cd ~/amc13_mcs wget http://physics.bu.edu/~wusx/download/AMC13/AMC13T1v0x0017_6vlx130t.mcs
Changed:
<
<
  • Run AMC13Tool from this directory ~/src/11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
>
>
  • Go to the directory which contains the desired firmware files and run AMC13Tool from this directory e.g.
       cd ~/amc13_mcs 
       ~/src/11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
       
 
  • Program the new firmware to flash memory and then load the flash to both chips:
Changed:
<
<

>
>
  Pick an action (h for menu): pv Current Virtex firmware version: 0x14
Line: 29 to 30
  Select desired MCS file. Hit to select best highlighted option Type '1-6' to select or '0' for menu:
Changed:
<
<
  • Check to make sure that the Current Virtex Firmware Version is not already the latest. If it is, then your firmware does not need to be updated; type '0' to return to the main menu
>
>
  • Check to make sure that the Current Virtex Firmware Version is not already the latest. If it is, then your firmware does not need to be updated; type '0' to return to the main menu
 
  • Hit enter to select the highlighted file, which is the latest-version firmware file found in the current directory
        ./AMC13T1v0x0017_6vlx130t.mcs=
    
    

Revision 221 Sep 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Line: 69 to 69
  Pick an action (h for menu): rc * Virtex Counters have been issued a reset *
Changed:
<
<
  • To enable the AMC13 from a list of inputs, use the command 'en' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here under Run Control), e.g.
>
>
  • To enable the AMC13 from a list of inputs, use the command 'en' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here), e.g.
 
   Pick an action (h for menu): en 4 10 b
   Enabling AMC inputs from list: 4, 10

Line: 162 to 162
  Read Evts [0054]: 00000000 00000064 00000000 00000064
  • You can see that we now have '0x64' events in the SDRAM buffer, ready to be read out
Changed:
<
<
  • In order to read out these events to a file for examination and further analysis use the 'df' command (whose specifics can be found here under DAQ):
>
>
  • In order to read out these events to a file for examination and further analysis use the 'df' command (whose specifics can be found here):
 
   Pick an action (h for menu): df test.dat
   Number of events to be dumped not specified

Line: 170 to 170
 
  1. events to go, current size= 134 Wrote 100 to file 'test.dat'
Changed:
<
<
  • This writes the events t the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here under DAQ
>
>
  • This writes the events t the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here
 

Revision 119 Sep 2012 - CharlieHill

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="HcalDTC"

AMC13Tool Common Procedures

Update Firmware

  • Go to the directory where all of the firmware files are kept e.g. cd ~/amc13_mcs
  • Make sure that you have the latest versions of both the Spartan and Virtex firmware in this directory by checking the link Wu's Directory and using wget to download the latest MCS files to your mcs directory e.g.
       cd ~/amc13_mcs
       wget http://physics.bu.edu/~wusx/download/AMC13/AMC13T1v0x0017_6vlx130t.mcs
       
  • Run AMC13Tool from this directory ~/src/11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
  • Program the new firmware to flash memory and then load the flash to both chips:
       Pick an action (h for menu): pv
       Current Virtex firmware version: 0x14
    
       Invalid file name: AMC13T1v0x00gy_6slx130t.mcs
       Version number is not a hex integer!
    
       1) AMC13T1v0x000f_6vlx130t.mcs
       2) AMC13T1v0x0010_6vlx130t.mcs
       3) AMC13T1v0x0012_6vlx130t.mcs
       4) AMC13T1v0x0013_6v130t.mcs
       5) AMC13T1v0x0014_6vlx130t.mcs
       6) **AMC13T1v0x0017_6vlx130t.mcs**
    
       Select desired MCS file. Hit  to select best highlighted option
       Type '1-6' to select or '0' for menu: 
       
  • Check to make sure that the Current Virtex Firmware Version is not already the latest. If it is, then your firmware does not need to be updated; type '0' to return to the main menu
  • Hit enter to select the highlighted file, which is the latest-version firmware file found in the current directory
        ./AMC13T1v0x0017_6vlx130t.mcs=
        WARNING: you are about to reprogram flash memory. Are you sure? (y)
       
  • Type 'y' to program the flash or hit enter (or any other key) to quit flash programming
  • After the flash has been programmed, you should see the following message:
       Flash successfully programmed and verified.
       Load the new flash memory to the chips to complete firmware update
       
  • This message indicates that the flash has been successfully programmed and verified! You are now ready to load the new firmware to the chip from flash memory.
  • The same exact process should be followed to program the Spartan Flash memory, using the initial command
    • Pick an action (h for menu): ps
  • Now that your flash memory has been successfully programmed, you are ready to load the flash to your Spartan and Virtex FPGAs.
       Pick an action (h for menu): L
       WARNING: you are about to reconfigure both spartan and virtex from flash memory. Are you sure? (y) y
       Wait 10 seconds to ensure the reconfiguration's completion:  0 
       Spartan and Virtex have been reconfigured from flash
       
  • Finally, to check and make sure that the flash has been successfully loaded to the AMC13:
       Pick an action (h for menu): fv
       Virtex Firmware Version: 0x17
       Spartan Firmware Version: 0xb
       
  • As we can see, the Virtex Firmware version has been updated to 0x17. Our AMC13 now has new Firmware!

Initialize AMC13

  • Before enabling your AMC13, it is a good idea to reset both chips and all counters:
       Pick an action (h for menu): rg
       *** Both chips have been issued a reset ***
    
       Pick an action (h for menu): rc
       *** Virtex Counters have been issued a reset ***
       
  • To enable the AMC13 from a list of inputs, use the command 'en' followed by the list of inputs to be enabled and a set of desired initialization conditions (which are specified here under Run Control), e.g.
       Pick an action (h for menu): en 4 10 b
       Enabling AMC inputs from list: 4, 10
       Link status: 04100410
       Stop EvB when Mon Buf Full
       'CONTROL1': 00174001
       
  • Check the status of the AMC13 counters and Control registers. It should look something like this (but not exactly!):
       Pick an action (h for menu): st
    
       *****AMC13 Status*****
       Status display detail level: 1
       Control 0: 03002013
         DAQ Link Down
         DAQ Link Almost Full
         Memory in fifo for ev ovfl
         L1A Overflow Warning
       Control 1: 00174001
         MonBuff full stops EVB
         Run Mode
       AMC Link Status: 04100410
         AMC Enabled Inputs: 04, 10
         AMC Input links locked: 04, 10
       AMC Port Status: 0be90000
         --All AMC Link Versions Correct--
         Unsynced AMC Ports: 00, 03, 05, 06, 07, 08, 09, 11
       EVB Counters:
                        LSCDAQ status [001b]:          0000c1ac
                             Run time [0048]: 00000000 03889192
                           Ready time [004a]: 00000000 0388cd14
                            Busy time [004c]: 00000000 00000001
                   L1A ovfl warn time [0050]: 00000000 00000001
       AMC Counters:
                                              <---Link 04-----> <---Link 10----->
                          AMC Ctr ACK [000e]: 00000000 00000712 00000000 00000713
                               Resend [004a]: 00000000 00000001 00000000 00000001
                           Ctr Accept [004e]: 00000000 0000071d 00000000 0000071d
                            AMC13 ACK [0050]: 00000000 00000001 00000000 00000001
       
  • As you can see, 'Run Mode' is enabled and our 'Run time' counter is ticking away. We are now ready to accept triggers and create events

Reading out Events

  • After you have initialized your AMC13, you are ready to receive triggers and read out events.
  • In the status display in the Initialize AMC13 section, the SDRAM buffer is empty, indicating that no events have been received.
  • After sending 100 L1As, the status display should now look something like (but not exactly!):
       Pick an action (h for menu): st
    
       *****AMC13 Status*****
       Status display detail level: 1
       Control 0: 03000003
         DAQ Link Down
         DAQ Link Almost Full
       Control 1: 00174001
         MonBuff full stops EVB
         Run Mode
       AMC Link Status: 04100410
         AMC Enabled Inputs: 04, 10
         AMC Input links locked: 04, 10
       AMC Port Status: 0be90000
         --All AMC Link Versions Correct--
         Unsynced AMC Ports: 00, 03, 05, 06, 07, 08, 09, 11
       EVB Counters:
                        SDRAM Word Ct [000d]:          00000086
                    Unread SDRAM Evts [000e]:          00000064
                        LSCDAQ status [001b]:          0000c1ac
                              L1A Ctr [0046]: 00000000 00000064
                             Run time [0048]: 00000010 78f86712
                           Ready time [004a]: 00000010 78f8af94
                            Busy time [004c]: 00000000 00000001
                   L1A ovfl warn time [0050]: 00000000 00000001
                    Tot evs monitored [0056]: 00000000 00000064
       AMC Counters:
                                              <---Link 04-----> <---Link 10----->
                           AMC Accept [0000]: 00000000 00000064 00000000 00000064
                              AMC ACK [0002]: 00000000 00000064 00000000 00000064
                     AMC EvN Mismatch [0006]: 00000000 00000064 00000000 00000064
                     AMC OrN Mismatch [0008]: 00000000 00000064 00000000 00000064
                     AMC BcN Mismatch [000a]: 00000000 0000005f 00000000 0000004d
                      AMC Received Ev [000c]: 00000000 00000064 00000000 00000064
                          AMC Ctr ACK [000e]: 00000000 0020cf2a 00000000 0020cf26
            AMC Ev Buf near full time [0016]: 00000000 00003d18 00000000 00003d38
                          Total Words [0040]: 00000000 00002ee0 00000000 00002ee0
                               Resend [004a]: 00000000 00000001 00000000 00000001
                         AMC13 Accept [004c]: 00000000 00000064 00000000 00000064
                           Ctr Accept [004e]: 00000000 0020cf36 00000000 0020cf32
                            AMC13 ACK [0050]: 00000000 00000065 00000000 00000065
                        Received Evts [0052]: 00000000 00000064 00000000 00000064
                            Read Evts [0054]: 00000000 00000064 00000000 00000064
       
  • You can see that we now have '0x64' events in the SDRAM buffer, ready to be read out
  • In order to read out these events to a file for examination and further analysis use the 'df' command (whose specifics can be found here under DAQ):
       Pick an action (h for menu): df test.dat
       Number of events to be dumped not specified
       Starting to dump 2048 events to file test.dat
       2000 events to go, current size= 134
       Wrote 100 to file 'test.dat'
       
  • This writes the events t the file 'test.dat' in binary format. The 'df' command also offers other kinds of file dumps, which are specified here under DAQ

-- CharlieHill - 19 Sep 2012

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback