FPGA VHDL tristate buffer for ram inout signal

Click For Summary

Discussion Overview

The discussion revolves around the implementation of a tristate buffer for managing inout signals in an FPGA context, specifically for reading from and writing to a RAM module. Participants explore the correct usage of inout signals and the configuration of the tristate buffer in VHDL code.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant questions whether the inout signal is correctly configured for writing to RAM when en = '1' and reading from RAM when en = '0'.
  • The same participant seeks clarification on the correctness of the buffer implementation where DQout is the incoming data for writing and DQ is the data being read when en goes low.
  • Another participant expresses that they have resolved their issue but does not provide details on the solution, prompting a request for clarification from others.
  • A different participant asks for the solution details, indicating they face a similar problem.
  • One participant reiterates their earlier explanation, stating that DQin is the data to write and DQout is the data to read when en is '1'.

Areas of Agreement / Disagreement

The discussion remains unresolved, with multiple participants expressing uncertainty about the implementation details of the tristate buffer and inout signals. There is no consensus on the correct approach.

Contextual Notes

Participants have not fully explored the implications of using tristate buffers with external RAM or the specific conditions under which their configurations are valid. There may be missing assumptions regarding the FPGA environment and the specific RAM module being used.

bassplayer142
Messages
431
Reaction score
0
First off, this is not school related as my semester just ended and I've just been playing around with my fpga.

My problem is that I'm trying to write to the ram module then read from it. I understand a little of the tristate buffer and inout signal but we didn't really go over this in class and I don't know if what i have is right or wrong. Here is some of my code that should give an indication of everything. (Please note i took out a lot of irrelevant code below for space and simplicity.

EDIT: I forgot to mention that I read that tristate buffers can only be used with external pins (mine is external ram). Also I just realized that this should probably be better off in the programming section so moving it is no problem.

1. Is the inout signal correct for the data being sent in(writing ram) when en = '1' and data coming out (reading ram) at en = '0'?
2. Is the buffer below correct if DQout is the incoming data I want to write to ram, and DQ is the incoming data back (read) when en goes low the data out is DQ.

Thanks for any help!port(
DQ : inout std_logic_vector(15 downto 0);
A : out STD_LOGIC_VECTOR(22 downto 0);

FlashCE_L,CE_L,WE_L,LB_L,OE_L,UB_L,RamCLK,RamADV_L,RamCRE : out STD_LOGIC
);

--buffer
DQout <= DQin when en = '1' else (others => 'Z');

DQ <= DQin;
 
Engineering news on Phys.org
Just figured it all out. Thanks anyway, feel free to close the thread or comment if interested.
 
bassplayer142 said:
Just figured it all out. Thanks anyway, feel free to close the thread or comment if interested.

Please tell me how you did it because i have the same problem and can't figure it out. Have nice day
 
valium2008 said:
Please tell me how you did it because i have the same problem and can't figure it out. Have nice day

Basically it is the same as I put above. The DQin is the data you want to write and then DQout is the data you want to read when en is '1'.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
Replies
1
Views
9K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
15K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 14 ·
Replies
14
Views
5K