Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Memory synthesis using VHDL - Errors

Reply
Thread Tools

Memory synthesis using VHDL - Errors

 
 
strykaar strykaar is offline
Junior Member
Join Date: Aug 2006
Posts: 3
 
      10-23-2006
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;
 
Reply With Quote
 
 
 
Reply

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
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM
Release of SPARK C-to-VHDL Parallelizing High Level Synthesis tool S Gupta VHDL 0 12-28-2003 07:04 PM
SOS! newbie question about synthesizable VHDL : synthesis run successfully but post-synthesis failed... walala VHDL 4 09-09-2003 08:41 AM
what are the possible reasons that successful pre-synthesis simulation + successful synthesis = failed post-synthes walala VHDL 4 09-08-2003 01:51 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57