OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BlocksIMM Class Reference

#include <BlocksIMM.hh>

Collaboration diagram for BlocksIMM:
Collaboration graph

Public Member Functions

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

Public Attributes

TTAMachine::ImmediateUnitiu
 
TTAMachine::RFPortout0
 
TTAMachine::Socketout0sock
 
std::list< std::string > sources
 

Detailed Description

Definition at line 39 of file BlocksIMM.hh.

Constructor & Destructor Documentation

◆ BlocksIMM()

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

BlocksIMM with default instructions

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

Definition at line 44 of file BlocksIMM.cc.

45 {
46 // IU property constants
47 unsigned int size = 1;
48 unsigned int width = 32;
49 unsigned int maxReads = 1;
50 unsigned int guardLatency = 1;
51 Machine::Extension ext = Machine::Extension::ZERO;
52
53 // Create object
54 iu = new ImmediateUnit(name, size, width, maxReads, guardLatency, ext);
55 this->sources = sources;
56 out0 = new RFPort("out0", *iu);
57 mach.addImmediateUnit(*iu);
58
59 // Create sockets
60 out0sock = new Socket(name + "_out0");
61 mach.addSocket(*out0sock);
63}
TTAMachine::ImmediateUnit * iu
Definition BlocksIMM.hh:41
TTAMachine::RFPort * out0
Definition BlocksIMM.hh:45
std::list< std::string > sources
Definition BlocksIMM.hh:47
TTAMachine::Socket * out0sock
Definition BlocksIMM.hh:46
virtual void addImmediateUnit(ImmediateUnit &unit)
Definition Machine.cc:224
virtual void addSocket(Socket &socket)
Definition Machine.cc:157
virtual void attachSocket(Socket &socket)
Definition Port.cc:191

References TTAMachine::Machine::addImmediateUnit(), TTAMachine::Machine::addSocket(), TTAMachine::Port::attachSocket(), iu, out0, out0sock, and sources.

Here is the call graph for this function:

◆ ~BlocksIMM()

BlocksIMM::~BlocksIMM ( )
inline

Definition at line 49 of file BlocksIMM.hh.

49 {
50 delete out0;
51 delete out0sock;
52 delete iu;
53 }

References iu, out0, and out0sock.

Member Data Documentation

◆ iu

TTAMachine::ImmediateUnit* BlocksIMM::iu

Definition at line 41 of file BlocksIMM.hh.

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

◆ out0

TTAMachine::RFPort* BlocksIMM::out0

Definition at line 45 of file BlocksIMM.hh.

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

◆ out0sock

TTAMachine::Socket* BlocksIMM::out0sock

Definition at line 46 of file BlocksIMM.hh.

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

◆ sources

std::list<std::string> BlocksIMM::sources

Definition at line 47 of file BlocksIMM.hh.

Referenced by BlocksIMM().


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