Towards Single-Event Upset Detection in Hardware Secure RISC-V Processors

 
Towards Single-Event Upset Detection in Hardware Secure
RISC-V Processors
 
J
e
f
f
r
e
y
 
P
r
i
n
z
i
e
,
 
B
o
r
i
s
 
E
n
g
e
l
e
n
,
 
K
a
r
e
l
 
A
p
p
e
l
s
,
 
L
e
v
i
 
M
a
r
i
ë
n
,
 
N
a
ï
n
 
J
o
n
c
k
e
r
s
Electronic
 Circuits and Systems
Advanced Integrated Sensing Lab (ADVISE)
 
Motivation
Research Methodology
Fault Injection Simulation Results
Conclusion
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
2
 
Outline
 
P
r
o
c
e
s
s
i
n
g
 
s
y
s
t
e
m
s
 
i
n
 
r
a
d
i
a
t
i
o
n
 
e
n
v
i
r
o
n
m
e
n
t
s
High-Energy Physics
Housekeeping processors (monitoring, configuration)
Detector data processing (pixel/vertex/ML processors)
Space applications
Primary on-board computer
S
e
c
o
n
d
a
r
y
 
c
o
m
p
u
t
e
r
s
(
D
a
t
a
 
p
r
o
c
e
s
s
i
n
g
,
 
a
c
c
e
l
e
r
a
t
o
r
s
,
 
)
S
E
U
s
 
c
a
n
 
c
a
u
s
e
 
d
a
t
a
 
e
r
r
o
r
s
,
u
n
p
r
e
d
i
c
t
a
b
l
e
 
b
e
h
a
v
i
o
r
 
o
r
s
e
v
e
r
e
 
c
r
a
s
h
e
s
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
3
 
Motivation
 
R
I
S
C
-
V
 
RISC-V Instruction Set Architecture (ISA)
Like ARM, x86, MIPS, SPARC, ...
Available toolchain (compiler, …)
Free to use - Open license
Many open source cores/SoCs available
Availability of source code for fault simulation
(Minor) Modifications possible
Not limited by vendor and export issues* (i.e. ARM)
*More important for space applications
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
4
 
Motivation
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
5
 
Motivation
 
I
b
e
x
 
C
o
r
e
 
o
v
e
r
v
i
e
w
Open source 32-bit RISC-V CPU
Written in SystemVerilog
two-stage pipeline 
(third pipeline stage
available)
Different configurations available
 
https://github.com/lowRISC/ibex
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
6
 
Motivation
 
S
e
c
u
r
i
t
y
 
F
e
a
t
u
r
e
s
I
b
e
x
 
c
a
n
 
i
m
p
l
e
m
e
n
t
 
a
 
s
e
t
 
o
f
 
e
x
t
r
a
 
f
e
a
t
u
r
e
s
t
o
 
s
u
p
p
o
r
t
 
s
e
c
u
r
i
t
y
-
c
r
i
t
i
c
a
l
 
a
p
p
l
i
c
a
t
i
o
n
s
Main strategy
: Ibex core can detect external
attacks due to corrupted states
Alerts provided by dedicated signals
 
Research Question:
Can these built-in security features be used to
detect SEUs within the Ibex core?
 
 
A
lert outputs
D
ual core lockstep
Bus integrity checking
Register file write enable
glitch detection and ECC
H
ardened PC
Shadow CSRs
 
https://ibex-core.readthedocs.io/en/latest/03_reference/security.html
 
M
i
n
o
r
 
M
a
j
o
r
 
B
u
s
 
A
l
e
r
t
 
T
e
s
t
b
e
n
c
h
 
a
r
c
h
i
t
e
c
t
u
r
e
 
CoCoTB testbench
Ibex RTL code
Python models for SoC
Data/Instruction memory
Stdio
Random SEU injection
(Pre-pass with Genus to extract flip-flop list)
Application code compiled and loaded in I-memory
Xcelium RTL simulator
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
7
 
Research Methodology
Makefile(s)
Linker files
C/asm files
 
Application program
 
Compile/Link
tb.py
I_memory.py
D_memory.py
 
Python testbench
RTL
(Ibex)
SEU_inj.py
bin
 
Dhrystone/Coremark
 
H
e
a
l
t
h
 
c
h
e
c
k
i
n
g
 
CPU state monitored each clock cycle
CRC is accumulated on critical internal signals
Checksum is signature for correct program flow:
PC, D-addr, D-data, I-addr, RF, CSR
Golden simulation is performed initially
CRC is checked after SEU injection
300k SEUs injected
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
8
 
Research Methodology
Run simulation
SEU inject
 
Random time
Check CRC
 
Golden
CRC
CRC
error
 
Check alert
Detected
Undetected
Abort sim
 
y
 
n
 
Continue simulaion
Check alert
False positive
 
 
 
R
e
s
u
l
t
s
 
b
y
 
s
y
m
p
t
o
m
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
9
 
Fault Injection Simulation Results
 
TB found CRC error but alert was low
 
2024
 
 
10
 
Fault Injection Simulation Results
 
R
e
s
u
l
t
s
 
b
y
m
o
d
u
l
e
 
S
o
m
e
 
e
r
r
o
r
s
 
a
r
e
 
n
o
t
 
d
e
t
e
c
t
e
d
!
 
2024
 
 
11
 
Fault Injection Simulation Results
 
I
m
p
r
o
v
e
m
e
n
t
Observation:
S
o
m
e
 
e
r
r
o
r
s
 
f
r
o
m
 
r
e
g
i
s
t
e
r
 
f
i
l
e
 
a
r
e
 
u
n
d
e
t
e
c
t
e
d
But … register file is protected with 39/32 Hsiao code = Simple?
 
Simulations
Run a few cases for undetected errors
Trace internal alert signals
 
R
e
s
u
l
t
:
 
A
l
e
r
t
s
 
w
e
r
e
 
r
a
i
s
e
d
 
i
n
t
e
r
n
a
l
l
y
 
b
u
t
 
m
a
s
k
e
d
 
t
o
w
a
r
d
s
 
t
h
e
 
o
u
t
p
u
t
 
 
2024
 
 
12
 
Fault Injection Simulation Results
 
I
m
p
r
o
v
e
m
e
n
t
Modifications to the source code
Opening issue on Github
Bug?
Modifications resulted in
no undetected bit flips
 
 
2024
 
 
13
 
Fault Injection Simulation Results
 
A
r
e
a
 
c
o
m
p
a
r
i
s
o
n
 
Synthesis performed in 180nm
 
~2x area overhead
Mostly due to lockstep datapath
Overhead includes comparison logic
 
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
14
 
Fault Injection Simulation Results
 
Research Question:
Can these built-in security features be used to detect SEUs within the Ibex core?
Y
e
s
,
 
b
u
t
 
a
 
s
l
i
g
h
t
 
m
o
d
i
f
i
c
a
t
i
o
n
 
t
o
 
t
h
e
 
c
o
r
e
 
w
a
s
 
n
e
c
e
s
s
a
r
y
 
(
b
u
g
?
)
Only error detection is present, how should we correct for errors?
TMR directly corrects errors but large overhead
Software/architecture correction required (checkpoint, rollback)
Alert signals can be connected to CPU interrupt controller
No scrubbing in register file
Fault accumulate until Hsiao code cannot correct anymore
 Registers must be refreshed in software regularly (compiler add-on required)
 
 
 
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
15
 
Conclusion
 
RISC-V provides opportunity for HEP and Space applications
Hardware secure RISC-V cores can provide a solution to ride along a much
larger community 
 We can focus on SoC design
Ibex RISC-V core was evaluated – CoCoTB simulaton environment
Most errors were detectable
Small RTL correction was necessary to provide 100% coverage
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
16
 
C
onclusion
 
T
h
a
n
k
 
y
o
u
J
e
f
f
r
e
y
 
P
r
i
n
z
i
e
,
 
B
o
r
i
s
 
E
n
g
e
l
e
n
,
 
K
a
r
e
l
 
A
p
p
e
l
s
,
 
L
e
v
i
 
M
a
r
i
ë
n
,
 
N
a
ï
n
 
J
o
n
c
k
e
r
s
 
TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V
Processors
 
17
Slide Note
Embed
Share

This research focuses on detecting single-event upsets (SEUs) in hardware-secure RISC-V processors in radiation environments, such as high-energy physics and space applications. Motivated by the potential data errors, unpredictable behavior, or crashes caused by SEUs, the study explores fault injection, simulation results, and the use of security features in the Ibex core to enhance SEU detection capabilities.

  • RISC-V Processors
  • SEU Detection
  • Hardware Security
  • Radiation Environments
  • Fault Injection

Uploaded on Apr 05, 2024 | 4 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Towards Single-Event Upset Detection in Hardware Secure RISC-V Processors Jeffrey Prinzie, Boris Engelen, Karel Appels, Levi Mari n, Na n Jonckers Electronic Circuits and Systems Advanced Integrated Sensing Lab (ADVISE)

  2. Outline Motivation Research Methodology Fault Injection Simulation Results Conclusion TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 2 Processors

  3. Motivation Processing systems in radiation environments High-Energy Physics Housekeeping processors (monitoring, configuration) Detector data processing (pixel/vertex/ML processors) Space applications Primary on-board computer Secondary computers (Data processing, accelerators, ) SEUs can cause data errors, unpredictable behavior or severe crashes TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 3 Processors

  4. Motivation RISC-V RISC-V Instruction Set Architecture (ISA) Like ARM, x86, MIPS, SPARC, ... Available toolchain (compiler, ) Free to use - Open license Many open source cores/SoCs available Availability of source code for fault simulation (Minor) Modifications possible Not limited by vendor and export issues* (i.e. ARM) *More important for space applications TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 4 Processors

  5. Motivation Ibex Core overview Open source 32-bit RISC-V CPU Written in SystemVerilog two-stage pipeline (third pipeline stage available) Different configurations available https://github.com/lowRISC/ibex TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 5 Processors

  6. Alert outputs Dual core lockstep Bus integrity checking Register file write enable glitch detection and ECC Hardened PC Shadow CSRs Motivation Alert Minor Major Bus Security Features Ibex can implement a set of extra features to support security-critical applications Main strategy: Ibex core can detect external attacks due to corrupted states Alerts provided by dedicated signals Research Question: Can these built-in security features be used to detect SEUs within the Ibex core? https://ibex-core.readthedocs.io/en/latest/03_reference/security.html TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 6 Processors

  7. Application program Research Methodology Makefile(s) Compile/Link bin Linker files Testbench architecture C/asm files Dhrystone/Coremark CoCoTB testbench Ibex RTL code Python models for SoC Data/Instruction memory Stdio Random SEU injection (Pre-pass with Genus to extract flip-flop list) Application code compiled and loaded in I-memory Xcelium RTL simulator Python testbench tb.py RTL (Ibex) I_memory.py D_memory.py SEU_inj.py TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 7 Processors

  8. Research Methodology Run simulation Random time SEU inject Health checking Golden CRC Check CRC CPU state monitored each clock cycle CRC is accumulated on critical internal signals Checksum is signature for correct program flow: PC, D-addr, D-data, I-addr, RF, CSR y CRC error Check alert Abort sim Detected Undetected Golden simulation is performed initially n CRC is checked after SEU injection Continue simulaion Check alert False positive 300k SEUs injected TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 8 Processors

  9. Fault Injection Simulation Results Results by symptom TB found CRC error but alert was low TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 9 Processors

  10. Fault Injection Simulation Results Results by module Some errors are not detected! 10 2024

  11. Fault Injection Simulation Results Improvement Observation: Some errors from register file are undetected But register file is protected with 39/32 Hsiao code = Simple? Simulations Run a few cases for undetected errors Trace internal alert signals Result: Alerts were raised internally but masked towards the output 11 2024

  12. Fault Injection Simulation Results Improvement Modifications to the source code Opening issue on Github Bug? Modifications resulted in no undetected bit flips 12 2024

  13. Fault Injection Simulation Results 13 2024

  14. Fault Injection Simulation Results Area comparison Synthesis performed in 180nm ~2x area overhead Mostly due to lockstep datapath Overhead includes comparison logic TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 14 Processors

  15. Conclusion Research Question: Can these built-in security features be used to detect SEUs within the Ibex core? Yes, but a slight modification to the core was necessary (bug?) Only error detection is present, how should we correct for errors? TMR directly corrects errors but large overhead Software/architecture correction required (checkpoint, rollback) Alert signals can be connected to CPU interrupt controller No scrubbing in register file Fault accumulate until Hsiao code cannot correct anymore Registers must be refreshed in software regularly (compiler add-on required) TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 15 Processors

  16. Conclusion RISC-V provides opportunity for HEP and Space applications Hardware secure RISC-V cores can provide a solution to ride along a much larger community We can focus on SoC design Ibex RISC-V core was evaluated CoCoTB simulaton environment Most errors were detectable Small RTL correction was necessary to provide 100% coverage TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 16 Processors

  17. Thank you Jeffrey Prinzie, Boris Engelen, Karel Appels, Levi Mari n, Na n Jonckers TWEPP 2023 - Towards Single-Event Upset Detetion in Hardware Secure RISC-V 17 Processors

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#