illegal terminator: '{' error

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

illegal terminator: '{' error

Anirudh
Hi,

I typed in the following on a notepad and saved it as .hdl file.

/** Checks if two 3-bit input buses are equal */
CHIP EQ3 {
IN a[3], b[3];
OUT out; // True iff a=b
PARTS:
Xor(a=a[0], b=b[0], out=c0);
Xor(a=a[1], b=b[1], out=c1);
Xor(a=a[2], b=b[2], out=c2);
Or(a=c0, b=c1, out=c01);
Or(a=c01, b=c2, out=neq);
Not(in=neq, out=out);
}


When I tried to load it using 'load script' from the 'File' menu, the Hardwar Simulator throws the following error:

In script C:\Users\...\Eq3.hdl, Line 3, Illegal Terminator: '{'

The same error comes whenever I tried to load my own script files. The contents of the script files do not seem to have any error.

The Hardware simulator in my PC is located at C:\Program Files\... and the operating system is Windows7.

Anyone has seen the same error? Any solutions?

Thanks
Anirudh
Reply | Threaded
Open this post in threaded view
|

Re: illegal terminator: '{' error

gcheong
I think the problem is that this is a chip definition, not a test script, so you would use the "load chip" menu item instead. If you want to test the chip in the simulator, you would write a test script (see appendix B in the book).

-Greg C.
Reply | Threaded
Open this post in threaded view
|

Re: illegal terminator: '{' error

Anirudh
Dear Greg,

Thank you so much. My chip works now after using the 'load chip' icon instead of the load scrip option.

Cheers
Anirudh