EmbDev.net

Forum: FPGA, VHDL & Verilog Can I get this to work in Verilog


von Astudentofminewhowasalittlepiggie (Guest)


Rate this post
useful
not useful
Hi Like the title says..Can I get this to work in Verilog?

if ((control == 0) and (array == 1) and (value > minvalue) and (value < 
maxvalue))

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Astudentofminewhowasalittlepiggie wrote:
> Can I get this to work in Verilog?
Whats the problem with it? Do you encounter any problems? Which ones?

von Astudentofminewhowasalittlepiggie (Guest)


Rate this post
useful
not useful
Yes, its a compiler error.

Error (10170): Verilog HDL syntax error at Graycounter.v(15) near text 
";";  expecting ")"

von Astudentofminewhowasalittlepiggie (Guest)


Rate this post
useful
not useful
Ofcourse not that, i needed a recompile..

Error (10170): Verilog HDL syntax error at Graycounter.v(15) near text 
"and";  expecting ")"

this one..

von Lattice User (Guest)


Rate this post
useful
not useful
The and operator is written as &&, just like in C

von Astudentofminewhowasalittlepiggie (Guest)


Rate this post
useful
not useful
Yes, that compiled. thanks!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.