Demultiplexor

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

Demultiplexor

GJS
Can any one see what is wrong with this

/** Demultiplexor ;
If Selector = 1 output to a else output to b */
        CHIP gmgatedemulti {
        IN A, B;
        OUT a, b;
        PARTS:
        Not(in=A, out=w1);
        And(a=w1, b=A, out=a);
        And(a=A, b=B, out=b);
}

I get a keyword expected error

Reply | Threaded
Open this post in threaded view
|

Re: Demultiplexor

cadet1620
Administrator
Your code is syntactically correct if the file is named "gmgatedemulti.hdl". Usually when the Hardware Simulator complains about syntax problems when none are apparent, it is because the HDL file was saved with Unicode text encoding. You need to make sure that your text editor is saving files with ANSI text encoding.

Note that you should be starting with the skeleton files supplied in the project\01 directory, keeping their original names.  If the file has the wrong name. it cannot be tested with the supplied test script.

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

Re: Demultiplexor

GJS
thanks, I used the skeleton and all is working ok now