OpenASIP  2.0
Static Public Member Functions | Static Private Member Functions | List of all members
Conversion Class Reference

#include <Conversion.hh>

Collaboration diagram for Conversion:
Collaboration graph

Static Public Member Functions

template<typename T >
static std::string toString (const T &source)
 
static std::string toString (double source, unsigned precision)
 
static std::string toString (bool source)
 
static std::string XMLChToString (const XMLCh *source)
 
static XMLCh * toXMLCh (const std::string &string)
 
template<typename T >
static int toInt (const T &source)
 
template<typename T >
static SLongWord toLong (const T &source)
 
static int toInt (const double &source)
 
static SLongWord toLong (const double &source)
 
template<typename T >
static unsigned int toUnsignedInt (const T &source)
 
template<typename T >
static ULongWord toUnsignedLong (const T &source)
 
template<typename T >
static double toDouble (const T &source)
 
template<typename T >
static float toFloat (const T &source)
 
static std::string toBinString (int source)
 
static std::string toBinString (double source)
 
static std::string toBinary (unsigned int source, unsigned int stringWidth=0)
 
template<typename T >
static std::string toHexString (T source, std::size_t digits=0, bool include0x=true)
 
static std::string floatToHexString (float source, bool include0x=true)
 
static std::string doubleToHexString (double source, bool include0x=true)
 
static void toRawData (const std::string &hexSource, unsigned char *target)
 

Static Private Member Functions

template<typename SourceType , typename DestType , bool destIsNumeric>
static void convert (const SourceType &source, DestType &dest)
 
static bool restWhiteSpace (std::istream &str)
 

Detailed Description

Definition at line 52 of file Conversion.hh.

Member Function Documentation

◆ convert()

template<typename SourceType , typename DestType , bool destIsNumeric>
static void Conversion::convert ( const SourceType &  source,
DestType &  dest 
)
staticprivate

◆ doubleToHexString()

std::string Conversion::doubleToHexString ( double  source,
bool  include0x = true 
)
static

Specialized version of toHexString() for double type with fixed digit count (16).

Definition at line 260 of file Conversion.cc.

260  {
261 
262  unsigned char* bytes = (unsigned char*) &source;
263  std::stringstream str;
264  if (include0x) {
265  str << "0x";
266  }
267  for (size_t i = 0; i < sizeof(double); i++) {
268 #if HOST_BIGENDIAN == 1
269  unsigned int value = (unsigned int)bytes[i];
270 #else
271  unsigned int value = (unsigned int)bytes[sizeof(double)-i-1];
272 #endif
273  value &= 0xff;
274  str << std::setfill('0') << std::setw(2) << std::hex << value;
275  }
276  return std::string(str.str());
277 }

◆ floatToHexString()

std::string Conversion::floatToHexString ( float  source,
bool  include0x = true 
)
static

Specialized version of toHexString() for float type with fixed digit count (8).

Definition at line 231 of file Conversion.cc.

232  {
233 
234  union {
235  float f;
236  int i;
237  } conv;
238 
239  conv.f = source;
240 
241  std::stringstream str;
242  str << std::setw(8) << std::setfill('0') << std::right << std::hex
243  << conv.i;
244 
245  std::string result = "";
246  str >> result;
247 
248  if (include0x) {
249  result.insert(0, "0x");
250  }
251 
252  return result;
253 }

◆ restWhiteSpace()

bool Conversion::restWhiteSpace ( std::istream &  str)
staticprivate

Returns true if rest of the stream is only white space.

Given stream is read, that is, it is not in the same state as it was before the function call.

Parameters
strThe stream to check.
Returns
True if there's no garbage in stream.

Definition at line 57 of file Conversion.cc.

57  {
58 
59  string temp = "";
60  str >> temp;
61 
62  if (!str.fail()) {
63  // if the stream contains non-white-space characters, the
64  // stream will not fail in the next read
65  return false;
66  }
67 
68  return true;
69 }

◆ toBinary()

std::string Conversion::toBinary ( unsigned int  source,
unsigned int  stringWidth = 0 
)
static

Converts an integer to the string which is in binary format.

The width of the returned string is given too. If the width is greater than required, the number is zero-extended. If the width is smaller than required, the most significant bits are reduced. If '0' is given in stringWidth, the binary string is not extended, nor reduced. This is the default value.

Parameters
sourceAn integer to be converted into a binary string.
stringWidthThe width of the returned string.
Returns
The binary string.

Definition at line 155 of file Conversion.cc.

155  {
156 
157  std::string result = "";
158  for (unsigned int i = 0; i < sizeof(unsigned int) * 8; i++) {
159 
160  if ((source & 0x80000000) != 0) {
161  result.append("1");
162  } else {
163  result.append("0");
164  }
165  source <<= 1;
166  }
167 
168  if (stringWidth == 0) {
169  string::size_type firstOne = result.find("1");
170  if (firstOne != string::npos) {
171  result = result.substr(firstOne, string::npos);
172  } else {
173  result = "0";
174  }
175  } else {
176  if (result.length() > stringWidth) {
177  result = result.substr(
178  result.length() - stringWidth, string::npos);
179  } else if (result.length() < stringWidth) {
180  int zerosToAdd = stringWidth - result.length();
181  for (int i = 0; i < zerosToAdd; i++) {
182  result.insert(0, "0");
183  }
184  }
185  }
186 
187  return result;
188 }

Referenced by SimValue::binaryValue(), FUTestbenchGenerator::createStimulusArrays(), SimValue::dump(), DefaultICGenerator::generateInputMux(), MemoryGridTable::memoryContents(), MemoryValueDialog::onOK(), portCodeBits(), printGuardFieldEncodings(), printImmediateControlField(), printSlotFieldEncodings(), printSourceFieldEncodings(), toBinString(), and TestbenchGenerator::writeStimulusArray().

◆ toBinString() [1/2]

string Conversion::toBinString ( double  source)
static

Converts a double to binary representation.

Parameters
sourceDouble to be converted.
Returns
Double as binary string.

Definition at line 95 of file Conversion.cc.

95  {
96 
97  union castUnion {
98  double d;
99  struct {int w1; int w2;} s;
100  };
101 
102  castUnion cast;
103  cast.d = source;
104 
105  std::string result = "";
106 
107  for (unsigned int i = 0; i < sizeof(int) * 8; i++) {
108 
109  if ((cast.s.w1 & 0x80000000) != 0) {
110  result.append("1");
111  } else {
112  result.append("0");
113  }
114  cast.s.w1 <<= 1;
115  }
116 
117  for (unsigned int i = 0; i < sizeof(int) * 8; i++) {
118 
119  if ((cast.s.w2 & 0x80000000) != 0) {
120  result.append("1");
121  } else {
122  result.append("0");
123  }
124  cast.s.w2 <<= 1;
125  }
126 
127  string::size_type firstOne = result.find("1");
128 
129  if (firstOne != string::npos) {
130  result = result.substr(firstOne, string::npos);
131  } else {
132  result = "0";
133  }
134 
135  result.append("b");
136 
137  return result;
138 }

◆ toBinString() [2/2]

std::string Conversion::toBinString ( int  source)
static

Converts and integer to the string which is in binary format.

Binary format includes a 'b' character at the end of the string.

Parameters
sourceAn integer to be converted into a binary string.
Returns
Returns the binary string.

Definition at line 81 of file Conversion.cc.

81  {
82  string result = toBinary(source);
83  result.append("b");
84  return result;
85 }

References toBinary().

Referenced by SimulateDialog::formattedValue(), ProximRegisterWindow::loadImmediateUnit(), ProximRegisterWindow::loadRegisterFile(), ProximPortWindow::update(), and NumberControl::update().

Here is the call graph for this function:

◆ toDouble()

template<typename T >
static double Conversion::toDouble ( const T &  source)
static

◆ toFloat()

template<typename T >
static float Conversion::toFloat ( const T &  source)
static

◆ toHexString()

template<typename T >
static std::string Conversion::toHexString ( source,
std::size_t  digits = 0,
bool  include0x = true 
)
static

◆ toInt() [1/2]

static int Conversion::toInt ( const double &  source)
static

◆ toInt() [2/2]

template<typename T >
static int Conversion::toInt ( const T &  source)
static

Referenced by MachineResourceModifier::analyzeBuses(), MachineResourceModifier::analyzeFunctionUnits(), MachineResourceModifier::analyzeRegisters(), ObjectState::boolAttribute(), ControlFlowGraph::buildMBBFromBB(), CostDatabase::buildRegisterFiles(), ConfigurationFile::checkSemantics(), CompiledSimCompiler::CompiledSimCompiler(), TPEFDisassembler::createDisassemblyElement(), llvm::LLVMTCEPOMBuilder::createFUTerminal(), TTAProgram::TPEFProgramFactory::createTerminal(), createTerminalFUPort(), TTAProgram::CodeGenerator::createTerminalRegister(), SetFUArchitectureCmd::Do(), SetRFArchitectureCmd::Do(), EPSDC::DoGetTextExtent(), BlockImplementationDialog::doOK(), CmdMem::execute(), TPEF::AOutSymbolSectionReader::finalize(), findFUPort(), TTAProgram::TPEFProgramFactory::findGuard(), SimulatorFrontend::findPort(), DataDependenceGraphBuilder::findStaticRegisters(), TDGen::getLLVMPatternWithConstants(), ProGe::NetlistTools::getUniqueInstanceName(), TTAProgram::TPEFResourceUpdater::initCache(), ObjectState::intAttribute(), DataObject::integerValue(), ConfigurationFile::intValue(), TTAProgram::ProgramAnnotation::intValue(), Operand::loadState(), MachineInfo::maxMemoryAlignment(), numbersToAscending(), InputOperandDialog::onAddSwap(), OperationDialog::onBindOperand(), OperationPropertyDialog::onDeleteInputOperand(), OperationDialog::onDeleteOperand(), OperationPropertyDialog::onDeleteOutputOperand(), InputOperandDialog::onDeleteSwap(), MemoryControl::onGoTo(), OperationPropertyDialog::onModifyInputOperand(), OperationPropertyDialog::onModifyOutputOperand(), OperationPropertyDialog::onMoveInputDown(), OperationPropertyDialog::onMoveInputUp(), OperationPropertyDialog::onMoveOutputDown(), OperationPropertyDialog::onMoveOutputUp(), CostEstimationDataDialog::onOK(), OperationDialog::onOperandSelection(), OperationPropertyDialog::onSelection(), NumberControl::onText(), SimulateDialog::onUpdateValue(), MemoryControl::onWriteMemory(), HDBBrowserWindow::openLink(), MachineResourceModifier::percentualFUIncrease(), MachineResourceModifier::percentualRegisterIncrease(), ProGe::VHDLNetlistWriter::portSignalType(), ProGe::VerilogNetlistWriter::portSignalType(), ProGe::NetlistPort::resolveRealWidth(), InlineAsmParser::substituteAsmString(), ConfigurationFile::timeStampValue(), toRawData(), OperationPropertyDialog::updateSwapLists(), TDGenerator::ValueType::valueType(), ProGe::VHDLNetlistWriter::writeComponentDeclarations(), ProGe::VHDLNetlistWriter::writePortDeclaration(), and ProGe::VerilogNetlistWriter::writePortDeclaration().

◆ toLong() [1/2]

static SLongWord Conversion::toLong ( const double &  source)
static

◆ toLong() [2/2]

template<typename T >
static SLongWord Conversion::toLong ( const T &  source)
static

◆ toRawData()

void Conversion::toRawData ( const std::string &  hexSource,
unsigned char *  target 
)
static

Converts bytes of a string hexadecimal value to target buffer.

Hex value can be in "0x" format or without the prefix. Caller is responsible for checking that the target buffer has enough allocated memory for conversion.

Parameters
sourceHex value.
targetBuffer where hex value bits are converted to.

Definition at line 201 of file Conversion.cc.

201  {
202  std::string hexValue = hexSource;
203  std::stringstream hexStream;
204  hexStream << hexSource;
205  char first = hexStream.get();
206  char second = hexStream.get();
207 
208  if (first == '0' && second == 'x') {
209  hexValue = hexSource.substr(2); // remove "0x"
210  }
211 
212  // if number of hex numbers is uneven (e.g "12345FA"), insert additional
213  // 0 to the front so that the hex numbers form N full bytes
214  if (hexValue.size() % 2 == 1) {
215  hexValue.insert(0, "0");
216  }
217 
218  // start filling the input parameter 2 hex numbers (byte) at a time to
219  // the data buffer
220  for (size_t i = 0; i < hexValue.size(); i=i+2) {
221  *target = toInt("0x" + hexValue.substr(i, 2));
222  ++target;
223  }
224 }

References toInt().

Referenced by SimValue::setValue().

Here is the call graph for this function:

◆ toString() [1/3]

static std::string Conversion::toString ( bool  source)
static

◆ toString() [2/3]

template<typename T >
static std::string Conversion::toString ( const T &  source)
static

Referenced by AddFUFromHDBDialog::acceptToList(), ProGe::NetlistGenerator::addBaseRFToNetlist(), ExecutionTrace::addBusActivity(), HDB::HDBManager::addBusCostEstimationData(), ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), ExecutionTrace::addBusWriteCount(), ExecutionTrace::addConcurrentRegisterFileAccessCount(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostEstimationData(), DSDBManager::addCycleCount(), DSDBManager::addEnergyEstimate(), ControlFlowGraph::addExit(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUCostEstimationData(), HDB::HDBManager::addFUExternalPortsToImplementation(), HDB::HDBManager::addFUImplementation(), ExecutionTrace::addFunctionUnitOperationTriggerCount(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::NetlistGenerator::addGCUToNetlist(), DefaultDecoderGenerator::addGlockPortToDecoder(), DefaultICGenerator::addICToNetlist(), DSDBManager::addImplementation(), ExecutionTrace::addInstructionExecutionCount(), ProGe::ProcessorWrapperBlock::addInstructionMemory(), DefaultDecoderGenerator::addLockReqPortToDecoder(), AlteraMemGenerator::addMemory(), CodeSectionCreator::addMove(), VectorLSGenerator::addOperation(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), AlmaIFIntegrator::addPortToAlmaIFBlock(), ExecutionTrace::addProcedureAddressRange(), ComponentAdder::addRegisterFiles(), MemorySystem::addressSpace(), TPEFDumper::addressSpaceString(), HDB::HDBManager::addRFArchitecture(), HDB::HDBManager::addRFCostEstimationData(), HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFImplementation(), HDB::HDBManager::addSocketCostEstimationData(), ExecutionTrace::addSocketWriteCount(), ADFCombiner::ADFCombiner(), TDGen::analyzeMachineRegisters(), TDGen::analyzeMachineVectorRegisterClasses(), DSDBManager::applicationPath(), DSDBManager::archConfigurationIDs(), DSDBManager::architectureString(), DSDBManager::areaEstimate(), IUResource::assign(), SimpleBrokerDirector::assign(), ExecutionPipelineResource::assignDestination(), ObjectState::attribute(), AlmaIFIntegrator::axiAddressWidth(), CompiledSimSymbolGenerator::basicBlockSymbol(), DefaultICGenerator::busAltSignal(), DefaultDecoderGenerator::busCntrlSignalPinOfSocket(), HDB::HDBManager::busCostEstimationData(), HDB::HDBManager::busCostEstimationDataIDs(), HDB::HDBManager::busCostEstimationDataList(), HDB::HDBManager::busEntryByIDQuery(), DefaultICGenerator::busMuxDataPort(), DefaultICGenerator::busWidthGeneric(), HDB::HDBManager::canRemoveFUArchitecture(), HDB::HDBManager::canRemoveRFArchitecture(), POMValidator::checkCompiledSimulatability(), POMValidator::checkConnectivity(), CopyingDelaySlotFiller::checkImmediatesAfter(), POMValidator::checkLongImmediates(), RegisterQuantityCheck::checkPredRegs(), POMValidator::checkSimulatability(), ObjectState::child(), CopyingDelaySlotFiller::collectMoves(), Assembler::compile(), CompiledSimulation::compileAndLoadFunction(), CompiledSimCompiler::compileDirectory(), DefaultDecoderGenerator::completeDecoderBlock(), ComponentAdder::ComponentAdder(), DSDBManager::configuration(), AlmaIFIntegrator::connectCoreMemories(), OperationDAGBuilder::connectOperandToNode(), ADFCombiner::connectRegisterFiles(), ADFCombiner::connectVectorLSU(), TDGen::constantNodeString(), DataDependenceGraphBuilder::constructIndividualBB(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), HDB::HDBManager::containsFUArchitecture(), HDB::HDBManager::containsRFArchitecture(), GUIOptionsSerializer::convertToConfigFileFormat(), HDB::HDBManager::costEstimationData(), HDB::HDBManager::costEstimationDataValue(), HDB::HDBManager::costFunctionPluginByID(), HDB::HDBManager::costFunctionPluginDataIDs(), TTAProgram::ProgramWriter::createBinary(), BlocksConnectIC::createBus(), VLIWConnectIC::createBus(), TTAProgram::ProgramWriter::createCodeSection(), TDGen::createConstantMaterializationPatterns(), ControlFlowGraph::createControlFlowEdge(), HDB::HDBManager::createCostEstimatioDataIdsQuery(), HDB::HDBManager::createCostFunctionOfFU(), HDB::HDBManager::createCostFunctionOfRF(), OperationDAGConverter::createDAG(), BBSchedulerController::createDDGFromBB(), TPEFDisassembler::createDisassemblyElement(), TPEF::Section::createSection(), FullyConnectedCheck::createSocket(), TTAProgram::TPEFProgramFactory::createTerminal(), VectorLSGenerator::createVectorLSU(), DSDBManager::cycleCount(), TDGen::dagNodeToString(), TTAProgram::DataMemory::dataDefinition(), DataDependenceGraphBuilder::DataDependenceGraphBuilder(), TTAProgram::Program::dataMemory(), DefaultICGenerator::dataWidthGeneric(), DefaultICDecoderEstimator::delayOfBus(), DefaultICDecoderEstimator::delayOfSocket(), SchedulingResource::dependentResource(), Breakpoint::description(), StopPoint::description(), determineLongest(), POMDisassembler::disassemble(), SimulatorFrontend::disassembleInstruction(), AddIUCmd::Do(), AddBusCmd::Do(), AddFUCmd::Do(), AddRFCmd::Do(), AddSocketCmd::Do(), AddASCmd::Do(), AddBridgeCmd::Do(), ProximBusDetailsCmd::Do(), ProximFUDetailsCmd::Do(), ProximIUDetailsCmd::Do(), ProximSocketDetailsCmd::Do(), ProximRFDetailsCmd::Do(), SimValue::dump(), OperationPimpl::emulationFunctionName(), DSDBManager::energyEstimate(), UniversalFunctionUnit::ensureInputPorts(), UniversalFunctionUnit::ensureOutputPorts(), StrictMatchRFEstimator::estimateEnergy(), InterpolatingRFEstimator::estimateEnergy(), DefaultICDecoderEstimator::estimateICArea(), DefaultICDecoderEstimator::estimateICEnergy(), Evaluate::Evaluate(), Exception::Exception(), InfoRegistersCommand::execute(), CmdMem::execute(), InfoImmediatesCommand::execute(), InfoProcCommand::execute(), VLIWConnectIC::explore(), GrowMachine::explore(), ADFCombiner::explore(), FrequencySweepExplorer::explore(), IPXactModel::extractSignals(), TPEFDumper::fileHeaders(), OperationDAGBuilder::finalize(), LabelManager::finalize(), TTAProgram::TPEFProgramFactory::findAddressSpace(), OperationDAGSelector::findDags(), TTAProgram::TPEFProgramFactory::findGuard(), TTAProgram::TPEFProgramFactory::findInstrTemplate(), TTAProgram::TPEFProgramFactory::findPort(), TTAProgram::ProgramWriter::findSection(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), SimulateDialog::formattedValue(), FrequencySweepExplorer::FrequencySweepExplorer(), HDB::HDBManager::fuArchitectureByIDQuery(), HDB::HDBManager::fuArchitectureID(), HDBBrowserWindow::fuArchLabel(), HDB::HDBManager::fuByEntryID(), HDB::HDBManager::fuCostEstimationData(), HDB::HDBManager::fuCostEstimationDataIDs(), HDB::HDBManager::fuEntriesByArchitecture(), HDB::HDBManager::fuEntryByIDQuery(), HDB::HDBManager::fuEntryHasArchitecture(), HDB::HDBManager::fuEntryIDOfImplementation(), HDB::HDBManager::fuExternalPortsByIDQuery(), HDB::HDBManager::fuImplementationByIDQuery(), HDB::HDBManager::fuImplementationDataPortsByIDQuery(), HDB::HDBManager::fuImplementationParametersByIDQuery(), MachineResourceManager::functionUnitPortResource(), HDB::HDBManager::fuPortBindingByNameQuery(), HDB::HDBManager::fuPortsAndBindingsByIDQuery(), CompiledSimulation::FUPortValue(), HDB::HDBManager::fuSourceFilesByIDQuery(), ProGeTestBenchGenerator::generate(), DefaultICDecoderGenerator::generate(), CompiledSimCodeGenerator::generateLoadTrigger(), CostDBEntryStatsRF::generateReadWriteString(), CompiledSimSymbolGenerator::generateTempVariable(), CompiledSimCodeGenerator::generateTriggerCode(), TDGen::genTCETargetLoweringSIMD_getSetCCResultVT(), OperationDAGBuilder::getBinding(), DisassemblyGridTable::GetColLabelValue(), ProDeIUEditPolicy::getCommand(), ProDeBusEditPolicy::getCommand(), ProDeRFEditPolicy::getCommand(), ADFCombiner::getNodeComponentName(), CompiledSimulation::getSimulateFunction(), ProGe::NetlistTools::getUniqueInstanceName(), OperationDAGBuilder::getVariableName(), GrowMachine::GrowMachine(), CompiledSimSymbolGenerator::guardBoolSymbol(), CompiledSimCodeGenerator::guardPipelineTopSymbol(), DefaultDecoderGenerator::guardPortName(), DataDependenceGraph::guardRenamed(), DOMBuilderErrorHandler::handleError(), ProcessorConfigurationFile::handleError(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), DSDBManager::hasApplication(), DSDBManager::hasArchitecture(), DSDBManager::hasConfiguration(), HDB::HDBManager::hasCostEstimationDataByID(), HDB::HDBManager::hasCostFunctionPluginByID(), DSDBManager::hasCycleCount(), DSDBManager::hasEnergyEstimate(), DSDBManager::hasImplementation(), TTAProgram::Instruction::immediate(), ImmediateGenerator::ImmediateGenerator(), TDGen::immediatePredicate(), TTAProgram::Instruction::immediatePtr(), CompiledSimulation::immediateUnitRegisterValue(), DSDBManager::implementationString(), MachineResourceModifier::increaseAllFUsThatDiffersByAmount(), MachineResourceModifier::increaseAllRFsThatDiffersByAmount(), AlmaIFIntegrator::initAlmaifBlock(), TclInterpreter::initialize(), DefaultICGenerator::inputMuxEntityName(), DefaultICGenerator::inputSocketBusPort(), TTAProgram::CodeSnippet::instructionAt(), TTAProgram::Program::instructionAt(), DefaultDecoderGenerator::instructionTemplateCondition(), HDB::HDBManager::ioUsageDataByIDQuery(), TTAMachine::Machine::isRISCVMachine(), DSDBManager::isUnschedulable(), CompiledSimSymbolGenerator::jumpTargetSetterSymbol(), POMDisassembler::label(), TTAMachine::RegisterGuard::loadState(), DSDBManager::longestPathDelayEstimate(), main(), llvm::LLVMTCEBuilder::mbbName(), MemorySystem::memory(), Memory::Memory(), MemoryGridTable::memoryContents(), MinimalOpSet::MinimalOpSet(), MinimizeMachine::MinimizeMachine(), HDB::HDBManager::modifyCostEstimationData(), HDB::HDBManager::modifyCostFunctionPlugin(), TTAProgram::Instruction::move(), TTAProgram::Program::moveAt(), CompiledSimSymbolGenerator::moveOperandSymbol(), TTAProgram::Instruction::movePtr(), DataDependenceGraph::nodeOfMove(), AddressSpacesDialog::onAdd(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), AddFUFromHDBDialog::onAdd(), GCUDialog::onAddFUPort(), GCUDialog::onAddOperation(), FUDialog::onAddOperation(), RFDialog::onAddPort(), FUDialog::onAddPort(), IUDialog::onAddPort(), GCUDialog::onAddSRPort(), AddBreakpointDialog::onOK(), WatchPropertiesDialog::onOK(), AddWatchDialog::onOK(), BreakpointPropertiesDialog::onOK(), SimulatorSettingsDialog::onOK(), ProximDisassemblyWindow::onRightClick(), ProximDisassemblyWindow::onRunUntil(), ProximDisassemblyWindow::onSetBreakpoint(), ProximDisassemblyWindow::onSetTempBp(), HDB::HDBManager::opcodesByIDQuery(), TTAProgram::TPEFResourceUpdater::operand(), operandBindingsString(), TDGen::operandToString(), TDGen::operationNodeToString(), TCEString::operator+(), TCEString::operator<<(), DefaultICGenerator::outputSocketBusPort(), DefaultICGenerator::outputSocketDataPort(), DefaultICGenerator::outputSocketEntityName(), ProGe::Parameter::Parameter(), MachineResourceModifier::percentualFUIncrease(), MachineResourceModifier::percentualRegisterIncrease(), ProGe::BaseNetlistBlock::portBy(), DefaultDecoderGenerator::portCodeCondition(), ProGe::VerilogNetlistWriter::portSignalName(), ProGe::VerilogNetlistWriter::portSignalType(), ProGe::NetlistVisualization::portWidthToString(), TTAProgram::Program::procedure(), DataDependenceGraphBuilder::processGuard(), ProgramDependenceGraph::processRegion(), SimulatorFrontend::programLocationDescription(), TPEF::TPEFDebugSectionReader::readData(), InfoRegistersCommand::registerDescription(), MachineResourceManager::registerFileIndexReference(), SimulationController::registerFileValue(), CompiledSimController::registerFileValue(), CompiledSimulation::registerFileValue(), SchedulingResource::relatedResource(), DSDBManager::removeApplication(), HDB::HDBManager::removeBusEntry(), DSDBManager::removeConfiguration(), HDB::HDBManager::removeCostEstimationData(), HDB::HDBManager::removeCostFunctionPlugin(), HDB::HDBManager::removeFUArchitecture(), HDB::HDBManager::removeFUEntry(), HDB::HDBManager::removeFUImplementation(), HDB::HDBManager::removeRFArchitecture(), HDB::HDBManager::removeRFEntry(), HDB::HDBManager::removeRFImplementation(), HDB::HDBManager::removeSocketEntry(), RemoveUnconnectedComponents::RemoveUnconnectedComponents(), Texts::TextGenerator::replaceText(), TTAProgram::Program::replaceUniversalAddressSpaces(), CompiledSimController::reset(), DataSectionCreator::resolveDataAreaSizesAndLabelAddresses(), LabelManager::resolveExpressionValue(), MachineResourceManager::resourceID(), TPEF::TPEFTools::resourceName(), HDB::HDBManager::resourceUsageDataByIDQuery(), HDB::HDBManager::rfArchitectureByIDQuery(), HDB::HDBManager::rfArchitectureID(), HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfCostEstimationData(), HDB::HDBManager::rfCostEstimationDataIDs(), HDB::HDBManager::rfEntriesByArchitecture(), HDB::HDBManager::rfEntryByIDQuery(), HDB::HDBManager::rfEntryHasArchitecture(), HDB::HDBManager::rfEntryIDOfImplementation(), HDB::HDBManager::rfExternalPortsByIDQuery(), HDB::HDBManager::rfImplementationByIDQuery(), HDB::HDBManager::rfImplementationByIDQuery2(), HDB::HDBManager::rfImplementationDataPortsByIDQuery(), HDB::HDBManager::rfImplementationParametersByIDQuery(), DefaultDecoderGenerator::rfOpcodeFromSrcOrDstField(), MachineResourceManager::rFPortOrFUIndexReference(), HDB::HDBManager::rfSourceFilesByIDQuery(), DataDependenceEdge::saveState(), BasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), TPEFDumper::section(), TPEFDumper::sectionHeader(), TPEFDumper::sectionString(), HDB::HDBManager::setArchitectureForFU(), HDB::HDBManager::setArchitectureForRF(), DSDBManager::setAreaEstimate(), ObjectState::setAttribute(), TPEF::DataSection::setByte(), HDB::HDBManager::setCostFunctionPluginForFU(), HDB::HDBManager::setCostFunctionPluginForRF(), TTAProgram::ProgramAnnotation::setIntValue(), DSDBManager::setLongestPathDelayEstimate(), SOPCInterface::setProperty(), ExecutionTrace::setSimulatedCycleCount(), llvm::TCETargetMachine::setTargetMachinePlugin(), DSDBManager::setUnschedulable(), SimpleICOptimizer::SimpleICOptimizer(), HDB::HDBManager::socketCostEstimationData(), HDB::HDBManager::socketCostEstimationDataIDs(), HDB::HDBManager::socketCostEstimationDataList(), DefaultDecoderGenerator::socketEncodingCondition(), HDB::HDBManager::socketEntryByIDQuery(), DefaultICGenerator::socketFileName(), BFRegCopyAfter::splitMove(), BFRegCopyBefore::splitMove(), FiniteStateAutomaton::stateName(), DataObject::stringValue(), TPEFDumper::symbolString(), TDGen::tceOperationPattern(), Texts::TextGenerator::text(), FiniteStateAutomaton::toDotString(), TesterContext::toOutputFormat(), DisassemblyFPRegister::toString(), DisassemblyIntRegister::toString(), DisassemblyImmediate::toString(), DisassemblyOperand::toString(), DisassemblyImmediateRegister::toString(), DisassemblyFUOperand::toString(), OperationDAGEdge::toString(), GraphNode::toString(), DisassemblyImmediateAssignment::toString(), ConstantNode::toString(), TerminalNode::toString(), GraphEdge::toString(), TTAMachine::ResourceVector::toString(), DataDependenceEdge::toString(), ProgramDependenceNode::toString(), EntryKeyDataInt::toString(), ControlDependenceNode::toString(), IndexTerm::toString(), EntryKeyDataDouble::toString(), MoveNode::toString(), ProgramOperation::toString(), WxConversion::toWxString(), KeyboardShortcutDialog::TransferDataToWindow(), OptionsDialog::TransferDataToWindow(), BusResource::unassign(), ExecutionPipelineResource::unassignDestination(), HDB::HDBManager::unsetArchitectureForFU(), HDB::HDBManager::unsetArchitectureForRF(), HDB::HDBManager::unsetCostFunctionPluginForFU(), HDB::HDBManager::unsetCostFunctionPluginForRF(), FUImplementationDialog::update(), NumberControl::update(), TTAMachine::FUPort::updateBindingString(), CompiledSimCodeGenerator::updateDeclaredSymbolsList(), OperationPropertyDialog::updateOperands(), GCUDialog::updatePortList(), FUDialog::updatePortList(), OperationPropertyDialog::updateSwapLists(), GUIOptions::validate(), TDGenerator::ValueType::valueTypeStr(), VectorLSGenerator::VectorLSGenerator(), DefaultDecoderGenerator::verifyCompatibility(), DefaultICDecoderGenerator::verifyCompatibility(), TDGen::write16bitRegisterInfo(), TDGen::write1bitRegisterInfo(), TDGen::write32bitRegisterInfo(), TDGen::write64bitRegisterInfo(), DefaultICGenerator::writeBusDumpCode(), ProGe::VHDLNetlistWriter::writeConnection(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), DefaultDecoderGenerator::writeControlRulesOfRFWritePort(), DataSectionCreator::writeDataLineToTPEF(), DefaultDecoderGenerator::writeGlockMapping(), DefaultDecoderGenerator::writeInstructionDecoder(), TDGen::writeIntegerImmediateDefs(), DefaultICGenerator::writeInterconnectionNetwork(), OperationDAGConverter::writeNode(), ProGe::VHDLNetlistWriter::writePortMappings(), ProGe::VerilogNetlistWriter::writeSignalAssignments(), DataDependenceGraph::writeToXMLFile(), ProGe::CUOpcodeGenerator::WriteVerilogOpcodePackage(), ProGe::CUOpcodeGenerator::WriteVhdlOpcodePackage(), and XilinxBlockRamGenerator::XilinxBlockRamGenerator().

◆ toString() [3/3]

static std::string Conversion::toString ( double  source,
unsigned  precision 
)
static

◆ toUnsignedInt()

template<typename T >
static unsigned int Conversion::toUnsignedInt ( const T &  source)
static

◆ toUnsignedLong()

template<typename T >
static ULongWord Conversion::toUnsignedLong ( const T &  source)
static

◆ toXMLCh()

static XMLCh* Conversion::toXMLCh ( const std::string &  string)
static

◆ XMLChToString()

static std::string Conversion::XMLChToString ( const XMLCh *  source)
static

The documentation for this class was generated from the following files:
Conversion::toBinary
static std::string toBinary(unsigned int source, unsigned int stringWidth=0)
Definition: Conversion.cc:155
Conversion::toInt
static int toInt(const T &source)