Nand Chip works not good

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

Nand Chip works not good

1291115416_user
I tried three way to implement And with Nand,here is it

CHIP And {
    IN a, b;
    OUT out;

    PARTS:
    Nand(a = a,b= b,out= o1);
       
        //1-ok
        //Nand(a = a,b= b,out= o2);
        //Nand(a = o1,b= o2,out= out);
       
        //2- ok
        Nand(a= o1,b= o1,out= out);
       
        //3-NG
        //Not(in = o1,out = out);
}

I though the second and third should be the same, but actully not(Simulator Fail).
And I don't know why,




Reply | Threaded
Open this post in threaded view
|

Re: Nand Chip works not good

WBahn
Administrator
I can't read your screen shot. Have you successfully implemented the Not gate yet?
Reply | Threaded
Open this post in threaded view
|

Re: Nand Chip works not good

1291115416_user
I didn‘t implemented the Not gate, But  the builtInChips directory had one, so Not gate should work well。

Besides, I guess whether the clock caused the error.
Reply | Threaded
Open this post in threaded view
|

Re: Nand Chip works not good

rleininger
The clock is not involved in execution of combinational logic chips.
Reply | Threaded
Open this post in threaded view
|

Re: Nand Chip works not good

WBahn
Administrator
In reply to this post by 1291115416_user
In order for it to use the built-in Not gate, it has to NOT find a file named Not.hdl in the folder. But there IS one -- the bare template. So it is finding that and running a file that has no HDL code in it. Try renaming or moving this file and see what happens.
Reply | Threaded
Open this post in threaded view
|

Re: Nand Chip works not good

1291115416_user
Oh, Yes. I rename the Not.hdl file  and try again, then it pass.
Thanks a lot.