OpenASIP 2.2
Loading...
Searching...
No Matches
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}
TTAMachine::RegisterFile * rf
Definition BlocksRF.hh:43
TTAMachine::RFPort * out1
Definition BlocksRF.hh:48
TTAMachine::RFPort * in1
Definition BlocksRF.hh:47
TTAMachine::Socket * in1sock
Definition BlocksRF.hh:49
TTAMachine::Socket * out1sock
Definition BlocksRF.hh:50
std::list< std::string > sources
Definition BlocksRF.hh:51
virtual void addRegisterFile(RegisterFile &unit)
Definition Machine.cc:236
virtual void addSocket(Socket &socket)
Definition Machine.cc:157
virtual void attachSocket(Socket &socket)
Definition Port.cc:191
Type
Type of the register file indicates how the RF is used.
@ NORMAL
Used for general register allocation.

References TTAMachine::Machine::addRegisterFile(), TTAMachine::Machine::addSocket(), TTAMachine::Port::attachSocket(), in1, in1sock, TTAMachine::RegisterFile::NORMAL, out1, out1sock, rf, and sources.

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(), and ~BlocksRF().

◆ in1sock

TTAMachine::Socket* BlocksRF::in1sock

Definition at line 49 of file BlocksRF.hh.

Referenced by BlocksRF(), and ~BlocksRF().

◆ out1

TTAMachine::RFPort* BlocksRF::out1

Definition at line 48 of file BlocksRF.hh.

Referenced by BlocksRF(), and ~BlocksRF().

◆ out1sock

TTAMachine::Socket* BlocksRF::out1sock

Definition at line 50 of file BlocksRF.hh.

Referenced by BlocksRF(), and ~BlocksRF().

◆ rf

TTAMachine::RegisterFile* BlocksRF::rf

Definition at line 43 of file BlocksRF.hh.

Referenced by BlocksRF(), and ~BlocksRF().

◆ sources

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

Definition at line 51 of file BlocksRF.hh.

Referenced by BlocksRF().


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