Difference: CppClass (1 vs. 10)

Revision 1031 May 2013 - CharlieHill

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

AMC13 C++ Classes

Below is a table of the AMC13 C++ classes as of 05/30/2013 with a brief description and a link to a page with a more in-depth look at each class's members.
Deleted:
<
<
FUN TASK FOR DAVID: write a script that works like Doxygen to keep this documentation up to date, using the source code's comments. smile
 
Class Name Functionality
AMC13 A class which contains the basic read, write, and control functions for the AMC13
AMC13uHAL A class which connects to an AMC13 using a uHAL connection file, inheriting all of the AMC13 class's members
Line: 14 to 12
 
AMC13_address A class which retrieves essential address table information for the AMC13
AMC13_verify A class which verifies the existence of an AMC13 and its two tongues at a given location
Deleted:
<
<

General read/write

   rv read(int chip, const std::string& reg)
   rv readAddress(int chip, uint32_t add)
   std::vector<rv> readBlockAddress(int chip, uint32_t add, size_t nWords)
   size_t readBlockAddress(int chip, uint32_t add, size_t nWords, uint32_t* buffer, size_t bufMax)
   std::vector<rv> readFifoAddress(int, uint32_t, size_t)
   std::map<std::string, uint32_t> readAllReadable(int chip)
   void write(int chip, const std::string& reg, rv value)
   void writeAddress(int chip, rv add, rv value)
   void writeBlockAddress(int chip, uint32_t add, std::vector<uint32_t> data, size_t nWords)
   void writeFifoAddress(int chip, uint32_t add, std::vector<uint32_t> data)
   void writeQueueAddress(int chip, uint32_t add, std::vector<uint32_t> data, size_t nWords)
   void writeTest(int chip)
   

Identification

    rv t1SerialNo()
    rv t2SerialNo()
    rv t1FirmVer()
    rv t2FirmVer()
    rv t1DNA()
    rv t2DNA()
    rv t1HardwareRev()
    rv t2HardwareRev()
    rv firmFlavor()
   

Initialization

   uint32_t parseInputEnableList(std::string list)
   void AMCInputEnable(std::string list)
   daqLinkEnable(bool b)
   void fakeDataEnable(bool b)
   void ttcRxEnable(bool b)
   void monBufBackPressEnable(bool b)
   

Control

   void reset(int chip)
   void sendLocalEvnOrnReset(uint32_t a, uint32_t b)
   void genInternalPeriodicL1As(bool b)
   void enableDaqLinkSenderReceiver()
   void saveReceivedDaqData(bool b)
   megaMonitorScale(bool b)
   setPreScaleFactor(uint32_t noZos)
   genInternalSingleL1A(uint32_t n)
   setTrigType(uint32_t type)
   setLocalL1APeriod(uint32_t n)
   setFEDid(uint32_t id)
   void startRun()
   void endRun()
   

DAQ

   uint32_t nextEventSize() 
   uint32_t readNextEvent(uint32_t *buffer, uint32_t max_buf)
   uint32_t readNextEventNoAdvance(uint32_t *buffer, uint32_t max_buf)
   

-- JimRohlf - 27 May 2012

 \ No newline at end of file

Revision 930 May 2013 - CharlieHill

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

AMC13 C++ Class

>
>

AMC13 C++ Classes

Below is a table of the AMC13 C++ classes as of 05/30/2013 with a brief description and a link to a page with a more in-depth look at each class's members.

FUN TASK FOR DAVID: write a script that works like Doxygen to keep this documentation up to date, using the source code's comments. smile

Class Name Functionality
AMC13 A class which contains the basic read, write, and control functions for the AMC13
AMC13uHAL A class which connects to an AMC13 using a uHAL connection file, inheriting all of the AMC13 class's members
AMC13_env A class which handles the environment variables and networking specifications needed to create an AMC13 object, and therefore connect to a module
AMC13_flash A class which handles the flash programming and firmware configuration for the AMC13
AMC13_id A class which retrieves essential AMC13 identification information
AMC13_address A class which retrieves essential address table information for the AMC13
AMC13_verify A class which verifies the existence of an AMC13 and its two tongues at a given location
 

General read/write

Revision 813 May 2013 - CharlieHill

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

AMC13 C++ Class

Deleted:
<
<
Other AMC13 Classes
AMC13_env
 

General read/write

   rv read(int chip, const std::string& reg)

Revision 708 May 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
Changed:
<
<
AMC13 Class as of 16 January 2013
>
>

AMC13 C++ Class

Other AMC13 Classes
<-- -->
Sorted ascending
AMC13_env
 

General read/write

Revision 618 Apr 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
AMC13 Class as of 16 January 2013

Revision 527 Mar 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
AMC13 Class as of 16 January 2013
Line: 18 to 18
  void writeTest(int chip)
Added:
>
>

Identification

    rv t1SerialNo()
    rv t2SerialNo()
    rv t1FirmVer()
    rv t2FirmVer()
    rv t1DNA()
    rv t2DNA()
    rv t1HardwareRev()
    rv t2HardwareRev()
    rv firmFlavor()
   
 

Initialization

   uint32_t parseInputEnableList(std::string list)

Revision 416 Jan 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
AMC13 Class as of 16 January 2013
Line: 13 to 13
  void write(int chip, const std::string& reg, rv value) void writeAddress(int chip, rv add, rv value) void writeBlockAddress(int chip, uint32_t add, std::vector data, size_t nWords)
Changed:
<
<
void writeFifoAddress(int, uint32_t, std::vector)
>
>
void writeFifoAddress(int chip, uint32_t add, std::vector data)
  void writeQueueAddress(int chip, uint32_t add, std::vector data, size_t nWords) void writeTest(int chip)

Revision 316 Jan 2013 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
Changed:
<
<
AMC13 Class 27 May 2012
>
>
AMC13 Class as of 16 January 2013

General read/write

   rv read(int chip, const std::string& reg)
   rv readAddress(int chip, uint32_t add)
   std::vector<rv> readBlockAddress(int chip, uint32_t add, size_t nWords)
   size_t readBlockAddress(int chip, uint32_t add, size_t nWords, uint32_t* buffer, size_t bufMax)
   std::vector<rv> readFifoAddress(int, uint32_t, size_t)
   std::map<std::string, uint32_t> readAllReadable(int chip)
   void write(int chip, const std::string& reg, rv value)
   void writeAddress(int chip, rv add, rv value)
   void writeBlockAddress(int chip, uint32_t add, std::vector<uint32_t> data, size_t nWords)
   void writeFifoAddress(int, uint32_t, std::vector<uint32_t>)
   void writeQueueAddress(int chip, uint32_t add, std::vector<uint32_t> data, size_t nWords)
   void writeTest(int chip)
   

Initialization

   uint32_t parseInputEnableList(std::string list)
   void AMCInputEnable(std::string list)
   daqLinkEnable(bool b)
   void fakeDataEnable(bool b)
   void ttcRxEnable(bool b)
   void monBufBackPressEnable(bool b)
   
 

Control

Changed:
<
<
  • void reset(int chip);
  • uint32_t parseInputEnableList(string list);
  • void AMCInputEnable(string list);
  • daqLinkEnable(bool b);
  • void fakeDataEnable(bool b);
  • void ttcRxEnable(bool b);
  • void monBufBackPress(bool b);
  • void startRun();
  • void endRun();
>
>
   void reset(int chip)
   void sendLocalEvnOrnReset(uint32_t a, uint32_t b)
   void genInternalPeriodicL1As(bool b)
   void enableDaqLinkSenderReceiver()
   void saveReceivedDaqData(bool b)
   megaMonitorScale(bool b)
   setPreScaleFactor(uint32_t noZos)
   genInternalSingleL1A(uint32_t n)
   setTrigType(uint32_t type)
   setLocalL1APeriod(uint32_t n)
   setFEDid(uint32_t id)
   void startRun()
   void endRun()
   
 

DAQ

Changed:
<
<
  • uint32_t nextEventSize();
  • uint32_t readNextEvent( uint32_t *buffer, uint32_t max_buf);
  • uint32_t readNextEventNoAdvance( uint32_t *buffer, uint32_t max_buf);

General read/write

  • rv read(int chip, const std::string& reg);
  • rv readAddress(int chip, uint32_t add);
  • std::vector readBlock(int chip, const std::string& reg, size_t nWords);
  • std::vector readBlockAddress(int chip, uint32_t add, size_t nWords);
  • size_t readBlockAddress(int chip, uint32_t add, size_t nWords, uint32_t* buffer, size_t bufMax);
  • std::map<std::string, uint32_t> readAllReadable(int chip);
  • void write(int chip, const std::string& reg, rv value);
  • void writeAddress(int chip, rv add, rv value);
  • void writeBlockAddress(int chip, uint32_t add, std::vector data, size_t nWords);
  • void writeQueueAddress(int chip, uint32_t add, std::vector data, size_t nWords);
  • void writeTest(int chip);
>
>
   uint32_t nextEventSize() 
   uint32_t readNextEvent(uint32_t *buffer, uint32_t max_buf)
   uint32_t readNextEventNoAdvance(uint32_t *buffer, uint32_t max_buf)
   
  -- JimRohlf - 27 May 2012

Revision 217 Sep 2012 - CharlieHill

Line: 1 to 1
 
META TOPICPARENT name="HcalDTC"
Changed:
<
<
C++ Class 27 May 2012
>
>
AMC13 Class 27 May 2012
 

Control

  • void reset(int chip);
Changed:
<
<
  • void enableTTC();
  • void flashDoCommand(int length);
  • void enableFlashWrite();
  • void waitForWriteDone();
  • void eraseFlashSector(uint32_t s);

Special reads

  • rv firmware(int chip);
    • get firmware versions of both FPGSs
  • void ttcErrorCounts(int chip, rv& singleBit, rv& multiBit, rv& bunchCount);
    • get TTC error counts
  • void ttcBcnEvnOrn(int chip, rv& bunchNumber, rv& eventNumber, rv& orbitNumber);
    • get TTC bunch, event, and orbit numbers
>
>
  • uint32_t parseInputEnableList(string list);
  • void AMCInputEnable(string list);
  • daqLinkEnable(bool b);
  • void fakeDataEnable(bool b);
  • void ttcRxEnable(bool b);
  • void monBufBackPress(bool b);
  • void startRun();
  • void endRun();

DAQ

  • uint32_t nextEventSize();
  • uint32_t readNextEvent( uint32_t *buffer, uint32_t max_buf);
  • uint32_t readNextEventNoAdvance( uint32_t *buffer, uint32_t max_buf);
 

General read/write

  • rv read(int chip, const std::string& reg);
Deleted:
<
<
    • single word read by register name
 
  • rv readAddress(int chip, uint32_t add);
Deleted:
<
<
    • single word read by address
  • void write(int chip, const std::string& reg, rv value);
    • single word write by register name
  • void writeAddress(int chip, rv add, rv value);
    • single word write by address
  • std::map<std::string, uint32_t> readAllReadable(int chip);
    • read all readable registers in address table
 
  • std::vector readBlock(int chip, const std::string& reg, size_t nWords);
Deleted:
<
<
    • block read by register name
 
  • std::vector readBlockAddress(int chip, uint32_t add, size_t nWords);
Changed:
<
<
    • block read by address
>
>
  • size_t readBlockAddress(int chip, uint32_t add, size_t nWords, uint32_t* buffer, size_t bufMax);
  • std::map<std::string, uint32_t> readAllReadable(int chip);
  • void write(int chip, const std::string& reg, rv value);
  • void writeAddress(int chip, rv add, rv value);
 
  • void writeBlockAddress(int chip, uint32_t add, std::vector data, size_t nWords);
Deleted:
<
<
    • block write by address
 
  • void writeQueueAddress(int chip, uint32_t add, std::vector data, size_t nWords);
Changed:
<
<
    • queued write by address

Flash read/write

  • std::vector readFlashPage(uint32_t add);
    • read one page (0x100 bytes) from the flash memory
  • void programFlash(const std::string& mcsFileName, uint32_t add);
    • program the flash memory from an mcs file to specified byte address
  • void writeFlashPage(uint32_t wadd, std::vector data);
    • write one page of data to the flash
  • void verifyFlash(const std::string& mcsFileName, uint32_t add);
    • verify the contents of the flash memory at byte address against an mcs file
  • std::vector firmwareFromFlash(uint32_t add, int pages);
    • read specified number of pages from the flash at specified address into a vector
  • std::vector firmwareFromMcs(const std::string& mcsFileName);
    • read contenst of an mcs file (data bytes) into vector

Printing

  • void printTtcErrorCounts();
  • void printTtcBcnEvnOrn(int chip, int nTimes);
  • void printRegisterValues(int chip);
  • void printFlashPage(uint32_t add);
>
>
  • void writeTest(int chip);
  -- JimRohlf - 27 May 2012

Revision 127 May 2012 - JimRohlf

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="HcalDTC"
C++ Class 27 May 2012

Control

  • void reset(int chip);
  • void enableTTC();
  • void flashDoCommand(int length);
  • void enableFlashWrite();
  • void waitForWriteDone();
  • void eraseFlashSector(uint32_t s);

Special reads

  • rv firmware(int chip);
    • get firmware versions of both FPGSs
  • void ttcErrorCounts(int chip, rv& singleBit, rv& multiBit, rv& bunchCount);
    • get TTC error counts
  • void ttcBcnEvnOrn(int chip, rv& bunchNumber, rv& eventNumber, rv& orbitNumber);
    • get TTC bunch, event, and orbit numbers

General read/write

  • rv read(int chip, const std::string& reg);
    • single word read by register name
  • rv readAddress(int chip, uint32_t add);
    • single word read by address
  • void write(int chip, const std::string& reg, rv value);
    • single word write by register name
  • void writeAddress(int chip, rv add, rv value);
    • single word write by address
  • std::map<std::string, uint32_t> readAllReadable(int chip);
    • read all readable registers in address table
  • std::vector readBlock(int chip, const std::string& reg, size_t nWords);
    • block read by register name
  • std::vector readBlockAddress(int chip, uint32_t add, size_t nWords);
    • block read by address
  • void writeBlockAddress(int chip, uint32_t add, std::vector data, size_t nWords);
    • block write by address
  • void writeQueueAddress(int chip, uint32_t add, std::vector data, size_t nWords);
    • queued write by address

Flash read/write

  • std::vector readFlashPage(uint32_t add);
    • read one page (0x100 bytes) from the flash memory
  • void programFlash(const std::string& mcsFileName, uint32_t add);
    • program the flash memory from an mcs file to specified byte address
  • void writeFlashPage(uint32_t wadd, std::vector data);
    • write one page of data to the flash
  • void verifyFlash(const std::string& mcsFileName, uint32_t add);
    • verify the contents of the flash memory at byte address against an mcs file
  • std::vector firmwareFromFlash(uint32_t add, int pages);
    • read specified number of pages from the flash at specified address into a vector
  • std::vector firmwareFromMcs(const std::string& mcsFileName);
    • read contenst of an mcs file (data bytes) into vector

Printing

  • void printTtcErrorCounts();
  • void printTtcBcnEvnOrn(int chip, int nTimes);
  • void printRegisterValues(int chip);
  • void printFlashPage(uint32_t add);

-- JimRohlf - 27 May 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