Just for fun I wanted to reproduce the memory of Can't get split rectangle to shrink small enough in this TikZ picture using a matrix of nodes avoiding the use of \foreach loops to place nodes.
My intention was to use a matrix of alu nodes with nodes in empty cells option
(no need of typing each particular node) and a particular column of controlcache nodes.
After some tests I've found some problems which I don't know how to solve. You can look at the following code and results.
First test (right figure): If I use a matrix of alu nodes and overwrite some column with controlcache nodes (multipart nodes), filling colors disappear. I've test to follow advices in Matrix of nodes column style inconsistency but I could not find the solution.
Second test (left matrix): If the whole matrix is made with controlcache nodes, the filling colors keep its value and there is no problem overwriting them with alu nodes even with particular filling colors.
Could you explain this contradiction?
And a second problem with nodes alignment. If you look carefully, blue alu nodes in the left matrix are misaligned with controlcache nodes, while gray controlcache ones are misaligned in second matrix. The reason and solution (0.5\pgflinewidth yshift) are in Andrew Stacey addendum to Jake's answer to the original question.
May be a better solution would be to draw two matrices, one for controlcache and another one for alu but I would like to know to control particular multipart nodes within a matrix.
\documentclass[border=3mm]{standalone}
\usepackage[rgb,hyperref]{xcolor}
\usepackage{tikz}
% Define colors
\definecolor{shade1}{rgb}{0.9, 0.9, 0.9}
\definecolor{shade2}{rgb}{0.75, 0.75, 0.75}
\definecolor{shade3}{rgb}{0.5, 0.5, 0.5}
\definecolor{shade4}{rgb}{0.35, 0.35, 0.35}
% Load TikZ libraries
\usetikzlibrary{shapes,matrix}
\usetikzlibrary{positioning}
% Text settings
\newcommand{\figureTextSize}{\tiny}
% Figure element lengths
\newlength{\gpgpuElemSep}
\setlength{\gpgpuElemSep}{1mm}
\newlength{\gpgpuElemSize}
\setlength{\gpgpuElemSize}{8mm}
% TikZ styles
\newcommand{\arrowStyle}{stealth}
\newcommand{\bendAngle}{45}
\newcommand{\lineThickness}{semithick}
\tikzstyle{box} = [%
draw,
rectangle,
\lineThickness,
]
\begin{document}
\begingroup
\figureTextSize
\begin{tikzpicture}[%
every node/.style={%
node distance=0.375\gpgpuElemSep,
},
component/.style={%
box,
minimum size=0.42\gpgpuElemSize,
inner sep=0pt,
},
alu/.style={%
component,
fill=shade1,
outer sep=0pt
},
controlcache/.style={%
component,
rectangle split,
rectangle split parts=2,
rectangle split part fill={shade2, shade3},
rectangle split every empty part={},
rectangle split empty part height=0.21\gpgpuElemSize-\pgflinewidth,
},
layoutalu/.style={%
matrix of nodes,
nodes in empty cells,
nodes=alu,
column sep=\gpgpuElemSep,
row sep=\gpgpuElemSep
},
layoutcc/.style={%
matrix of nodes,
nodes in empty cells,
nodes=controlcache,
column sep=\gpgpuElemSep,
row sep=\gpgpuElemSep
}
]
\matrix (alu)
[layoutcc,
column 3/.style={nodes={alu,yshift=-.5\pgflinewidth}},
row 2 column 5/.style={nodes={alu,fill=blue!15}}]
{ & & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & &|[alu,fill=blue!15]| & & \\
& & & & & & & \\
& & & & & & & \\
};
\matrix[right = 1cm of alu.east] (alu2)
[layoutalu,
column 3/.style={nodes={controlcache,fill=red!30,yshift=.5\pgflinewidth}},
column 5/.style={nodes={rectangle split part fill={red,blue},controlcache}}]
{ & & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\end{tikzpicture}
\endgroup
\end{document}

