> Hey ijust realized that i cant initialize all the lru and and valid bits in
> accessMemory to zero every time the accessMemory function is called, because
> you only want all this initialization to happen in the first call to a cache.
> I was trying to figure out a way to know when its the first call, by possibly
> assuming that the addr given in to accessMemory is 0x00400000 (the first PC
> value, and use that to know, but I am not sure if I can assume that this will
> be what gaurantees the first call? Am I doing it right or is there another
> way I am just not thinking of. Ive been stuck on this for a while
These should be initialized for you. You don't have to worry about
initializing it in accessMemory.
>
> also, we dont have to make sure an instruction fetch given to accessMemory is
> separate from a data fetch given to accessMemory, almost like keeping two
> caches?
>
No you don't.
Albert
also, we dont have to make sure an instruction fetch given to accessMemory