Skip to content
Snippets Groups Projects
ttool_development_infrastructure.tex 43.9 KiB
Newer Older
\paragraph{Save and Re-read TML: } 
\begin{itemize}
\item Open \texttt{./tmltranslator/TMLArchiTextSpecification.java}.
\item Modify the string \texttt{private String keywords[] = {"NODE", "CPU", "FPGA", "SET", "BUS", "LINK", "BRIDGE", "MEMORY", "MASTERCLOCKFREQUENCY", "DMA"};} adding the FPGA information.
\item Exactly how \texttt{private String cpuparameters[]}, declare \texttt{private String fpgaparameters[] = {"capacity", "byteDataSize", "mappingPenalty", "goIdleTime", "maxConsecutiveIdleCycles", "reconfigurationTime", "execiTime", "execcTime"};}. 
\item In the method \texttt{public String makeNodes(TMLArchitecture tmla)} let's declare \texttt{HwFPGA fpga;} variable, then have a look to \texttt{if (node instanceof HwCPU)} and handle the corresponding FPGA case.
\item To re-read, in \texttt{public int analyseInstruction(String \_line, int \_lineNb, String[] \_split)} have a look to \begin{verbatim}
if (_split[1].equals("CPU")) {
                HwCPU cpu = new HwCPU(_split[2]);
                tmla.addHwNode(cpu);
            }
\end{verbatim}
and do the same for FPGA
\item Finally, in the same method, have a look to the case \texttt{if (node instanceof HwCPU)} and do the same for FPGA. To make the comparison easier, capitalize the name of the FPGA's parameters. 
\end{itemize}