1 |
483 |
julius |
OR1200 with Fault Tolerance features
|
2 |
|
|
====================================
|
3 |
|
|
|
4 |
|
|
This technology-independent build tests the OR1200's fault tolerance features,
|
5 |
|
|
primarily parity error detection and behavior on its various internal RAMs.
|
6 |
|
|
|
7 |
|
|
OR1200 fault tolerance features
|
8 |
|
|
===============================
|
9 |
|
|
|
10 |
|
|
The OR1200's parity detection mechanisms are enabled by adding
|
11 |
|
|
"`define OR1200_RAM_PARITY" in the or1200_defines.v file.
|
12 |
|
|
|
13 |
|
|
This enables parity detection logic on the generic technology memory
|
14 |
|
|
implementations (to be inerred as block RAMs by FPGA synthesis tools, ASIC flow
|
15 |
|
|
will have to provide custom solution) throughout the processor.
|
16 |
|
|
|
17 |
|
|
The 5 places special control logic is added is in the instruction and data
|
18 |
|
|
cache modules, the instruction and data MMU TLB caches, and the register file.
|
19 |
|
|
|
20 |
|
|
An output vector is added to the top level of the OR1200 to indicate when a
|
21 |
|
|
parity error is detected.
|
22 |
|
|
|
23 |
|
|
The following behavior is exhibited when a parity error is detected in these
|
24 |
|
|
locations:
|
25 |
|
|
|
26 |
|
|
Instruction cache instruction RAM: Cache line refill
|
27 |
|
|
Instruction cache tag RAM: Cache line refill
|
28 |
|
|
Data cache data RAM: Cache line refill
|
29 |
|
|
Data cache tag RAM: Cache line refill
|
30 |
|
|
|
31 |
|
|
Instruction MMU TLB match register RAM: ITLB miss exception
|
32 |
|
|
Instruction MMU TLB translate register RAM: ITLB miss exception
|
33 |
|
|
Data MMU TLB match register RAM: DTLB miss exception
|
34 |
|
|
Data MMU TLB translate register RAM: DTLB miss exception
|
35 |
|
|
|
36 |
|
|
Register file: Execution continues, however a parity error in the register
|
37 |
|
|
file is considered unrecoverable, and the OR1200 should be
|
38 |
|
|
reset. This is not done automatically and should be the job
|
39 |
|
|
of an external unit.
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
Testing System
|
43 |
|
|
==============
|
44 |
|
|
|
45 |
|
|
A special test-bench set up is contained in this testbench. The software test,
|
46 |
|
|
or1200ft-parity, communicates with a verilog module via some memory locations
|
47 |
|
|
in the main RAM on the Wishbone bus, sending commands which will inject errors
|
48 |
|
|
into various RAMs throughout the OR1200. The software then exercises these
|
49 |
|
|
areas of the RAM to ensure the parity error is detected.
|
50 |
|
|
|
51 |
|
|
ORPSoC Configuration
|
52 |
|
|
====================
|
53 |
|
|
|
54 |
|
|
ORPSoC is configured with no peripherals, just bus arbiters, and a 1MB RAM on
|
55 |
|
|
the Wishbone bus.
|
56 |
|
|
|
57 |
|
|
The only additional module is the parity error handler.
|
58 |
|
|
|
59 |
|
|
Parity Error Handler Module
|
60 |
|
|
===========================
|
61 |
|
|
|
62 |
|
|
This module is in rtl/verilog/parity_err_handler of this build's path.
|
63 |
|
|
|
64 |
|
|
It takes the wishbone clock, a reset and the OR1200's parity error indicator
|
65 |
|
|
vector, and will issue a reset to the OR1200 on detection of a RF parity error,
|
66 |
|
|
and assert its interrupt line (to IRQ5 of OR1200's PIC) on detection of any
|
67 |
|
|
instruction cache parity errors.
|
68 |
|
|
|
69 |
|
|
The interrupt is edge-triggered by the incoming parity error indicator vector
|
70 |
|
|
but behaves as a level-triggered interrupt source, and reading from it (it is
|
71 |
|
|
at address 0xe0000000 on the Wishbone data bus) will clear the pending
|
72 |
|
|
interrupt.
|
73 |
|
|
|
74 |
|
|
It can be configured to reset or interrupt on any incoming parity error vector.
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
Verilog Testbench Stimulus
|
78 |
|
|
==========================
|
79 |
|
|
|
80 |
|
|
The additional verilog testbench module, or1200_ft_stim, is used to inject
|
81 |
|
|
parity errors into specific bits and words of the various RAMs in the design,
|
82 |
|
|
to a simulate single event upset (SUE).
|
83 |
|
|
|
84 |
|
|
The stimulus is controlled by the software test running on the processor. It
|
85 |
|
|
(the testbench) polls some unused memory locations in the RAM on the Wishbone
|
86 |
|
|
data bus, and communicates via very simple protocol with the processor.
|
87 |
|
|
|
88 |
|
|
It can inject errors into all cache, MMU TLB and register file memories for
|
89 |
|
|
a generic technology configuration.
|
90 |
|
|
|
91 |
|
|
See the file for more details.
|
92 |
|
|
|
93 |
|
|
Software Test
|
94 |
|
|
=============
|
95 |
|
|
|
96 |
|
|
The software test configures the various memories to contain useful data before
|
97 |
|
|
commanding the verilog or1200_ft_stim module to inject errors there and
|
98 |
|
|
accessing them again. See the file sw/tests/or1200ft/or1200ft-parity.c for
|
99 |
|
|
exact details.
|
100 |
|
|
|
101 |
|
|
The software test checks every bit possible in an output word from the cache
|
102 |
|
|
and TLB memories,and checks every word and every bit of the register file
|
103 |
|
|
memories.
|
104 |
|
|
|
105 |
|
|
Running The Test
|
106 |
|
|
================
|
107 |
|
|
|
108 |
|
|
To run the fault tolerance test, the Modelsim simulator is used by default,
|
109 |
|
|
but to switch back to using Icarus Verilog, run:
|
110 |
|
|
|
111 |
|
|
boards/generic/ft/sim/run$ make rtl-test TEST=or1200ft-parity SIMULATOR=icarus
|
112 |
|
|
|
113 |
|
|
Or to run with Modelsim, remove "SIMULATOR=icarus".
|
114 |
|
|
|