M
Mike
Guest
Hi,
In my small example below, I get an error when trying to call function
f(). However, if I comment out the line indicated below, then I get no
errors.
According to the 1364-1995 spec, section 3.11 Name Spaces, I did not
violate any rule when defining wire "f' in module "b" because function
"f" is defined in a different module. Also, the declaration of wire
"f" is later in the source than the call to function "f". So, is there
something that I am missing about how the call to function "f" in
module "b" is elaborated?
Thanks in advance,
Mike
---------------------
module a;
b b();
function f;
input i;
f = i;
endfunction
endmodule
module b;
wire w = f(1'b0);
wire f = 1'h1; // no error if this line commented out
initial
$display("%b", w);
endmodule
-------------------------
Compiling source file "0.v"
Error! Identifier (f) not a task or function
[Verilog-INOTF]
"0.v", 10: f(1'b0);
Error! Identifier (f) not a task or function
[Verilog-INOTF]
"0.v", 10: f(1'b0);
2 errors
End of Tool: VERILOG-XL 05.70.001-s Aug 14, 2006 22:53:04
In my small example below, I get an error when trying to call function
f(). However, if I comment out the line indicated below, then I get no
errors.
According to the 1364-1995 spec, section 3.11 Name Spaces, I did not
violate any rule when defining wire "f' in module "b" because function
"f" is defined in a different module. Also, the declaration of wire
"f" is later in the source than the call to function "f". So, is there
something that I am missing about how the call to function "f" in
module "b" is elaborated?
Thanks in advance,
Mike
---------------------
module a;
b b();
function f;
input i;
f = i;
endfunction
endmodule
module b;
wire w = f(1'b0);
wire f = 1'h1; // no error if this line commented out
initial
$display("%b", w);
endmodule
-------------------------
Compiling source file "0.v"
Error! Identifier (f) not a task or function
[Verilog-INOTF]
"0.v", 10: f(1'b0);
Error! Identifier (f) not a task or function
[Verilog-INOTF]
"0.v", 10: f(1'b0);
2 errors
End of Tool: VERILOG-XL 05.70.001-s Aug 14, 2006 22:53:04