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

#include <BlocksMUL.hh>

Collaboration diagram for BlocksMULPair:
Collaboration graph

Public Member Functions

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

Public Attributes

std::unique_ptr< BlocksMULmul0
 
std::unique_ptr< BlocksMULmul1
 
std::shared_ptr< TTAMachine::Socketin1sock
 
std::shared_ptr< TTAMachine::Socketin2sock
 
std::list< std::string > sources
 

Detailed Description

This class is a wrapper for BlocksMUL class to group two units both representing a different output of the same Blocks Unit.

Definition at line 67 of file BlocksMUL.hh.

Constructor & Destructor Documentation

◆ BlocksMULPair()

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

Constructor BlocksMULPair

Parameters
machThe TTA machine where the MUL pair needs to be added.
nameThe name of the MUL 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 Blocks.
usesOut1A boolean that indicates whether output port 1 of the FU is used in the Blocks.

Definition at line 73 of file BlocksMUL.cc.

76  : sources(sources) {
77  in1sock = std::make_shared<TTAMachine::Socket>(name + "_in1t");
78  in2sock = std::make_shared<TTAMachine::Socket>(name + "_in2");
79  mach.addSocket(*(in1sock.get()));
80  mach.addSocket(*(in2sock.get()));
81  if (usesOut0)
82  mul0.reset(
83  new BlocksMUL(mach, name + "_out0", sources, in1sock, in2sock));
84  if (usesOut1)
85  mul1.reset(
86  new BlocksMUL(mach, name + "_out1", sources, in1sock, in2sock));
87 }

References TTAMachine::Machine::addSocket(), in1sock, in2sock, mul0, mul1, and sources.

Here is the call graph for this function:

Member Data Documentation

◆ in1sock

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

Definition at line 72 of file BlocksMUL.hh.

Referenced by BlocksMULPair().

◆ in2sock

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

Definition at line 73 of file BlocksMUL.hh.

Referenced by BlocksMULPair().

◆ mul0

std::unique_ptr<BlocksMUL> BlocksMULPair::mul0

Definition at line 70 of file BlocksMUL.hh.

Referenced by BlocksMULPair().

◆ mul1

std::unique_ptr<BlocksMUL> BlocksMULPair::mul1

Definition at line 71 of file BlocksMUL.hh.

Referenced by BlocksMULPair().

◆ sources

std::list<std::string> BlocksMULPair::sources

Definition at line 74 of file BlocksMUL.hh.

Referenced by BlocksMULPair().


The documentation for this class was generated from the following files:
BlocksMUL
Definition: BlocksMUL.hh:39
BlocksMULPair::mul0
std::unique_ptr< BlocksMUL > mul0
Definition: BlocksMUL.hh:70
BlocksMULPair::mul1
std::unique_ptr< BlocksMUL > mul1
Definition: BlocksMUL.hh:71
BlocksMULPair::in2sock
std::shared_ptr< TTAMachine::Socket > in2sock
Definition: BlocksMUL.hh:73
BlocksMULPair::in1sock
std::shared_ptr< TTAMachine::Socket > in1sock
Definition: BlocksMUL.hh:72
BlocksMULPair::sources
std::list< std::string > sources
Definition: BlocksMUL.hh:74
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157