how to implement add32,i implemented it,but don't know what's wrong in that?

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

how to implement add32,i implemented it,but don't know what's wrong in that?

pooja
is there any other way to do it?
CHIP Add32 {
    IN a[32], b[32];
    OUT out[32];

    PARTS:

    // First 16-bit adder
    Adder16(a=a[0..15], b=b[0..15], cin=false, out=out[0..15], cout=c);

    // Second 16-bit adder
    Adder16(a=a[16..31], b=b[16..31], cin=c, out=out[16..31], cout=c2);
}

i implemented like this ,but when i'm loading the chip into the simulator
Reply | Threaded
Open this post in threaded view
|

Re: how to implement add32,i implemented it,but don't know what's wrong in that?

WBahn
Administrator
I think I've seen somewhere else where someone remarked that the tools don't support anything larger than 16-bit busses. I'll try to run a couple tests to confirm that if I get a chance.
Reply | Threaded
Open this post in threaded view
|

Re: how to implement add32,i implemented it,but don't know what's wrong in that?

WBahn
Administrator
I just tried to make a Not17 by adding one more Not channel and it failed to load. So, sure enough, the Hardware Simulator can't support anything more than a 16-bit bus.

Unfortunate, true, but the tools are not general purpose -- they are only intended to support the Nand-2-Tetris project.