Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

inout wire logic, quartus15.1, error

Altera_Forum
Honored Contributor II
2,571 Views

Using Quartus 15.1 I have the following issue,  

when I'm using this construction  

- inout wire logic [31:0] SIG1; - it is working correctly,  

 

but when I define logic [31:0] in typedef into package and using import package, how 

- package def_type; 

typedef logic [31:0] SIG1_WIDTH_T; 

endpackage 

 

inout SIG1_WIDTH_T SIG1; 

 

The Quartus send me an Error (10170): Verilog HDL syntax error.. 

 

The last one scheme is run correctly by Synplify & NCSIM, and Quartus 15.1 according it's Help supports Package & User-defined types
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
920 Views

Hello, 

 

It's true that Quartus 15.1 supports package and user-defined types. Could you share your entire code? ( File which contains package and another file which contains your port declaration.) Also please post full message for your error. 

 

Thanks, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

 

--- Quote Start ---  

Hello, 

 

It's true that Quartus 15.1 supports package and user-defined types. Could you share your entire code? ( File which contains package and another file which contains your port declaration.) Also please post full message for your error. 

 

Thanks, 

Bhaumik 

--- Quote End ---  

 

 

 

It's full code, which ended with error: 

Error (10170): Verilog HDL syntax error at tst_package.sv(8) near text: "SIG1"; expecting ")". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Altera Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. 

 

 

package state_type; typedef logic SIG1_WIDTH_T; endpackage import state_type::*; // import package definitions into $unit module tst_sv( inout wire SIG1_WIDTH_T SIG1//not working //inout wire logic SIG1//working correctly ); endmodule
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

Hi, 

 

You are using 'wire' and 'logic' both types. According to me only single type should be used. 

 

Try following : 

 

package state_type;  

typedef wire [31:0] SIG1_WIDTH_T; 

endpackage 

 

import state_type::*; // import package definitions into $unit 

 

module tst_sv( 

inout SIG1_WIDTH_T SIG1//not working 

//inout wire logic [31:0] SIG1//working correctly 

); 

 

 

endmodule  

 

It should work. 

 

Thank you, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

`wire logic` is legal SystemVerilog. wire is the signal kind, and logic is the data type. The other kind of signal is var for variable. This syntax was added in 1800-2009. To be backward compatible with Verilog, logic is the implicit data type for a wire. SystemVerilog allows other data types like structs and enums on wires. Quartus may not support this yet.

0 Kudos
Altera_Forum
Honored Contributor II
920 Views

Let's view below code, while inout wire logic defines directly it works correctly, but when I try to use logic whithout wire - I get error from Quartus - 

Error (10663): Verilog HDL Port Connection error at tst_package.sv(35): output or inout port "SIG1" must be connected to a structural net expression 

 

 

package state_type; typedef logic SIG1_WIDTH_T; endpackage import state_type::*; // import package definitions into $unit module inner_m( input EN, input SIG1_WIDTH_T IN1, output SIG1_WIDTH_T OUT1, inout SIG1_WIDTH_T SIG1//not working //inout wire logic SIG1//working correctly ); assign SIG1 = EN ? IN1 : 'z; assign OUT1 = SIG1; endmodule module tst_sv( input EN, input SIG1_WIDTH_T IN1, output SIG1_WIDTH_T OUT1, inout SIG1_WIDTH_T SIG1//not working //inout wire logic SIG1//working correctly ); inner_m inner_m( .EN (EN), .IN1 (IN1), .OUT1 (OUT1), .SIG1 (SIG1) ); endmodule
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

Did you try 

 

inout wire SIG1_WIDTH_T SIG1
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

inout wire SIG1_WIDTH_T SIG1 

 

- Yes, I have try it, and get error - 

Error (10170): Verilog HDL syntax error at tst_package.sv(11) near text: "SIG1"; expecting ")". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Altera Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number.
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

This seems like a support issue for Quartus.

0 Kudos
Altera_Forum
Honored Contributor II
920 Views

 

--- Quote Start ---  

`wire logic` is legal SystemVerilog. wire is the signal kind, and logic is the data type. The other kind of signal is var for variable. This syntax was added in 1800-2009. To be backward compatible with Verilog, logic is the implicit data type for a wire. SystemVerilog allows other data types like structs and enums on wires.  

--- Quote End ---  

 

 

Thank you. I was not aware about this. 

 

Cheers, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

 

--- Quote Start ---  

This seems like a support issue for Quartus. 

--- Quote End ---  

 

 

I think so, but I don't know any way to connect with support altera. I only rely that they are reading this forum
0 Kudos
Altera_Forum
Honored Contributor II
920 Views

Hello putnik47, 

 

Sorry for very late reply. 

 

By creating myAltera account, you can generate service request. This way you would be in direct touch with Altera's representative. Visit following : https://www.altera.com/mal-all/mal-signin.html?resource=%2fcontent%2faltera-www%2fglobal%2fen_us%2findex%2fmyaltera%2fmal-home.html&$login$=%24%24login%24%24 (https://www.altera.com/mal-all/mal-signin.html?resource=%2fcontent%2faltera-www%2fglobal%2fen_us%2findex%2fmyaltera%2fmal-home.html&$login$=%24%24login%24%24

 

Cheers, 

Bhaumik
0 Kudos
Reply