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.

how to model the testbench for bidirection_bus?

Status
Not open for further replies.

kimjin

Member level 3
Joined
Mar 6, 2005
Messages
61
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,729
vsim-3053

in my design ,i used a bidirection_bus,it's the type of inout,inout [3:0] data_bus;
in my testbench, i identified the signal:reg [3:0] data_bus;
but in the modelsim, it reports a error when i load the simulation program bidir_bus_test.v,the error said:
Error: (vsim-3053) E:/vhd/bidir_bus/bidir_bus_test.v(14): Illegal output or inout port connection (port 'data_bus').
# Region: /bidir_bus_test/u1
i'd wonder how to simulation the bidirection_bus,who can help me?
thank you.
 

(vsim-3053)

here is how you need to handle bi directional ports!

inout [3:0] data_bus;
// use following register to drive the data..
// if you are not driving any data on bidirectional data bus
// asssign Z to data_bus_reg
// for reading data from bidirectional bus use "data_bus" directly!

reg [3:0] data_bus_reg;

assign data_bus = data_bus_reg;

Hope this helps!
 

bidirectional bus testbench

it does work.
thank you very much.
 

illegal output or inout port connection (port

try out this link.

**broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top