Sct DSP Tutorial

This Tutorial describes how to set up Code Composer Studio, check out the SCT DSP code, and compile a new version of the binary.

Code Composer Studio

The Digital Signal Processors (DSPs) are used on the ATLAS Silicon Read Out Drivers (ROD) to control the ROD and histogram calibration information. The same RODs are used for both the SCT and pixels, but the firmware is different, tailored to the different hardware needs. The DSP code is developed and compiled into a binary file using the Texas Instruments Code Composer Studio.

Licenses

As CCS is a commercial product, limited licenses are available. It is installed on various laptops scattered around the SCT group (Trevor, Tom, Peter), and more recently on the SR1 environmental machine.

SR1 Environmental

  • Name of machine: pcatlsctsr1env
  • Location: SR1 (http://building.web.cern.ch/map/building?bno=SR1)
  • Username and password should be in the book on the desk, but you should be able to use any NICE login.
  • NB - originally wanted to use sctroddq account to develop code, but CCS gives errors on startup. For the moment can use the sctdcs account (password in book)
  • Current version is Code Composer Studio version 3.3

Installation

This should have already been done on the machine. If somehow this gets reset, then the procedure is:
  • Log in as sctroddq to the NICE machine you want to install to
  • The install folder is: \\cern.ch\dfs\Services\caeprogs\TI_CodeComposerStudio
  • Copy the folder over, and then run the intall program. (nb, this will only work as sctroddq, who has install rights)
Then follow installation instructions.

Configuring Code Composer Studio

This describes how to set up CCS to compile the DSP code.
  • First, start the CCS setup.
  • Either click the desktop icon, or via the start menu:
    startSetupCCS.JPG
  • Now select the device relevant to the DSP.
  • We use the following for the ROD:
  • Master: C6201 Device Simulator, Little Endian, Map 1
  • Slaves: C6713 Device Simulator, Little Endian
  • Select the device and add it to the project:
    setupCCS.JPG
  • Save and quit, when prompted, start CCS on exit.

Starting Code Composer Studio

  • If you want to start CCS later, click the desktop icon:
    ccsIcon.JPG
  • Or start it via the start menu.

Setting up CCS for DSP Code

There are a number of obscure and magical things you will need to do get the DSP to actaully compile on your machine.

The ti and rodts Directory

This directory contains some assemler source code files (asm) and is also needed to store obj files during compilation. If the correct directory structure is not present, CCS will complain that it can't find the directory. The actual directory structure is locked deep within the DSP code, so it is easier to just download this:
  • ti.zip: Directory structure needed to start up the DSP code
  • Then move the ti directory to C:\ so that CCS will pick it up.
You will also need a rodts directory for CCS to copy files to after compilation:
  • rodts.zip: Directory structure to compile code
  • Unzip this to C:\ for CCS as well.

Additional Libraries

Some additional dll files are needed to run the application used to convert the code into a binary file. This includes cvirte.dll. These come from National Instruments, and the run-time application can be downloaded for free. To get hold of them:
  • Google "LabWindows/CVI Runtime Engine"
  • This should find the National Instruments page with relevant drivers.
  • Download and install the latest version for you platform.
  • NILWCVIRTE851.exe: Alternatively get Lab Windows Run-Time here.

Checking Out From CVS

At the moment the SCT CVS code is on lxplus, it would be nice to move it over to central ATLAS CVS, but this will be a bit of a faff!
  • The CVS for the old (and currently in use) SCT code is located on lxplus:
  • CVSROOT=:ext:username@lxplus.cern.ch:/afs/cern.ch/user/s/sctpixel/private/cvsroot
  • Module RodDaq
  • Branch: SCT_DSP_DEV_1 for the head of the SCT DSP code
  • Or each version should also be tagged (eg SCT_1_4_1)
  • Please tag code if you make a binary for use in the pit!! It makes it MUCH easier to track changes.
It is suggested that you check the code out into the directory:
  • C:\Rod-Sct-development
  • This will be in sync with the project file in CVS, or you can change the path yourself manually.

The DSP Project

You should now have everything ready to compile the DSP Code, so start CCS. First you will need to open the project.
  • In CCS, Click on Project -> Open
  • Go to the directory C:\your\install\dir\RodDaq\Dsp\
  • Open rodRun_sct.pjt for the master, sdsp6713_sct.pjt for slaves.

Compiling the Code

To compile the DSP code, click on one of the compilation buttons:
  • The Compile buttons in CCS:
    compile.JPG
  • The make equivalent is on the left, or re build from scratch on the right.
  • If all works well, you should get a box popping up asking you to press a key.
  • nb - If you don't get the window popping up, you probably need Lab Windows (see Additional Libraries above)
  • This will create binaries and copy them to c:\rodts\data\dspProgram\rodRun

Flashing the Binaries

Now you have the binaries, they need to be flashed to the ROD crates.

Master DSP

The master DSP consists of one file, rodrun_sct.bin, that need to be flashed to the DSP, and is stored in memory. To do this:
  • Copy the binray somewhere accessible by the DAQ crate.
  • Log into the single board computer (SBC) in the DAQ crate. (ctatsct01 in SR1)
  • Source the relative setup script for the DAQ code (eg /work/pcphsctr04/daqsoft/sct/SctRodDaqTom/setup_tdaq191_bs.sh)
  • Go to the RodUtils directory: (=$SCTPIXEL_DAQ_ROOT/RodUtils)
  • Run ./MdspFlashLoad and enter the appropriate slot and the path to your binary.
  • Run ./RodReset to reset the ROD so it is ready to go!

Slave DSP

The slave DSP code is flashed when the ROD is configured, by sending binaries to the master and writing the memory from there.
  • There are three binaries you need to copy: sdsp6701_ipram.bin, sdsp6701_idram.bin, sdsp6701_xprog.bin
  • These then need to be included in your SctDaq configuration.
  • For the xml configuration, you need to edit $SCTDAQ_ROD_CONFIGURATION_PATH
  • And then add or modify the following: (usually at the top of the file)
 <defaults>
  <slave type="F">
    <ipramFile>/work/pcphsctr04/daqsoft/sct/devdsp/SlaveOct2008/sdsp6713_ipram.bin</ipramFile>
    <idramFile>/work/pcphsctr04/daqsoft/sct/devdsp/SlaveOct2008/sdsp6713_idram.bin</idramFile>
    <extFile>/work/pcphsctr04/daqsoft/sct/devdsp/SlaveOct2008/sdsp6713_xcode.bin</extFile>
  </slave>
 </defaults>
  • The new firmware should load next time you start up the Daq


Major updates:
-- TomBarber - 27 Nov 2008
Topic attachments
I Attachment History Action SizeSorted ascending Date Who Comment
Compressed Zip archivezip rodts.zip r1 manage 0.8 K 2008-11-27 - 21:28 TomBarber Directory structure to compile code
JPEGjpg ccsIcon.JPG r1 manage 6.8 K 2008-11-27 - 19:33 TomBarber  
JPEGjpg compile.JPG r1 manage 14.0 K 2008-11-27 - 21:04 TomBarber The Compile buttons in CCS
JPEGjpg startSetupCCS.JPG r1 manage 35.7 K 2008-11-27 - 19:19 TomBarber How to start the CCS setup
JPEGjpg setupCCS.JPG r1 manage 76.7 K 2008-11-27 - 19:23 TomBarber  
Compressed Zip archivezip ti.zip r1 manage 2904.8 K 2008-11-27 - 20:02 TomBarber Directory structure needed to start up the DSP code
Microsoft Executable fileexe NILWCVIRTE851.exe r1 manage 47834.5 K 2008-12-08 - 17:15 TomBarber National Instruments LabWindows Run-Time
Edit | Attach | Watch | Print version | History: r8 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2008-12-09 - TomBarber
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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