PC.tst missed scenario and I provide one

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

PC.tst missed scenario and I provide one

Walker
when i wote PC.hdl with a bug, the PC.tst run succesfully:

CHIP PC {
    IN in[16],inc, load, reset;
    OUT out[16];
   
    PARTS:
    Inc16 (in=outback, out=incin);
    Mux16 (a=in, b=incin, sel=inc, out=out1);   // should be : a=outback , PC.tst should be improved
    Mux16 (a=out1, b=in, sel=load, out=out2);
    Mux16 (a=out2, b=false, sel=reset, out=out3);
    Register (in=out3, load=true, out=out, out=outback);
}

so i add a scenario test in PC.tst andPC.cmp to improve the test.