Not sure if you did this by accident, but you added this new topic to an
existing one.  In the future, you should make sure you change the subject
line of the email, rather than reply to an existing one.

With regards to your question, I recommend looking at the SConscript file
in that directory.  It tells the build tool (scons) what to build.

-Andrew

On Mon, Apr 16, 2012 at 10:55 AM, Xuhao Chen <[email protected]> wrote:

> **
> Hello everyone,
>  I want to extend SLICC with C++ objects MessageFilter
>  as the ISCA'2011 tutorial describes.
>
> The source files (MessageFilter.hh & MessageFilter.cc) are in 
> src\mem\ruby\filters, but when building,
> I find that these two files are not copied to build/ALPHA_FS/mem/protocol/
> .
> So there is an building error like this:
>
> # scons build/ALPHA_FS/gem5.opt PROTOCOL=MI_example RUBY=True
> ...
> In file included from build/ALPHA_FS/mem/protocol/DMA_Controller.hh:17,
>                  from build/ALPHA_FS/mem/protocol/DMA_Controller.cc:15:
>
> build/ALPHA_FS/mem/protocol/Types.hh:64:41: error: 
> mem/protocol/MessageFilter.hh: No such file or directory
> scons: *** [build/ALPHA_FS/mem/protocol/DMA_Controller.o] Error 1
> scons: building terminated because of errors.
>
> The build/ALPHA_FS/mem/protocol/Types.hh which includes MessageFilter.hh 
> cannot
> find this header file,
> what should I do to tell the building tool to copy MessageFilter.hh to
> build/ALPHA_FS/mem/protocol/?
>
> Here are the source code:
>
>  // MessageFilter.hh
> class MessageFilter {
> public:
> MessageFilter(int param1);
> int filter(RequestMsg msg);
> };
>
> // MessageFilter.cc
> int MessageFilter::filter(RequestMsg msg)
> {
> return 0;
> }
>
> // MI_example-cache.sm
> structure(MessageFilter, external="yes") {
> int filter(RequestMsg);
> };
> MessageFilter requestFilter,
> constructor_hack="param";
> action(af_allocateUnlessFiltered, "af") {
>   if (requestFilter.filter(in_msg) != 1) {
>     cacheMemory.allocate(address, new Entry);
>   }
> }
>
>  Best regards,
> ------------------------------
>
> Xuhao Chen
>
> PhD student
>
> School of Computer
>
> National University of Defense Technology
>
> Changsha, Hunan, P.R.China, 410073****
>
> Tel:  +86-159-741-03340 (Mobile)
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to