OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
TTAProgram::Address Class Reference

#include <Address.hh>

Inheritance diagram for TTAProgram::Address:
Inheritance graph
Collaboration diagram for TTAProgram::Address:
Collaboration graph

Public Member Functions

 Address (InstructionAddress location, const TTAMachine::AddressSpace &space)
 
 ~Address ()
 
InstructionAddress location () const
 
const TTAMachine::AddressSpacespace () const
 
bool operator== (const Address &other) const
 
bool operator!= (const Address &other) const
 
bool operator< (const Address &addr) const
 

Private Attributes

InstructionAddress location_
 The location identified by the address. More...
 
const TTAMachine::AddressSpacespace_
 The address space of the address. More...
 

Detailed Description

An address in the target memory system of the TTA program.

An address is a number that identifies a location in an address space. An address can point to a location of data memory, instruction memory or unified memory.

Definition at line 51 of file Address.hh.

Constructor & Destructor Documentation

◆ Address()

TTAProgram::Address::Address ( InstructionAddress  location,
const TTAMachine::AddressSpace space 
)

◆ ~Address()

TTAProgram::Address::~Address ( )

Member Function Documentation

◆ location()

InstructionAddress TTAProgram::Address::location ( ) const

Referenced by TTAProgram::DataMemory::addDataDefinition(), StaticProgramAnalyzer::addProgram(), TTAProgram::Procedure::address(), TTAProgram::CodeSnippet::address(), TTAProgram::Instruction::address(), SimProgramBuilder::build(), TTAProgram::TPEFProgramFactory::build(), CompiledSimUtilizationStats::calculate(), SimulationStatistics::calculate(), POMValidator::checkCompiledSimulatability(), POMValidator::checkConnectivity(), POMValidator::checkLongImmediates(), POMValidator::checkSimulatability(), TTAProgram::Scope::codeLabel(), TTAProgram::Scope::codeLabelCount(), ControlFlowGraph::computeLeadersFromJumpSuccessors(), ControlFlowGraph::computeLeadersFromRefManager(), ControlFlowGraph::computeLeadersFromRelocations(), TTAProgram::Program::convertSymbolRef(), TTAProgram::Procedure::copy(), TTAProgram::BasicBlock::copy(), TTAProgram::GlobalScope::copyAndRelocate(), ProcedurePass::copyCfgToProcedure(), TTAProgram::Program::copyDataMemoriesFrom(), TTAProgram::Program::copyFrom(), SequentialScheduler::createBasicBlocks(), ControlFlowGraph::createBBEdges(), TTAProgram::ProgramWriter::createBinary(), ControlFlowGraph::createBlock(), TTAProgram::ProgramWriter::createCodeSection(), ControlFlowGraph::createControlFlowEdge(), TTAProgram::TPEFProgramFactory::createDataMemories(), TTAProgram::ProgramWriter::createDataSections(), ControlFlowGraph::createJumps(), TTAProgram::ProgramWriter::createRelocSections(), SimulatorFrontend::currentProcedure(), TTAProgram::DataMemory::dataDefinition(), TTAProgram::DataMemory::dataDefinitionsEnd(), TTAProgram::Scope::dataLabel(), TTAProgram::Scope::dataLabelCount(), POMDisassembler::destinationLabels(), ControlFlowGraph::directJump(), ProgramDependenceGraph::disassemble(), POMDisassembler::disassemble(), SimulatorFrontend::disassembleInstruction(), POMDisassembler::disassembleProcedure(), POMDisassembler::disassembleProgram(), TTAProgram::CodeSnippet::endAddress(), TTAProgram::TerminalAddress::equals(), SymbolAddressCommand::execute(), DisassembleCommand::execute(), TTAProgram::Program::finalize(), ControlFlowGraph::findNextIndex(), TTASimulationController::findProgramExitPoints(), TTAProgram::ProgramWriter::findSection(), SimulatorFrontend::finishSimulation(), TTAProgram::Program::fixInstructionReferences(), CompiledSimCodeGenerator::generateInstruction(), DisassemblyGridTable::GetNumberRows(), TTAProgram::GlobalScope::globalCodeLabel(), TTAProgram::GlobalScope::globalCodeLabelCount(), TTAProgram::GlobalScope::globalDataLabel(), TTAProgram::GlobalScope::globalDataLabelCount(), ProcedureTransferTracker::handleEvent(), RFAccessTracker::handleEvent(), AbsoluteToRelativeJumps::handleProcedure(), ControlFlowGraph::indirectJump(), SimulatorFrontend::initializeDataMemories(), TTAProgram::CodeSnippet::instructionAt(), TTAProgram::Program::instructionCount(), DisassemblyGridTable::loadProgram(), main(), TTAProgram::DataDefinition::MAU(), TTAProgram::Program::moveProcedure(), TTAProgram::CodeSnippet::nextInstruction(), TTAProgram::Program::nextInstruction(), SimControlLanguageCommand::parseInstructionAddressExpression(), TTAProgram::CodeSnippet::previousInstruction(), POMDisassembler::printAddress(), SimulatorFrontend::programLocationDescription(), TTAProgram::Procedure::remove(), TTAProgram::Program::removeProcedure(), TTAProgram::Program::replaceUniversalAddressSpaces(), CompiledSimController::reset(), TTAProgram::DataMemory::setAddressSpace(), TTAProgram::GlobalScope::setDataLabelAddressSpace(), SimControlLanguageCommand::setMemoryAddress(), TTAProgram::Program::setStartAddress(), POMDisassembler::startAddress(), DisasmTopCountAttrProvider::updateTopCountTable(), TTAProgram::InstructionReferenceManager::validate(), and TTAProgram::TerminalBasicBlockReference::value().

◆ operator!=()

bool TTAProgram::Address::operator!= ( const Address other) const

Definition at line 46 of file Address.cc.

46  {
47  return !this->operator==(other);
48 }

References operator==().

Here is the call graph for this function:

◆ operator<()

bool TTAProgram::Address::operator< ( const Address addr) const
inline

Definition at line 63 of file Address.hh.

63  {
64  if (location_ < addr.location_) return true;
65  if (location_ > addr.location_) return false;
66 
67  // The location is equal.
68 
69  if (space_ < addr.space_) return true;
70 
71  return false;
72  }

References location_, and space_.

◆ operator==()

bool TTAProgram::Address::operator== ( const Address other) const

Definition at line 40 of file Address.cc.

40  {
41  return this->location_ == other.location_
42  && *this->space_ == *other.space_;
43 }

References location_, and space_.

Referenced by operator!=().

◆ space()

const TTAMachine::AddressSpace& TTAProgram::Address::space ( ) const

Member Data Documentation

◆ location_

InstructionAddress TTAProgram::Address::location_
private

The location identified by the address.

Definition at line 76 of file Address.hh.

Referenced by operator<(), and operator==().

◆ space_

const TTAMachine::AddressSpace* TTAProgram::Address::space_
private

The address space of the address.

Definition at line 78 of file Address.hh.

Referenced by operator<(), and operator==().


The documentation for this class was generated from the following files:
TTAProgram::Address::operator==
bool operator==(const Address &other) const
Definition: Address.cc:40
TTAProgram::Address::location_
InstructionAddress location_
The location identified by the address.
Definition: Address.hh:76
TTAProgram::Address::space_
const TTAMachine::AddressSpace * space_
The address space of the address.
Definition: Address.hh:78