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";
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++) {
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++) {
#define assert(condition)
#define UM_OUTPUT_SOCKET_NAME
#define UM_INPUT_SOCKET_NAME
static void abortProgram() __attribute__((noreturn))
static void writeToErrorLog(const std::string fileName, const int lineNumber, const std::string functionName, const std::string message, const int neededVerbosity=0)
static std::string toString(const T &source)
static NullOperation & instance()
Operation & operation(const char *name)
virtual int width() const
virtual Machine * machine() const
virtual TCEString name() const
virtual HWOperation * operation(const std::string &name) const
virtual bool hasOperation(const std::string &name) const
virtual BaseFUPort * port(const std::string &name) const
int numberOfOutputs() const
int numberOfInputs() const
const std::string & name() const
ComponentType * item(int index) const
virtual SocketNavigator socketNavigator() const
virtual Socket * outputSocket() const
virtual void attachSocket(Socket &socket)
virtual Socket * inputSocket() const
virtual int portCount() const
virtual TTAMachine::HWOperation * operation(const std::string &name) const
static const std::string OPERATIONS_OF_32_BITS[]
Table of names of 32 bit operations.
int portCountWithWidth(int width) const
static const std::string OC_SETTING_PORT_64
Name of the 64 bit wide opcode setting port.
UniversalFunctionUnit(const std::string &name, OperationPool &opPool)
virtual ~UniversalFunctionUnit()
virtual void addPipelineElement(TTAMachine::PipelineElement &element)
static bool is32BitOperation(const std::string &opName)
static const std::string OC_SETTING_PORT_32
Name of the 32 bit wide opcode setting port.
void ensureInputPorts(int width, int count)
OperationPool & opPool_
Operation pool from which the operations are searched.
SmartHWOperation & addSupportedOperation(const Operation &operation)
virtual bool hasOperation(const std::string &name) const
virtual void loadState(const ObjectState *state)
void ensureOutputPorts(int width, int count)
TTAMachine::FUPort & portWithWidth(int index, int width) const