Memory compare script error?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory compare script error?

Lsakurifaisu
In the compare script in line 39 it has the load bit set but then doesn't load that value into the address. I was under the impression that if the load bit was enabled then the value being sent to the address should be stored. But in the compare file -1 is set as the input, then the load bit is set, but the value output is 0. Shouldn't it be -1?

If this isn't the case could someone please explain why not as I am a little lost.
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Memory compare script error?

cadet1620
Administrator
This post was updated on .
The Memory test is a mix of synchronous and combinatorial operations.  What's happening at line 39 in the output is a combinatorial read of the Screen memory.  Since the clock doesn't tick, the DFFs deep inside the Screen don't change state, hence don't store a new value.
// Screen test

set load 1,
set in -1,
set address %X4FCF,
tick,                   <----  clock fires, data stored
tock,
output,

set address %X504F,
tick,                   <----  clock fires, data stored
tock,
output;

set address %X0FCF,		// Did not also write to lower or upper RAM
eval,                   <----  no clock; doing a combinatorial read of RAM
output;
set address %X2FCF,
eval,                   <----  no clock; doing a combinatorial read of RAM
output;

The point of the combinatorial reads is to see that the load signal going to ROM was false during the write to Screen.

--Mark