Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
CAOS_HW
HDL_IP
SafeSU
Commits
1532d575
Commit
1532d575
authored
Apr 21, 2021
by
GuillemCabo
Committed by
Guillem
Nov 23, 2021
Browse files
add 3 way voter rtl
update readme
parent
a1f28127
Changes
2
Show whitespace changes
Inline
Side-by-side
submodules/seu_ip/readme.md
View file @
1532d575
...
...
@@ -7,4 +7,5 @@ IPs for Transient and permanent error detection and correction mechanisms
*
ecc
\_
reg
\_
sbf.sv: Single bitflip error correction for registers.
*
hamming16t11d
\_
enc: SEC-DEC Hamming encoder. 11 data bits, 5 check bits.
*
hamming16t11d
\_
dec: SEC-DEC Hamming decoder. 11 data bits, 5 check bits.
*
way3
\_
voter: Tree way voter for replicated logic.
submodules/seu_ip/way3_voter.sv
0 → 100644
View file @
1532d575
//-----------------------------------------------------
// ProjectName: De-RISC/SELENE
// Function : Three way voter for reduncancy mechanisms
// Description: This module compares tree signals and outputs the most common value.
// If one signal is different rises error1_o.
// If Non of the signals is the same it rises error2_o
//
// Error signal is only active while the condition it describes is active.
//
// The circuit is combinational, is up to the designer to add input or
// output registers.
//
// Coder : G.Cabo
// References :
`default_nettype
none
`timescale
1
ns
/
1
ps
`ifndef
SYNT
`ifdef
FORMAL
`define
ASSERTIONS
`endif
`endif
module
way3_voter
#
(
// Width of sampled signal
parameter
integer
IN_WIDTH
=
32
)
(
// Input 0
input
logic
[
IN_WIDTH
-
1
:
0
]
in0
,
// Input 1
input
logic
[
IN_WIDTH
-
1
:
0
]
in1
,
// Input 2
input
logic
[
IN_WIDTH
-
1
:
0
]
in2
,
// Voted output
output
logic
[
IN_WIDTH
-
1
:
0
]
out
,
// One discrepance - recovered
output
logic
error1_o
,
// Two discrepancies - unrecoverable
output
logic
error2_o
);
always_comb
begin
if
(
in0
==
in1
)
begin
out
=
in0
;
if
(
in0
!=
in2
)
begin
error1_o
=
1'b1
;
error2_o
=
1'b0
;
end
else
begin
error1_o
=
1'b0
;
error2_o
=
1'b0
;
end
end
else
begin
error1_o
=
1'b1
;
//Reach else implies in0!=in1
if
(
in0
==
in2
)
begin
out
=
in0
;
error2_o
=
1'b0
;
end
else
begin
if
(
in1
==
in2
)
begin
out
=
in1
;
error2_o
=
1'b0
;
end
else
begin
// Non of the signals match
// Select one input, but it may be incorrect
out
=
in0
;
error2_o
=
1'b1
;
end
end
end
end
////////////////////////////////////////////////////////////////////////////////
//
// Formal Verification section begins here.
//
////////////////////////////////////////////////////////////////////////////////
`ifdef
FORMAL
`endif
endmodule
`default_nettype
wire
//allow compatibility with legacy code and xilinx ip
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