Skip to content
Snippets Groups Projects
Commit bc7e057b authored by Tobias Klaus's avatar Tobias Klaus
Browse files

adds cored pseudo code

parent a75a2112
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,47 @@ static bool equals(enc_t vc1, enc_t vc2, sig_t B1, sig_t B2, sig_t A) {
#define SIG_s_YZ /* FIXME */
#define SIG_s_XZ /* FIXME */
/**
* Pseudo-Code for the CoRed voter
*
* SIGNAL_DUE() signals a Deteceted Unrecoverable Error
*
* The function APPLY() is appended after CORED_VOTE
Require: Bx , By , Bz #Constant signatures of Operands
function CORED_ VOTE (xc , yc , zc )
ZERO_LOCAL _ STORAGE()
if (xc − yc ) = (Bx − By ) then
if (xc − zc ) = (Bx − Bz ) then
winc <- APPLY(xc , (xc − yc ) + (xc − zc ))
return winc, BE <- (Bx − By ) + (Bx − Bz ) #statically computed
else
winc <- APPLY(xc , (xc − yc ))
return winc, BE <- (Bx − By ) #statically computed
end if
else if (yc − zc) = (By − Bz ) then
winc <- APPLY (yc, (yc − zc ))
return winc, BE <- (By -B z) #statically computed
else if (xc − zc) =(Bx − Bz) then
winc <- APPLY (xc , (xc − zc ))
return winc , BE <- (Bx − Bz ) #statically computed
else
winc <- ∅ #empty set
SIGNAL_DUE()
end if
end function
function APPLY (vc , Bdyn )
if Bdyn > Bmax then
SIGNAL_DUE()
end if
return vc + Bdyn
end function
**/
static sig_t CoRedVote(void) {
/* TODO: Implement CoRed Voter */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment