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
dbf0b46b
Commit
dbf0b46b
authored
Feb 11, 2020
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xvme64x_core: support for static address DIP switch
parent
6abee52c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
vme_funct_match.vhd
hdl/rtl/vme_funct_match.vhd
+11
-11
xvme64x_core.vhd
hdl/rtl/xvme64x_core.vhd
+12
-3
No files found.
hdl/rtl/vme_funct_match.vhd
View file @
dbf0b46b
...
...
@@ -66,21 +66,21 @@ architecture rtl of vme_funct_match is
signal
s_function
:
std_logic_vector
(
ader_i
'range
);
signal
s_ader_am_valid
:
std_logic_vector
(
ader_i
'range
);
begin
------------------------------------------------------------------------------
-- Address and AM comparators
------------------------------------------------------------------------------
gen_match_loop
:
for
i
in
ader_i
'range
generate
-- True in case of match
s_function
(
i
)
<=
'1'
when
(((
addr_i
(
t_ADEM_M
)
and
g_DECODER
(
i
)
.
adem
(
t_ADEM_M
))
------------------------------------------------------------------------------
-- Address and AM comparators
------------------------------------------------------------------------------
gen_match_loop
:
for
i
in
ader_i
'range
generate
-- True in case of match
s_function
(
i
)
<=
'1'
when
(((
addr_i
(
t_ADEM_M
)
and
g_DECODER
(
i
)
.
adem
(
t_ADEM_M
))
=
ader_i
(
i
)(
t_ADEM_M
))
and
((
am_i
=
ader_i
(
i
)(
t_ADER_AM
))
or
not
g_DECODE_AM
))
else
'0'
;
-- True if the AM is enabled by AMCAP
s_ader_am_valid
(
i
)
<=
g_DECODER
(
i
)
.
amcap
(
to_integer
(
unsigned
(
am_i
)));
end
generate
;
-- True if the AM is enabled by AMCAP
s_ader_am_valid
(
i
)
<=
g_DECODER
(
i
)
.
amcap
(
to_integer
(
unsigned
(
am_i
)));
end
generate
;
------------------------------------------------------------------------------
-- Function priority encoder
...
...
hdl/rtl/xvme64x_core.vhd
View file @
dbf0b46b
...
...
@@ -107,6 +107,9 @@ entity xvme64x_core is
g_BEG_SN
:
std_logic_vector
(
23
downto
0
)
:
=
x"000000"
;
g_END_SN
:
std_logic_vector
(
23
downto
0
)
:
=
x"000000"
;
g_USE_BASE_ADDR_SWITCH
:
boolean
:
=
FALSE
;
g_BASE_ADDR_BITS
:
integer
:
=
6
;
-- Function decoder parameters.
g_DECODER
:
t_vme64x_decoder_arr
:
=
c_vme64x_decoders_default
);
port
(
...
...
@@ -134,6 +137,9 @@ entity xvme64x_core is
-- pulse to the IRQ Generator.
irq_ack_o
:
out
std_logic
;
-- Base address switch(es)
base_addr_switch_i
:
in
std_logic_vector
(
g_BASE_ADDR_BITS
-1
downto
0
)
:
=
(
others
=>
'0'
);
-- User CSR
-- The following signals are used when g_USER_CSR_EXT = true
-- otherwise they are connected to the internal user CSR.
...
...
@@ -181,7 +187,7 @@ architecture rtl of xvme64x_core is
-- Compute the ADER for each function if CR/CSR is not used. For example:
-- ADEM=FF000000, GA=05 => ADER=05000000
-- ADEM=FFE00000, GA=05 => ADER=00A00000
function
compute_static_ader
(
ga
:
std_logic_vector
(
4
downto
0
)
)
return
t_ader_array
is
function
compute_static_ader
(
ga
:
std_logic_vector
)
return
t_ader_array
is
variable
a
:
t_ader_array
(
0
to
c_last_ader
)
:
=
(
others
=>
x"0000_0000"
);
begin
for
i
in
a
'range
loop
...
...
@@ -396,7 +402,7 @@ begin
port
map
(
clk_i
=>
clk_i
,
rst_n_i
=>
s_reset_n
,
addr_i
=>
s_addr_decoder_i
,
addr_o
=>
s_addr_decoder_o
,
decode_start_i
=>
s_decode_start
,
...
...
@@ -519,7 +525,10 @@ begin
s_module_enable
<=
'1'
;
s_module_reset
<=
'0'
;
s_bar
<=
s_ga
;
s_ader
<=
compute_static_ader
(
s_ga
);
s_ader
<=
compute_static_ader
(
s_ga
)
when
not
g_USE_BASE_ADDR_SWITCH
else
compute_static_ader
(
base_addr_switch_i
);
end
generate
;
user_csr_addr_o
<=
s_user_csr_addr
;
...
...
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