Cosmetic fixes.
[matthijs/projects/internship.git] / Report / Main / Context / Montium.tex
1 \section{Montium Tile Processor}
2 The Montium Tile Processor (Montium) is the main product of Recore Systems. It
3 is a reconfigurable processor that is aimed for inclusion in a tiled,
4 heterogenous multi- or manycore System-on-Chip (SoC), connected to other tiles
5 and the outside world through a Network-on-Chip (NoC).
6
7 The Montium has a number of fundamental differences with ``regular'' processors
8 and DSP engines, that make it both interesting and challenging to program for
9 both application programmers and compiler designers.
10
11 \begin{figure}
12   %\epsfig{file=Img/MontiumOverview.eps, width=.5\textwidth}
13   \caption{Overview of the Montium design}
14 \end{figure}
15
16 \subsection{Overall design}
17 The Montium is built from a few parts. The central part is the interconnect,
18 which ties memories, Arithmetic and Logic Units (ALU) and the Communication
19 and Configuration Unit (CCU) together. The memories store data locally, the
20 ALU's process data and the CCU moves data and configuration on and off the
21 Montium. Furthermore, there is a sequencer, which is the closest thing to a
22 normal processor in the Montium: It accepts and executes instructions one by
23 one, is capable of performing (conditional) jumps and some other limited control
24 flow. 
25
26 \subsubsection{Sequencer}
27 The Sequencer executes its instructions one by one and controls all other
28 elements through the configuration registers (CR). To keep the size of sequencer
29 instructions limited, while not limiting the flexibility of the other elements,
30 two levels of configuration registers are introduced. These registers are wide
31 and contain multiple sets of input signals to the various multiplexers, function
32 units, etc.
33
34 The sequencer instructions in turn contain indices into these configuration
35 registers. This way, every sequencer instruction can select a configuration for
36 the entire Montium for the cycle during which the instruction is executed. This
37 also means that the Montium is reconfigured on every cycle, for maximum
38 flexibility and performance.
39
40 Using a two-level configuration register scheme ensures that when a (part of) a
41 particular configuration is reused in more then one sequencer instruction, it
42 does not have to be duplicated entirely. Only the index pointing to the right
43 configuration register (which is a lot smaller) is duplicated in multiple
44 sequencer instructions. This does of course limit the amount of different
45 configurations that a single program can use and thus limit the size of a
46 Montium program.
47
48 \subsubsection{Memories}
49 The Montium contains ten memories (two for each ALU). Each of these memories has
50 its own Address Generation Unit (AGU), which can generate different memory
51 address patterns. This means that the instructions or CRs never contain direct memory
52 addresses, only modifications to the current address. Each memory simply reads
53 from its current address and offers the value read to the interconnect (which
54 can then further distribute it to wherever it is needed). Writing works in the
55 same way (though a memory can only be read from or written to in the same cycle).
56
57 \subsubsection{ALU's}
58 The main processing elements of the Montium are its 5 ALU's. Each of them has
59 four (16 bit) inputs, each with a number of input registers. Each ALU contains a
60 number of function units, a multiplier, a few adders and some miscellaneous
61 logic. Each of the elements in the ALU can be controlled separately and data can
62 be routed in different ways by configuration of multiplexers inside the
63 ALU. The ALU has two output ports, without registers. Additionally, there is a
64 connection from each ALU to its neighbour.
65
66 The ALU also has no internal registers, so data travels through the entire ALU
67 in a single cycle, to arrive at the outputs before the end of the cycle. This
68 means that the ALU can perform a lot of computation in a single clock cycle. For
69 example, using four of the five ALU's, an FFT butterfly operation (two complex
70 multiplications and four complex additions) can be exected in a
71 single clock cycle. The downside of this approach is that the data will have a
72 long path to travel, which limits the clock speed of the design.
73
74 \subsubsection{CCU}
75 The CCU controls communication with the external world, usually a
76 NoC. During normal operations, the CCU can take values from the
77 interconnect and stream them out onto the NoC, or vice versa. Additionally, the
78 CCU can be used from outside the Montium to start and stop execution and
79 move configuration registers, sequencer instructions and memory contents into
80 and out of the Montium.
81
82 \subsubsection{Interconnect}
83 The central part of the Montium is the interconnect, which is a mostly connected
84 crossbar of lines. There are a total of 10 global busses in the interconnect, to
85 which every input and output port of the various components can be connected.
86 This way, every output of the memories, ALU's and CCU can be routed to every
87 input (provided that there are enough global busses). Additionally, each pair of
88 memories belonging to a specific ALU can be routed directly to the inputs and
89 outputs of that ALU, without requiring a global bus.
90
91 \subsection{Design changes}
92 Currently, the Montium design is experiencing a major overhaul. During work with
93 the original design, a number of flaws or suboptimal constructs have been found.
94 In particular, the ALUs are capable of performing a large number of operations
95 in a single cycle, but since they operate sequentially, this severly limits
96 clock speeds. In the new design, the number of ALUs is reduced, but each ALU is
97 subdivided in multiple parallel operating function units. Also, the Montium has
98 only very limited support for control flow, making it hard to program it for
99 data dependent control and synchronization, which asks for improvements.
100
101 This approach requires computations to be properly pipelined to efficiently
102 use all those function units in parallel, but since data only travels through
103 only a single function unit in each cycle, this allows for much higher clock
104 speeds than the old design.
105
106 During my internship I have mainly been working with the old Montium design, and
107 unless otherwise stated, that is what is meant when referring to the "Montium".
108 Some of the work has been done with the new design in mind, but only during the
109 final weeks of my internship I have been actually working with the new design.
110 See section \ref{Pipelining} for more details.