Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Vhdl Ram

Thread Tools

Vhdl Ram

bmartiniello bmartiniello is offline
Junior Member
Join Date: Sep 2006
Posts: 1

I am having trouble with a RAM component that I created from a datasheet. The code for the component can be found below. The trouble I am having occurs when I try to write into the memory. If the chip enable (cen) is placed low before the write enable (wen), when the write enable goes low, the input goes undefined. This happens when there is data already in the memory or not. If both cen and wen are placed low at the same time, the write occurs as it should. Any insight as to what causes this problem would be appreciated. Thanks.

ENTITY mil_11570287_2_1024x4_sram_b IS

addr : IN std_logic_vector (9 DOWNTO 0);
cen : IN std_logic;
wen : IN std_logic;
I : INOUT std_logic_vector (4 DOWNTO 1)

END mil_11570287_2_1024x4_sram_b ;

ARCHITECTURE arch OF mil_11570287_2_1024x4_sram_b IS

type mem_array is array(0 to 1023) of std_logic_vector(4 downto 1);
signal sram_values: mem_array;


process(cen, wen, I, sram_values, addr)
if cen = '0' then
if wen = '0' then
sram_values(conv_integer(unsigned(addr))) <= I;
I <= sram_values(conv_integer(unsigned(addr)));
end if;
I <= (others => 'Z');
end if;
end process;

Reply With Quote

Thread Tools

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
No RAM left, n e 1 no of RAM giver (freeware) ? Morph Computer Support 2 10-09-2004 02:11 AM
NEW RAM V OLD RAM Allan Birnbaum Ditlevsen Computer Information 2 06-07-2004 01:50 PM
Looking for a VHDL or Verilog RAM Model that modles Common RAM Faults Robert Posey VHDL 0 11-26-2003 07:50 PM
Mixing SDR Ram with DDR Ram? Daz Computer Support 2 09-14-2003 03:28 PM