Stuck on loading chip even with ANSI encoding

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

Stuck on loading chip even with ANSI encoding

Bitterguy
I read the other thread with a similar problem yet that solution still did not work.

Here is my .hdl file text:
//Not in != out

CHIP Not {
    IN in;
    OUT out;

    PARTS:
    Not(in = in, out = out);
}

As you can tell I'm just getting started so this is quite frustrating.

As always, thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Stuck on loading chip even with ANSI encoding

cadet1620
Administrator
Bitterguy wrote
I read the other thread with a similar problem yet that solution still did not work.

Here is my .hdl file text:
//Not in != out

CHIP Not {
...
   PARTS:
    Not(in = in, out = out);
}
By truing to use Not in your Not.hdl, you are causing infinite recursion. The Hardware Simulator is not smart enough to detect this 8-(

You need to use nothing but Nand parts to make your Not. (Hint: read appendix A.5.2 and find the named constants for constant 0 and 1 inputs.)

Once you have your Not working, then you can use Nand and Not to make And.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Stuck on loading chip even with ANSI encoding

Bitterguy
So if m understanding you correctly I need to do something like Not(in1 = in, out = out1); ?
Reply | Threaded
Open this post in threaded view
|

Re: Stuck on loading chip even with ANSI encoding

cadet1620
Administrator
Have you read the Hardware Construction Survival Kit? Lots of helpful hints in there.

You can't use Not at all inside Not.hdl! Not.hdl will look like:

    CHIP Not {

        IN  in;
        OUT out;

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

--Mark