Hi Fangfei,
As you suggest, sendTimingReq may change the packet. Thus, if you want to know
what the packet looked like before passing it on, you must store the fields in
local variables before calling sendTimingReq. You see this done in plenty
places throughout the code. If the packet is not accepted (sendTimingReq
returns false), then it should be unaltered.
Getting back to your error, are you suggesting there is a bug in
sendDeferredPacket in that it looks at the attributes of the packet when it
shouldn't?
Thanks,
Andreas
From: Fangfei Liu <[email protected]<mailto:[email protected]>>
Reply-To: gem5 users mailing list
<[email protected]<mailto:[email protected]>>
Date: Monday, 18 February 2013 00:16
To: gem5 users mailing list <[email protected]<mailto:[email protected]>>
Subject: [gem5-users] question on masterPort.sendTimingReq() function
Hi,
I’m hacking classic cache model to implement my own cache design. I’m using a
two level cache hierarchy and simple memory. I met a very strange assertion
fail which I could not figure it out. The failed assertion is as follows:
void MSHR::clearDownstreamPending(): Assertion `downstreamPending' failed
If I trace back the calling stack, it is called by sendDeferredPacket()
function in cache_impl.hh. I have figured out some more detailed information.
This function basically sends out request from either miss queue or write
buffer. In this specific case, it gets a timing packet from L2 cache write
buffer, therefore it is a L2 writeback packet, and MSHR->isForwardNoResponse()
is true (do not need response). Also, no new bus packet is generated and the
original packet is forwarded to next level (in my case, it is a simple memory).
It turns out after calling the function masterPort.sendTimingReq(pkt), pkt is
modified and MSHR->isForwardNoResponse() (which depends on
mshr->getTarget()->pkt) is no longer true (pkt->cmd becomes ReadReq). I was
wondering is there any way that the function sendTimingReq(pkt) can modify the
attribute of the packet (such as change pkt->cmd)? By the way, Before
successfully send the request, sendDeferredPacket retries several times.
Thanks in advance!
Best regards
Fangfei
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users