Hi Alex,

SLICC does not support loops for reasons that can be read in the SLICC
README file:

src/mem/slicc/README

Question: How comes there is no "for" loop statement in slicc?
Answer: Been there, done that. That is easy to add, first of all. But
unbound
loop make slicc eventually un-synthesizable. We want to avoid that. If you
want
to loop through a bounded array do something, make the action done in a
external interface in RubySlicc_Util.h. Inside, you just pass the vector as
parameter to the external interface to achieve the same effects.

Another bad thing of using loop statement like for is that we can not
determine
how many buffer space to allocate before the transition. With a vector, if
it
easy to understand we can always allocate the worst case number of hardware
resources.

As I have suggested to you in a previous question, you *could* modify SLICC
to handle additional things (e.g. parameters, loops, etc) but in my
experience it has been far easier to do any such hacking/interfacing
through an external object (as this Q/A from the README also suggests).

Malek



On Sat, Nov 2, 2013 at 4:14 PM, Alex Tomala <[email protected]> wrote:

> Hello,
>
> I am making a new cache coherence protocol in Gem5. In one of my actions,
> I require using a while loop to send messages to other caches depending on
> certain circumstances. I am wondering if there is a while loop in SLICC or
> if I need to do something else. My code would look something like this:
>
> while (x < totalNum()){  //pretend totalNum() is a C++ function that
> returns the number of cache
> if (fulfills certain conditions){
>      enqueue(replyChild_out, ParentReplyType, latency=issue_latency) {
>  out_msg.Address := address;
>       out_msg.Type := ParentReplyType:PYS;
>       out_msg.Sender := machineID;
>       out_msg.Destination.add(in_msg.Requestor);
>     }
> }
> }
>
> I don't know if this is possible or not.
>
> Best regards,
>
> Alex Tomala
>
> _______________________________________________
> 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