Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Memory synthesis using VHDL - Errors

 
Thread Tools Search this Thread
Old 10-23-2006, 05:56 PM   #1
Default Memory synthesis using VHDL - Errors


Hi friends I am trying to implement memory using VHDL and below is the code for that. I have a limitation that my address bus has to be 19 bits wide and data bus 8 bits, I am getting the following errors in the order mentioned:

1. parse error, unexpected LIBRARY, expecting error or IDENTIFIER
2. Library IEEE is not declared.


these point out at the very beginning on the code :

USE library IEEE;
USE IEEE.STD_LOGIC_1164.all;

package RAM_package is
subtype addr is std_logic_vector (18 downto 0);
type MEM is array (524287 downto 0) of addr;
end RAM_package;

USE WORK.RAM_package.ALL;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity ram_1 is
port (A : in std_logic_vector(18 downto 0) :="0000000000000000000";
CEB, WEB, OEB : out STD_LOGIC;
data : inout std_logic_vector(7 downto 0));
end ram_1;

architecture Behavioral of ram_1 is

signal i_bus : std_logic_vector(7 downto 0) := "00000000"; -- RAM internal data latch
signal mem : MEM; -- RAM data

begin
process begin

variable i: integer;

for i in 0 to 128 loop

wait until CEB = '0';

if WEB = '1' then --- read op

i_bus <= mem(A);

elsif WEB = '0' then -- write op
mem(A) <= data;
i_bus <= data;

else i_bus <= ( others => 'X');

end if ;
A<=A+1;
end loop;
end process ;

process (OEB, i_bus) begin -- control output drivers:
case (OEB) is
when '0' => data <= i_bus;
when '1' => data <= ( others => 'Z');
when others => data <= ( others => 'X');
end case ;
end process ;

end Behavioral;


strykaar
strykaar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
OCZ 6GB Triple-Channel 1333 MHz DDR3 Memory Kit Admin Front Page News 0 02-16-2009 01:27 PM
memory upgrade -D- A+ Certification 1 02-03-2007 01:01 AM
Re: What memory to use? me A+ Certification 0 12-14-2004 03:33 AM
Re: Memory stick question Nildram A+ Certification 1 01-14-2004 02:41 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46