Cat
Public Member Functions | Private Attributes | List of all members
CU_v1 Class Reference

#include <inc/CU_v1.h>

Inheritance diagram for CU_v1:
Element Hierarchy Object Attrib

Public Member Functions

 CU_v1 ()
 Standard constructor. More...
 
virtual ~CU_v1 ()
 Destructor. More...
 
void help ()
 
StatusCode init ()
 
void reset ()
 
void update ()
 
FePGAfePga ()
 
void readFifo (int, int, unsigned int *)
 
- Public Member Functions inherited from Element
 Element ()
 Standard constructor. More...
 
virtual ~Element ()
 Destructor. More...
 
void recursiveInitElement ()
 
void recursiveInitCommunications ()
 
StatusCode setConnection (Hierarchy *)
 
Hierarchyconnection ()
 
- Public Member Functions inherited from Hierarchy
 Hierarchy ()
 Standard constructor. More...
 
virtual ~Hierarchy ()
 Destructor. More...
 
void clear ()
 
void setParent (Hierarchy *parent)
 
Hierarchyparent ()
 
Hierarchyparent (std::string)
 
Hierarchyorigin ()
 
virtual void addChild (Hierarchy *element)
 
std::vector< Hierarchy * > children ()
 
Hierarchychild (std::string)
 
HierarchychildTyped (std::string)
 
unsigned long numberOfChildren ()
 
bool hasChildren ()
 
void delChild (Hierarchy *)
 
void delChild (std::string)
 
std::string path (std::string=std::string(""))
 
std::string pathTyped (std::string=std::string(""))
 
void tree (std::string indent=std::string(""))
 
void tree ()
 
- Public Member Functions inherited from Object
 Object ()
 Standard constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
std::string name () const
 
std::string type ()
 
unsigned char id ()
 
std::string title ()
 
void msgSvc (int level, std::string msg, std::string name)
 
void msg (std::string mymsg)
 
void verbose (std::string mymsg)
 
void debug (std::string mymsg)
 
void info (std::string mymsg)
 
void warning (std::string mymsg)
 
void error (std::string mymsg)
 
void fatal (std::string mymsg)
 
void msg (std::string mymsg, std::string name)
 
void verbose (std::string mymsg, std::string name)
 
void debug (std::string mymsg, std::string name)
 
void info (std::string mymsg, std::string name)
 
void warning (std::string mymsg, std::string name)
 
void error (std::string mymsg, std::string name)
 
void fatal (std::string mymsg, std::string name)
 
void setName (std::string name)
 
void setType (std::string type)
 
void setId (unsigned char id)
 
void setTitle (std::string title)
 
void setDllName (std::string dllName)
 
std::string dllName ()
 
- Public Member Functions inherited from Attrib
 Attrib ()
 Standard constructor. More...
 
virtual ~Attrib ()
 Destructor. More...
 
bool is (int attribut)
 
void add (int attribut)
 
void remove (int attribut)
 
std::string attributs ()
 

Private Attributes

int m_fifoDepth
 
int m_gbtAddress [1]
 
int m_fifoInjectAddress [3]
 
FePGAm_fePga
 
unsigned int * m_fifo [3]
 
Datam_data
 
RAMm_ramInj [3]
 
RAMm_fifoUsbTest
 

Additional Inherited Members

- Public Types inherited from Attrib
enum  Attribut {
  UNDEFINED, PASSIVE, ACTIVE, INTERFACE,
  IO, IODATA, ELEMENT, HARDWARE,
  PROCESSUS, SOFTWARE
}
 
- Protected Attributes inherited from Element
Hierarchym_connection
 
- Protected Attributes inherited from Attrib
std::string m_attribString [10]
 

Detailed Description

Author
Date
2006-10-23

Definition at line 19 of file CU_v1.h.

Constructor & Destructor Documentation

◆ CU_v1()

CU_v1::CU_v1 ( )

Standard constructor.

Definition at line 17 of file CU_v1.cpp.

References Attrib::add(), Hierarchy::addChild(), Attrib::ELEMENT, Attrib::HARDWARE, m_fePga, m_fifoDepth, Object::setName(), and Object::setType().

17  {
18  setName("CU_v1");
19  setType("CU_v1");
21 
22  m_fifoDepth = 1024;
23 
24  //m_seqAddress = 17 ; // c'est l'addresse du FPGA
25  //m_fifoInjectAddress[0] = 23; // What should I do here?
26 
27  m_fePga =new FePGA();
28  m_fePga->setName("FePGA");
30 
31  /*
32 
33  m_fifo[0] = new unsigned int[m_fifoDepth];
34 
35  for (int i = 0; i<3; ++i){ // Do I loop up to 3 too? Car Frederic a besoin de plus de place dans les RAM
36  m_ramInj[i] = new RAM();
37  // m_ramSpy[i] = new RAM();
38  fePga()->usb()->addChild(m_ramInj[i]); // What should I do here ?
39  // FePga()->usb()->addChild(m_ramSpy[i]);
40  m_ramInj[i]->setAddress(13); // for debug // What should I do here ?
41  //m_ramSpy[i]->setAddress(m_fifoSpyAddress[i]);
42  m_ramInj[i]->setSize(16, m_fifoDepth); // What should I do here ?
43  // m_ramSpy[i]->setSize(16, m_fifoDepth);
44  }
45 
46 
47 
48 
49  m_fifoUsbTest = new RAM();
50  m_fifoUsbTest->setAddress(3); // WARNING I NEED TO CHANGE THE ADDRESS
51  m_fifoUsbTest->setSize(16,256); // WHAT SIZE FOR I NNED
52  m_fifoUsbTest->setName("FifoUsbTest");
53  fePga()->usb()->addChild(m_fifoUsbTest);
54 */
55 
56 }
void add(int attribut)
Definition: Attrib.h:67
void setName(std::string name)
Definition: Object.h:51
int m_fifoDepth
Definition: CU_v1.h:65
Definition: FePGA.h:23
FePGA * m_fePga
Definition: CU_v1.h:68
void setType(std::string type)
Definition: Object.h:52
virtual void addChild(Hierarchy *element)
Definition: Hierarchy.cpp:83

◆ ~CU_v1()

CU_v1::~CU_v1 ( )
virtual

Destructor.

Definition at line 60 of file CU_v1.cpp.

60  {
61 }

Member Function Documentation

◆ fePga()

FePGA* CU_v1::fePga ( )
inline

Definition at line 56 of file CU_v1.h.

References m_fePga, and readFifo().

Referenced by BOOST_PYTHON_MODULE().

56  {
57  return m_fePga;
58  }
FePGA * m_fePga
Definition: CU_v1.h:68

◆ help()

void CU_v1::help ( )
inlinevirtual

printout help for the element

Implements Element.

Definition at line 29 of file CU_v1.h.

References Object::info(), and Object::name().

29 { info("CU_v1 "+name()+". No help.","CU_v1::help"); };
void info(std::string mymsg)
Definition: Object.h:38
std::string name() const
Definition: Object.h:28

◆ init()

StatusCode CU_v1::init ( )
inlinevirtual

init the component

Returns
void

Implements Element.

Definition at line 35 of file CU_v1.h.

References StatusCode::SUCCESS.

35  {
36  return StatusCode::SUCCESS;
37  };

◆ readFifo()

void CU_v1::readFifo ( int  add,
int  subadd,
unsigned int *  fifo 
)

Definition at line 64 of file CU_v1.cpp.

References m_fePga, m_fifoDepth, and FePGA::spiRead().

Referenced by BOOST_PYTHON_MODULE(), and fePga().

64  {
65 m_fePga->spiRead(subadd, m_fifoDepth, fifo); // Question why do we read the fifo with spi? /
66 }
int m_fifoDepth
Definition: CU_v1.h:65
FePGA * m_fePga
Definition: CU_v1.h:68
StatusCode spiRead(unsigned int, unsigned int, unsigned int *)
Definition: FePGA.cpp:102

◆ reset()

void CU_v1::reset ( )
inlinevirtual

Resets the Element so that is is in a standard and safe situation. Different from Element::init which configure the Element. Element::reset() is more an Emergency pull. It is often/usually called by the recursiveInitElement method at the start of the program.

Implements Element.

Definition at line 46 of file CU_v1.h.

References Object::debug(), m_fePga, Object::name(), and FePGA::reset().

46  {
47  m_fePga->reset();
48  debug("CU_v1 "+name()+" reset.","CU_v1::reset");
49  };
void reset()
Definition: FePGA.h:54
FePGA * m_fePga
Definition: CU_v1.h:68
void debug(std::string mymsg)
Definition: Object.h:37
std::string name() const
Definition: Object.h:28

◆ update()

void CU_v1::update ( )
inlinevirtual

Update the Element configuration from the actual hardware

Implements Element.

Definition at line 54 of file CU_v1.h.

References Object::info(), and Object::name().

Referenced by AppFrame.AppFrame::deleteHardware(), ConfFrame.ConfFrame::onChange(), GraphFrame.GraphFrame::onChange(), CfgFrame.CfgFrame::onChange(), ConfFrame.ConfFrame::onEdit(), AppFrame.AppFrame::onLoad(), ConfFrame.ConfFrame::onReLoad(), GraphFrame.GraphFrame::onReLoad(), CfgFrame.CfgFrame::onReLoad(), and AppFrame.AppFrame::onReLoad().

54 {info("CU_v1 "+name()+". Nothing to do.","CU_v1::update");};
void info(std::string mymsg)
Definition: Object.h:38
std::string name() const
Definition: Object.h:28

Member Data Documentation

◆ m_data

Data* CU_v1::m_data
private

Definition at line 70 of file CU_v1.h.

◆ m_fePga

FePGA* CU_v1::m_fePga
private

Definition at line 68 of file CU_v1.h.

Referenced by CU_v1(), fePga(), readFifo(), and reset().

◆ m_fifo

unsigned int* CU_v1::m_fifo[3]
private

Definition at line 69 of file CU_v1.h.

◆ m_fifoDepth

int CU_v1::m_fifoDepth
private

Definition at line 65 of file CU_v1.h.

Referenced by CU_v1(), and readFifo().

◆ m_fifoInjectAddress

int CU_v1::m_fifoInjectAddress[3]
private

Definition at line 67 of file CU_v1.h.

◆ m_fifoUsbTest

RAM* CU_v1::m_fifoUsbTest
private

Definition at line 72 of file CU_v1.h.

◆ m_gbtAddress

int CU_v1::m_gbtAddress[1]
private

Definition at line 66 of file CU_v1.h.

◆ m_ramInj

RAM* CU_v1::m_ramInj[3]
private

Definition at line 71 of file CU_v1.h.


The documentation for this class was generated from the following files: