Chapter 1

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

Chapter 1

TheRealRedd
Hello

I made an and gate in HDL and i don't get any errors until the final output (when a =1, and b =1)
i get the error "Comparison Failure at Line 5", Here is my code:


CHIP And {
    IN a, b;
    OUT out;

    PARTS:
    Nand (a=a, b=b, out=aAndb);
}

please help,
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Chapter 1

cadet1620
Administrator
TheRealRedd wrote
    Nand (a=a, b=b, out=aAndb);
This makes an internal wire named "aAndB", but does not connect anything to the And chip's "out" pin.
That's why the And's out is always 0.

You might want to read the survival guide, particularly the "what's the meaning of a=a?" section.

--Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Chapter 1

TheRealRedd
Thanks!
Loading...