Dear gem5 team,

I am trying to understand and modify gem5 memory system. However, I am not
familiar with swig and confused about gem5 memory system.

First, does the fs.py of X86 linux system use *PhysicalMemory* as wrapper
of *TestMemClass*?
When I try to find how gem5 allocate memory for simulated system, I only
find *mmap()* function in *PhysicalMemory::createBackingStore*. As far as I
see, all memory will be inited in *createBackingStore?*

Second, the *memories* of *test_sys* in fs.py  contain: *physmem* and
*memories.
*As I understand, *memories **, *instead of *physmem,* is used for *physmem
*variable in *sim/system.cc**. *In fs.py, how is *physmem *used  if there
is no corresponding code in c++ to *physmem*?

Third, if I want to add two memory controller to *test_sys*, should I
change the code
*self.physmem = MemClass(range = AddrRange(mdesc.mem()))*
to
*self.physmem = PhysicalMemory(self.name <http://self.name>, self.memories)*
?

Thank you for your reply first~

-- 
Best regards!
-------------------------------------------------------------------

Wayne Zhang
Department of Computer Science, HKU
E-mail:[email protected] <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to