Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
VME64x core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
VME64x core
Commits
28197037
Commit
28197037
authored
Sep 18, 2017
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CR_CSR: reduce CR rom size.
parent
5feb437b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
VME_CR_CSR_Space.vhd
hdl/vme64x-core/rtl/VME_CR_CSR_Space.vhd
+8
-4
No files found.
hdl/vme64x-core/rtl/VME_CR_CSR_Space.vhd
View file @
28197037
...
...
@@ -249,7 +249,7 @@ architecture rtl of VME_CR_CSR_Space is
-- Function to encode the configuration ROM
function
f_cr_encode
return
t_cr_array
is
variable
cr
:
t_cr_array
(
0
to
1023
)
:
=
(
others
=>
x"00"
);
variable
cr
:
t_cr_array
(
0
to
511
)
:
=
(
others
=>
x"00"
);
variable
crc
:
unsigned
(
7
downto
0
)
:
=
x"00"
;
begin
cr
(
16
#
001
#
to
16
#
003
#
)
:
=
(
x"00"
,
x"03"
,
x"ff"
);
-- Length of CR (excluding checksum)
...
...
@@ -280,14 +280,14 @@ architecture rtl of VME_CR_CSR_Space is
cr
(
16
#
048
#+
i
*
8
to
16
#
04
f
#+
i
*
8
)
:
=
f_cr_vec
(
g_AMCAP
(
i
));
-- Function X AMCAP
cr
(
16
#
188
#+
i
*
4
to
16
#
18
b
#+
i
*
4
)
:
=
f_cr_vec
(
g_ADEM
(
i
));
-- Function X ADEM
end
loop
;
for
i
in
1
to
cr
'length
-1
loop
for
i
in
cr
'range
loop
crc
:
=
crc
+
unsigned
(
cr
(
i
));
end
loop
;
cr
(
16
#
000
#
)
:
=
std_logic_vector
(
crc
);
-- Checksum
return
cr
;
end
;
signal
s_cr_rom
:
t_cr_array
(
0
to
1023
)
:
=
f_cr_encode
;
constant
s_cr_rom
:
t_cr_array
(
0
to
511
)
:
=
f_cr_encode
;
------------------------------------------------------------------------------
...
...
@@ -305,7 +305,11 @@ begin
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
s_cr_data
<=
s_cr_rom
(
to_integer
(
s_addr
)
mod
1024
);
if
s_addr
(
11
)
=
'0'
then
s_cr_data
<=
s_cr_rom
(
to_integer
(
s_addr
(
10
downto
2
)));
else
s_cr_data
<=
x"00"
;
end
if
;
end
if
;
end
process
;
...
...
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