Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not C++ Question...logic one #36

Open
ahmed-shafik opened this issue Jan 26, 2014 · 2 comments
Open

Not C++ Question...logic one #36

ahmed-shafik opened this issue Jan 26, 2014 · 2 comments

Comments

@ahmed-shafik
Copy link

Dears,

Kindly need to know where the poppedBusPacket fields (buspaclettype, address..) used before calling the coomandqueue.pop function in update () function in MemoryController although it is initialized in the constructor by null

@dramninjasUMD
Copy link
Collaborator

I am not sure I understand your question. poppedBusPacket is not used before the pop() function. It starts out as null and then is passed to commandQueue.pop(BusPacket **busPacket); as a double pointer. What CommandQueue does is it uses the double pointer to set the original pointer to a valid BusPacket pointer(for example here: https://github.com/dramninjasUMD/DRAMSim2/blob/master/CommandQueue.cpp#L219 ).

So after the call to pop(), the poppedBusPacket pointer is pointing to a valid BusPacket if the function returns true.

I hope that makes sense. It was kind of a bad design choice back when it was made, but it has never been high on the priority list to change.

@swanandM
Copy link

Hello,
which file (.cpp) in source code actually do the simulation of DRAM. & how it does ?
can you please help me with this.
thank in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants