URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [trunk/] [vhdl/] [ram.vhd] - Diff between revs 85 and 98
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 85 |
Rev 98 |
Line 46... |
Line 46... |
|
|
generic_ram:
|
generic_ram:
|
if memory_type = "GENERIC" generate
|
if memory_type = "GENERIC" generate
|
ram_proc: process(clk, mem_byte_sel, mem_write,
|
ram_proc: process(clk, mem_byte_sel, mem_write,
|
mem_address, mem_data_w, mem_sel)
|
mem_address, mem_data_w, mem_sel)
|
variable mem_size : natural := 8192;
|
variable mem_size : natural := 2 ** ADDRESS_WIDTH;
|
variable data : std_logic_vector(31 downto 0);
|
variable data : std_logic_vector(31 downto 0);
|
subtype word is std_logic_vector(mem_data_w'length-1 downto 0);
|
subtype word is std_logic_vector(mem_data_w'length-1 downto 0);
|
type storage_array is
|
type storage_array is
|
array(natural range 0 to mem_size-1) of word;
|
array(natural range 0 to mem_size/4 - 1) of word;
|
variable storage : storage_array;
|
variable storage : storage_array;
|
variable index : natural := 0;
|
variable index : natural := 0;
|
file load_file : text is in "code.txt";
|
file load_file : text is in "code.txt";
|
variable hex_file_line : line;
|
variable hex_file_line : line;
|
begin
|
begin
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.