problem with loading of chip And.hdl

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

problem with loading of chip And.hdl

raghavV
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with loading of chip And.hdl

ybakos
You have to adhere to the chip specifications.
Nand has two inputs a and b. The And chip has two inputs, a and b. Be sure the read Appendix A for the hdl syntax.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with loading of chip And.hdl

cadet1620
Administrator
In reply to this post by raghavV
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.

    HW Simulator showing error message
    "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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with loading of chip And.hdl

raghavV
In reply to this post by ybakos
thanx ybakos...i thought the values a& b were just for the reference purpose and we can take any input pins...and the chip has now successfully loaded..:)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with loading of chip And.hdl

raghavV
In reply to this post by cadet1620
thanx administrator,,it was really helpful..:D
Loading...