Discussion:
[Proj 4] don't seem to be accessing data with accessDRAM
(too old to reply)
[Instr] Albert Chae
2008-08-12 03:13:52 UTC
Permalink
Raw Message
Are you sure the address in DRAM you are trying to access is
"block-aligned"? Also, are you passing it the block_size properly?
Remember it requires a TransferUnit.

Albert
If you haven't already, I would step through it with gdb. Even though you are
printing the values to screen, maybe stepping through the code line-by-line
will make something jump out at you.
Or maybe you can get Albert or a TA to look at your code...
We've used printf on almost every line. We're explicitly passing the base
pointer to the 'data' array member of the cacheBlock struct to accessDRAM.
This
looks correct to us, but obviously isn't-- any hints?
Sounds like a pointer problem, like maybe you are sending the wrong
pointer
to accessDRAM, but then printing the correct pointer later.
You might want to try logging everything at each step around accessDRAM
(or
use gdb) to make sure you are sending the correct pointer and address in.
Unable to figure this one out right now: accessDRAM doesn't appear to >
be
pulling in any data, at least none that we can detect with our printf
statements in the code. The correct data is showing up in the GUI cache
display, but in a set that we don't expect it to. Any ideas?
Jeremy Cowles
2008-08-12 00:02:21 UTC
Permalink
Raw Message
Sounds like a pointer problem, like maybe you are sending the wrong pointer
to accessDRAM, but then printing the correct pointer later.

You might want to try logging everything at each step around accessDRAM (or
use gdb) to make sure you are sending the correct pointer and address in.
Unable to figure this one out right now: accessDRAM doesn't appear to be
pulling in any data, at least none that we can detect with our printf
statements in the code. The correct data is showing up in the GUI cache
display, but in a set that we don't expect it to. Any ideas?
Jeremy Cowles
2008-08-12 00:45:17 UTC
Permalink
Raw Message
If you haven't already, I would step through it with gdb. Even though you
are printing the values to screen, maybe stepping through the code
line-by-line will make something jump out at you.

Or maybe you can get Albert or a TA to look at your code...
We've used printf on almost every line. We're explicitly passing the base
pointer to the 'data' array member of the cacheBlock struct to accessDRAM.
This
looks correct to us, but obviously isn't-- any hints?
Post by Jeremy Cowles
Sounds like a pointer problem, like maybe you are sending the wrong pointer
to accessDRAM, but then printing the correct pointer later.
You might want to try logging everything at each step around accessDRAM (or
use gdb) to make sure you are sending the correct pointer and address in.
Unable to figure this one out right now: accessDRAM doesn't appear to be
pulling in any data, at least none that we can detect with our printf
statements in the code. The correct data is showing up in the GUI cache
display, but in a set that we don't expect it to. Any ideas?
Loading...