\documentclass{standalone}
\usepackage{ga}
\begin{document}
\begin{tikzpicture}[x=1cm,y=1cm]
\input{../wt.tikz}
\tikzset{blk/.style={draw, line width=1pt, align=center, font=\scriptsize, minimum width=1.4cm, minimum height=0.7cm}}
% block diagram
\begin{scope}[xshift=1.2cm, yshift=-7.4cm]
\node[blk] (ib) at (0,1.2) {Information\\bits};
\node[draw, circle, line width=1pt, inner sep=0pt, minimum size=0.45cm] (m) at (2.1,1.2) {}; \draw[line width=0.8pt] (m.north west) -- (m.south east) (m.north east) -- (m.south west);
\node[blk] (si) at (4.6,1.2) {Spread\\information};
\node[blk] (ss) at (2.1,-0.3) {Spreading\\sequence};
\draw[->, line width=0.8pt] (ib) -- node[above, font=\scriptsize] {$i$ bps} (m);
\draw[->, line width=0.8pt] (m) -- node[above, font=\scriptsize] {$n$ bps} (si);
\draw[->, line width=0.8pt] (ss) -- node[right, font=\scriptsize] {$n$ bps (or cps)} (m);
\end{scope}
% waveforms: 4 bits, SF = 8
\def\R{{1,-1,-1,1}}
\def\S{{1,-1,1,1,-1,1,-1,-1}}
\def\cw{0.2}
\begin{scope}[xshift=0cm]
\foreach \row/\lab [count=\k] in {0/{Tx information bits ($R$)},-1.1/{Spreading sequence ($Sp$), $SF = 8$},-2.2/{Spread information ($R \times Sp$)},-3.3/{Spreading sequence ($Sp$)},-4.4/{Rx information bits ($R$)}} {
  \node[anchor=east, font=\scriptsize] at (-0.2,\row) {\lab};
  \draw[gray!60, line width=0.3pt] (0,\row) -- (6.4,\row);
  \node[font=\tiny, anchor=west] at (6.45,\row+0.3) {$+1$}; \node[font=\tiny, anchor=west] at (6.45,\row-0.3) {$-1$};
}
\foreach \b in {1,2,3} \draw[gray!50, dashed, line width=0.3pt] (1.6*\b,0.5) -- (1.6*\b,-4.8);
\foreach \j in {0,...,31} {
  \pgfmathtruncatemacro{\bi}{floor(\j/8)} \pgfmathtruncatemacro{\ci}{mod(\j,8)}
  \pgfmathsetmacro{\r}{\R[\bi]} \pgfmathsetmacro{\s}{\S[\ci]} \pgfmathsetmacro{\rs}{\r*\s}
  \pgfmathsetmacro{\x}{\cw*\j}
  \foreach \row/\v/\c in {0/\r/black,-1.1/\s/black,-2.2/\rs/wtblue,-3.3/\s/black,-4.4/\r/black}
    \draw[\c, line width=0.9pt] (\x,\row+0.3*\v) -- (\x+\cw,\row+0.3*\v);
  \ifnum\j>0
    \pgfmathtruncatemacro{\pbi}{floor((\j-1)/8)} \pgfmathtruncatemacro{\pci}{mod(\j-1,8)}
    \pgfmathsetmacro{\pr}{\R[\pbi]} \pgfmathsetmacro{\ps}{\S[\pci]} \pgfmathsetmacro{\prs}{\pr*\ps}
    \foreach \row/\v/\pv/\c in {0/\r/\pr/black,-1.1/\s/\ps/black,-2.2/\rs/\prs/wtblue,-3.3/\s/\ps/black,-4.4/\r/\pr/black}
      \draw[\c, line width=0.9pt] (\x,\row+0.3*\pv) -- (\x,\row+0.3*\v);
  \fi
}
\draw[<->, line width=0.5pt] (0,0.55) -- node[above, font=\scriptsize] {Information bit} (1.6,0.55);
\draw[<->, line width=0.5pt, orange!80!black] (0,-0.6) -- node[above, font=\scriptsize] {Chip} (0.2,-0.6);
\draw[brace, decoration={mirror=false}] (7.0,0.3) -- (7.0,-2.5) node[midway, right=5pt, font=\scriptsize, wtgreen] {Spreading};
\draw[brace, decoration={mirror=false}] (7.0,-2.6) -- (7.0,-4.7) node[midway, right=5pt, font=\scriptsize, wtblue] {Despreading};
\end{scope}
\end{tikzpicture}
\end{document}
