`default_nettype none and tasks/functions?

P

Pacbell User

Guest
`default_nettype none
module temp;

task my_task;
input integer a; // <-- Modelsim flags error!
begin
$display("a = %0d", a );
end
endtask

initial begin
my_task ( 32 );
#1 $finish(1);
end
endmodule

^^^
When I attempt to compile this code under Modelsim XE-III 6.2c,
it gives me the following error message on my tasks's input declaration:

nettype of a must be explicitly declared. (Default_nettype is none.)

Is this a tool bug, or can I not use input/output integer on task/function
declarations when I use `default_nettype none?
 
Pacbell User wrote:
Is this a tool bug, or can I not use input/output integer on task/function
declarations when I use `default_nettype none?
`default_nettype only applies to implicit net declarations. Task/
function
arguments are always variables, never nets. This is a tool bug,
probably
caused by using the same code to process task/function argument
declarations as module port declarations.
 
On Mar 9, 12:10 pm, "Pacbell User" <dontre...@dontreply.com> wrote:
`default_nettype none
module temp;

task my_task;
input integer a; // <-- Modelsim flags error!
begin
$display("a = %0d", a );
end
endtask

initial begin
my_task ( 32 );
#1 $finish(1);
end
endmodule

^^^
When I attempt to compile this code under Modelsim XE-III 6.2c,
it gives me the following error message on my tasks's input declaration:

nettype of a must be explicitly declared. (Default_nettype is none.)

Is this a tool bug, or can I not use input/output integer on task/function
declarations when I use `default_nettype none?
Just to add to what Steve said, it ran fine in VCS as well. Maybe you
should try latest version of Modelsim?

Ajeetha, CVC
www.noveldv.com
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pacbell User wrote:
`default_nettype none
module temp;

task my_task;
input integer a; // <-- Modelsim flags error!
begin
$display("a = %0d", a );
end
endtask

initial begin
my_task ( 32 );
#1 $finish(1);
end
endmodule

^^^
When I attempt to compile this code under Modelsim XE-III 6.2c,
it gives me the following error message on my tasks's input declaration:

nettype of a must be explicitly declared. (Default_nettype is none.)

Is this a tool bug, or can I not use input/output integer on task/function
declarations when I use `default_nettype none?
Icarus Verilog (the current snapshot) gets this right. It really
looks like a bug in Modelsim, which is surprising because they
are generally pretty good. Check your version, and look for updates.

- --
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFF8uOvrPt1Sc2b3ikRAhREAKCvyBdDJcJdIsMTTWr0VivImf0RRwCgt7Ks
aZCRQW3TbYHyk+fRZ2tKHMk=
=mOUg
-----END PGP SIGNATURE-----
 

Welcome to EDABoard.com

Sponsor

Back
Top