RAM4K - Test script success, not 4K?

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

RAM4K - Test script success, not 4K?

Rick
The test script ends successfully on this chip. But it doesn't really have 4K of memory.
I'm confused.



CHIP RAM4K {
    IN in[16], load, address[12];
    OUT out[16];

PARTS:
RAM64(in=in,load=la,address=address[6..11],out=outa);
RAM64(in=in,load=lb,address=address[6..11],out=outb);
RAM64(in=in,load=lc,address=address[6..11],out=outc);
RAM64(in=in,load=ld,address=address[6..11],out=outd);
RAM64(in=in,load=le,address=address[6..11],out=oute);
RAM64(in=in,load=lf,address=address[6..11],out=outf);
RAM64(in=in,load=lg,address=address[6..11],out=outg);
RAM64(in=in,load=lh,address=address[6..11],out=outh);
         
Mux8Way16(sel=address[0..2],a=outa,b=outb,c=outc,d=outd,e=oute,f=outf,g=outg,h=outh,out=out);
DMux8Way(in=load,sel=address[0..2],a=la,b=lb,c=lc,d=ld,e=le,f=lf,g=lg,h=lh);
Reply | Threaded
Open this post in threaded view
|

Re: RAM4K - Test script success, not 4K?

WBahn
Administrator
Just because a script runs successfully doesn't mean that the chip is completely correct, only that it is correct enough to pass the particular tests that the script runs.

Your chip does write to memory for the entire 4K address space, so if you write a value to some location and then read from that location, you will read out what you wrote in.

But your chip assign eight different addresses to each physical memory location, so if you write a value to one address, then write a different value to one of the other seven addresses that map to that same location, and then read from the original location you will not get the original value back. While writing a test that will detect this for your particular mapping is easy, writing a set of tests that are likely to detect this for all of the conceivable mappings is a lot harder unless you do an exhaustive test of all 4096 memory location instead of the hundred or so tests that the script performs.