\resizebox{!}{0.94\textheight}{%
\begin{circuitikz}
    \newcommand{\add}[2]{
        \draw #1 node[draw, circle,fill=white](#2){$+$};
    }
    \newcommand{\basicevent}[4]{
        \draw #1 node[draw, circle,inner sep=0,minimum size=1cm,align=center](#2){#3 \\ \tiny $#4$};
    }
    \newcommand{\lane}[4]{
        \def\height{#3}
        \draw #1 node[draw, minimum width=16cm, minimum height=\height, outer sep=0, anchor=south west](#2lane){};
        \draw(#2lane.west) node[anchor=south, outer sep=0, minimum width=\height,rotate=90](#2lable){#4};
    }
    % DRAM:
    \lane{(0,0)}{dram}{1.75cm}{DRAM}
    %outputs
    \draw (dramlane.north) ++(-5.25,0) node[outport, anchor=south](dram_wd_out){};
    \draw (dramlane.north) ++(-1.75,0) node[outport, anchor=south](dram_sbe_out) {};
    \draw (dramlane.north) ++(+1.75,0) node[outport, anchor=south](dram_dbe_out){};
    \draw (dramlane.north) ++(+5.25,0) node[outport, anchor=south](dram_mbe_out){};
    % blocks
    \basicevent{(dram_wd_out) ++(0,-1)}{wd}{WD}{172}
    \basicevent{(dram_sbe_out) ++(0,-1)}{sbe}{SBE}{1610}
    \basicevent{(dram_dbe_out) ++(0,-1)}{dbe}{DBE}{172}
    \basicevent{(dram_mbe_out) ++(0,-1)}{mbe}{MBE}{172}
    % inner connections
    \draw[-Triangle,black!30!red] (wd.north) -- (dram_wd_out);
    \draw[-Triangle,black!30!red] (sbe.north) -- (dram_sbe_out);
    \draw[-Triangle,black!30!red] (dbe.north) -- (dram_dbe_out);
    \draw[-Triangle,black!30!red] (mbe.north) -- (dram_mbe_out);
    
    % SEC:
    \lane{(dramlane.north west) ++(0,1)}{sec}{3.5cm}{SEC}
    % inputs
    \draw (seclane.south) ++(-5.25,0) node[inport, anchor=north](sec_wd_in){};
    \draw (seclane.south) ++(-1.75,0) node[inport, anchor=north](sec_sbe_in) {};
    \draw (seclane.south) ++(+1.75,0) node[inport, anchor=north](sec_dbe_in){};
    \draw (seclane.south) ++(+5.25,0) node[inport, anchor=north](sec_mbe_in){};
    % outputs
    \draw (seclane.north) ++(-5.25,0) node[outport, anchor=south](sec_wd_out){};
    \draw (seclane.north) ++(-2.5,0) node[outport, anchor=south](sec_sbe_out){};
    \draw (seclane.north) ++(-1.0,0) node[outport, anchor=south](sec_sbe_lat_out){};
    \draw (seclane.north) ++(1,0) node[outport, anchor=south](sec_dbe_out){};
    \draw (seclane.north) ++(2.5,0) node[outport, anchor=south](sec_tbe_out){};
    \draw (seclane.north) ++(5.25,0) node[outport, anchor=south](sec_mbe_out){};
    \draw (seclane.north) ++(+7,0) node[outport, anchor=south](sec_sb_out){};
    % blocks
    \draw (sec_sbe_in.north) ++(0,0.5) node[coverage, anchor=in, coverage residual=100\%, coverage latent=0\%] (seccov){};
    \draw (sec_dbe_in.north) ++(0,0.5) node[split2, anchor=in, split2 left=83\%, split2 right=17\%] (secsplit){};
    \basicevent{(sec_sb_out) ++(0,-1.5)}{sb}{SB}{0.1}
    % inner connections
    \draw[-Triangle,black!30!red] (sec_wd_in) -- (sec_wd_out);
    \draw[-Triangle,black!30!red] (sec_mbe_in) -- (sec_mbe_out);
    \draw[-Triangle,black!30!red] (secsplit.out 1) -- (sec_dbe_out);
    \draw[-Triangle,black!30!red] (secsplit.out 2) -- (sec_tbe_out);
    \draw[-Triangle,black!30!red] (sec_sbe_in) -- (seccov.in);
    \draw[-Triangle,black!30!red] (sec_dbe_in) -- (secsplit.in);
    \draw[-Triangle,black!30!red] (seccov.res) -- (sec_sbe_out);
    \draw[-Triangle,black!30!blue] (seccov.lat) -- (sec_sbe_lat_out);
    \draw[-Triangle,black!30!blue] (sb) -- (sec_sb_out);
    
    % dram -> SEC
    \draw[-Triangle,black!30!red] (dram_wd_out.north) -- (sec_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (dram_sbe_out.north) -- (sec_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny 1610};
    \draw[-Triangle,black!30!red] (dram_dbe_out.north) -- (sec_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 172};
    \draw[-Triangle,black!30!red] (dram_mbe_out.north) -- (sec_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 172};
    
    % DRAM-TRIM:
    \lane{(seclane.north west) ++(0,1.5)}{dramtrim}{5cm}{DRAM-TRIM}
    % inputs
    \draw (dramtrimlane.south) ++(-5.25,0) node[inport, anchor=north](dram_trim_wd_in){};
    \draw (dramtrimlane.south) ++(-2.5,0) node[inport, anchor=north](dram_trim_sbe_in){};
    \draw (dramtrimlane.south) ++(+1.0,0) node[inport, anchor=north](dram_trim_dbe_in){};
    \draw (dramtrimlane.south) ++(+2.5,0) node[inport, anchor=north](dram_trim_tbe_in){};
    \draw (dramtrimlane.south) ++(+5.25,0) node[inport, anchor=north](dram_trim_mbe_in){};
    % blocks
    \draw (dram_trim_sbe_in.north) ++(-2,0.5) node[split1, anchor=in, split1 top=94\%] (dram_trim_sbe_split){};
    \draw (dram_trim_dbe_in.north) ++(-2.5,0.5) node[split2, anchor=in, split2 left=11\%, split2 right=89\%] (dram_trim_dbe_split){};
    \draw (dram_trim_tbe_in.north) ++(0,0.5) node[split3, anchor=in, split3 left=0.9\%, split3 middle=15\%, split3 right=83\%] (dram_trim_tbe_split){};
    \add {(dram_trim_dbe_split.out 1) ++(0,0.75)}{dram_trim_sbe_add};
    \add {(dram_trim_tbe_split.out 1) ++(0,1.35)}{dram_trim_dbe_add};
    % outputs
    \draw (dramtrimlane.north) ++(-7,0) node[outport, anchor=south](dram_trim_wd_out){};
    \draw (dramtrimlane.north -| dram_trim_sbe_add) node[outport, anchor=south](dram_trim_sbe_out){};
    \draw (dramtrimlane.north -| dram_trim_dbe_add) node[outport, anchor=south](dram_trim_dbe_out){};
    \draw (dramtrimlane.north -| dram_trim_tbe_split.out 3) node[outport, anchor=south](dram_trim_tbe_out){};
    \draw (dramtrimlane.north) ++(5.25,0) node[outport, anchor=south](dram_trim_mbe_out){};
    % inner connections
    \draw[-Triangle,black!30!red] (dram_trim_wd_in) -- ++(0,0.5) coordinate(dram_trim_c0) -- (dram_trim_wd_out |- dram_trim_c0) -- (dram_trim_wd_out);
    \draw[-Triangle,black!30!red] (dram_trim_sbe_in) -- ++(0,0.25) coordinate(dram_trim_c1) -- (dram_trim_sbe_split.in |- dram_trim_c1) -- (dram_trim_sbe_split.in);
    \draw[-Triangle,black!30!red] (dram_trim_dbe_in) -- ++(0,0.25) coordinate(dram_trim_c2) -- (dram_trim_dbe_split.in |- dram_trim_c2) -- (dram_trim_dbe_split.in);
    \draw[-Triangle,black!30!red] (dram_trim_tbe_in) -- (dram_trim_tbe_split.in);
    \draw[-Triangle,black!30!red] (dram_trim_dbe_split.out 1) -- (dram_trim_sbe_add.south);
    \draw[-Triangle,black!30!red] (dram_trim_sbe_split.out 1) -- (dram_trim_sbe_split.out 1 |- dram_trim_sbe_add.west) -- (dram_trim_sbe_add.west);
    \draw[-Triangle,black!30!red] (dram_trim_tbe_split.out 1) -- (dram_trim_tbe_split.out 1 |- dram_trim_sbe_add.east) -- (dram_trim_sbe_add.east);
    \draw[-Triangle,black!30!red] (dram_trim_sbe_add.north) -- (dram_trim_sbe_out.south);
    \draw[-Triangle,black!30!red] (dram_trim_dbe_split.out 2) -- (dram_trim_dbe_split.out 2 |- dram_trim_dbe_add.west) -- (dram_trim_dbe_add.west);
    \draw[-Triangle,black!30!red] (dram_trim_tbe_split.out 2) -- (dram_trim_tbe_split.out 2 |- dram_trim_dbe_add.east) -- (dram_trim_dbe_add.east);
    \draw[-Triangle,black!30!red] (dram_trim_dbe_add.north) -- (dram_trim_dbe_out.south);
    \draw[-Triangle,black!30!red] (dram_trim_tbe_split.out 3) -- (dram_trim_tbe_out.south);
    \draw[-Triangle,black!30!red] (dram_trim_mbe_in.north) -- (dram_trim_mbe_out.south);

    % sec -> DRAM-TRIM
    \draw[-Triangle,black!30!red] (sec_wd_out.north) -- (dram_trim_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (sec_sbe_out.north) -- (dram_trim_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny 0};
    \draw[-Triangle,black!30!red] (sec_dbe_out.north) -- (dram_trim_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 142.8};
    \draw[-Triangle,black!30!red] (sec_tbe_out.north) -- (dram_trim_tbe_in.south) node[anchor=east,midway,align=center]{TBE \\ \tiny 29.2};
    \draw[-Triangle,black!30!red] (sec_mbe_out.north) -- (dram_trim_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 172};

    % BUS-TRIM:
    \lane{(dramtrimlane.north west) ++(0,1)}{bustrim}{5cm}{BUS-TRIM}
    % inputs
    \draw (bustrimlane.south -| dram_trim_wd_out) node[inport, anchor=north](bus_trim_wd_in){};
    \draw (bustrimlane.south -| dram_trim_sbe_out) node[inport, anchor=north](bus_trim_sbe_in){};
    \draw (bustrimlane.south -| dram_trim_dbe_out) node[inport, anchor=north](bus_trim_dbe_in){};
    \draw (bustrimlane.south -| dram_trim_tbe_out) node[inport, anchor=north](bus_trim_tbe_in){};
    \draw (bustrimlane.south -| dram_trim_mbe_out) node[inport, anchor=north](bus_trim_mbe_in){};
    % DRAM-TRIM -> BUS-TRIM
    \draw[-Triangle,black!30!red] (dram_trim_wd_out.north) -- (bus_trim_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (dram_trim_sbe_out.north) -- (bus_trim_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny 16.0};
    \draw[-Triangle,black!30!red] (dram_trim_dbe_out.north) -- (bus_trim_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 131.5};
    \draw[-Triangle,black!30!red] (dram_trim_tbe_out.north) -- (bus_trim_tbe_in.south) node[anchor=east,midway,align=center]{TBE \\ \tiny 24.3};
    \draw[-Triangle,black!30!red] (dram_trim_mbe_out.north) -- (bus_trim_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 172};
    % blocks
    \draw (bus_trim_sbe_in.north) ++(-1.5,0.5) node[split1, anchor=in, split1 top=43.8\%] (bus_trim_sbe_split){};
    \draw (bus_trim_dbe_in.north) ++(-2,0.5) node[split2, anchor=in, split2 left=49.6\%, split2 right=31.4\%] (bus_trim_dbe_split){};
    \draw (bus_trim_tbe_in.north) ++(0,0.5) node[split3, anchor=in, split3 left=32.5\%, split3 middle=41.9\%, split3 right=17.5\%] (bus_trim_tbe_split){};
    \basicevent{(bus_trim_sbe_split) ++(-2,1.75)}{az}{AZ}{172};
    \add {(bus_trim_dbe_split.out 1) ++(0,0.75)}{bus_trim_sbe_add};
    \add {(bus_trim_tbe_split.out 1) ++(0,1.35)}{bus_trim_dbe_add};
    % outputs
    \draw (bustrimlane.north -| bus_trim_mbe_in) ++(1,0)  node[outport, anchor=south](bus_trim_mbe_out){};
    \draw (bustrimlane.north -| bus_trim_wd_in) node[outport, anchor=south](bus_trim_wd_out){};
    \draw (bustrimlane.north -| az) node[outport, anchor=south](bus_trim_az_out){};
    \draw (bustrimlane.north -| bus_trim_sbe_add) node[outport, anchor=south](bus_trim_sbe_out){};
    \draw (bustrimlane.north -| bus_trim_dbe_add) node[outport, anchor=south](bus_trim_dbe_out){};
    \draw (bustrimlane.north -| bus_trim_tbe_split.out 3) node[outport, anchor=south](bus_trim_tbe_out){};
    % inner connections
    \draw[-Triangle,black!30!red] (bus_trim_wd_in.north) -- (bus_trim_wd_out.south);
    \draw[-Triangle,black!30!red] (az.north) -- (bus_trim_az_out.south);
    \draw[-Triangle,black!30!red] (bus_trim_wd_in.north) -- (bus_trim_wd_out.south);
    \draw[-Triangle,black!30!red] (bus_trim_sbe_in) -- ++(0,0.25) coordinate(bus_trim_c0) -- (bus_trim_sbe_split.in |- bus_trim_c0) -- (bus_trim_sbe_split.in);
    \draw[-Triangle,black!30!red] (bus_trim_dbe_in) -- ++(0,0.25) coordinate(bus_trim_c1) -- (bus_trim_dbe_split.in |- bus_trim_c1) -- (bus_trim_dbe_split.in);
    \draw[-Triangle,black!30!red] (bus_trim_tbe_in.north) -- (bus_trim_tbe_split.in);
    \draw[-Triangle,black!30!red] (bus_trim_mbe_in) -- ++(0,0.5) coordinate(bus_trim_c2) -- (bus_trim_mbe_out |- bus_trim_c2) -- (bus_trim_mbe_out);
    \draw[-Triangle,black!30!red] (bus_trim_dbe_split.out 1) -- (bus_trim_sbe_add.south);
    \draw[-Triangle,black!30!red] (bus_trim_sbe_split.out 1) -- (bus_trim_sbe_split.out 1 |- bus_trim_sbe_add.west) -- (bus_trim_sbe_add.west);
    \draw[-Triangle,black!30!red] (bus_trim_tbe_split.out 1) -- (bus_trim_tbe_split.out 1 |- bus_trim_sbe_add.east) -- (bus_trim_sbe_add.east);
    \draw[-Triangle,black!30!red] (bus_trim_sbe_add.north) -- (bus_trim_sbe_out.south);
    \draw[-Triangle,black!30!red] (bus_trim_dbe_split.out 2) -- (bus_trim_dbe_split.out 2 |- bus_trim_dbe_add.west) -- (bus_trim_dbe_add.west);
    \draw[-Triangle,black!30!red] (bus_trim_tbe_split.out 2) -- (bus_trim_tbe_split.out 2 |- bus_trim_dbe_add.east) -- (bus_trim_dbe_add.east);
    \draw[-Triangle,black!30!red] (bus_trim_dbe_add.north) -- (bus_trim_dbe_out.south);
    \draw[-Triangle,black!30!red] (bus_trim_tbe_split.out 3) -- (bus_trim_tbe_out.south);

    % LINK-ECC:
    \lane{(bustrimlane.north west) ++(0,1)}{linkecc}{5cm}{LINK-ECC}
    % inputs
    \draw (linkecclane.south -| bus_trim_wd_out) node[inport, anchor=north](linkecc_wd_in){};
    \draw (linkecclane.south -| bus_trim_az_out) node[inport, anchor=north](linkecc_az_in){};
    \draw (linkecclane.south -| bus_trim_sbe_out) node[inport, anchor=north](linkecc_sbe_in){};
    \draw (linkecclane.south -| bus_trim_dbe_out) node[inport, anchor=north](linkecc_dbe_in){};
    \draw (linkecclane.south -| bus_trim_tbe_out) node[inport, anchor=north](linkecc_tbe_in){};
    \draw (linkecclane.south -| bus_trim_mbe_out) node[inport, anchor=north](linkecc_mbe_in){};
    % outputs
    \draw (linkecclane.north -| linkecc_wd_in) node[outport, anchor=south](linkecc_wd_out){};
    \draw (linkecclane.north -| linkecc_az_in) node[outport, anchor=south](linkecc_az_out){};
    \draw (linkecclane.north -| linkecc_sbe_in) ++(-3.25,0) node[outport, anchor=south](linkecc_sbe_out){};
    \draw (linkecclane.north -| linkecc_dbe_in) node[outport, anchor=south](linkecc_dbe_out){};
    \draw (linkecclane.north -| linkecc_tbe_in) node[outport, anchor=south](linkecc_tbe_out){};
    \draw (linkecclane.north -| linkecc_mbe_in) node[outport, anchor=south](linkecc_mbe_out){};
    % BUS-TRIM -> LINK-ECC
    \draw[-Triangle,black!30!red] (bus_trim_wd_out.north) -- (linkecc_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (bus_trim_az_out.north) -- (linkecc_az_in.south) node[anchor=east,midway,align=center]{AZ \\ \tiny 172};
    \draw[-Triangle,black!30!red] (bus_trim_sbe_out.north) -- (linkecc_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny 80.1};
    \draw[-Triangle,black!30!red] (bus_trim_dbe_out.north) -- (linkecc_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 51.5};
    \draw[-Triangle,black!30!red] (bus_trim_tbe_out.north) -- (linkecc_tbe_in.south) node[anchor=east,midway,align=center]{TBE \\ \tiny 4.2};
    \draw[-Triangle,black!30!red] (bus_trim_mbe_out.north) -- (linkecc_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 172};
    % blocks
    \basicevent{(linkecc_sbe_in) ++(1,1)}{linkecc_sbe}{SBE}{5 \cdot 10^9}
    \draw (linkecc_sbe) ++(0,0.9) node[coverage, anchor=in, coverage residual=100\%, coverage latent=100\%] (linkecc_cov){};
    \add {(linkecc_sbe_out) ++(0,-0.75)}{linkecc_add};
    \draw (linkecclane.north -| linkecc_cov.lat) node[outport, anchor=south](linkecc_sbe_lat_out){};
    % inner connections
    \draw[-Triangle,black!30!red] (linkecc_wd_in) -- (linkecc_wd_out);
    \draw[-Triangle,black!30!red] (linkecc_az_in) -- (linkecc_az_out);
    \draw[-Triangle,black!30!red] (linkecc_add.north) -- (linkecc_sbe_out);
    \draw[-Triangle,black!30!red] (linkecc_dbe_in) -- (linkecc_dbe_out);
    \draw[-Triangle,black!30!red] (linkecc_tbe_in) -- (linkecc_tbe_out);
    \draw[-Triangle,black!30!red] (linkecc_mbe_in) -- (linkecc_mbe_out);
    \draw[-Triangle,black!30!red] (linkecc_cov.res) -- (linkecc_add.east -| linkecc_cov.res) -- (linkecc_add.east);
    \draw[-Triangle,black!30!red] (linkecc_sbe) -- (linkecc_cov.in);
    \draw[-Triangle,black!30!red] (linkecc_sbe_in) -- ++(0,0.5) coordinate(linkecc_c0) -- (linkecc_add |- linkecc_c0) -- (linkecc_add.south);
    \draw[-Triangle,black!30!blue] (linkecc_cov.lat) -- (linkecc_sbe_lat_out);

    % SEC-DED:
    \lane{(linkecclane.north west) ++(0,1)}{secded}{6cm}{SEC-DED}
    % inputs
    \draw (secdedlane.south -| linkecc_wd_out) node[inport, anchor=north](secded_wd_in){};
    \draw (secdedlane.south -| linkecc_az_out) node[inport, anchor=north](secded_az_in){};
    \draw (secdedlane.south -| linkecc_sbe_out) node[inport, anchor=north](secded_sbe_in){};
    \draw (secdedlane.south -| linkecc_dbe_out) node[inport, anchor=north](secded_dbe_in){};
    \draw (secdedlane.south -| linkecc_tbe_out) node[inport, anchor=north](secded_tbe_in){};
    \draw (secdedlane.south -| linkecc_mbe_out) node[inport, anchor=north](secded_mbe_in){};
    % LINK-ECC -> SEC-DED
    \draw[-Triangle,black!30!red] (linkecc_wd_out.north) -- (secded_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (linkecc_az_out.north) -- (secded_az_in.south) node[anchor=east,midway,align=center]{AZ \\ \tiny 172};
    \draw[-Triangle,black!30!red] (linkecc_sbe_out.north) -- (secded_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny 80.1};
    \draw[-Triangle,black!30!red] (linkecc_dbe_out.north) -- (secded_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 51.5};
    \draw[-Triangle,black!30!red] (linkecc_tbe_out.north) -- (secded_tbe_in.south) node[anchor=east,midway,align=center]{TBE \\ \tiny 4.2};
    \draw[-Triangle,black!30!red] (linkecc_mbe_out.north) -- (secded_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 172};
    % blocks
    \draw (secded_sbe_in) ++(-0.75,0.75) node[coverage, anchor=in, coverage residual=100\%, coverage latent=100\%] (secded_sbe_cov){};
    \draw (secded_sbe_cov.east) ++(0.5,0) node[coverage, anchor=west, coverage residual=100\%, coverage latent=100\%] (secded_dbe_cov){};
    \draw (secded_dbe_cov.east) ++(0.5,0) node[split2, anchor=west,split2 left=44\%,split2 right=56\%] (secded_tbe_split){};
    \draw (secded_tbe_split.east) ++(0.5,0) node[coverage, anchor=west, coverage residual=50\%, coverage latent=50\%] (secded_mbe_cov){};
    \basicevent{(secded_mbe_cov.north east) ++(0.5,1.5)}{secded_sdb}{SDB}{0.1}
    \draw (secded_tbe_split.out 1) ++(0,0.25) node[coverage, anchor=in, coverage residual=100\%, coverage latent=100\%] (secded_tbe_cov){};
    \add {(secded_mbe_cov.res) ++(0,1.5)}{secded_add};
    % outputs
    \draw (secdedlane.north -| secded_wd_in) ++(-0.5,0) node[outport, anchor=south](secded_wd_out){};
    \draw (secdedlane.north -| secded_wd_out) ++(0.5,0) node[outport, anchor=south](secded_az_out){};
    \draw (secdedlane.north -| secded_sbe_cov.res) node[outport, anchor=south](secded_sbe_out){};
    \draw (secdedlane.north -| secded_sbe_cov.lat) node[outport, anchor=south](secded_sbe_lat_out){};
    \draw (secdedlane.north -| secded_dbe_cov.res) node[outport, anchor=south](secded_dbe_out){};
    \draw (secdedlane.north -| secded_dbe_cov.lat) node[outport, anchor=south](secded_dbe_lat_out){};
    \draw (secdedlane.north -| secded_tbe_cov.res) node[outport, anchor=south](secded_tbe_out){};
    \draw (secdedlane.north -| secded_tbe_cov.lat) node[outport, anchor=south](secded_tbe_lat_out){};
    \draw (secdedlane.north -| secded_add) node[outport, anchor=south](secded_mbe_out){};
    \draw (secdedlane.north -| secded_mbe_cov.lat) node[outport, anchor=south](secded_mbe_lat_out){};
    \draw (secdedlane.north -| secded_sdb) node[outport, anchor=south](secded_sdb_lat_out){};
    % inner connections
    \draw[-Triangle,black!30!red] (secded_sbe_cov.res) -- (secded_sbe_out);
    \draw[-Triangle,black!30!blue] (secded_sbe_cov.lat) -- (secded_sbe_lat_out);
    \draw[-Triangle,black!30!red] (secded_dbe_cov.res) -- (secded_dbe_out);
    \draw[-Triangle,black!30!blue] (secded_dbe_cov.lat) -- (secded_dbe_lat_out);
    \draw[-Triangle,black!30!red] (secded_tbe_cov.res) -- (secded_tbe_out);
    \draw[-Triangle,black!30!blue] (secded_tbe_cov.lat) -- (secded_tbe_lat_out);
    \draw[-Triangle,black!30!blue] (secded_mbe_cov.lat) -- (secded_mbe_lat_out);
    \draw[-Triangle,black!30!blue] (secded_sdb) -- (secded_sdb_lat_out);
    \draw[-Triangle,black!30!red] (secded_wd_in) -- ++(0,0.25) coordinate (secded_c0) -- (secded_c0 -| secded_wd_out) -- (secded_wd_out);
    \draw[-Triangle,black!30!red] (secded_az_in) -- ++(0,0.5) coordinate (secded_c1) -- (secded_c1 -| secded_az_out) -- (secded_az_out);
    \draw[-Triangle,black!30!red] (secded_sbe_in) -- ++(0,0.25) coordinate (secded_c2) -- (secded_c2 -| secded_sbe_cov.in) -- (secded_sbe_cov.in);
    \draw[-Triangle,black!30!red] (secded_dbe_in) -- ++(0,0.25) coordinate (secded_c3) -- (secded_c3 -| secded_dbe_cov.in) -- (secded_dbe_cov.in);
    \draw[-Triangle,black!30!red] (secded_tbe_in) -- ++(0,0.5) coordinate (secded_c4) -- (secded_c4 -| secded_tbe_split.in) -- (secded_tbe_split.in);
    \draw[-Triangle,black!30!red] (secded_mbe_in) -- ++(0,0.25) coordinate (secded_c5) -- (secded_c5 -| secded_mbe_cov.in) -- (secded_mbe_cov.in);
    \draw[-Triangle,black!30!red] (secded_tbe_split.out 1) -- (secded_tbe_cov.in);
    \draw[-Triangle,black!30!red] (secded_mbe_cov.res) -- (secded_add.south);
    \draw[-Triangle,black!30!red] (secded_add.north) -- (secded_mbe_out);
    \draw[-Triangle,black!30!red] (secded_tbe_split.out 2) -- ++(0,0.25) -- ++(0.25,0) coordinate (secded_c6) -- (secded_c6 |- secded_add) -- (secded_add.west);

    % SEC-DED-TRIM:
    \lane{(secdedlane.north west) ++(0,3)}{secdedtrim}{5cm}{SEC-DED-TRIM}
    % inputs
    \draw (secdedtrimlane.south -| secded_wd_out) node[inport, anchor=north](secdedtrim_wd_in){};
    \draw (secdedtrimlane.south -| secded_az_out) node[inport, anchor=north](secdedtrim_az_in){};
    \draw (secdedtrimlane.south -| secded_sbe_out) node[inport, anchor=north](secdedtrim_sbe_in){};
    \draw (secdedtrimlane.south -| secded_dbe_out) node[inport, anchor=north](secdedtrim_dbe_in){};
    \draw (secdedtrimlane.south -| secded_tbe_out) node[inport, anchor=north](secdedtrim_tbe_in){};
    \draw (secdedtrimlane.south -| secded_mbe_out) node[inport, anchor=north](secdedtrim_mbe_in){};
    % SEC-DED -> SEC-DED-TRIM
    \draw[-Triangle,black!30!red] (secded_wd_out.north) -- (secdedtrim_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny 172};
    \draw[-Triangle,black!30!red] (secded_az_out.north) -- (secdedtrim_az_in.south) node[anchor=west,midway,align=center]{AZ \\ \tiny 172};
    \draw[-Triangle,black!30!red] (secded_sbe_out.north) -- (secdedtrim_sbe_in.south) node[anchor=west,midway,align=center]{SBE \\ \tiny 0};
    \draw[-Triangle,black!30!red] (secded_dbe_out.north) -- (secdedtrim_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny 0};
    \draw[-Triangle,black!30!red] (secded_tbe_out.north) -- (secdedtrim_tbe_in.south) node[anchor=east,midway,align=center]{TBE \\ \tiny 0};
    \draw[-Triangle,black!30!red] (secded_mbe_out.north) -- (secdedtrim_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny 88.4};
    % blocks
    \draw (secdedtrim_dbe_in.north) ++(0,0.75) node[split2, anchor=in, split2 left=20\%, split2 right=79\%] (secdedtrim_dbe_split){};
    \draw (secdedtrim_dbe_split.west) ++(-0.75,0) node[split1, anchor=east, split1 top=89\%] (secdedtrim_sbe_split){};
    \draw (secdedtrim_dbe_split.east) ++(0.75,0) node[split3, anchor=west, split3 left=3\%, split3 middle=27\%, split3 right=70\%] (secdedtrim_tbe_split){};
    \add {(secdedtrim_dbe_split.out 1) ++(0,0.7)}{secdedtrim_sbe_add};
    \add {(secdedtrim_tbe_split.out 2) ++(0,1)}{secdedtrim_dbe_add};
    % outputs
    \draw (secdedtrimlane.north -| secdedtrim_wd_in) node[outport, anchor=south](secdedtrim_wd_out){};
    \draw (secdedtrimlane.north -| secdedtrim_az_in) node[outport, anchor=south](secdedtrim_az_out){};
    \draw (secdedtrimlane.north -| secdedtrim_sbe_add.north) node[outport, anchor=south](secdedtrim_sbe_out){};
    \draw (secdedtrimlane.north -| secdedtrim_dbe_add.north) node[outport, anchor=south](secdedtrim_dbe_out){};
    \draw (secdedtrimlane.north -| secdedtrim_tbe_split.out 3) node[outport, anchor=south](secdedtrim_tbe_out){};
    \draw (secdedtrimlane.north -| secdedtrim_mbe_in) node[outport, anchor=south](secdedtrim_mbe_out){};
    % inner connections
    \draw[-Triangle,black!30!red] (secdedtrim_wd_in) -- (secdedtrim_wd_out);
    \draw[-Triangle,black!30!red] (secdedtrim_az_in) -- (secdedtrim_az_out);
    \draw[-Triangle,black!30!red] (secdedtrim_sbe_split.out 1) -- (secdedtrim_sbe_add -| secdedtrim_sbe_split.out 1) -- (secdedtrim_sbe_add.west);
    \draw[-Triangle,black!30!red] (secdedtrim_dbe_split.out 1) -- (secdedtrim_sbe_add.south);
    \draw[-Triangle,black!30!red] (secdedtrim_tbe_split.out 1) -- (secdedtrim_sbe_add -| secdedtrim_tbe_split.out 1) -- (secdedtrim_sbe_add.east);
    \draw[-Triangle,black!30!red] (secdedtrim_dbe_split.out 2) -- (secdedtrim_dbe_add -| secdedtrim_dbe_split.out 2) -- (secdedtrim_dbe_add.west);
    \draw[-Triangle,black!30!red] (secdedtrim_tbe_split.out 2) -- (secdedtrim_dbe_add.south);
    \draw[-Triangle,black!30!red] (secdedtrim_tbe_split.out 3) -- (secdedtrim_tbe_out);
    \draw[-Triangle,black!30!red] (secdedtrim_sbe_add.north) -- (secdedtrim_sbe_out);
    \draw[-Triangle,black!30!red] (secdedtrim_dbe_add.north) -- (secdedtrim_dbe_out);
    \draw[-Triangle,black!30!red] (secdedtrim_mbe_in) -- (secdedtrim_mbe_out);
    \draw[-Triangle,black!30!red] (secdedtrim_sbe_in) -- ++(0,0.5) coordinate (secdedtrim_c0) -- (secdedtrim_c0 -| secdedtrim_sbe_split.in) -- (secdedtrim_sbe_split.in);
    \draw[-Triangle,black!30!red] (secdedtrim_dbe_in) -- (secdedtrim_dbe_split.in);
    \draw[-Triangle,black!30!red] (secdedtrim_tbe_in) -- ++(0,0.5) coordinate (secdedtrim_c1) -- (secdedtrim_c1 -| secdedtrim_tbe_split.in) -- (secdedtrim_tbe_split.in);

    % ASIL
    \lane{(secdedtrimlane.north west) ++(0,4)}{asil}{2cm}{ASIL}
    \draw (asillane) node[]() {\large \textbf{Calculate ASIL}};
    \draw (asillane.east) ++(2,0) node[black!30!red](spfm) {$\mathrm{SPFM} = 89.45\%$};
    \draw (spfm.south) ++(0,-0.15) node[black!30!blue,anchor=north](lfm) {$\mathrm{LFM} = 54.86\%$};
    % inputs
    \draw (asillane.south) ++(-5,0) node[inport, anchor=north](asil_res_in){};
    \draw (asillane.south) ++(+5,0) node[inport, anchor=north](asil_lat_in){};
    % adder
    \draw (asil_res_in) ++(0,-1.25) node[draw, circle, minimum size=1cm](asil_res_add){$+$};
    % \coordinate (asil_lat_add) at (asil_lat_in) +(0,-1.25);
    \basicevent{(asil_res_add) ++(-2,0)}{other}{Other}{9.5};
    % connections
    \draw[-Triangle,black!30!red,dashed] (other) -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_wd_out.north) -- +(0,0.75) node[anchor=east,midway,align=center]{WD \\ \tiny 172} -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_az_out.north) -- +(0,0.75) node[anchor=west,midway,align=center]{AZ \\ \tiny 172} -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_sbe_out.north) -- +(0,0.75) node[anchor=east,midway,align=center]{SBE \\ \tiny 0} -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_dbe_out.north) -- +(0,0.75) node[anchor=east,midway,align=center]{DBE \\ \tiny 0} -- +(-3,0.75) -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_tbe_out.north) -- +(0,1.15) node[anchor=west,midway,align=center]{TBE \\ \tiny 0} -- +(-4,1.15) -- (asil_res_add);
    \draw[-Triangle,black!30!red] (secdedtrim_mbe_out.north) -- +(0,1.55) node[anchor=west,midway,align=center]{MBE \\ \tiny 88.4} -- +(-6.1,1.55) -- (asil_res_add);
    % \draw[-Triangle,black!30!red] (asil_res_add) -- (asil_res_in) node[anchor=west,midway,align=center]{$\lambda_{RF}=$};
    % \draw[-Triangle,black!30!blue] (asil_lat_add) -- (asil_lat_in) node[anchor=west,midway,align=center]{$\lambda_{MPF,L}=$};

    \draw[gray, dashed] (dramtrimlane.north west) ++(-4,0.5) -- ++(24,0);
    \draw[gray, dashed] (linkecclane.north west) ++(-4,0.5) -- ++(24,0);
    \draw[gray, dashed] (secdedtrimlane.north west) ++(-4,0.5) -- ++(24,0);

    \draw[gray!50](22,7) node(){\Huge \bf DRAM};
    \draw[gray!50](22,19) node(){\Huge \bf BUS};
    \draw[gray!50](22,33) node(){\Huge \bf SoC};

    % latent connections
    \add {(seclane.north east) ++(1,0.75)}{sec_lat_add};
    \draw[-Triangle,black!30!blue] (sec_sb_out) -- ++(0,0.4) node[anchor=east,align=center](latsb0){SB \\ \tiny 0.1} -- (latsb0 -| seclane.east) -- (sec_lat_add);
    \draw[-Triangle,black!30!blue] (sec_sbe_lat_out) -- ++(0,1) node[anchor=east,align=center](latsbe0){SBE \\ \tiny 1610} -- (latsbe0 -| seclane.east) -- (sec_lat_add);

    \add {(linkecclane.north east) ++(1,0.5)}{linkecc_lat_add};
    \draw[-Triangle,black!30!blue] (sec_lat_add) -- (linkecc_lat_add);
    \draw[-Triangle,black!30!blue] (linkecc_sbe_lat_out) -- ++(0,0.4) node[anchor=east,align=center]{SBE \\ \tiny 0} -- (linkecc_lat_add);

    \add {(secdedlane.north east) ++(1,1.5)}{secded_lat_add};
    \draw[-Triangle,black!30!blue] (linkecc_lat_add) -- (secded_lat_add);
    \draw[-Triangle,black!30!blue] (secded_sdb_lat_out) -- ++(0,0.5) node[anchor=east,align=center](secdedsb_lat){SDB \\ \tiny 0.1} -- (secdedsb_lat -| secdedlane.east) -- (secded_lat_add);
    \draw[-Triangle,black!30!blue] (secded_mbe_lat_out) -- ++(0,1.0) node[anchor=east,align=center](secdedmbe_lat){MBE \\ \tiny 86} -- (secdedmbe_lat -| secdedlane.east) -- (secded_lat_add);
    \draw[-Triangle,black!30!blue] (secded_tbe_lat_out) -- ++(0,1.5) node[anchor=east,align=center](secdedtbe_lat){TBE \\ \tiny 0} -- (secdedtbe_lat -| secdedlane.east) -- (secded_lat_add);
    \draw[-Triangle,black!30!blue] (secded_dbe_lat_out) -- ++(0,2.0) node[anchor=east,align=center](secdeddbe_lat){DBE \\ \tiny 0} -- (secdeddbe_lat -| secdedlane.east) -- (secded_lat_add);
    \draw[-Triangle,black!30!blue] (secded_sbe_lat_out) -- ++(0,2.5) node[anchor=east,align=center](secdedsbe_lat){SBE \\ \tiny 0} -- (secdedsbe_lat -| secdedlane.east) -- (secded_lat_add);

    \draw[-Triangle,black!30!red] (asil_res_add) -- (asil_res_in) node[anchor=west,midway,align=center]{$\lambda_\mathrm{RF}=441.9$};
    \draw[-Triangle,black!30!blue] (secded_lat_add) -- ++(0,9) coordinate (secdedlatc0) -- (secdedlatc0 -| asil_lat_in) -- (asil_lat_in) node[anchor=west,near end,align=center]{$\lambda_\mathrm{MPF,L}=1696.3$};

    %Legends:
    \draw(22.5,3.5) node(){\Large \textbf{Legend:}};
    \draw[black!30!red](22.5,2.75) node(){\Large $\lambda_\mathrm{RF}$};
    \draw[black!30!blue](22.5,2.0) node(){\Large $\lambda_\mathrm{MPF,L}$};

    % Additional text
    \draw(linkecclane.south east) node[anchor=south east](){\tiny DBE and MBE not drawn for sake of space};
    
\end{circuitikz}%
}