Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

* Verilog HDL error at *: declaring global objects is a System verilog feature

Status
Not open for further replies.

manili

Member level 1
Joined
Sep 15, 2014
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,602
Hi all,
I'm using Quartus II to compile a verilog code.
You can imaging the code as below :

File1.v:

reg A, B, C;
wire D, E, F;

task My_Task;
//use A, ..., F here.
endtask
----------------------------
File2.v:

module Top;
`include "File1.v"
//use My_Task here
endmodule
----------------------------

But the compiler does not compile my code and give me this error :

Error (error id): Verilog HDL error at File1.v(some line): declaring global objects is a SystemVerilog feature

Please correct me if I'm wrong:
The precompiler program should append File1.v into File2.v at the place that you write "`include "File1.v"". So there should be no problem with the code because it's just like to pass the following to the compiler :

----------------------------
File2.v:

module Top;
reg A, B, C;
wire D, E, F;

task My_Task;
//use A, ..., F here.
endtask

//use My_Task here
endmodule

Thank you very much for your help.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top