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

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-30-2005, 10:17 PM
xyzzy
Guest
 
Posts: n/a
Default Bi-directional Pin Use

I am working on a memory interface where the data path in bi-directional. I have internal signals data_write and data_read. I need to tristate data_write when data comes into the device for data_read. I have a internal tri_state signal but can't seem to figure out the correct way to code this.

Thanks
Reply With Quote
  #2 (permalink)  
Old 03-30-2005, 11:32 PM
mk
Guest
 
Posts: n/a
Default Re: Bi-directional Pin Use

On Wed, 30 Mar 2005 14:17:04 -0800, xyzzy <> wrote:

>I am working on a memory interface where the data path in bi-directional. I have internal signals data_write and data_read. I need to tristate data_write when data comes into the device for data_read. I have a internal tri_state signal but can't seem to figure out the correct way to code this.
>
>Thanks


assume an IO pad similar to following:

module IO(PAD, IN, OUT, OE);

inout PAD;
output IN; // from the pad IN to the core
input OUT; // OUT from the core
input OE;

wire IN = PAD;

wire PAD = OE ? OUT : 1'bZ

endmodule

and see if you connect your data and tri-state signals to the ports of
the IO. Normally you just need to connect your tri-state to the data
PADs and your data_write & data_read should go to the control signals
of the external memory.

Reply With Quote
  #3 (permalink)  
Old 03-31-2005, 02:47 AM
Weddick
Guest
 
Posts: n/a
Default Re: Bi-directional Pin Use

Now in VHDL


"mk" <kal*@dspia.*comdelete> wrote in message
news:[email protected]
> On Wed, 30 Mar 2005 14:17:04 -0800, xyzzy <> wrote:
>
>>I am working on a memory interface where the data path in bi-directional.
>>I have internal signals data_write and data_read. I need to tristate
>>data_write when data comes into the device for data_read. I have a
>>internal tri_state signal but can't seem to figure out the correct way to
>>code this.
>>
>>Thanks

>
> assume an IO pad similar to following:
>
> module IO(PAD, IN, OUT, OE);
>
> inout PAD;
> output IN; // from the pad IN to the core
> input OUT; // OUT from the core
> input OE;
>
> wire IN = PAD;
>
> wire PAD = OE ? OUT : 1'bZ
>
> endmodule
>
> and see if you connect your data and tri-state signals to the ports of
> the IO. Normally you just need to connect your tri-state to the data
> PADs and your data_write & data_read should go to the control signals
> of the external memory.
>



Reply With Quote
  #4 (permalink)  
Old 03-31-2005, 12:05 PM
Symon
Guest
 
Posts: n/a
Default Re: Bi-directional Pin Use

data_pins <= out_data when tristate = '0' else (others => 'Z');

"Weddick" <[email protected]> wrote in message
news:[email protected]
> Now in VHDL
>
>



Reply With Quote
  #5 (permalink)  
Old 03-31-2005, 04:42 PM
Rob Gaddi
Guest
 
Posts: n/a
Default Re: Bi-directional Pin Use

Symon wrote:
> data_pins <= out_data when tristate = '0' else (others => 'Z');
>
> "Weddick" <[email protected]> wrote in message
> news:[email protected]
>
>>Now in VHDL
>>
>>

>

I was just about to have to ask this very question. Much obliged.
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 PLI: drivers of bi-directional ports Andi Verilog 0 07-05-2006 08:21 AM
modelling Bi-directional address/data multiplexed bus morpheus FPGA 2 03-01-2005 02:38 AM
making output port to bi-directional port! Vick Verilog 0 12-16-2004 06:14 AM
Making output-port to bi-directional-port! Vick Verilog 5 12-15-2004 06:03 AM


All times are GMT +1. The time now is 10:26 PM.


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