raghavV wrote
i wrote the following code
CHIP And {
IN a, b;
OUT out;
PARTS:
Nand(in1=a ;in2=b;out =c);
Nand(in1=a ;in2=b;out =f);
Nand(in1=c ;in2=f;out=out);
}
(after the parts section)..but wen i run it on the hardware simulator..nothing happens and the chip doesnot load...while wen no changes were made,the chip would load..
i modified it using wordpad..and also tried (in the main parts section)
Nand(in1=a ;in2=b;out =c);
Nand(in1=c ;in2=c;out=out);
but still nothing would happen..plz tell what to do
Thanx
You should be getting an error message on the status line when you load this HDL or load and run the And.tst file, as shown in red at the bottom of this image. Note that on some small screens the message is off the bottom and you need to move the window up to see it.
"In HDL file C:\...\And.hdl, Line 6, in1 is not a pin in Nand: load And.hdl".
Look at Figure 1.6, is shows an example of correct HDL syntax. Note that the left side of "=" is generally "a," "b" or "out." See the
Hardware Construction Survival Kit, specifically the section
HDL syntax and the meaning of "a=a".
WARNING! You need to make the chips in the order presented in section 1.2. This is also explained in the
Hardware Construction Survival Kit.
--Mark