OpenASIP  2.0
Public Member Functions | Public Attributes | List of all members
BlocksRF Class Reference

#include <BlocksRF.hh>

Collaboration diagram for BlocksRF:
Collaboration graph

Public Member Functions

 BlocksRF (TTAMachine::Machine &mach, const std::string &name, std::list< std::string > sources)
 
 ~BlocksRF ()
 

Public Attributes

TTAMachine::RegisterFilerf
 
TTAMachine::RFPortin1
 
TTAMachine::RFPortout1
 
TTAMachine::Socketin1sock
 
TTAMachine::Socketout1sock
 
std::list< std::string > sources
 

Detailed Description

Definition at line 41 of file BlocksRF.hh.

Constructor & Destructor Documentation

◆ BlocksRF()

BlocksRF::BlocksRF ( TTAMachine::Machine mach,
const std::string &  name,
std::list< std::string >  sources 
)

Default blocks Regierfile model

Parameters
machThe TTA machine where the RF needs to be added.
nameThe name of the RF.
sourcesA list of sources that are attached to this unit's input.

Definition at line 42 of file BlocksRF.cc.

43  {
44  // Rf property constants
45  unsigned int size = 16;
46  // fixed for now, TODO: needs to be variable for mixed precision?
47  unsigned int width = 32;
48  unsigned int maxReads = 1;
49  unsigned int maxWrites = 1;
50  unsigned int guardLatency = 0;
53 
54  rf = new RegisterFile(
55  name, size, width, maxReads, maxWrites, guardLatency, type);
56  this->sources = sources;
57  in1 = new RFPort("in1", *rf);
58  out1 = new RFPort("out1", *rf);
59  mach.addRegisterFile(*rf);
60 
61  // Create sockets
62  in1sock = new Socket(name + "_in1t");
63  out1sock = new Socket(name + "_out1");
64  mach.addSocket(*in1sock);
65  mach.addSocket(*out1sock);
68 }

References TTAMachine::Machine::addRegisterFile(), TTAMachine::Machine::addSocket(), and NORMAL.

Here is the call graph for this function:

◆ ~BlocksRF()

BlocksRF::~BlocksRF ( )
inline

Definition at line 53 of file BlocksRF.hh.

53  {
54  delete out1;
55  delete in1;
56  delete in1sock;
57  delete out1sock;
58  delete rf;
59  }

References in1, in1sock, out1, out1sock, and rf.

Member Data Documentation

◆ in1

TTAMachine::RFPort* BlocksRF::in1

Definition at line 47 of file BlocksRF.hh.

Referenced by ~BlocksRF().

◆ in1sock

TTAMachine::Socket* BlocksRF::in1sock

Definition at line 49 of file BlocksRF.hh.

Referenced by ~BlocksRF().

◆ out1

TTAMachine::RFPort* BlocksRF::out1

Definition at line 48 of file BlocksRF.hh.

Referenced by ~BlocksRF().

◆ out1sock

TTAMachine::Socket* BlocksRF::out1sock

Definition at line 50 of file BlocksRF.hh.

Referenced by ~BlocksRF().

◆ rf

TTAMachine::RegisterFile* BlocksRF::rf

Definition at line 43 of file BlocksRF.hh.

Referenced by ~BlocksRF().

◆ sources

std::list<std::string> BlocksRF::sources

Definition at line 51 of file BlocksRF.hh.


The documentation for this class was generated from the following files:
BlocksRF::out1
TTAMachine::RFPort * out1
Definition: BlocksRF.hh:48
BlocksRF::out1sock
TTAMachine::Socket * out1sock
Definition: BlocksRF.hh:50
TTAMachine::RFPort
Definition: RFPort.hh:45
TTAMachine::Port::attachSocket
virtual void attachSocket(Socket &socket)
Definition: Port.cc:191
TTAMachine::Machine::addRegisterFile
virtual void addRegisterFile(RegisterFile &unit)
Definition: Machine.cc:236
TTAMachine::Socket
Definition: Socket.hh:53
BlocksRF::sources
std::list< std::string > sources
Definition: BlocksRF.hh:51
NORMAL
@ NORMAL
Definition: tceopgen.cc:45
TTAMachine::RegisterFile::Type
Type
Type of the register file indicates how the RF is used.
Definition: RegisterFile.hh:50
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47
BlocksRF::in1sock
TTAMachine::Socket * in1sock
Definition: BlocksRF.hh:49
BlocksRF::rf
TTAMachine::RegisterFile * rf
Definition: BlocksRF.hh:43
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157
BlocksRF::in1
TTAMachine::RFPort * in1
Definition: BlocksRF.hh:47