Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
53cfac24
Commit
53cfac24
authored
Aug 16, 2017
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
genrams: ram initialization functions should be impure
parent
c590dfac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
memory_loader_pkg.vhd
modules/genrams/memory_loader_pkg.vhd
+10
-10
generic_dpram_dualclock.vhd
modules/genrams/xilinx/generic_dpram_dualclock.vhd
+1
-1
generic_dpram_sameclock.vhd
modules/genrams/xilinx/generic_dpram_sameclock.vhd
+1
-1
generic_dpram_split.vhd
modules/genrams/xilinx/generic_dpram_split.vhd
+2
-2
No files found.
modules/genrams/memory_loader_pkg.vhd
View file @
53cfac24
...
...
@@ -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
;
...
...
modules/genrams/xilinx/generic_dpram_dualclock.vhd
View file @
53cfac24
...
...
@@ -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
);
...
...
modules/genrams/xilinx/generic_dpram_sameclock.vhd
View file @
53cfac24
...
...
@@ -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
);
...
...
modules/genrams/xilinx/generic_dpram_split.vhd
View file @
53cfac24
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment