OpenASIP  2.0
Macros | Functions | Variables
POMGenMacros.hh File Reference
#include "UniversalMachine.hh"
#include "Program.hh"
#include "Procedure.hh"
#include "Instruction.hh"
#include "Move.hh"
#include "MoveGuard.hh"
#include "Guard.hh"
#include "Terminal.hh"
#include "TerminalImmediate.hh"
#include "TerminalRegister.hh"
#include "SimValue.hh"
#include "OperationPool.hh"
#include "Application.hh"
#include "UniversalFunctionUnit.hh"
#include "UnboundedRegisterFile.hh"
#include "SmartHWOperation.hh"
#include "FUPort.hh"
#include "TerminalFUPort.hh"
#include "BaseFUPort.hh"
#include "Port.hh"
#include "SpecialRegisterPort.hh"
#include "RegisterFile.hh"
#include "FunctionUnit.hh"
#include "ControlUnit.hh"
#include "AssocTools.hh"
#include "StringTools.hh"
#include "Conversion.hh"
Include dependency graph for POMGenMacros.hh:

Go to the source code of this file.

Macros

#define PRINTOUT(STUFF)
 define this to get the programs printed to stdout while they are contructed More...
 
#define REG(RFNAME, REGNUM)
 
#define IREG(REGNUM)   REG(r, REGNUM)
 
#define PORT(FUNAME, PORTNAME)
 
#define OPORT(FUNAME, PORTNAME, OPERATION)
 
#define OPERAND(OPERATION, OPERAND_INDEX)   OPORT(OPERATION, OPERAND_INDEX, OPERATION)
 
#define IMM(WIDTH, VALUE)
 
#define CONTROL_OPERAND(OPERATION, OPNUM)
 
#define BOOL()
 
#define BOOLGUARD()
 
#define INVBOOLGUARD()
 
#define RA()
 
#define IMM32(VALUE)   IMM(32, VALUE)
 
#define INSTRUCTION(ADD_MOVES)
 
#define MOVE_TEMPLATE(SRC, DST, CONSTRUCT_MOVE)
 
#define BASIC_MOVE_CONSTRUCTION   tempMove = std::make_shared<Move>(src__, dst__, *bus__)
 
#define MOVE(SRC, DST)   MOVE_TEMPLATE(SRC, DST, BASIC_MOVE_CONSTRUCTION);
 
#define NOP   PRINTOUT("nop "); moveCounter__++;
 
#define LABEL(LABEL_NAME)   iaddress_##LABEL_NAME
 
#define SET_LABEL(LABEL_NAME)
 
#define SET_IP(VALUE)   currentIP__ = VALUE
 
#define SET_IP_INCREMENT(COUNT)   incrementOfIP__ = COUNT
 
#define GUARDED_MOVE_CONSTRUCTION(ADFGUARD)
 
#define GMOVE(SRC, DST, GUARD)   MOVE_TEMPLATE(SRC, DST, GUARDED_MOVE_CONSTRUCTION(GUARD));
 
#define CREATE_PROGRAM(PROGRAM, MACHINE)
 
#define CREATE_PROCEDURE(PROCNAME)
 
#define END_PROGRAM
 

Functions

void null__ ()
 
TTAMachine::RegisterFilefindRegisterFile (const TTAMachine::Machine &machine, std::string name)
 
TTAMachine::FunctionUnitfindFunctionUnit (const TTAMachine::Machine &machine, std::string name)
 
TTAProgram::TerminalFUPortcreateTerminalFUPort (const TTAMachine::Machine &machine, std::string fuName, std::string pName, std::string opName)
 
TTAMachine::PortfindFUPort (const TTAMachine::Machine &machine, std::string fuName, std::string portName)
 
SimValuetempSimValue (unsigned int bitWidth, SIntWord intValue)
 
TTAMachine::BusfindBus (const TTAMachine::Machine &machine, std::string busName)
 
TTAMachine::RegisterFilefindBooleanRegisterFile (const TTAMachine::Machine &machine)
 
TTAMachine::GuardfindBooleanGuard (const TTAMachine::Machine &machine, bool isInverted)
 

Variables

SimValuetemporary = NULL
 

Detailed Description

A macro set and helper functions for implementing the macros to make creating of Program Object Models for unit tests manually easy.

Author
Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)

Definition in file POMGenMacros.hh.

Macro Definition Documentation

◆ BASIC_MOVE_CONSTRUCTION

#define BASIC_MOVE_CONSTRUCTION   tempMove = std::make_shared<Move>(src__, dst__, *bus__)

Creates a basic move without any guards.

Definition at line 446 of file POMGenMacros.hh.

◆ BOOL

#define BOOL ( )
Value:
new TerminalRegister(\
*findBooleanRegisterFile(machine__).port(0), 0);\
PRINTOUT("bool")

Creates a terminal pointing to the boolean register.

Definition at line 371 of file POMGenMacros.hh.

◆ BOOLGUARD

#define BOOLGUARD ( )
Value:
findBooleanGuard(machine__, false);\
PRINTOUT("boolguard")

Returns RegisterGuard pointing to boolean register

Definition at line 379 of file POMGenMacros.hh.

◆ CONTROL_OPERAND

#define CONTROL_OPERAND (   OPERATION,
  OPNUM 
)
Value:
new TerminalFUPort( \
*machine__.controlUnit()->operation(#OPERATION), \
OPNUM);\
PRINTOUT(#OPERATION "." #OPNUM)

Creates a TerminalFUPort that writes to the GCU operand port, thus triggering a control flow operation.

Parameters
OPERATIONThe name of the operation to trigger.
OPNUMThe operand number.

Definition at line 297 of file POMGenMacros.hh.

◆ CREATE_PROCEDURE

#define CREATE_PROCEDURE (   PROCNAME)
Value:
SET_LABEL(PROCNAME); \
Procedure* PROCNAME = \
new Procedure("proc_"#PROCNAME, programSpace__, LABEL(PROCNAME));\
program__.addProcedure(PROCNAME);\
proc = PROCNAME

Creates a new procedure to add instructions to.

Sets a label to the creation position.

Definition at line 584 of file POMGenMacros.hh.

◆ CREATE_PROGRAM

#define CREATE_PROGRAM (   PROGRAM,
  MACHINE 
)
Value:
OperationPool operationPool; \
unsigned int currentIP__ = 0; \
currentIP__ = 0; \
unsigned int incrementOfIP__ = 1; \
incrementOfIP__ = 1; \
Procedure* proc = NULL;\
const AddressSpace& programSpace__ = \
*MACHINE.controlUnit()->addressSpace();\
Program PROGRAM(programSpace__);\
Program& program__ = PROGRAM; \
const Machine& machine__ = MACHINE;\
PRINTOUT("\n# program '" #PROGRAM "':\n")

Creates a guarded move and adds it to the instruction this macro is invoked in.

Inverted version.s

Parameters
SRCThe source terminal.
DSTThe destination terminal.
GTERMThe termimal that is watched by this guard. #define IGMOVE(SRC, DST, GTERM) \ MOVE_TEMPLATE(SRC, DST, GUARDED_MOVE_CONSTRUCTION(GTERM, true)); Initializes the POM generator macros.

This should be stated before using the above macros.

@PROGRAM The name of the program. @MACHINE The target processor of the program.

Definition at line 563 of file POMGenMacros.hh.

◆ END_PROGRAM

#define END_PROGRAM
Value:
int foooooO__ = 1; foooooO__++;\
PRINTOUT("\n# program ends\n")

Frees the resources allocated by the POM generator macros.

Currently does basically nothing. Code is there just to avoid compiler warnings/errors.

Definition at line 597 of file POMGenMacros.hh.

◆ GMOVE

#define GMOVE (   SRC,
  DST,
  GUARD 
)    MOVE_TEMPLATE(SRC, DST, GUARDED_MOVE_CONSTRUCTION(GUARD));

Creates a guarded move and adds it to the instruction this macro is invoked in.

Non-inverted version.

Parameters
SRCThe source terminal.
DSTThe destination terminal.
GTERMThe termimal that is watched by this guard. #define GMOVE(SRC, DST, GTERM) \ MOVE_TEMPLATE(SRC, DST, GUARDED_MOVE_CONSTRUCTION(GTERM, false));

Definition at line 539 of file POMGenMacros.hh.

◆ GUARDED_MOVE_CONSTRUCTION

#define GUARDED_MOVE_CONSTRUCTION (   ADFGUARD)
Value:
TTAMachine::Guard &adfGuard__ = ADFGUARD; \
MoveGuard* guard__ = new MoveGuard(adfGuard__); \
tempMove = std::make_shared<Move>(src__, dst__, *bus__, guard__);

Creation of guarded move.

Parameters
TERMINALThe terminal the guard should watch.
INVERTIs the guard inverted? true if it is.

#define GUARDED_MOVE_CONSTRUCTION(TERMINAL, INVERT) \ PRINTOUT(" || only if ");\ Terminal* term__ = TERMINAL;\ PRINTOUT(" != " #INVERT); \ PRINTOUT(" ||"); \ MoveGuard* guard__ = new MoveGuard(term__, INVERT); \ tempMove = new Move(src__, dst__, *bus__, guard__);

Definition at line 520 of file POMGenMacros.hh.

◆ IMM

#define IMM (   WIDTH,
  VALUE 
)
Value:
new TerminalImmediate(tempSimValue(WIDTH, VALUE)); \
PRINTOUT("#" #VALUE)

Creates a TerminalImmediate by width and value.

Expects the creator to manage deallocation.

Parameters
WIDTHThe bit width of the value.
VALUEThe value of the immediate.

Definition at line 286 of file POMGenMacros.hh.

◆ IMM32

#define IMM32 (   VALUE)    IMM(32, VALUE)

A shortcut which creates a 32 bit TerminalImmediate.

Parameters
VALUEThe value of the immediate.

Definition at line 405 of file POMGenMacros.hh.

◆ INSTRUCTION

#define INSTRUCTION (   ADD_MOVES)
Value:
{\
Instruction* tempInstruction__ = new Instruction(); \
int moveCounter__ = 1; \
PRINTOUT("\t" << currentIP__ << ": ");\
ADD_MOVES; \
PRINTOUT("\n");\
proc->add(tempInstruction__); \
} currentIP__ += incrementOfIP__

Creates an instruction and adds it to a procedure.

Parameters
ADD_MOVESA (list of) move creation statement(s).

Definition at line 413 of file POMGenMacros.hh.

◆ INVBOOLGUARD

#define INVBOOLGUARD ( )
Value:
findBooleanGuard(machine__, true);\
PRINTOUT("invboolguard")

Returns Inverted RegisterGuard pointing to boolean register

Definition at line 386 of file POMGenMacros.hh.

◆ IREG

#define IREG (   REGNUM)    REG(r, REGNUM)

Shortcut to an integer register in sequential code.

Parameters
REGNUMThe integer register index.

Definition at line 133 of file POMGenMacros.hh.

◆ LABEL

#define LABEL (   LABEL_NAME)    iaddress_##LABEL_NAME

Gets the variable connected to a label.

Using LABEL and SET_LABEL macros one can make implementing backward jumps easier.

Parameters
LABEL_NAMEThe name of the label to refer to.

Definition at line 475 of file POMGenMacros.hh.

◆ MOVE

#define MOVE (   SRC,
  DST 
)    MOVE_TEMPLATE(SRC, DST, BASIC_MOVE_CONSTRUCTION);

Creates a basic move and adds it to the instruction this macro is invoked in.

Expects that the bus names of the machine are named by appending the index of the bus to the word 'bus', i.e., 'bus1', 'bus2', etc.

Parameters
SRCThe source terminal.
DSTThe destination terminal.

Definition at line 458 of file POMGenMacros.hh.

◆ MOVE_TEMPLATE

#define MOVE_TEMPLATE (   SRC,
  DST,
  CONSTRUCT_MOVE 
)
Value:
{\
Terminal* src__ = SRC;\
PRINTOUT(" -> "); \
Terminal* dst__ = DST;\
PRINTOUT(" "); \
Bus* bus__ = &findBus(\
machine__, std::string("bus") + Conversion::toString(moveCounter__));\
std::shared_ptr<Move> tempMove = nullptr; \
CONSTRUCT_MOVE;\
tempInstruction__->addMove(tempMove);\
} moveCounter__++;

A helper macro to create different types of moves.

Parameters
SRCThe source terminal.
DSTThe destination terminal.
MOVE_CONSTRUCTORA constructor of the move to create.

Definition at line 430 of file POMGenMacros.hh.

◆ NOP

#define NOP   PRINTOUT("nop "); moveCounter__++;

A no-operation move.

Just skips the move slot by incrementing the move counter.

Definition at line 465 of file POMGenMacros.hh.

◆ OPERAND

#define OPERAND (   OPERATION,
  OPERAND_INDEX 
)    OPORT(OPERATION, OPERAND_INDEX, OPERATION)

A shortcut to an operand in sequential code.

Parameters
OPERATIONThe name of the operation.
OPERAND_INDEXIndex of the operand.

Definition at line 241 of file POMGenMacros.hh.

◆ OPORT

#define OPORT (   FUNAME,
  PORTNAME,
  OPERATION 
)
Value:
machine__, #FUNAME, #PORTNAME, #OPERATION);\
PRINTOUT(#FUNAME "." #OPERATION "." #PORTNAME)

Creates a TerminalFUPort using the given name strings.

Parameters
FUNAMEThe function unit or operation name (in sequential).
PORTNAMEThe port name or operand index (in sequential).
OPERATIONThe name of the operation.

Definition at line 229 of file POMGenMacros.hh.

◆ PORT

#define PORT (   FUNAME,
  PORTNAME 
)
Value:
new TerminalFUPort( \
dynamic_cast<BaseFUPort&>( \
findFUPort(machine__, #FUNAME, #PORTNAME)));\
PRINTOUT(#FUNAME "." #PORTNAME)

Creates a TerminalFUPort using the given name strings.

Parameters
FUNAMEThe function unit or operation name (in sequential).
PORTNAMEThe port name or operand index (in sequential).

Definition at line 216 of file POMGenMacros.hh.

◆ PRINTOUT

#define PRINTOUT (   STUFF)

define this to get the programs printed to stdout while they are contructed

Definition at line 73 of file POMGenMacros.hh.

◆ RA

#define RA ( )
Value:
new TerminalFUPort(\
dynamic_cast<BaseFUPort&>( \
*machine__.controlUnit()->returnAddressPort()));\
PRINTOUT("ra")

Creates a terminal pointing to the return address port of the GCU.

Definition at line 393 of file POMGenMacros.hh.

◆ REG

#define REG (   RFNAME,
  REGNUM 
)
Value:
new TerminalRegister(\
*findRegisterFile(machine__, #RFNAME).port(0), \
REGNUM);\
PRINTOUT(#RFNAME "" #REGNUM)

Creates a TerminalRegister using the given register file and register.

Parameters
RFNAMEThe register file name (either 'r' or 'f' in sequential).
REGNUMThe index of the register.

Definition at line 123 of file POMGenMacros.hh.

◆ SET_IP

#define SET_IP (   VALUE)    currentIP__ = VALUE

Forces a new value to the instruction pointer.

Parameters
VALUEThe new value to assign to the instruction pointer counter.

Definition at line 495 of file POMGenMacros.hh.

◆ SET_IP_INCREMENT

#define SET_IP_INCREMENT (   COUNT)    incrementOfIP__ = COUNT

Sets the amount how much instruction pointer should be incremented after adding an instruction.

Parameters
COUNTThe increment.

Definition at line 503 of file POMGenMacros.hh.

◆ SET_LABEL

#define SET_LABEL (   LABEL_NAME)
Value:
PRINTOUT(#LABEL_NAME ":\n");\
unsigned int LABEL(LABEL_NAME) = currentIP__; \
LABEL(LABEL_NAME) = currentIP__;

Sets a label at the current instruction pointer position.

Using LABEL and SET_LABEL macros one can make implementing backward jumps easier.

Parameters
LABEL_NAMEThe name of the label to refer to.

Definition at line 485 of file POMGenMacros.hh.

Function Documentation

◆ createTerminalFUPort()

TTAProgram::TerminalFUPort* createTerminalFUPort ( const TTAMachine::Machine machine,
std::string  fuName,
std::string  pName,
std::string  opName 
)

Creates terminal of given parameters.

Definition at line 161 of file POMGenMacros.hh.

163  {
164 
166  TTAMachine::HWOperation *op = NULL;
167 
168  if (fu.hasOperation(opName)) {
169  op = fu.operation(opName);
170  } else {
171  op = new TTAMachine::HWOperation(opName, fu);
172  }
173 
174  int index = 0;
175 
176  try {
177  index = Conversion::toInt(pName);
178  } catch ( ... ) {
179  index = op->io(*fu.operationPort(pName));
180  }
181 
182  return new TTAProgram::TerminalFUPort(*op, index);
183 }

References findFunctionUnit(), TTAMachine::FunctionUnit::hasOperation(), TTAMachine::HWOperation::io(), machine, TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationPort(), and Conversion::toInt().

Here is the call graph for this function:

◆ findBooleanGuard()

TTAMachine::Guard& findBooleanGuard ( const TTAMachine::Machine machine,
bool  isInverted 
)

Helper function which finds either normal or inverted guard pointing to boolean register

Aborts with error if the boolean register file is not found.

Parameters
machineThe machine to search in.
isInvertedDo we look for inverted guard.
Returns
The found Guard

Definition at line 343 of file POMGenMacros.hh.

343  {
344 
346 
347  // go through all the register files in the machine
348  for (int i = 0; i < bus->guardCount(); ++i) {
349  TTAMachine::RegisterGuard *regGuard =
350  dynamic_cast<TTAMachine::RegisterGuard*>(bus->guard(i));
351 
352  if (regGuard == NULL) {
353  continue;
354  }
355 
356  if (regGuard->isInverted() == isInverted &&
357  regGuard->registerFile()->width() == 1 &&
358  regGuard->registerFile()->numberOfRegisters() == 1) {
359  return *regGuard;
360  }
361  }
362 
363  // just to avoid compiler warnings
364  abortWithError("Can't find BooleanGuard!");
365  throw 1;
366 }

References abortWithError, TTAMachine::Machine::busNavigator(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::Guard::isInverted(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::RegisterGuard::registerFile(), and TTAMachine::BaseRegisterFile::width().

Here is the call graph for this function:

◆ findBooleanRegisterFile()

TTAMachine::RegisterFile& findBooleanRegisterFile ( const TTAMachine::Machine machine)

Helper function which finds the boolean register file in the machine.

Aborts with error if the boolean register file is not found.

Parameters
machineThe machine to search in.
Returns
The found register file.

Definition at line 312 of file POMGenMacros.hh.

312  {
313 
316 
317  // go through all the register files in the machine
318  for (int i = 0; i < navigator.count(); ++i) {
319  TTAMachine::RegisterFile& rf = *navigator.item(i);
320 
321  // expect the boolean register to be the first register file with
322  // only one register of width 1
323  if (rf.width() == 1 && rf.numberOfRegisters() == 1) {
324  return rf;
325  }
326  }
327  // just to avoid compiler warnings
328  abortWithError("Can't find boolean register file from machine!.");
329  throw 1;
330 }

References abortWithError, TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::Machine::registerFileNavigator(), and TTAMachine::BaseRegisterFile::width().

Here is the call graph for this function:

◆ findBus()

TTAMachine::Bus& findBus ( const TTAMachine::Machine machine,
std::string  busName 
)

Helper function which finds a bus in a machine.

Aborts with error if the bus is not found.

Parameters
machineThe machine to search in.
busNameThe name of the bus. Unused in case of UniversalMachine.
Returns
The found bus.

Definition at line 269 of file POMGenMacros.hh.

269  {
270  if (dynamic_cast<const UniversalMachine*>(&machine) != NULL) {
271  return dynamic_cast<const UniversalMachine&>(machine).universalBus();
272  } else {
274  return *nav.item(busName);
275  }
276 }

References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), and machine.

Here is the call graph for this function:

◆ findFunctionUnit()

TTAMachine::FunctionUnit& findFunctionUnit ( const TTAMachine::Machine machine,
std::string  name 
)

Helper function which finds a function unit in the machine.

Aborts with error if the function unit is not found.

Parameters
machineThe machine to search in.
nameThe name of the function unit. Can be empty in sequential.
Returns
The found register file.

Definition at line 146 of file POMGenMacros.hh.

146  {
147  if (dynamic_cast<const UniversalMachine*>(&machine) != NULL) {
148  return dynamic_cast<const UniversalMachine&>(
149  machine).universalFunctionUnit();
150  } else {
153  return *nav.item(name);
154  }
155 }

References TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), and machine.

Referenced by createTerminalFUPort(), and findFUPort().

Here is the call graph for this function:

◆ findFUPort()

TTAMachine::Port& findFUPort ( const TTAMachine::Machine machine,
std::string  fuName,
std::string  portName 
)

Helper function which finds a port in a function unit.

Aborts with error if the port is not found.

Parameters
machineThe machine to search in.
fuNameThe name of the function unit. The operation, if sequential.
portNameThe name of the port. The operand, if sequential code.
Returns
The found port.

Definition at line 196 of file POMGenMacros.hh.

199  {
200 
201  if (dynamic_cast<const UniversalMachine*>(&machine) != NULL) {
202  return *dynamic_cast<const UniversalMachine&>(machine).
203  universalFunctionUnit().operation(fuName)->port(
204  Conversion::toInt(portName));
205  } else {
206  return *findFunctionUnit(machine, fuName).port(portName);
207  }
208 }

References findFunctionUnit(), machine, TTAMachine::FunctionUnit::port(), and Conversion::toInt().

Here is the call graph for this function:

◆ findRegisterFile()

TTAMachine::RegisterFile& findRegisterFile ( const TTAMachine::Machine machine,
std::string  name 
)

Helper function which finds a register file in the machine.

Aborts with error if the register file is not found.

Parameters
machineThe machine to search in.
nameThe name of the register file.
Returns
The found register file.

Definition at line 94 of file POMGenMacros.hh.

94  {
95 
96  if (dynamic_cast<const UniversalMachine*>(&machine) != NULL) {
97  if (StringTools::ciEqual(name, "r")) {
98  return dynamic_cast<const UniversalMachine&>(
99  machine).integerRegisterFile();
100  } else
101  if (StringTools::ciEqual(name, "f")) {
102  return dynamic_cast<const UniversalMachine&>(
103  machine).doubleRegisterFile();
104  }
105  abortWithError(std::string("No register file ") + name + " found.");
106  } else {
109  return *nav.item(name);
110  }
111 
112  abortWithError("Can't find register file " + name);
113  // just to avoid compiler warnings
114  throw 1;
115 }

References abortWithError, StringTools::ciEqual(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, and TTAMachine::Machine::registerFileNavigator().

Here is the call graph for this function:

◆ null__()

void null__ ( )

A procedure that does nothing.

Definition at line 81 of file POMGenMacros.hh.

81  {
82 }

◆ tempSimValue()

SimValue& tempSimValue ( unsigned int  bitWidth,
SIntWord  intValue 
)

Creates a temporary SimValue to be used in TerminalImmediate construction.

Parameters
bitWidthThe bit width of the SimValue.
intValueThe integer value of the SimValue.
Returns
A SimValue reference (owned by the function).

Definition at line 252 of file POMGenMacros.hh.

252  {
253  delete temporary;
254  temporary = new SimValue(bitWidth);
255  *temporary = intValue;
256  return *temporary;
257 }

References temporary.

Variable Documentation

◆ temporary

SimValue* temporary = NULL

Definition at line 76 of file POMGenMacros.hh.

Referenced by EnableBPCommand::execute(), and tempSimValue().

TTAMachine::Guard
Definition: Guard.hh:55
LABEL
#define LABEL(LABEL_NAME)
Definition: POMGenMacros.hh:475
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
TTAMachine::HWOperation
Definition: HWOperation.hh:52
TTAMachine::Bus
Definition: Bus.hh:53
tempSimValue
SimValue & tempSimValue(unsigned int bitWidth, SIntWord intValue)
Definition: POMGenMacros.hh:252
SET_LABEL
#define SET_LABEL(LABEL_NAME)
Definition: POMGenMacros.hh:485
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
TTAMachine::Machine::Navigator::count
int count() const
Conversion::toString
static std::string toString(const T &source)
SimValue
Definition: SimValue.hh:96
TTAMachine::BaseRegisterFile::numberOfRegisters
virtual int numberOfRegisters() const
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::HWOperation::io
int io(const FUPort &port) const
Definition: HWOperation.cc:364
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
UniversalMachine
Definition: UniversalMachine.hh:56
TTAMachine::RegisterGuard
Definition: Guard.hh:137
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
StringTools::ciEqual
static bool ciEqual(const std::string &a, const std::string &b)
Definition: StringTools.cc:240
TTAMachine::FunctionUnit::hasOperation
virtual bool hasOperation(const std::string &name) const
Definition: FunctionUnit.cc:330
findFUPort
TTAMachine::Port & findFUPort(const TTAMachine::Machine &machine, std::string fuName, std::string portName)
Definition: POMGenMacros.hh:196
TTAMachine::Bus::guardCount
int guardCount() const
Definition: Bus.cc:441
TTAMachine::Bus::guard
Guard * guard(int index) const
Definition: Bus.cc:456
TTAProgram::TerminalFUPort
Definition: TerminalFUPort.hh:56
WIDTH
const string WIDTH
Definition: MifImageWriter.cc:21
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
TTAMachine::Guard::isInverted
virtual bool isInverted() const
createTerminalFUPort
TTAProgram::TerminalFUPort * createTerminalFUPort(const TTAMachine::Machine &machine, std::string fuName, std::string pName, std::string opName)
Definition: POMGenMacros.hh:161
Application::initialize
static void initialize()
Definition: Application.cc:99
findBus
TTAMachine::Bus & findBus(const TTAMachine::Machine &machine, std::string busName)
Definition: POMGenMacros.hh:269
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
findFunctionUnit
TTAMachine::FunctionUnit & findFunctionUnit(const TTAMachine::Machine &machine, std::string name)
Definition: POMGenMacros.hh:146
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47
Conversion::toInt
static int toInt(const T &source)
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
PRINTOUT
#define PRINTOUT(STUFF)
define this to get the programs printed to stdout while they are contructed
Definition: POMGenMacros.hh:73
TTAMachine::BaseRegisterFile::width
virtual int width() const
TTAMachine::RegisterGuard::registerFile
const RegisterFile * registerFile() const
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
findRegisterFile
TTAMachine::RegisterFile & findRegisterFile(const TTAMachine::Machine &machine, std::string name)
Definition: POMGenMacros.hh:94
temporary
SimValue * temporary
Definition: POMGenMacros.hh:76
findBooleanGuard
TTAMachine::Guard & findBooleanGuard(const TTAMachine::Machine &machine, bool isInverted)
Definition: POMGenMacros.hh:343
OPERATION
#define OPERATION(OPNAME)
Definition: OSAL.hh:90
findBooleanRegisterFile
TTAMachine::RegisterFile & findBooleanRegisterFile(const TTAMachine::Machine &machine)
Definition: POMGenMacros.hh:312