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

#include <BlocksFU.hh>

Inheritance diagram for BlocksFU:
Inheritance graph
Collaboration diagram for BlocksFU:
Collaboration graph

Public Attributes

std::vector< TTAMachine::HWOperation * > ops
 
TTAMachine::FunctionUnitfu
 
TTAMachine::FUPortin1
 
TTAMachine::FUPortin2
 
TTAMachine::FUPortout
 
std::shared_ptr< TTAMachine::Socketin1sock
 
std::shared_ptr< TTAMachine::Socketin2sock
 
TTAMachine::Socketoutsock
 
std::list< std::string > sources
 
std::string name
 

Protected Member Functions

 BlocksFU (TTAMachine::Machine &mach, const std::string &name, std::list< std::string > sources, std::shared_ptr< TTAMachine::Socket > in1sock, std::shared_ptr< TTAMachine::Socket > in2sock)
 
 ~BlocksFU ()
 

Detailed Description

Definition at line 43 of file BlocksFU.hh.

Constructor & Destructor Documentation

◆ BlocksFU()

BlocksFU::BlocksFU ( TTAMachine::Machine mach,
const std::string &  name,
std::list< std::string >  sources,
std::shared_ptr< TTAMachine::Socket in1sock,
std::shared_ptr< TTAMachine::Socket in2sock 
)
protected

This constructor should not be called directly.

Definition at line 43 of file BlocksFU.cc.

49  // Function unit and ports
50  fu = new FunctionUnit(name);
51  this->name = name;
52  this->sources = sources;
53 
54  // output port suffix
55  std::string outputSuffix = name.substr(name.find("_") + 1);
56 
57  in1 = new FUPort("in1t", 32, *fu, true, true, true);
58  in2 = new FUPort("in2", 32, *fu, false, false, true);
59  out = new FUPort(outputSuffix, 32, *fu, false, false, false);
60 
61  // Add to machine
62  mach.addFunctionUnit(*(this->fu));
63 
64  // Create output socket
65  outsock = new Socket(name);
66  mach.addSocket(*outsock);
67  in1->attachSocket(*(in1sock.get()));
68  in2->attachSocket(*(in2sock.get()));
70 }

References TTAMachine::Machine::addFunctionUnit(), TTAMachine::Machine::addSocket(), TTAMachine::Port::attachSocket(), fu, in1, in1sock, in2, in2sock, name, out, outsock, and sources.

Here is the call graph for this function:

◆ ~BlocksFU()

BlocksFU::~BlocksFU ( )
inlineprotected

Definition at line 50 of file BlocksFU.hh.

50  {
51  delete in1;
52  delete in2;
53  delete out;
54  delete outsock;
55  delete fu;
56  }

References fu, in1, in2, out, and outsock.

Member Data Documentation

◆ fu

TTAMachine::FunctionUnit* BlocksFU::fu

◆ in1

TTAMachine::FUPort* BlocksFU::in1

◆ in1sock

std::shared_ptr<TTAMachine::Socket> BlocksFU::in1sock

Definition at line 64 of file BlocksFU.hh.

Referenced by BlocksFU().

◆ in2

TTAMachine::FUPort* BlocksFU::in2

◆ in2sock

std::shared_ptr<TTAMachine::Socket> BlocksFU::in2sock

Definition at line 65 of file BlocksFU.hh.

Referenced by BlocksFU().

◆ name

std::string BlocksFU::name

◆ ops

std::vector<TTAMachine::HWOperation*> BlocksFU::ops

◆ out

TTAMachine::FUPort* BlocksFU::out

◆ outsock

TTAMachine::Socket* BlocksFU::outsock

Definition at line 66 of file BlocksFU.hh.

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

◆ sources

std::list<std::string> BlocksFU::sources

Definition at line 67 of file BlocksFU.hh.

Referenced by BlocksFU().


The documentation for this class was generated from the following files:
BlocksFU::in1
TTAMachine::FUPort * in1
Definition: BlocksFU.hh:61
BlocksFU::fu
TTAMachine::FunctionUnit * fu
Definition: BlocksFU.hh:60
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::Port::attachSocket
virtual void attachSocket(Socket &socket)
Definition: Port.cc:191
TTAMachine::FUPort
Definition: FUPort.hh:46
BlocksFU::in2sock
std::shared_ptr< TTAMachine::Socket > in2sock
Definition: BlocksFU.hh:65
BlocksFU::out
TTAMachine::FUPort * out
Definition: BlocksFU.hh:63
TTAMachine::Socket
Definition: Socket.hh:53
BlocksFU::sources
std::list< std::string > sources
Definition: BlocksFU.hh:67
TTAMachine::Machine::addFunctionUnit
virtual void addFunctionUnit(FunctionUnit &unit)
Definition: Machine.cc:202
BlocksFU::name
std::string name
Definition: BlocksFU.hh:68
BlocksFU::in2
TTAMachine::FUPort * in2
Definition: BlocksFU.hh:62
BlocksFU::outsock
TTAMachine::Socket * outsock
Definition: BlocksFU.hh:66
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157
BlocksFU::in1sock
std::shared_ptr< TTAMachine::Socket > in1sock
Definition: BlocksFU.hh:64