FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2007, 05:43 PM
linuxczar
Guest
 
Posts: n/a
Default how to represent "inout" data type in testbenches in "verilog"

hi everybody
i didnt get how to represent "inout" datatype in testbenches in
verilog. i just tried with both "reg" and "wire" types but it didn't
worked.

thanks and regards
gkreddy.bh

Reply With Quote
  #2 (permalink)  
Old 03-14-2007, 07:30 PM
Alex
Guest
 
Posts: n/a
Default Re: how to represent "inout" data type in testbenches in "verilog"

On Mar 14, 11:43 am, "linuxczar" <h.264wo...@gmail.com> wrote:
> hi everybody
> i didnt get how to represent "inout" datatype in testbenches in
> verilog. i just tried with both "reg" and "wire" types but it didn't
> worked.
>
> thanks and regards
> gkreddy.bh


Here is an example :

wire [7:0] DQ;
reg [7:0] D = 0;
wire [7:0] Q;

assign DQ = (OE)? 8'bz : D;
assign Q = DQ;

dut dut (
....
.DQ (DQ), //inout
.OE (OE), //input
....
);

-Alex

Reply With Quote
  #3 (permalink)  
Old 03-21-2007, 07:28 PM
[email protected]
Guest
 
Posts: n/a
Default Re: how to represent "inout" data type in testbenches in "verilog"

On Mar 14, 10:30 pm, "Alex" <agnu...@gmail.com> wrote:
> On Mar 14, 11:43 am, "linuxczar" <h.264wo...@gmail.com> wrote:
>
> > hi everybody
> > i didnt get how to represent "inout" datatype in testbenches in
> > verilog. i just tried with both "reg" and "wire" types but it didn't
> > worked.

>
> > thanks and regards
> > gkreddy.bh

>
> Here is an example :
>
> wire [7:0] DQ;
> reg [7:0] D = 0;
> wire [7:0] Q;
>
> assign DQ = (OE)? 8'bz : D;
> assign Q = DQ;
>
> dut dut (
> ....
> .DQ (DQ), //inout
> .OE (OE), //input
> ....
> );
>
> -Alex




Why cant we use the inout declaration directly

module top(a,b);
inout a,b;
endmodule


Alex

Did you mean that the simulator will use its own algorithm to coerce
the port to inout . DQ port

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
verilog code for the "international data encryption algorithm(IDEA)" neelima Verilog 0 01-23-2007 11:09 AM
verilog code for the "international data encryption algorithm(IDEA)" neelima Verilog 0 01-23-2007 11:09 AM
Why do we need "check" "call" "misc" in PLI? Lee Verilog 1 05-17-2004 04:42 PM
Can't find companion website for the "Ciletti" Verilog book. Teece Verilog 1 11-12-2003 06:55 PM
SystemVerilog: "logic" or "ulogic?" Cliff Cummings Verilog 1 09-21-2003 12:55 AM


All times are GMT +1. The time now is 04:13 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved