\sectionright{\sffamily Structural Elements} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\sffamily Custom Module (Black Box)} \subsubsection{\sffamily Description} The \texttt{rtl\_module} element is designed to represent higher-level functional units or "black boxes" within a digital system. It is based on the \texttt{rtl\_base\_box} but features a distinct green tint and a dedicated label at the top. This element is ideal for hierarchical diagrams where the internal logic of a component is abstracted away. The label is automatically positioned at the \texttt{north} edge with a slight offset to prevent overlap with incoming signals. \subsubsection{\sffamily Attributes} The module's name is passed as a mandatory argument to the style. Dimensioning follows the standard package scheme: \begin{center} \begin{tabular}{lp{8cm}} \toprule \textbf{Attribute} & \textbf{Effect} \\ \midrule \texttt{rtl\_module=\{Name\}} & Sets the identifying label at the top of the module. \\ \texttt{rtl\_width} & Sets the minimum width (Default: 1.5cm). \\ \texttt{rtl\_height} & Sets the minimum height (Default: 1.8cm). \\ \bottomrule \end{tabular} \end{center} \subsubsection{\sffamily Anchors} \begin{itemize} \item \textbf{Standard Anchors}: \texttt{north}, \texttt{south}, \texttt{east}, \texttt{west}, and all corner anchors. \item \textbf{Note}: Use the \texttt{north} anchor with caution, as it shares space with the module label. \end{itemize} \subsubsection{\sffamily Listing} The following example demonstrates a scaled module with a custom name. \begin{RTLexample}[Custom Module] \begin{tikzpicture}[>=Stealth, thick, scale=0.8] % Module with specific name and dimensions \node[rtl_module={Control\_Unit}, rtl_width=3cm, rtl_height=2.5cm] (Mod1) at (0,0) {}; % Connections \draw[<-] (Mod1.west) ++(0,0.5) -- ++(-1,0) node[left] {instr\_in}; \draw[->] (Mod1.east) -- ++(1,0) node[right] {ctrl\_out}; \draw[<-] (Mod1.south) -- ++(0,-0.7) node[below] {reset}; \end{tikzpicture} \end{RTLexample} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\sffamily Constant Value} \subsubsection{\sffamily Description} The \texttt{rtl\_const} element is used to represent static signal values, parameters, or hardcoded addresses. Its distinct purple color serves as a visual cue that the signal originating from this block is non-volatile and fixed during the design's operation. Internally, it behaves like an asynchronous register without any clock or control logic. \subsubsection{\sffamily Attributes} \begin{center} \begin{tabular}{lp{8cm}} \toprule \textbf{Attribute} & \textbf{Effect} \\ \midrule \texttt{rtl\_width} & Sets the minimum width (Default: 1.5cm). \\ \texttt{rtl\_height} & Sets the minimum height (Default: 1.8cm). \\ \bottomrule \end{tabular} \end{center} \subsubsection{\sffamily Anchors} \begin{itemize} \item \textbf{Standard Anchors}: Full set of rectangular anchors (\texttt{north}, \texttt{south}, etc.). \end{itemize} \subsubsection{\sffamily Listing} Constants are typically used to feed fixed values into operators or modules. \begin{RTLexample}[Constant Value] \begin{tikzpicture}[>=Stealth, thick, scale=0.8] % Constant value block \node[rtl_const] (C1) at (0,0) {8'hFF}; % Example of signal origin \draw[->, rtl_bus={8}] (C1.east) -- ++(1.5,0) node[right] {}; \end{tikzpicture} \end{RTLexample} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\sffamily Cutset Decoration} \subsubsection{\sffamily Description} The \texttt{is\_cutset} style is a specialized visual decorator used to mark timing boundaries, pipelining stages, or logic cuts within a diagram. Instead of being a standalone node, it is applied as an attribute to any existing rectangular element (like registers or modules). The style automatically draws a dashed vertical line through the center of the component, extending slightly (5\%) beyond the \texttt{north} and \texttt{south} boundaries. By utilizing the \texttt{foreground} PGF layer, the cutset remains clearly visible even when applied to filled or shaded elements. \subsubsection{\sffamily Attributes} The style accepts an optional argument to customize the appearance of the dashed line, such as changing its color or thickness. \begin{center} \begin{tabular}{lp{8cm}} \toprule \textbf{Attribute} & \textbf{Effect} \\ \midrule \texttt{is\_cutset=\{draw\_options\}} & Activates the cutset line. The argument allows standard TikZ draw options (Default: \texttt{dashed, thick}). \\ \bottomrule \end{tabular} \end{center} \subsubsection{\sffamily Anchors} \begin{itemize} \item \textbf{Standard Anchors}: Full set of rectangular anchors (\texttt{north}, \texttt{south}, etc.). \end{itemize} \subsubsection{\sffamily Listing} The following example shows how to mark a timing boundary across a series of registers. \begin{RTLexample}[Logic Cutset] \begin{tikzpicture}[>=Stealth, thick, scale=0.8] % Sequence of registers \node[rtl_module={Mod A}] (M1) at (0,0) {}; % Register with a red cutset line \node[rtl_reg, is_cutset={red}, right=2cm of M1] (R1) {Reg}; \node[rtl_module={Mod B}, right=2cm of R1] (M2) {}; % Signals \draw[->] (M1) -- (R1); \draw[->] (R1) -- (M2); % Label for the cutset \node[red, font=\sffamily\small] at (R1.north) [yshift=0.5cm] {Timing Cut}; \end{tikzpicture} \end{RTLexample} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\sffamily Hierarchical Levels} \subsubsection{\sffamily Description} Complex digital systems, such as SOC architectures or multi-stage DSP pipelines, etc., often require a hierarchical representation to remain readable. The \texttt{\textbackslash createHierLevel} command is designed to automate the "zoom-in" effect from a high-level block to a detailed schematic. It automatically draws a focal marker (dashed circle) around the source component, creates a large container at a target position, and pulls projection lines on the \texttt{background} layer to visualize the transition. This command is specifically optimized to include external PDF schematics, allowing for a modular documentation workflow. \subsubsection{\sffamily Attributes} The command utilizes a mix of positional and mandatory arguments to define the geometric relationship between the hierarchy levels: \begin{center} \begin{tabular}{lp{8cm}} \toprule \textbf{Argument} & \textbf{Effect} \\ \midrule \texttt{[\#1]} & Optional TikZ draw options for the projection lines (e.g., color, dash pattern). \\ \texttt{\{\#2\}} & Name of the source node in the overview (e.g., \texttt{DSP\_Core}). \\ \texttt{\{\#3\}} & Target coordinate for the center of the detail view (e.g., \texttt{(10,-5)}). \\ \texttt{\{\#4\}} & Reference name for the new detail container. \\ \texttt{\{\#5\}} & Width of the detail container. \\ \texttt{\{\#6\}} & Height of the detail container. \\ \texttt{\{\#7\}} & File path to the external PDF or image. \\ \bottomrule \end{tabular} \end{center} \subsubsection{\sffamily Anchors} The created detail container behaves like a standard \texttt{rtl\_reg} node: \begin{itemize} \item \textbf{Standard Anchors}: \texttt{north}, \texttt{south}, \texttt{east}, \texttt{west}, etc. These can be used to connect global signals to the zoomed-in schematic. \end{itemize} \subsubsection{\sffamily Listing} The following example demonstrates a zoom-in from a generic DSP block to a specific 8-to-1 Multiplexer implementation. \begin{RTLexample}[Hierarchical Level] \begin{tikzpicture}[>=Stealth, thick, scale=0.8] \node[rtl_module] (Core) at (0,0) {Module}; \createHierLevel{Core}{(12,-4)}{DetailView}{8cm}{7cm}{../examples/8_1_MUX/8_1_MUX.pdf}; \end{tikzpicture} \end{RTLexample}