Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hydra - a radiation-tolerant SoC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Hydra - a radiation-tolerant SoC
Commits
defc6aef
Commit
defc6aef
authored
2 years ago
by
Tristan Gingold
Browse files
Options
Downloads
Patches
Plain Diff
hydra_core.vhd: rework watchdog period
parent
668c63ca
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdl/rtl/hydra_core.vhd
+8
-4
8 additions, 4 deletions
hdl/rtl/hydra_core.vhd
with
8 additions
and
4 deletions
hdl/rtl/hydra_core.vhd
+
8
−
4
View file @
defc6aef
...
...
@@ -130,6 +130,9 @@ architecture arch of hydra_core is
signal
reset_cause_cpu
,
reset_cause_ecc
,
reset_cause_wd
:
std_logic
;
signal
dram_scrub_period
,
iram_scrub_period
:
std_logic_vector
(
15
downto
0
);
-- Initial watchdog period.
constant
wd_init
:
std_logic_vector
(
31
downto
0
)
:
=
x"0000_0400"
;
signal
wd_period
,
wd_period_val
,
wd_counter
,
wd_key_val
:
std_logic_vector
(
31
downto
0
);
signal
wd_period_wr
,
wd_key_wr
,
wd_timeout
:
std_logic
;
...
...
@@ -424,20 +427,21 @@ begin
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
wd_period
<=
x"0000_0400"
;
wd_counter
<=
x"0000_0400"
;
wd_period
<=
wd_init
;
wd_counter
<=
wd_init
;
wd_timeout
<=
'0'
;
else
wd_timeout
<=
'0'
;
if
wd_period_wr
=
'1'
then
-- Period change
-- Note: counter doesn't change.
wd_period
<=
wd_period_val
;
wd_counter
<=
wd_period_val
;
else
if
wd_counter
=
(
wd_counter
'range
=>
'0'
)
then
-- Timeout
wd_timeout
<=
'1'
;
wd_counter
<=
wd_period
;
-- Use the initial (small) period
wd_counter
<=
wd_init
;
elsif
cpu_rst
=
"111"
or
(
wd_key_wr
=
'1'
and
wd_key_val
=
x"c0423bc9"
)
then
-- Key -> reload
-- Also restart the watchdog if the cpu is reset.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment