[Gems-users] Using the timing model to change store values when using Lazy VM


Date: Fri, 31 Oct 2008 15:54:53 +1300
From: "Fuad Tabba" <fuad@xxxxxxxxxxxxxxxxx>
Subject: [Gems-users] Using the timing model to change store values when using Lazy VM
Hi,

I've noticed that when using lazy vm (ATMTP), in TransactionSimicsProcessor::redirectStoreToWriteBuffer  you use SIM_c_set_mem_op_value_buf  in order to change the store value in the memory transaction back to the original one found in main memory, while adding the new value to the write buffer.

The Simics reference manual states (under SIM_c_set_mem_op_value_buf) that:-

"These functions cannot be called from a timing-model since the real operation will overwrite the value set. They should instead be used from a snoop-device."

Moreover, in the Simics programming manual it also says that:-
"If the value of a memory store has been changed in the timing model, it should be reset in the snoop device."

Which seems to be a contradiction, where else would you store the value? It seems to me that you sort of ignore both statements and it seems to work for you guys. I've tried to understand this code better, and I've noticed that by actually changing the stall time to anything other than 0, then the value is indeed lost.


My question is this, there's a clear contradiction in the Simics documentation, yet you have obviously managed to get this working. Can you enlighten me on how this actually behaves in regards to GEMS/Ruby with Lazy VM? :)

Thanks.

Cheers,
/fuad
[← Prev in Thread] Current Thread [Next in Thread→]