OpenASIP  2.0
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 }

References TTAMachine::Machine::addImmediateUnit(), and TTAMachine::Machine::addSocket().

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().

◆ out0

TTAMachine::RFPort* BlocksIMM::out0

Definition at line 45 of file BlocksIMM.hh.

Referenced by ~BlocksIMM().

◆ out0sock

TTAMachine::Socket* BlocksIMM::out0sock

Definition at line 46 of file BlocksIMM.hh.

Referenced by ~BlocksIMM().

◆ sources

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

Definition at line 47 of file BlocksIMM.hh.


The documentation for this class was generated from the following files:
BlocksIMM::out0sock
TTAMachine::Socket * out0sock
Definition: BlocksIMM.hh:46
BlocksIMM::out0
TTAMachine::RFPort * out0
Definition: BlocksIMM.hh:45
BlocksIMM::sources
std::list< std::string > sources
Definition: BlocksIMM.hh:47
TTAMachine::RFPort
Definition: RFPort.hh:45
TTAMachine::Machine::addImmediateUnit
virtual void addImmediateUnit(ImmediateUnit &unit)
Definition: Machine.cc:224
TTAMachine::Port::attachSocket
virtual void attachSocket(Socket &socket)
Definition: Port.cc:191
TTAMachine::Socket
Definition: Socket.hh:53
TTAMachine::Machine::Extension
Extension
Definition: Machine.hh:80
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157
BlocksIMM::iu
TTAMachine::ImmediateUnit * iu
Definition: BlocksIMM.hh:41
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50