CPUComponent.h Source File
Back to the index.
Go to the documentation of this file.
56 CPUComponent(
const string& className,
const string& cpuKind);
65 return m_symbolRegistry;
69 return m_symbolRegistry;
83 const string& methodName,
84 const vector<string>& arguments);
128 uint64_t
Unassemble(
int nRows,
bool indicatePC, uint64_t vaddr, ostream& output);
158 ss.flags(std::ios::hex | std::ios::showbase);
186 bool LookupAddressDataBus(
GXemul* gxemul = NULL);
235 #endif // CPUCOMPONENT_H
bool m_showFunctionTraceReturn
SymbolRegistry & GetSymbolRegistry()
Gets a reference to the CPU's symbol registry.
virtual bool MethodMayBeReexecutedWithoutArgs(const string &methodName) const
Returns whether a method name may be re-executed without args.
uint64_t Unassemble(int nRows, bool indicatePC, uint64_t vaddr, ostream &output)
int32_t m_functionCallTraceDepth
virtual AddressDataBus * AsAddressDataBus()
Returns the component's AddressDataBus interface, if any.
virtual bool PreRunCheckForComponent(GXemul *gxemul)
Checks the state of this component, before starting execution.
virtual int FunctionTraceArgumentCount()
AddressDataBus * m_addressDataBus
virtual size_t DisassembleInstruction(uint64_t vaddr, vector< string > &result)=0
Disassembles an instruction into readable strings.
virtual bool FunctionTraceReturnImpl(int64_t &retval)
virtual void FlushCachedStateForComponent()
Resets the cached state of this component.
virtual bool VirtualToPhysical(uint64_t vaddr, uint64_t &paddr, bool &writable)=0
Virtual to physical address translation (MMU).
virtual void GetMethodNames(vector< string > &names) const
Retrieves a component's implemented method names.
A registry for loaded symbols.
virtual double GetCurrentFrequency() const
Returns the current frequency (in Hz) that the component runs at.
int64_t m_nrOfTracedFunctionCalls
bool FunctionTraceReturn()
CPUComponent(const string &className, const string &cpuKind)
Constructs a CPUComponent.
static void RunUnitTests(int &nSucceeded, int &nFailures)
virtual bool WriteData(const uint8_t &data, Endianness endianness)
Writes 8-bit data to the currently selected address.
virtual int64_t FunctionTraceArgument(int n)
A Component is a node in the configuration tree that makes up an emulation setup.
Base class for unit testable classes.
virtual string VirtualAddressAsString(uint64_t vaddr)
Format a virtual address as a displayable string.
virtual bool ReadData(uint8_t &data, Endianness endianness)
Reads 8-bit data from the currently selected address.
uint64_t m_lastUnassembleVaddr
const SymbolRegistry & GetSymbolRegistry() const
virtual void ExecuteMethod(GXemul *gxemul, const string &methodName, const vector< string > &arguments)
Executes a method on the component.
virtual CPUComponent * AsCPUComponent()
Returns the component's CPUComponent interface.
An interface for implementing components that read/write data via an address bus.
virtual uint64_t PCtoInstructionAddress(uint64_t pc)
Convert PC value to instuction address.
bool m_showFunctionTraceCall
virtual void ShowRegisters(GXemul *gxemul, const vector< string > &arguments) const
virtual void ResetState()
Resets the state variables of this component.
uint64_t m_delaySlotTarget
bool m_exceptionOrAbortInDelaySlot
virtual void AddressSelect(uint64_t address)
Place an address on the bus.
A base-class for processors Component implementations.
Generated on Tue Aug 25 2020 19:25:06 for GXemul by
1.8.18