I suppose that I should add new machinetype for VictimBuffer
structure and also the mapping function from L1 cache to victimbuffer.
Think about the action a_issueGETS in original
L1Cache.sm:
action(a_issueGETS, "a", desc="Issue GETS")
{
peek(mandatoryQueue_in, CacheMsg)
{
enqueue(requestNetwork_out, RequestMsg,
latency="L1_REQUEST_LATENCY") {
out_msg.Address := address;
out_msg.Type :=
CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
out_msg.Destination.add(map_L1CacheMachId_to_L2Cache(address,
machineID));
out_msg.MessageSize :=
MessageSizeType:Request_Control;
out_msg.AccessMode :=
in_msg.AccessMode;
out_msg.Prefetch := in_msg.Prefetch;
}
}
}
Now in case of a victim buffer,I would like the GETS request
be sent to the victimQueue. For the "a_issueGETS" action, I think the out_msg.Destination must be modified to guarantee the request
message be transferred to the right Victim Buffer.
It seems that I need to write the mapping function like
this:
inline MachineID
map_L1CacheMachId_to_L1VictimBuffer(address,machineID);
{
int num = 0;
MachineID mach =
{MACHINETYPE_VICTIM_ENUM,0};
mach.num =
machineIDToNodeID(L1CacheMachId);
return mach;
}
(2) about trigger event.
Two messagebuffer
victimRequestQueue and victimResponseQueue were created
here.
The former is used to transfer requests to the buffer, while
the later is created to response the data message to L1 requestor.
However,dislike the L2 cache, the victimBuffer need
not do state transtions, thus one of the two
messagebuffers should not trigger events within the in_port
processing
On the other hand, I have checked that all the
in_port processing contains the event triggering like this:
in_port(requestNetwork_in, RequestMsg, requestToL1Cache)
{
...
if(){trigger(Event:xxx),in_msg.address;
...
}
I have already tried not to write in_port codes for
victimResponeseQueue, but make error complains that:
Error: Unrecognized variable:
victimResponseQueue_in
Have I did some misunderstanding of the processing scheme
of the in_port/out_port? Any advice of how to do communication between L1 and
victimbuffer?
Thanks...