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

#include <BlocksALU.hh>

Collaboration diagram for BlocksALUPair:
Collaboration graph

Public Member Functions

 BlocksALUPair (TTAMachine::Machine &mach, const std::string &name, std::list< std::string > sources, bool usesOut0, bool usesOut1)
 

Public Attributes

std::unique_ptr< BlocksALUalu0
 
std::unique_ptr< BlocksALUalu1
 
std::shared_ptr< TTAMachine::Socketin1sock
 
std::shared_ptr< TTAMachine::Socketin2sock
 
std::list< std::string > sources
 

Detailed Description

Definition at line 62 of file BlocksALU.hh.

Constructor & Destructor Documentation

◆ BlocksALUPair()

BlocksALUPair::BlocksALUPair ( TTAMachine::Machine mach,
const std::string &  name,
std::list< std::string >  sources,
bool  usesOut0,
bool  usesOut1 
)

Emulates second output port with copy of FU with input port sharing

Parameters
machThe TTA machine where the ALU pair needs to be added.
nameThe name of the ALU pair.
sourcesA list of sources that are attached to this unit's input.
usesOut0A boolean that indicates whether output port 0 of the FU is used in the CGRA.
usesOut1A boolean that indicates whether output port 1 of the FU is used in the CGRA.

Definition at line 90 of file BlocksALU.cc.

93  : sources(sources) {
94  in1sock = std::make_shared<TTAMachine::Socket>(name + "_in1t");
95  in2sock = std::make_shared<TTAMachine::Socket>(name + "_in2");
96  mach.addSocket(*(in1sock.get()));
97  mach.addSocket(*(in2sock.get()));
98  if (usesOut0)
99  alu0.reset(
100  new BlocksALU(mach, name + "_out0", sources, in1sock, in2sock));
101  if (usesOut1)
102  alu1.reset(
103  new BlocksALU(mach, name + "_out1", sources, in1sock, in2sock));
104 }

References TTAMachine::Machine::addSocket(), alu0, alu1, in1sock, in2sock, and sources.

Here is the call graph for this function:

Member Data Documentation

◆ alu0

std::unique_ptr<BlocksALU> BlocksALUPair::alu0

Definition at line 65 of file BlocksALU.hh.

Referenced by BlocksALUPair().

◆ alu1

std::unique_ptr<BlocksALU> BlocksALUPair::alu1

Definition at line 66 of file BlocksALU.hh.

Referenced by BlocksALUPair().

◆ in1sock

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

Definition at line 67 of file BlocksALU.hh.

Referenced by BlocksALUPair().

◆ in2sock

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

Definition at line 68 of file BlocksALU.hh.

Referenced by BlocksALUPair().

◆ sources

std::list<std::string> BlocksALUPair::sources

Definition at line 69 of file BlocksALU.hh.

Referenced by BlocksALUPair().


The documentation for this class was generated from the following files:
BlocksALUPair::sources
std::list< std::string > sources
Definition: BlocksALU.hh:69
BlocksALUPair::in1sock
std::shared_ptr< TTAMachine::Socket > in1sock
Definition: BlocksALU.hh:67
BlocksALUPair::alu1
std::unique_ptr< BlocksALU > alu1
Definition: BlocksALU.hh:66
BlocksALU
Definition: BlocksALU.hh:39
BlocksALUPair::alu0
std::unique_ptr< BlocksALU > alu0
Definition: BlocksALU.hh:65
BlocksALUPair::in2sock
std::shared_ptr< TTAMachine::Socket > in2sock
Definition: BlocksALU.hh:68
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157