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
0
Merge Requests
0
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
0aae97ff
Commit
0aae97ff
authored
May 02, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc_core/wrc_periph: reset fix (reason for hangs still unclear)
parent
f1c00720
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
wrc_periph.vhd
modules/wrc_core/wrc_periph.vhd
+30
-12
No files found.
modules/wrc_core/wrc_periph.vhd
View file @
0aae97ff
...
...
@@ -6,7 +6,7 @@
-- Author : Grzegorz Daniluk
-- Company : Elproma
-- Created : 2011-04-04
-- Last update: 2012-0
2-28
-- Last update: 2012-0
4-30
-- Platform : FPGA-generics
-- Standard : VHDL
-------------------------------------------------------------------------------
...
...
@@ -76,10 +76,10 @@ architecture struct of wrc_periph is
function
f_cnt_memsize
(
words
:
integer
)
return
std_logic_vector
is
begin
return
std_logic_vector
(
to_unsigned
(
words
*
4
/
1024
/
64
-
1
,
4
));
return
std_logic_vector
(
to_unsigned
(
words
*
4
/
1024
/
16
-
1
,
4
));
-- *4 - to get size in bytes
-- /1024 - to get size in kB
-- /
64
-1 - to get size in format of MEMSIZE@sysc_hwfr register
-- /
16
-1 - to get size in format of MEMSIZE@sysc_hwfr register
end
f_cnt_memsize
;
signal
sysc_regs_i
:
t_sysc_in_registers
;
...
...
@@ -97,6 +97,27 @@ begin
-------------------------------------
-- reset wrc
-------------------------------------
--process(clk_sys_i)
--begin
-- if rising_edge(clk_sys_i) then
-- if(rst_n_i = '0') then
-- rst_wrc_n_o <= '0';
-- rst_net_n_o <= '0';
-- rst_wrc_n_o_reg <= '1'; -- Resume CPU 1 cycle after reset
-- else
-- if(sysc_regs_o.rstr_trig_wr_o = '1' and sysc_regs_o.rstr_trig_o = x"deadbee") then
-- rst_wrc_n_o_reg <= not sysc_regs_o.rstr_rst_o;
-- --else
-- --rst_wrc_n_o <= '1';
-- end if;
-- rst_wrc_n_o <= rst_wrc_n_o_reg;
-- rst_net_n_o <= not sysc_regs_o.gpsr_net_rst_o;
-- end if;
-- end if;
--end process;
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
...
...
@@ -107,17 +128,14 @@ begin
else
if
(
sysc_regs_o
.
rstr_trig_wr_o
=
'1'
and
sysc_regs_o
.
rstr_trig_o
=
x"deadbee"
)
then
rst_wrc_n_o_reg
<=
not
sysc_regs_o
.
rstr_rst_o
;
--else
--rst_wrc_n_o <= '1';
end
if
;
rst_wrc_n_o
<=
rst_wrc_n_o_reg
;
rst_wrc_n_o
<=
not
sysc_regs_o
.
rstr_rst_o
;
end
if
;
rst_net_n_o
<=
not
sysc_regs_o
.
gpsr_net_rst_o
;
end
if
;
end
if
;
end
if
;
end
if
;
end
process
;
-------------------------------------
-- LEDs
-------------------------------------
...
...
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