Improve Montium description.
[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 compilers.
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 is 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 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 read or written in the same cycle TODO: Is
56 this true?).
57
58 \subsubsection{ALU's}
59 The main processing elements of the Montium are its 5 ALU's. Each of them has
60 four (16 bit) inputs, each with a number of input registers. Each ALU contains a
61 number of function units, a multiplier, a few adders and some miscelaneous
62 logic. Each of the elements in the ALU can be controlled seperately and data can
63 be routed in different ways through configuration of multiplexers inside the
64 ALU. The ALU has two output ports, without registers. Additionally, there is a
65 connection from each ALU to its neighbour.
66
67 The ALU also has no internal registers, so data travels through the entire ALU
68 in a single cycle, to arrive at the outputs before the end of the cycle. This
69 means that the ALU can perform a lot of computation in a single clock cycle. For
70 example, using four of the five ALU's, an FFT butterfly operation (two complex
71 multiplications and four complex additions TODO: Right?) can be exected in a
72 single clock cycle. The downside of this approach is that the data will have a
73 long path to travel over, which limits the clock speed of the design.
74
75 \subsubsection{CCU}
76 The CCU controls communication with the external world, usually a
77 network-on-chip. During normal operations, the CCU can take values from the
78 interconnect and stream them out onto the NoC, or vice versa. Additionally, the
79 CCU can be used from external to the Montium to start and stop execution and
80 move configuration registers, sequencer instructions and memory contents into
81 and out of the Montium.
82
83 \subsubsection{Interconnect}
84 The central part of the Montium is the interconnect, which is a mostly connected
85 crossbar of lines. There are a total of 10 global busses in the interconnect, to
86 which every input and output port of the various components can be connected.
87 This way, every output of the memories, ALU's and CCU can be routed to every
88 input (provided that there are enough global busses). Additionally, each pair of
89 memories belonging to a specific ALU can be routed directly to the inputs and
90 outputs of that ALU, without requiring a global bus.
91
92 \subsection{Design changes}
93 Currently, the Montium design is experiencing a major overhaul. During work with
94 the original design, a number of flaws or suboptimal constructs have been found.
95 In particular, the ALUs are capable of performing a large number of operations
96 in a single cycle, but since they operate sequentially, this severly limits
97 clock speeds. In the new design, the number of ALUs is reduced, but each ALU is
98 subdivided in multiple parallel-operating function units.
99
100 This approach requires computations to be properly pipelined to be efficiently
101 use all those function units in parallel, but since data only travels through
102 only a single function unit in each cycle, this allows for much higher clock
103 speeds than the old design.
104
105 During my internship I have mainly been working with the old Montium design, and
106 unless otherwise stated, that is what is meant when referring to the "Montium".
107 Some of the work has been done with the new design in mind, but only during the
108 final weeks of my internship I have been involved with the new design enough to
109 see most of the picture. See section \ref{Pipelining} for more details.