\resizebox{0.94\textwidth}{!}{%
\begin{circuitikz}
    \newcommand{\add}[2]{
        \draw(#1) node[draw, circle](#2){$+$};
    }
    \newcommand{\basicevent}[4]{
        \draw #1 node[draw, circle,inner sep=0,minimum size=1cm](#2){#3} ++(0,-0.5) node[anchor=north](){\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}{2.5cm}{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.25)}{wd}{WD}{172}
    \basicevent{(dram_sbe_out) ++(0,-1.25)}{sbe}{SBE}{1610}
    \basicevent{(dram_dbe_out) ++(0,-1.25)}{dbe}{DBE}{172}
    \basicevent{(dram_mbe_out) ++(0,-1.25)}{mbe}{MBE}{172}
    % inner connections
    \draw[-Triangle,red] (wd.north) -- (dram_wd_out);
    \draw[-Triangle,red] (sbe.north) -- (dram_sbe_out);
    \draw[-Triangle,red] (dbe.north) -- (dram_dbe_out);
    \draw[-Triangle,red] (mbe.north) -- (dram_mbe_out);
    
    % SEC:
    \lane{0,3.75}{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=10\%, coverage latent=12\%] (seccov){};
    \draw (sec_dbe_in.north) ++(0,0.5) node[split2, anchor=in, split2 left=83\%, split2 right=17\%] (secsplit){};
    % \draw[-Triangle,red] (sec_sbe_in.north) -- ++(0,0.5) node[coverage, anchor=in, coverage residual=10\%, coverage latent=12\%](seccov){};
    % \draw[-Triangle,red] (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,red] (sec_wd_in) -- (sec_wd_out);
    \draw[-Triangle,red] (sec_mbe_in) -- (sec_mbe_out);
    \draw[-Triangle,red] (secsplit.out 1) -- (sec_dbe_out);
    \draw[-Triangle,red] (secsplit.out 2) -- (sec_tbe_out);
    \draw[-Triangle,red] (sec_sbe_in) -- (seccov.in);
    \draw[-Triangle,red] (sec_dbe_in) -- (secsplit.in);
    \draw[-Triangle,red] (seccov.res) -- (sec_sbe_out);
    \draw[-Triangle,blue] (seccov.lat) -- (sec_sbe_lat_out);
    \draw[-Triangle,blue] (sb) -- (sec_sb_out);
    
    % dram -> SEC
    \draw[-Triangle,red] (dram_wd_out.north) -- (sec_wd_in.south) node[anchor=east,midway,align=center]{WD \\ \tiny TODO};
    \draw[-Triangle,red] (dram_sbe_out.north) -- (sec_sbe_in.south) node[anchor=east,midway,align=center]{SBE \\ \tiny TODO};
    \draw[-Triangle,red] (dram_dbe_out.north) -- (sec_dbe_in.south) node[anchor=east,midway,align=center]{DBE \\ \tiny TODO};
    \draw[-Triangle,red] (dram_mbe_out.north) -- (sec_mbe_in.south) node[anchor=east,midway,align=center]{MBE \\ \tiny TODO};
    
    % DRAM-TRIM:
    \lane{0,8.5}{trim}{3.5cm}{TRIM}
    % inputs
    \draw(seccovout.north|-trimlane.south) node [inport, anchor=north](trimseccovin){};
    \draw(sec_sbe_out.north|-trimlane.south) node [inport, anchor=north](secsplitin){};
    % blocks
    \draw[-Triangle,red] (trimseccovin.north) -- ++(0,0.5) node[split1, anchor=in, split1 top={94\%}](trimsplit1){};
    \draw[-Triangle,red] (secsplitin.north) -- ++(0,0.5) node[split2, anchor=in, split2 left={11\%}, split2 right={89\%}](trimsplit2){};
    % outputs
    
    % \draw[-Triangle,red] (secsplitout2) -- ++(0,0.5) -- ++(2.0,0) coordinate(h) -- (h|-secsplitin.south) node [inport, anchor=south](secsplitin2){};
    % \draw[-Triangle,red] (secsplitin2.north) -- ++(0,0.5) node[split3, anchor=in, split3 left={0.9\%}, split3 right={83.2\%}, split3 middle={15.8\%}](trimsplit2){};

    % sec -> DRAM-TRIM
    % \draw[-Triangle,red] (seccovout.north) -- (trimseccovin.south);
    % \draw[-Triangle,red] (secsplitout.north) -- (secsplitin.south);
\end{circuitikz}%
}