![]() |
|
|
|||||||
![]() |
VHDL - Memory synthesis using VHDL - Errors |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |