Go to the documentation of this file.
50 "ADD",
"SUB",
"LDW",
"LDQ",
"LDH",
"STW",
"STQ",
"STH",
"EQ",
"GT",
51 "GTU",
"SHL",
"SHR",
"SHRU",
"AND",
"IOR",
"XOR",
"SYS",
"JUMP",
"CALL",
52 "MIN",
"MAX",
"MINU",
"MAXU",
"SXQW",
"SXHW",
"NEG",
"MUL",
"DIV",
53 "DIVU",
"CFI",
"CIF",
"ROTL",
"ROTR",
"ABS",
"LDQU",
"LDHU"};
103 const string procName =
"UniversalFunctionUnit::operation";
105 if (FunctionUnit::hasOperation(
name)) {
106 return FunctionUnit::operation(
name);
132 const string procName =
"UniversalFunctionUnit::addPipelineElement";
133 const string errorMsg =
134 "Tried to add pipeline element to UniversalFunctionUnit!";
148 const string procName =
"UniversalFunctionUnit::loadState";
149 const string errorMsg =
150 "Tried to load state of UniversalFunctionUnit from an ObjectState "
166 const string procName =
"UniversalFunctionUnit::portCount";
167 throw OutOfRange(__FILE__, __LINE__, procName);
172 for (
int i = 0; i < FunctionUnit::portCount(); i++) {
173 if (FunctionUnit::port(i)->width() == width) {
192 const string procName =
"UniversalFunctionUnit::port";
193 throw OutOfRange(__FILE__, __LINE__, procName);
198 for (
int i = 0; i < portC; i++) {
202 if (p !=
nullptr &&
port->
width() == width) {
244 const string procName =
"UniversalFunctionUnit::addOperation";
245 const string errorMsg =
246 "Operation pool contained an operation with illegal"
273 assert(width == 32 || width == 64);
285 portName, width, *
this,
true,
true);
301 while (matches < count) {
305 portName, width, *
this,
false,
false);
338 while (matches < count) {
342 portName, width, *
this,
false,
false);
360 for (
int i = 0; i < numberOfElements; i++) {
void ensureInputPorts(int width, int count)
virtual TTAMachine::HWOperation * operation(const std::string &name) const
Operation & operation(const char *name)
virtual Socket * inputSocket() const
static const std::string OC_SETTING_PORT_32
Name of the 32 bit wide opcode setting port.
static bool is32BitOperation(const std::string &opName)
int portCountWithWidth(int width) const
virtual TCEString name() const
void ensureOutputPorts(int width, int count)
TTAMachine::FUPort & portWithWidth(int index, int width) const
static void writeToErrorLog(const std::string fileName, const int lineNumber, const std::string functionName, const std::string message, const int neededVerbosity=0)
#define UM_INPUT_SOCKET_NAME
virtual BaseFUPort * port(const std::string &name) const
static const std::string OC_SETTING_PORT_64
Name of the 64 bit wide opcode setting port.
static NullOperation & instance()
static std::string toString(const T &source)
#define assert(condition)
virtual void attachSocket(Socket &socket)
static const std::string OPERATIONS_OF_32_BITS[]
Table of names of 32 bit operations.
const std::string & name() const
int numberOfInputs() const
virtual SocketNavigator socketNavigator() const
virtual int portCount() const
virtual bool hasOperation(const std::string &name) const
virtual void addPipelineElement(TTAMachine::PipelineElement &element)
OperationPool & opPool_
Operation pool from which the operations are searched.
virtual Machine * machine() const
virtual void loadState(const ObjectState *state)
UniversalFunctionUnit(const std::string &name, OperationPool &opPool)
virtual Socket * outputSocket() const
virtual ~UniversalFunctionUnit()
ComponentType * item(int index) const
int numberOfOutputs() const
static void abortProgram() __attribute__((noreturn))
#define UM_OUTPUT_SOCKET_NAME
virtual int width() const
SmartHWOperation & addSupportedOperation(const Operation &operation)