Re: [Gems-users] About the L2cacheMemory vector in Abstractchip.h


Date: Wed, 14 Apr 2010 12:59:05 -0500
From: Byn Choi <bynchoi1@xxxxxxxxxxxx>
Subject: Re: [Gems-users] About the L2cacheMemory vector in Abstractchip.h
https://lists.cs.wisc.edu/archive/gems-users/2010-February/msg00034.shtml

On Apr 14, 2010, at 2:08 AM, MaDafan wrote:

Hi there.
I intend to simulate a target cache memory design, involving some modifications to the ruby cache memory, coherency protocol, and so on.
It's necessary for me to add a global component to the CMP system, so I choose to implement it in Abstractchip.h, which contains the base class needed by the generated Chip.h, after new member  functions are added, I tried to make ruby but error emerges.

===========================
make log:
slicc_interface/AbstractChip.
h: In member function `void AbstractChip::BankRemap()':
slicc_interface/AbstractChip.h:175: error: invalid use of undefined type `struct CacheMemory<L1Cache_Entry>'
slicc_interface/AbstractChip.h:84: error: declaration of `struct CacheMemory<L1Cache_Entry>'
slicc_interface/AbstractChip.h:178: error: invalid use of undefined type `struct CacheMemory<L1Cache_Entry>'
slicc_interface/AbstractChip.h:84: error: declaration of `struct CacheMemory<L1Cache_Entry>'

=================================================
the error code:
template<class ENTRY> class CacheMemory;                           :84
                 .....
Vector < CacheMemory<L1Cache_Entry>* > m_L2Cache_L2cacheMemory_vec;
                 .....
m_L2Cache_L2cacheMemory_vec.ref(i)
->VictimReg.lookup(i).m_LastRef.   :175
============================

It seems the error occurs because I direct refer the member function of  "m_L2Cache_L2cacheMemory_vec.ref(i)", which is an instantiation of Cachememory object, but I see nothing illegal here since class L1Cache_Entry will be generated and Cachememory is well defined in Cachememory.h, 
what's wrong with it? or do I have to modify the generted Chip.h rather than abstractchip.h? I'm so dumb!
Thanks for your advice and help!


使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! _______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.


[← Prev in Thread] Current Thread [Next in Thread→]