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.

inout ports in verilog

Status
Not open for further replies.

kaelk

Newbie level 2
Joined
Jan 24, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
Dear all;

I have the following error with modelsim

Error: module_uart/biDirBuffer.sv(6): An inout port (dat_io) must be a net type.

ad the code for the moule is below


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
module biDirBuffer(
   input  logic       outEn,
   input  logic [7:0] dat_i,
   output logic [7:0] dat_o,
   inout  logic  [7:0] dat_io
);
   
   assign dat_o = dat_io; 
   assign dat_io = outEn ? dat_i : 'Z;
endmodule




I think that I made he correct assignments, if you have any idea please help
Thanks
 
Last edited by a moderator:

Try "inout wire [7:0] dat_io" or just plain "inout [7:0] dat_io" instead. Because, well, an inout port (dat_io) must be a net type. The error message says it all really.
 
  • Like
Reactions: kaelk

    kaelk

    Points: 2
    Helpful Answer Positive Rating
Try "inout wire [7:0] dat_io" or just plain "inout [7:0] dat_io" instead. Because, well, an inout port (dat_io) must be a net type. The error message says it all really.

thanks mrflibble, I tried it and it works,
yes I understand that the error message says that inout data_io must be a net/wire
but I thin that a logic type can get a Z value ? no?
Thanks
 


Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top