Update on Overleaf.
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
\draw (1.375,-0.25) rectangle ++(0.25,0.25);
|
||||
\end{tikzpicture}%
|
||||
}
|
||||
|
||||
%
|
||||
\caption{Calculation Blocks for the Safety Methodology}
|
||||
\label{fig:blocks}
|
||||
\end{figure}
|
||||
42
blocks.tex
42
blocks.tex
@@ -8,6 +8,9 @@
|
||||
}}
|
||||
|
||||
\makeatletter
|
||||
|
||||
\pgfkeys{/tikz/coverage residual/.initial = 100\%}
|
||||
\pgfkeys{/tikz/coverage latent/.initial = 0\%}
|
||||
\pgfdeclareshape{coverage}{
|
||||
% Minimum required anchors:
|
||||
\savedanchor{\northeast}{
|
||||
@@ -20,19 +23,19 @@
|
||||
}
|
||||
|
||||
% Special Anchors, that can be calculated from the others (lazy calculation)
|
||||
\anchor{south west} {\southwest}
|
||||
\anchor{north east} {\northeast}
|
||||
\anchor{north west} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x}
|
||||
\anchor{south east} {\southwest \pgf@y=\pgf@y \pgf@x=-\pgf@x}
|
||||
\anchor{west} {\southwest \pgf@y=0cm \pgf@x=\pgf@x}
|
||||
\anchor{east} {\northeast \pgf@y=0cm \pgf@x=\pgf@x}
|
||||
\anchor{north} {\northeast \pgf@y=\pgf@y \pgf@x=0cm}
|
||||
\anchor{south} {\southwest \pgf@y=\pgf@y \pgf@x=0cm}
|
||||
\anchor{center} {\pgfpointorigin}
|
||||
\anchor{out 2} {\northeast \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
|
||||
\anchor{out 1} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
|
||||
\anchor{in} {\southwest \pgf@y=\pgf@y \pgf@x=0cm \pgfpoint{0.5\pgf@x}{\pgf@y-0.2cm}}
|
||||
\anchor{text} {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox+0.5cm}}
|
||||
\anchor{south west} {\southwest}
|
||||
\anchor{north east} {\northeast}
|
||||
\anchor{north west} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x}
|
||||
\anchor{south east} {\southwest \pgf@y=\pgf@y \pgf@x=-\pgf@x}
|
||||
\anchor{west} {\southwest \pgf@y=0cm \pgf@x=\pgf@x}
|
||||
\anchor{east} {\northeast \pgf@y=0cm \pgf@x=\pgf@x}
|
||||
\anchor{north} {\northeast \pgf@y=\pgf@y \pgf@x=0cm}
|
||||
\anchor{south} {\southwest \pgf@y=\pgf@y \pgf@x=0cm}
|
||||
\anchor{center} {\pgfpointorigin}
|
||||
\anchor{lat} {\northeast \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
|
||||
\anchor{res} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
|
||||
\anchor{in} {\southwest \pgf@y=\pgf@y \pgf@x=0cm \pgfpoint{0.5\pgf@x}{\pgf@y-0.2cm}}
|
||||
\anchor{text} {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox+0.5cm}}
|
||||
|
||||
\backgroundpath{
|
||||
\pgfsetstrokecolor{black}
|
||||
@@ -58,6 +61,19 @@
|
||||
\southwest \pgf@ya=0.5\pgf@y \pgf@xa=0cm
|
||||
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\bf Coverage}
|
||||
\pgfusepath{stroke}
|
||||
% Vertical Middle Line:
|
||||
\northeast \pgf@yb=\pgf@y \pgf@xb=\pgf@x
|
||||
\pgfpathmoveto{\pgfpoint{0cm}{0cm}}
|
||||
\pgfpathlineto{\pgfpoint{0cm}{\pgf@yb}}
|
||||
\pgfusepath{stroke}
|
||||
% Left lable:
|
||||
\northeast \pgf@ya=0.5\pgf@y \pgf@xa=-0.5\pgf@x
|
||||
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\pgfkeysvalueof{/tikz/coverage residual}}
|
||||
\pgfusepath{stroke}
|
||||
% Right lable:
|
||||
\northeast \pgf@ya=0.5\pgf@y \pgf@xa=0.5\pgf@x
|
||||
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\pgfkeysvalueof{/tikz/coverage latent}}
|
||||
\pgfusepath{stroke}
|
||||
% Construct Output1:
|
||||
\northeast \pgf@ya=\pgf@y \pgf@xa=0.5\pgf@x
|
||||
\southwest \pgf@yb=\pgf@y \pgf@xb=0.5\pgf@x
|
||||
|
||||
94
model2.tex
94
model2.tex
@@ -1,8 +1,11 @@
|
||||
\resizebox{0.94\textwidth}{!}{%
|
||||
\begin{circuitikz}
|
||||
\newcommand{\add}[3]{
|
||||
\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){};
|
||||
@@ -10,36 +13,75 @@
|
||||
}
|
||||
% DRAM:
|
||||
\lane{0,0}{dram}{2.5cm}{DRAM}
|
||||
\draw(2,1.25) node[draw, circle](wd){WD}; \draw(wd.south) node[anchor=north](){\tiny $172\cdot10^{-9}$};
|
||||
\draw(5,1.25) node[draw, circle](sbe){SBE}; \draw(sbe.south) node[anchor=north](){\tiny $161\cdot10^{-9}$};
|
||||
\draw(8.5,1.25) node[draw, circle](dbe){DBE}; \draw(dbe.south) node[anchor=north](){\tiny $172\cdot10^{-9}$};
|
||||
\draw(12.5,1.25) node[draw, circle](mbe){MBE}; \draw(mbe.south) node[anchor=north](){\tiny $172\cdot10^{-9}$};
|
||||
%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}
|
||||
\draw[-Triangle,red] (sbe.north) -- (sbe.north|- dramlane.north) node[outport, anchor=south](dramsbeout){};
|
||||
\draw[-Triangle,red] (wd.north) -- (wd.north |- dramlane.north) node[outport, anchor=south](dramwdout) {};
|
||||
\draw[-Triangle,red] (dbe.north) -- (dbe.north|- dramlane.north) node[outport, anchor=south](dramdbeout){};
|
||||
\draw[-Triangle,red] (mbe.north) -- (mbe.north|- dramlane.north) node[outport, anchor=south](drammbeout){};
|
||||
\draw(dramwdout.north |-seclane.south) node [inport, anchor=north](){};
|
||||
\draw(dramsbeout.north |-seclane.south) node [inport, anchor=north](secsbein){};
|
||||
\draw(dramdbeout.north |-seclane.south) node [inport, anchor=north](secdbein){};
|
||||
\draw(drammbeout.north|-seclane.south) node [inport, anchor=north](){};
|
||||
\draw[-Triangle,red] (dramsbeout.north) -- (secsbein.south);
|
||||
\draw[-Triangle,red] (secsbein.north) -- ++(0,0.5) node[coverage, anchor=in](seccov){100\%};
|
||||
\draw[-Triangle,red] (dramdbeout.north) -- (secdbein.south);
|
||||
\draw[-Triangle,red] (secdbein.north) -- ++(0,0.5) node[split2, anchor=in, split2 left={83\%}, split2 right={17\%}](secsplit){};
|
||||
% 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}
|
||||
\draw[-Triangle,red] (seccov.out 1) -- (seccov.out 1|- seclane.north) node[outport, anchor=south](seccovout){};
|
||||
% inputs
|
||||
\draw(seccovout.north|-trimlane.south) node [inport, anchor=north](trimseccovin){};
|
||||
\draw[-Triangle,red] (seccovout.north) -- (trimseccovin.south);
|
||||
\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] (secsplit.out 1) -- (secsplit.out 1|- seclane.north) node[outport, anchor=south](secsplitout){};
|
||||
\draw(secsplitout.north|-trimlane.south) node [inport, anchor=north](secsplitin){};
|
||||
\draw[-Triangle,red] (secsplitout.north) -- (secsplitin.south);
|
||||
\draw[-Triangle,red] (secsplitin.north) -- ++(0,0.5) node[split2, anchor=in, split2 left={11\%}, split2 right={89\%}](trimsplit2){};
|
||||
\draw[-Triangle,red] (secsplit.out 2) -- (secsplit.out 2|- seclane.north) node[outport, anchor=south](secsplitout2){};
|
||||
\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){};
|
||||
% 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}%
|
||||
}
|
||||
Reference in New Issue
Block a user