Mike, Thanks a lot for you reply. I checked in protocols and did a grep on
"triggerQueue". There are a lot of them and I looked into
MOESI_CMP_directory-L2cache.sm. There I found that triggerqueue is used in a
similar way that I did. First you define MessageBuffer like this:
MessageBuffer triggerQueue, ordered="true";
Then define out_port and in_port:
out_port(triggerQueue_out, TriggerMsg, triggerQueue);
in_port(triggerQueue_in, TriggerMsg, triggerQueue) {
if (triggerQueue_in.isReady()) {
peek(triggerQueue_in, TriggerMsg) {
if (in_msg.Type == TriggerType:ALL_ACKS) {
trigger(Event:All_Acks, in_msg.Address);
} else {
error("Unexpected message");
}
}
}
}
Then in some actions, you enqueue to triggerQueue_out. And in some
transitions you call the action n_popTriggerQueue to dequeue triggerQueue_in
(and what does this mean?). I have two questions:
1. I changed my code and replaced RequestMsg and ResponseMsg of my in_port
and out_port associated with my local MessageBuffer to TriggerMsg. But when
I tried to compile, I got this error:
../protocols/MSI_MOSI_CMP_directory-L2cache.sm:539: Error: Type 'TriggerMsg'
not declared.
However I grepped in MOESI_CMP_directory-L2cache.sm and didn't see
TriggerMsg declared either. I thought this is a built in Slicc class. How do
I fix this?
2. What is the difference of my approach and the triggerQueue approach? I
want to fully understand how two ports communicate with one MessageBuffer.
I'm sorry for asking so many questions in this email. I really appreciate
your help!
Thanks in advance,
Lei
----- Original Message -----
From: "Mike Marty" <mikem@xxxxxxxxxxx>
To: "Lei Yang" <lya755@xxxxxxxxxxxxxxxxxxxx>; "Gems Users"
<gems-users@xxxxxxxxxxx>
Sent: Monday, November 06, 2006 11:41 AM
Subject: Re: [Gems-users] MessageBuffer
Grep for "triggerQueue" in the protocols directory. There are many
examples of using a MessageBuffer in this way.
--Mike
Does anybody know how to use MessageBuffer the way I described? I did a
search on the list archive and couldn't find anything close. I think the
GEMS author might know how to do it. I'm stuck on this and really
appreciate your comments!
Thanks in advance.
Lei
----- Original Message -----
From: <lya755@xxxxxxxxxxxxxxxxxxxx>
To: <Gems-users@xxxxxxxxxxx>
Sent: Monday, November 06, 2006 1:42 AM
Subject: [Gems-users] MessageBuffer
> Dear list,
>
> I have a question regarding the use of MessageBuffer. I am using
> MSI_MOSI_CMP_directory protocol. I want to create a MessageBuffer that
> connects an in_port and an out_port, both belong to the
> L2Cache_Controller.
> Basically the L2 controller sends message to the out_port and the
> in_port
> just
> process each message in FIFO order. No data needs to go in or out of
> the
> L2
> cache.
>
> Right now I defined the following in my
> MSI_MOSI_CMP_directory-L2cache.sm
> file:
>
> MessageBuffer LocalL2Request, ordered="true";
>
> out_port(LocalL2Request_out, RequestMsg, LocalL2Request);
>
> in_port(LocalL2Request_in, RequestMsg, LocalL2Request) {
> if(LocalL2Request_in.isReady()) {
> peek(LocalL2Request_in, RequestMsg) {
> // Do something;
> }
> }
> }
>
> However it seems that the two ports are not "connected" even if they
> share
> the
> same MessageBuffer. The simulator goes to an infinite loop when I send
> requests to the out_port, which implies that those requests were never
> processed by the in_port.
>
> Please help!!
>
> Thanks a lot!
> Lei
>
>
> _________________________________________________________
> This message was sent through the NU ECE webmail gateway.
> _______________________________________________
> 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.
>
>
_______________________________________________
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.
|