From 9fef9a372d313fb552f121d11b2c239d9e5d563e Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 25 Jul 2008 16:57:27 +0200 Subject: [PATCH] Fill MontiumC context section. --- Report/Main/Context/MontiumC.tex | 39 +++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/Report/Main/Context/MontiumC.tex b/Report/Main/Context/MontiumC.tex index 35f1e60..828f3f2 100644 --- a/Report/Main/Context/MontiumC.tex +++ b/Report/Main/Context/MontiumC.tex @@ -1,2 +1,39 @@ \section{MontiumC} -This section will describe MontiumC and the montium programming workflow. +Since having just a piece of hardware is not enough, we also need some way to +program the Montium. To this end, the MontiumC language was created. The +MontiumC language is a language very similar to C. It allows very fine grained +control over the montium through a set of functions that can be called (where +the function called determines the operation mapped on the montium). + +MontiumC is, on one hand, a strict subset of C. Every MontiumC program is +therefore a valid C program as well. This is one of the strong points of +MontiumC: By using a normal C compiler, a MontiumC program can be functionally +simulated on normal hardware. + +Figure \ref{CompilingMontiumC} show the flow for compiling a MontiumC program +into a Montium binary file, which can be loaded directly onto a Montium. The +process is roughly divided into two parts (each of which corresponds to a +different program in the compiler suite): The frontend and the backend. + +The frontend takes in a MontiumC program and turns it into a lower level +description of the program. The frontend is responsible for mapping higher level +C constructs onto simpler instructions, for canonicalizing and simplifying the +code. These canonicalizations and simplifications ensure that the backend can be +kept simpler and does not have to deal with all the complexities of the original +program. + +The frontend is again divided into two pieces, the first of which +transforms C code into an intermediate representation (also see section +\ref{LLVM}). The second part transforms this intermediate representation, output +again a (reduced form of) this representation. + +The backend, in turn, takes in this reduced description of the program and +transforms this into a valid Montium binary. To do this, it must find an ALU +configuration to execute a given set of operations, trace values to allocate +them to registers, generate instructions for the adress generation units, etc. + +\begin{figure} +\epsfig{file=Img/Compiling.ps, width=\textwidth} +\caption{MontiumC compilation flow} +\label{CompilingMontiumC} +\end{figure} -- 2.30.2