Editing the given .hdl files

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

Editing the given .hdl files

ryanmanes
So, I know this is pretty elementary. I've run the test script in project 00 for the Xor chip. It works and says that it completed successfully. However, I don't get an output file. Do I need to click something to open the output file? I assumed it would pop up automatically.

Also, I edited the Not.hdl file in Notepad, but now I can't load the chip into the hardware simulator to run the test script. Here's what I have for it.

/**
 * Not gate: out = not in
 */

CHIP Not {
    IN in;
    OUT out;

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


Why can I not load the chip now?
Reply | Threaded
Open this post in threaded view
|

Re: Editing the given .hdl files

ryanmanes
After thinking about it some more, I changed the .hdl file a bit, and I might still be wrong, but I'm more concerned about being able to load it into the hardware simulator. Thanks.

/**
 * Not gate: out = not in
 */

CHIP Not {
    IN in;
    OUT out;

    PARTS:
    Nand(in=in, out=out);
}
Reply | Threaded
Open this post in threaded view
|

Re: Editing the given .hdl files

cadet1620
Administrator
In reply to this post by ryanmanes
ryanmanes wrote
So, I know this is pretty elementary. I've run the test script in project 00 for the Xor chip. It works and says that it completed successfully. However, I don't get an output file. Do I need to click something to open the output file? I assumed it would pop up automatically.
You are probably looking in the wrong place. The Xor.out file should be in the same directory as the Xor.tst file that you loaded and ran. I've been mystified more than once when I've edited an HDL file and the change didn't have any effect because I was runing the test from another directory.  (I have lots of student project trees and the tools remember which directory they last used....)
Also, I edited the Not.hdl file in Notepad, but now I can't load the chip into the hardware simulator to run the test script. Here's what I have for it.

/**
 * Not gate: out = not in
 */

CHIP Not {
    IN in;
    OUT out;

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

Why can I not load the chip now?
There should be an error message in the status line at the bottom of the HardwareSimulator window. It's most helpful to include these error messages. In this case I'm guessing it's about Nand not having a pin named 'in'.

Nand has two input pins named 'a' and 'b'. You need to connect something to them:
    Nand(a=something, b=something, out=out)

Read the Hardware Construction Survival Kit. There's a section in there that should help you understand what goes on the left and right sides of the '='.

--Mark