Commit 53cfac24 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

genrams: ram initialization functions should be impure

parent c590dfac
......@@ -12,26 +12,26 @@ package memory_loader_pkg is
subtype t_meminit_array is t_generic_ram_init;
function f_load_mem_from_file
impure function f_load_mem_from_file
(file_name : string;
mem_size : integer;
mem_width : integer;
fail_if_notfound : boolean)
return t_meminit_array;
function f_load_mem32_from_file
impure function f_load_mem32_from_file
(file_name : string; mem_size : integer; fail_if_notfound : boolean)
return t_ram32_type;
function f_load_mem16_from_file
impure function f_load_mem16_from_file
(file_name : string; mem_size : integer; fail_if_notfound : boolean)
return t_ram16_type;
function f_load_mem8_from_file
impure function f_load_mem8_from_file
(file_name : string; mem_size : integer; fail_if_notfound : boolean)
return t_ram8_type;
function f_load_mem32_from_file_split
impure function f_load_mem32_from_file_split
(file_name : in string; mem_size : in integer;
fail_if_notfound : boolean; byte_idx : in integer)
return t_ram8_type;
......@@ -40,7 +40,7 @@ end memory_loader_pkg;
package body memory_loader_pkg is
function f_load_mem_from_file
impure function f_load_mem_from_file
(file_name : in string;
mem_size : in integer;
mem_width : in integer;
......@@ -87,7 +87,7 @@ package body memory_loader_pkg is
-- RAM initialization for most common sizes to speed-up synthesis
-------------------------------------------------------------------
function f_load_mem32_from_file
impure function f_load_mem32_from_file
(file_name : in string;
mem_size : in integer;
fail_if_notfound : boolean)
......@@ -127,7 +127,7 @@ package body memory_loader_pkg is
-------------------------------------------------------------------
function f_load_mem16_from_file
impure function f_load_mem16_from_file
(file_name : in string;
mem_size : in integer;
fail_if_notfound : boolean)
......@@ -167,7 +167,7 @@ package body memory_loader_pkg is
-------------------------------------------------------------------
function f_load_mem8_from_file
impure function f_load_mem8_from_file
(file_name : in string;
mem_size : in integer;
fail_if_notfound : boolean)
......@@ -209,7 +209,7 @@ package body memory_loader_pkg is
-- initialization for 32-bit RAM split into 4x 8-bit BRAM
-------------------------------------------------------------------
function f_load_mem32_from_file_split
impure function f_load_mem32_from_file_split
(file_name : in string;
mem_size : in integer;
fail_if_notfound : boolean;
......
......@@ -79,7 +79,7 @@ architecture syn of generic_dpram_dualclock is
type t_ram_type is array(0 to g_size-1) of std_logic_vector(g_data_width-1 downto 0);
function f_file_to_ramtype return t_ram_type is
impure function f_file_to_ramtype return t_ram_type is
variable tmp : t_ram_type;
variable n, pos : integer;
variable mem32 : t_ram32_type(0 to g_size-1);
......
......@@ -78,7 +78,7 @@ architecture syn of generic_dpram_sameclock is
type t_ram_type is array(0 to g_size-1) of std_logic_vector(g_data_width-1 downto 0);
function f_file_to_ramtype return t_ram_type is
impure function f_file_to_ramtype return t_ram_type is
variable tmp : t_ram_type;
variable n, pos : integer;
variable mem32 : t_ram32_type(0 to g_size-1);
......
......@@ -98,7 +98,7 @@ architecture syn of generic_dpram_split is
type t_split_ram is array(0 to g_size-1) of std_logic_vector(7 downto 0);
function f_file_to_ramtype(idx : integer) return t_split_ram is
impure function f_file_to_ramtype(idx : integer) return t_split_ram is
variable tmp : t_split_ram;
variable mem8 : t_ram8_type(0 to g_size-1);
begin
......@@ -112,7 +112,7 @@ architecture syn of generic_dpram_split is
return t_split_ram(mem8);
end f_file_to_ramtype;
function f_file_contents return t_meminit_array is
impure function f_file_contents return t_meminit_array is
begin
return f_load_mem_from_file(g_init_file, g_size, c_data_width, g_fail_if_file_not_found);
end f_file_contents;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment