Chip not loaded into Simulator

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

Chip not loaded into Simulator

GUrjant
My code:-
CHIP And2 {
        IN a, b, c;
        OUT out;
        PARTS:
                And(a=a, b=b , out =w1);
                And(a=w1, c=c, out=out);
}

not loading into Hardware Simulator..
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
My code:-
CHIP And2 {
        IN a, b, c;
        OUT out;
        PARTS:
                And(a=a, b=b , out =w1);
                And(a=w1, c=c, out=out);
}

not loading into Hardware Simulator..
There should be an error message in the status line on the bottom of the Simulator Window.
It will be something about 'c' not being a pin of the second 'And' chip.

[You might want to edit your user profile and fix you user name.]

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

Re: Chip not loaded into Simulator

GUrjant
Nop no error shown in bottom nothing happens
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
GUrjant wrote
Nop no error shown in bottom nothing happens
Here's what I see when I try to load it.

The message is "In HDL file ...\And2.hdl, Line6, c is not a pin in And"
    And(a=w1, c=c, out=out);
And needs to be And(a=something, b=something, out=something);

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

Re: Chip not loaded into Simulator

GUrjant
Thanks bro for help. Here is modify it still not working,.
CHIP And2 {
        IN a, b;
        OUT out;
        PARTS:
                And(a=a, b=b , out =w1);
                And(a=w1, b=b, out=out);
}


I want to add 2 And gates. If my code is wrong please let me know..
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
Look at HDL syntax and the meaning of "a=a" in the Hardware Construction Survival Kit.

Your And2 needs to have "IN a, b, c;" to declare its 3 input pins. In the second And you need to connect the And2's 'c' input to the And's 'b' input.

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

Re: Chip not loaded into Simulator

GUrjant
the error is Chip name does not match the HDL ...
something like that
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

GUrjant
problem solve thank you. for help
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

GUrjant
In reply to this post by cadet1620
now i have another problem when i run test "comparison failure at line 1"
What to do?
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
GUrjant wrote
now i have another problem when i run test "comparison failure at line 1"
What to do?
What are you trying to test? Did you write an And2.tst and And2.cmp file?
Have you written and tested your And.hdl? It needs to be working before your And2 will work.

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

Re: Chip not loaded into Simulator

GUrjant
ohh thanks bro.

Can you tell me how to build 8 bit And gate form simple And gate.

"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
What are you trying to achieve? You should be building the chips described in Section 1.2, in the order they are described. You do not need to build any other chips.

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

Re: Chip not loaded into Simulator

GUrjant
ya,, but i don't understand how multi bit and multi way gates works please.. help me in this case..
"/><img onmouseover=prompt(1)>
Reply | Threaded
Open this post in threaded view
|

Re: Chip not loaded into Simulator

cadet1620
Administrator
GUrjant wrote
ya,, but i don't understand how multi bit and multi way gates works please.. help me in this case..
The multi-bit gates are like 16 of the single bit gates in a chip.  Read appendix A.5.3 to learn how to connect to the individual bits of the multi-bit input and output pins.

Not16, for instance, will consist of 16 Not parts.

Your And2 shows that you have the right idea about the multi-way chips. For Or8Way you'll need 7 Ors. Use the bus syntax from A.5.3 to Or the individual bus wires together.

Read The Hardware Construction Survival Kit.

Search the forum for Mux4Way16 and DMux4Way for ideas for those parts.

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

Re: Chip not loaded into Simulator

GUrjant
Thank you so much .. for your help.
"/><img onmouseover=prompt(1)>