Discussion:
Weird Compile Error
(too old to reply)
~~ VerilogMan ~~
2004-10-13 15:53:35 UTC
Permalink
Hey,
I am gettin an error at this line :
'define counter 1b'0

Error is :

** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Serial_To_Parallel.v(13): near "'d":
syntax error
** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Serial_To_Parallel.v(13): Illegal digit
for specified base in numeric constant



... NO idea why ??? :(
John_H
2004-10-13 16:00:54 UTC
Permalink
Make sure your define starts with a `grave not a 'single quote' and move the
b for binary to the other side of the tick.

`define counter 1'b0
Post by ~~ VerilogMan ~~
Hey,
'define counter 1b'0
[snip]
Post by ~~ VerilogMan ~~
... NO idea why ??? :(
~~ VerilogMan ~~
2004-10-13 16:10:10 UTC
Permalink
NICE :) it got fixed but i used to work that way no ?
Now I am getting more errors :|

input clk ;

** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Top_Module_Decoder.v(4): near "input":
expecting: ';'
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
Make sure your define starts with a `grave not a 'single quote' and move the
b for binary to the other side of the tick.
`define counter 1'b0
Post by ~~ VerilogMan ~~
Hey,
'define counter 1b'0
[snip]
Post by ~~ VerilogMan ~~
... NO idea why ??? :(
John_H
2004-10-13 17:01:23 UTC
Permalink
I suspect there's a line above "input clk;" that isn't properly terminated
with a semicolon. A module declaration port list *does* end with a
semicolon before the external inpu/output/wire/reg definitions.
Post by ~~ VerilogMan ~~
NICE :) it got fixed but i used to work that way no ?
Now I am getting more errors :|
input clk ;
** Error: C:/Documents and
expecting: ';'
glen herrmannsfeldt
2004-10-13 17:38:02 UTC
Permalink
Post by John_H
I suspect there's a line above "input clk;" that isn't
properly terminated with a semicolon.
A module declaration port list *does* end with a
semicolon before the external inpu/output/wire/reg definitions.
I don't seem to have so much of a problem with semicolons,
though I do still find it a little strange. I remember learning
years ago about the difference between PL/I and Pascal. In PL/I
semicolons are statement terminators, in Pascal they are separators.
The difference appears most around END and ELSE.

Now, why is it that verilog doesn't use them on END?

-- glen
~~ VerilogMan ~~
2004-10-13 17:51:14 UTC
Permalink
The thing is that it's very annoying,
at school my code was working , and now at home I get all these errors ... I
think it's because of the version of ModelSim is not the same :|
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by glen herrmannsfeldt
Post by John_H
I suspect there's a line above "input clk;" that isn't properly
terminated with a semicolon.
A module declaration port list *does* end with a
semicolon before the external inpu/output/wire/reg definitions.
I don't seem to have so much of a problem with semicolons,
though I do still find it a little strange. I remember learning
years ago about the difference between PL/I and Pascal. In PL/I
semicolons are statement terminators, in Pascal they are separators.
The difference appears most around END and ELSE.
Now, why is it that verilog doesn't use them on END?
-- glen
~~ VerilogMan ~~
2004-10-13 17:47:07 UTC
Permalink
Correct, i had forgotten a ";" at the end of my module declaration ! :)
I get a lot of errors with this type of statement:

input parallel_data[1:0];
** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Top_Module_Decoder.v(7): near "[":
expecting: ';'


and another error :
encoded_w_errors_out = encoded_w_errors;

** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Top_Module_Decoder.v(33): near "=":
expecting: IDENT
Post by John_H
I suspect there's a line above "input clk;" that isn't properly terminated
with a semicolon. A module declaration port list *does* end with a
semicolon before the external inpu/output/wire/reg definitions.
Post by ~~ VerilogMan ~~
NICE :) it got fixed but i used to work that way no ?
Now I am getting more errors :|
input clk ;
** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Top_Module_Decoder.v(4): near
expecting: ';'
John_H
2004-10-13 18:21:27 UTC
Permalink
You have so much stuff that should never have worked anywhere.
Inputs have the range before the identifier. 2-D inputs are not supported
in Verilog. So...

input [1:0] parallel_data;

is the "encoded_w_errors_out = encoded_w_errors;" supposed to be a
continuous assignment or is it in an always block, using the unusual
blocking operator?

This almost looks like something a prof would give to find out how little
someone actually knows about Verilog. Do you have a coworker that could
look over your shoulder as opposed to spending time here fixing your code?
Post by ~~ VerilogMan ~~
Correct, i had forgotten a ";" at the end of my module declaration ! :)
input parallel_data[1:0];
** Error: C:/Documents and
expecting: ';'
encoded_w_errors_out = encoded_w_errors;
** Error: C:/Documents and
expecting: IDENT
[snip]
~~ VerilogMan ~~
2004-10-13 20:13:01 UTC
Permalink
No, to be honest, this is not my code man , we trying to build a convolution
encoder
Each of us has to do part of the code... I did mine ,....
And I am supposed to do the testbench too ...
But all the stuff my partner sent are half not working ! He has his own way
of coding... and it's a pain to look for the errors
I have been over his codes for the whole day ... and I have to do get my tb
done for trw :|
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
You have so much stuff that should never have worked anywhere.
Inputs have the range before the identifier. 2-D inputs are not supported
in Verilog. So...
input [1:0] parallel_data;
is the "encoded_w_errors_out = encoded_w_errors;" supposed to be a
continuous assignment or is it in an always block, using the unusual
blocking operator?
This almost looks like something a prof would give to find out how little
someone actually knows about Verilog. Do you have a coworker that could
look over your shoulder as opposed to spending time here fixing your code?
Post by ~~ VerilogMan ~~
Correct, i had forgotten a ";" at the end of my module declaration ! :)
input parallel_data[1:0];
** Error: C:/Documents and
expecting: ';'
encoded_w_errors_out = encoded_w_errors;
** Error: C:/Documents and
expecting: IDENT
[snip]
~~ VerilogMan ~~
2004-10-13 20:25:16 UTC
Permalink
YAE (yet another error !)

always@(count or clk_div)
if(count==6)
begin
count = 0;

** Error: D:/DATA/School/478/Verilog/clock_divider.v(21): (vlog-2110)
Illegal reference to net "count".
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
You have so much stuff that should never have worked anywhere.
Inputs have the range before the identifier. 2-D inputs are not supported
in Verilog. So...
input [1:0] parallel_data;
is the "encoded_w_errors_out = encoded_w_errors;" supposed to be a
continuous assignment or is it in an always block, using the unusual
blocking operator?
This almost looks like something a prof would give to find out how little
someone actually knows about Verilog. Do you have a coworker that could
look over your shoulder as opposed to spending time here fixing your code?
Post by ~~ VerilogMan ~~
Correct, i had forgotten a ";" at the end of my module declaration ! :)
input parallel_data[1:0];
** Error: C:/Documents and
expecting: ';'
encoded_w_errors_out = encoded_w_errors;
** Error: C:/Documents and
expecting: IDENT
John_H
2004-10-13 20:41:01 UTC
Permalink
Make your partner fix his non-working code.

ANYTHING assigned in an always block either with a plocking operator or a
non-blocking operator cannot be a type wire. Typically the reg is used but
I believe integers would work as well.

This is super-simple Verilog. You should know this if you're "Verilog Man."
If your partner doesn't have it right, have him fix the code or get rid of
him - you're better off doing it right the first time than correcting his
mistakes.

I like to help people out but I'll bow out of further comments on your
errors. Good luck, man.
Post by ~~ VerilogMan ~~
YAE (yet another error !)
if(count==6)
begin
count = 0;
** Error: D:/DATA/School/478/Verilog/clock_divider.v(21): (vlog-2110)
Illegal reference to net "count".
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
You have so much stuff that should never have worked anywhere.
Inputs have the range before the identifier. 2-D inputs are not supported
in Verilog. So...
input [1:0] parallel_data;
is the "encoded_w_errors_out = encoded_w_errors;" supposed to be a
continuous assignment or is it in an always block, using the unusual
blocking operator?
This almost looks like something a prof would give to find out how little
someone actually knows about Verilog. Do you have a coworker that could
look over your shoulder as opposed to spending time here fixing your code?
Post by ~~ VerilogMan ~~
Correct, i had forgotten a ";" at the end of my module declaration ! :)
input parallel_data[1:0];
** Error: C:/Documents and
expecting: ';'
encoded_w_errors_out = encoded_w_errors;
** Error: C:/Documents and
expecting: IDENT
~~ VerilogMan ~~
2004-10-13 21:51:48 UTC
Permalink
My lab partner is my friend ... can't get rid of them...
I found already *a lot* of errors, but after a while especially when it is
not your code, you don't see everything ...
thanks anyways

PS: I am verilog man , because I will be a verilog master
:)
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
Make your partner fix his non-working code.
ANYTHING assigned in an always block either with a plocking operator or a
non-blocking operator cannot be a type wire. Typically the reg is used but
I believe integers would work as well.
This is super-simple Verilog. You should know this if you're "Verilog Man."
If your partner doesn't have it right, have him fix the code or get rid of
him - you're better off doing it right the first time than correcting his
mistakes.
I like to help people out but I'll bow out of further comments on your
errors. Good luck, man.
Post by ~~ VerilogMan ~~
YAE (yet another error !)
if(count==6)
begin
count = 0;
** Error: D:/DATA/School/478/Verilog/clock_divider.v(21): (vlog-2110)
Illegal reference to net "count".
--
Sorouche Mirmiran
http://sorouche.no-ip.org
Post by John_H
You have so much stuff that should never have worked anywhere.
Inputs have the range before the identifier. 2-D inputs are not
supported
Post by ~~ VerilogMan ~~
Post by John_H
in Verilog. So...
input [1:0] parallel_data;
is the "encoded_w_errors_out = encoded_w_errors;" supposed to be a
continuous assignment or is it in an always block, using the unusual
blocking operator?
This almost looks like something a prof would give to find out how
little
Post by ~~ VerilogMan ~~
Post by John_H
someone actually knows about Verilog. Do you have a coworker that could
look over your shoulder as opposed to spending time here fixing your
code?
Post by ~~ VerilogMan ~~
Post by John_H
Post by ~~ VerilogMan ~~
Correct, i had forgotten a ";" at the end of my module declaration !
:)
Post by ~~ VerilogMan ~~
Post by John_H
Post by ~~ VerilogMan ~~
input parallel_data[1:0];
** Error: C:/Documents and
expecting: ';'
encoded_w_errors_out = encoded_w_errors;
** Error: C:/Documents and
Settings/Zoroastreus/Desktop/Verilog/Top_Module_Decoder.v(33): near
expecting: IDENT
Continue reading on narkive:
Loading...