NVMain运行机制深入了解之一

来源:互联网 发布:打车软件数据流图 编辑:程序博客网 时间:2024/04/27 23:15

通过看NVMain的类实现,很多类都继承了NVMObject

这里把NVMObject阅读一下,下面是我提取出来的继承了NVMObject的类之间根据AddChild函数调用关系排序。

TraceMain --> NVMain --> MemoryController --> Interconnect --> RankFactory --> BankFactory --> SubArray -->EnduranceModelFactory||DataEncoderFactory

首先每个NVMObject都包含的有:

私有对象:

  protected:    NVMObject_hook *parent;    AddressTranslator *decoder;    Stats *stats;    Params *p;    std::string statName;    std::vector<NVMObject_hook *> children;    std::vector<NVMObject *> *hooks;    EventQueue *eventQueue;    GlobalEventQueue *globalEventQueue;    std::ostream *debugStream;    TagGenerator *tagGen;    HookType hookType, currentHookType;    void AddHookUnique( std::vector<NVMObject *>& list, NVMObject *hook );    ncycle_t MAX( const ncycle_t, const ncycle_t );    ncycle_t MIN( const ncycle_t, const ncycle_t );

NVMObject_hook包含了指向parent的类AddressTranslator负责进行物理地址和对应结构地址的翻译工作。<pre name="code" class="cpp">Stats使用来记录数据的<pre name="code" class="cpp"><pre name="code" class="cpp">Params用来记录配置的参数<pre name="code" class="cpp"> std::string statName;是数据名称<pre name="code" class="cpp">std::vector<NVMObject_hook *> children;<pre name="code" class="cpp">std::vector<NVMObject *> *hooks;不知道和上面什么关系<pre name="code" class="cpp">EventQueue *eventQueue;<pre name="code" class="cpp">GlobalEventQueue *globalEventQueue;
std::ostream *debugStream;TagGenerator *tagGen;HookType hookType, currentHookType;void AddHookUnique( std::vector<NVMObject *>& list, NVMObject *hook );ncycle_t MAX( const ncycle_t, const ncycle_t );ncycle_t MIN( const ncycle_t, const ncycle_t );

0 0
原创粉丝点击