Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit core collection
Commits
60c698d6
Commit
60c698d6
authored
Mar 19, 2024
by
Harvey Leicester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added switch for host interface endianness
parent
3acd992e
Pipeline
#5220
failed with stage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
17 deletions
+43
-17
wrc_urv_wrapper.vhd
modules/wrc_core/wrc_urv_wrapper.vhd
+43
-17
No files found.
modules/wrc_core/wrc_urv_wrapper.vhd
View file @
60c698d6
...
...
@@ -36,7 +36,8 @@ entity wrc_urv_wrapper is
generic
(
g_IRAM_SIZE
:
integer
;
g_IRAM_INIT
:
string
;
g_CPU_ID
:
integer
);
g_CPU_ID
:
integer
;
g_SWAP_HOST_ENDIAN
:
boolean
:
=
true
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
...
@@ -185,26 +186,51 @@ begin
db_i
=>
dm_data_s
,
qb_o
=>
dm_mem_rdata
);
-- Host access to the CPU memory (through instruction port)
p_iram_host_access
:
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
ha_im_write
<=
'0'
;
else
if
regs_in
.
udata_load_o
=
'1'
then
ha_im_wdata
<=
f_swap_endian_32
(
regs_in
.
udata_o
);
ha_im_write
<=
'1'
;
else
gen_host_access_swap_endian
:
if
g_SWAP_HOST_ENDIAN
=
true
generate
-- Host access to the CPU memory (through instruction port)
p_iram_host_access
:
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
ha_im_write
<=
'0'
;
else
if
regs_in
.
udata_load_o
=
'1'
then
ha_im_wdata
<=
f_swap_endian_32
(
regs_in
.
udata_o
);
ha_im_write
<=
'1'
;
else
ha_im_write
<=
'0'
;
end
if
;
ha_im_addr
(
21
downto
0
)
<=
regs_in
.
uaddr_addr_o
&
"00"
;
ha_im_addr
(
31
downto
22
)
<=
(
others
=>
'0'
);
regs_out
.
udata_i
<=
f_swap_endian_32
(
im_data
);
end
if
;
end
if
;
end
process
p_iram_host_access
;
end
generate
;
gen_host_access
:
if
g_SWAP_HOST_ENDIAN
=
false
generate
-- Host access to the CPU memory (through instruction port)
p_iram_host_access
:
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
ha_im_write
<=
'0'
;
else
if
regs_in
.
udata_load_o
=
'1'
then
ha_im_wdata
<=
regs_in
.
udata_o
;
ha_im_write
<=
'1'
;
else
ha_im_write
<=
'0'
;
end
if
;
ha_im_addr
(
21
downto
0
)
<=
regs_in
.
uaddr_addr_o
&
"00"
;
ha_im_addr
(
31
downto
22
)
<=
(
others
=>
'0'
);
regs_out
.
udata_i
<=
f_swap_endian_32
(
im_data
);
ha_im_addr
(
21
downto
0
)
<=
regs_in
.
uaddr_addr_o
&
"00"
;
ha_im_addr
(
31
downto
22
)
<=
(
others
=>
'0'
);
regs_out
.
udata_i
<=
im_data
;
end
if
;
end
if
;
end
if
;
end
process
p_iram_host_access
;
end
process
p_iram_host_access
;
end
generate
;
-- Wishbone bus arbitration / internal RAM access
p_wishbone_master
:
process
(
clk_sys_i
)
...
...
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