diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-01-28 07:24:01 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-01-28 07:24:01 -0800 |
commit | c3d41a2def15cdaf2ac3984315f452dacc6a0884 (patch) | |
tree | 5324ebec3add54b934a841eee901983ac3463a7f /src/cpu/thread_state.hh | |
parent | da2a4acc26ba264c3c4a12495776fd6a1c4fb133 (diff) | |
parent | 4acca8a0536d4445ed25b67edf571ae460446ab9 (diff) | |
download | gem5-c3d41a2def15cdaf2ac3984315f452dacc6a0884.tar.xz |
Merge with the main repo.
--HG--
rename : src/mem/vport.hh => src/mem/fs_translating_port_proxy.hh
rename : src/mem/translating_port.cc => src/mem/se_translating_port_proxy.cc
rename : src/mem/translating_port.hh => src/mem/se_translating_port_proxy.hh
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r-- | src/cpu/thread_state.hh | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 972ca895d..30bb64ed7 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -49,8 +49,9 @@ namespace TheISA { }; class Checkpoint; -class Port; -class TranslatingPort; +class PortProxy; +class SETranslatingPort; +class FSTranslatingPort; /** * Struct for holding general thread state that is needed across CPU @@ -83,11 +84,13 @@ struct ThreadState { Tick readLastSuspend() { return lastSuspend; } - void connectPhysPort(); - - void connectVirtPort(ThreadContext *tc); - - void connectMemPorts(ThreadContext *tc); + /** + * Initialise the physical and virtual port proxies and tie them to + * the data port of the CPU. + * + * tc ThreadContext for the virtual-to-physical translation + */ + void initMemProxies(ThreadContext *tc); void dumpFuncProfile(); @@ -99,17 +102,13 @@ struct ThreadState { TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; } - Process *getProcessPtr() { return process; } - - TranslatingPort *getMemPort(); + PortProxy* getPhysProxy() { return physProxy; } - void setMemPort(TranslatingPort *_port) { port = _port; } + FSTranslatingPortProxy* getVirtProxy() { return virtProxy; } - VirtualPort *getVirtPort() { return virtPort; } - - FunctionalPort *getPhysPort() { return physPort; } + Process *getProcessPtr() { return process; } - void setPhysPort(FunctionalPort *port) { physPort = port; } + SETranslatingPortProxy* getMemProxy(); /** Reads the number of instructions functionally executed and * committed. @@ -128,9 +127,6 @@ struct ThreadState { void setStatus(Status new_status) { _status = new_status; } public: - /** Connects port to the functional port of the memory object - * below the CPU. */ - void connectToMemFunc(Port *port); /** Number of instructions committed. */ Counter numInst; @@ -177,15 +173,14 @@ struct ThreadState { protected: Process *process; - TranslatingPort *port; - - /** A functional port, outgoing only, for functional accesse to virtual - * addresses. */ - VirtualPort *virtPort; - - /** A functional port outgoing only for functional accesses to physical + /** A port proxy outgoing only for functional accesses to physical * addresses.*/ - FunctionalPort *physPort; + PortProxy *physProxy; + + /** A translating port proxy, outgoing only, for functional + * accesse to virtual addresses. */ + FSTranslatingPortProxy* virtProxy; + SETranslatingPortProxy* proxy; public: /* |