Hi Marti,

I would think that you could use a boolean variable that you defined
in the CacheEntry/DirEntry Structure of the L2, and when set to false,
don't do the desired action.

For example:

inport(my_port, RequestMsg, latency="") {
   peek(my_port, RequestMsg) {

    bool flag := getEntryFlag(cache_entry, address);

     if(flag) {

        trigger(Event: ........);

     }
     // else do nothing
o
  }
}

The getEntryFlag Function could be something you define similar to the
isLocalOwnerValid Function.

But in this case, the port is still scheduled and woken up every
cycle, but you just don't execute anything.

If you truly don't want the port to be scheduled for wakeup, it is a
little more tricky. Essentially each in_port inherits from the
Consumer Class (/ruby/common/Consumer.hh)

What you can do, is check to see if the L1RequestToL2 in_port
(consumer) is scheduled for some said cycle using
the bool alreadySchedule(Time) function, and if not, then schedule
your port (consumer) to wake up.

Does that make sense?

Malek

2012/2/22 Martí Torrents Lapuerta <[email protected]>:
> Hi Nilay!
>
> That seems a good point :D But how can I do that?
>
> Thanks!
>
>
> 2012/2/22 Nilay Vaish <[email protected]>
>>
>> Why can you not use a boolean variable to track whether or not the L1
>> cache sent a request to the L2 cache in this cycle?
>>
>> --
>> Nilay
>>
>>
>> On Wed, 22 Feb 2012, Martí Torrents Lapuerta wrote:
>>
>>> Hy Malek,
>>>
>>> Thanks for your answer, but I think that this parameter (rank) is only
>>> used
>>> when 2 inports are going to access the same address. In my case I want to
>>> issue only one of the two InPorts per cycle. Do you know any other way?
>>>
>>> Thanks for your attention.
>>>
>>> 2012/2/22 Malek Musleh <[email protected]>
>>>
>>>> Hi Marti,
>>>>
>>>> I believe you would need to specify the rank of the inport.
>>>>
>>>> For example:
>>>>
>>>>  // Response Network
>>>>  in_port(responseNetwork_in, ResponseMsg, responseToL1Cache, rank=2) {
>>>>
>>>> You would then need to define the priority for each of the in_ports.
>>>>
>>>> Take a look at the MOESI_CMP_Token protocol as reference.
>>>>
>>>> Malek
>>>>
>>>> 2012/2/22 Martí Torrents Lapuerta <[email protected]>:
>>>>>
>>>>> Hello everybody,
>>>>>
>>>>> I am working with the MOESI_CMP_directory-L2cache protocol in Ruby. I
>>>>
>>>> have
>>>>>
>>>>> just added a new input port with some requests that I would like to
>>>>
>>>> inject
>>>>>
>>>>> in L2, however I only want to process this requests, when there is a
>>>>
>>>> cycle
>>>>>
>>>>> where the L1 is not sending any request to the L2. So myInPort must
>>>>> have
>>>>> less priority than the L1requestNetwork_in InPort. I do not know how to
>>>>
>>>> do
>>>>>
>>>>> this, Is there anybody who could help me with this issue?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Marti
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Martí Torrents Lapuerta
>>> [email protected]
>>> (+34)649 65 10 57
>>
>>
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
>
>
> --
> Martí Torrents Lapuerta
> [email protected]
> (+34)649 65 10 57
>
> _______________________________________________
> 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