Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

I need help just starting the algorithm for Direct Memory Mapping. I understand the semi-pseudo and I even did a few practice numbers/addresses by hand, drawing a diagram for my buffers. When it comes to putting it in C code, I'm stumped. The data members that I am working with are: tCache.buffers->age tCache.buffers->tag tCache.buffers->validBit tCache.nBufferQty tCache.nBufferSize tCache.nCacheHit tCache.nCacheMiss tCache.nTotalAccess tRunData->nBufferQty tRunData->nBufferSize tRunData->nCacheHit tRunData->nCacheMiss strAddrList[][MAXADDRLEN] ( addresses )

OpenStudy (anonymous):

Basically my logic would fall into here: // Process each memory address in the current test run and determine hits and misses. for(i = 0; i < cache.nTotalAccesses; ++i) { unsigned int address; sscanf_s(strAddrList[i], "%X", &address); // Convert hex string to a usable int address value. // Code to process each memory address should go here: }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
3 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!