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
f9e4389d
Commit
f9e4389d
authored
2 years ago
by
Tristan Gingold
Browse files
Options
Downloads
Patches
Plain Diff
Add IRAM tests
parent
14485655
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sw/sf2-test/main.c
+34
-4
34 additions, 4 deletions
sw/sf2-test/main.c
with
34 additions
and
4 deletions
sw/sf2-test/main.c
+
34
−
4
View file @
f9e4389d
...
...
@@ -18,7 +18,9 @@ extern void clear_bss(void);
static
enum
t_test
{
TEST_ECC_DE
,
TEST_IRAM_DE
,
TEST_IRAM_SE
,
TEST_IRAM_SCRUB
,
TEST_WD
,
TEST_CPU1_RECOVER
,
TEST_CPU2_RECOVER
,
...
...
@@ -153,16 +155,42 @@ main (void)
v
=
SUPERVISOR
->
reset_cause
;
uart_put_hex_digit
(
v
&
0x0f
);
uart_puts
(
", tst: "
);
uart_put_hex_digit
(
next_test
);
uart_put_hex_digit
(
next_test
&
0x0f
);
uart_putc
(
'\n'
);
switch
(
next_test
)
{
case
TEST_
ECC
_DE
:
next_test
=
TEST_
WD
;
case
TEST_
IRAM
_DE
:
next_test
=
TEST_
IRAM_SE
;
v
=
*
(
volatile
unsigned
*
)
0xfffc
;
unreachable
();
break
;
case
TEST_IRAM_SE
:
/* Must have been corrected. */
v
=
*
(
volatile
unsigned
*
)
0xfffc
;
if
(
SUPERVISOR
->
iram_ecc_se
!=
0
)
unreachable
();
v
=
*
(
volatile
unsigned
*
)
0xfff8
;
if
(
SUPERVISOR
->
iram_ecc_se
!=
1
)
unreachable
();
next_test
=
TEST_IRAM_SCRUB
;
/* Fallthrough */
case
TEST_IRAM_SCRUB
:
if
(
SUPERVISOR
->
iram_scrub_se
!=
0
||
SUPERVISOR
->
iram_scrub_de
!=
0
)
unreachable
();
uart_puts
(
"Start IRAM scrubber"
);
SUPERVISOR
->
scrub_cfg
=
HYDRA_SUPERVISOR_REGS_SCRUB_CFG_IRAM_EN
;
while
(
SUPERVISOR
->
iram_scrub_de
==
0
)
uart_putc
(
'.'
);
uart_putc
(
'\n'
);
if
(
SUPERVISOR
->
iram_scrub_se
!=
1
||
SUPERVISOR
->
iram_scrub_de
!=
1
)
unreachable
();
next_test
=
TEST_WD
;
/* Fallthrough */
case
TEST_WD
:
/* Test watchdog - infinite loop */
next_test
=
TEST_CPU1_RECOVER
;
...
...
@@ -214,6 +242,8 @@ main (void)
/* Fallthrough */
case
TEST_DONE
:
default:
next_test
++
;
SUPERVISOR
->
wd_key
=
WD_KEY
;
SUPERVISOR
->
wd_period
=
100000000
;
uart_puts
(
"Hello diot.
\n
"
);
...
...
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