1 | %%%%%%%%%% |
---|
2 | % |
---|
3 | %$Log: SystemCASS.tex,v $ |
---|
4 | %Revision 1.3 2005/03/25 14:33:01 buchmann |
---|
5 | %Typo : |
---|
6 | %- dependAncy -> dependEncy |
---|
7 | % |
---|
8 | %sc_initialize : |
---|
9 | %- Use a hash table to speed up elaboration step. (x40 faster) |
---|
10 | % |
---|
11 | %Tracing : |
---|
12 | %- check for modification BEFORE building bit string. |
---|
13 | %- use sprintf instead std string concatenation. |
---|
14 | % |
---|
15 | %Revision 1.2 2005/02/22 11:36:58 buchmann |
---|
16 | %Generate correctly documentations. |
---|
17 | %Add special flag to disable PAT tracing support. |
---|
18 | % |
---|
19 | %Revision 1.1 2005/01/20 09:15:12 buchmann |
---|
20 | %add following functions to sc_uint classes : |
---|
21 | %- operator [] |
---|
22 | %- range (left,right) |
---|
23 | % |
---|
24 | %support to port dependency declarations. |
---|
25 | %print used precompiled options in verbose mode. |
---|
26 | %use pedantic flag. |
---|
27 | %add some rules to generate documentations. |
---|
28 | % |
---|
29 | % |
---|
30 | % |
---|
31 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
32 | \documentclass{report} |
---|
33 | \usepackage[latin1]{inputenc} |
---|
34 | \usepackage[T1]{fontenc} |
---|
35 | \usepackage{a4wide} |
---|
36 | \usepackage{charter} |
---|
37 | \usepackage{helvet} |
---|
38 | \usepackage{graphicx} |
---|
39 | \usepackage{amsmath} |
---|
40 | \usepackage{moreverb} |
---|
41 | \usepackage{longtable} |
---|
42 | \usepackage{calc} |
---|
43 | \usepackage{alltt} |
---|
44 | \usepackage{makeidx} |
---|
45 | \usepackage{xspace} |
---|
46 | \renewcommand{\rmdefault}{phv} |
---|
47 | \renewcommand{\sfdefault}{phv} |
---|
48 | \renewcommand{\ttdefault}{pcr} |
---|
49 | \newcommand{\SYSTEMCASS}{\textsc{SystemCASS}\xspace} |
---|
50 | \newcommand{\SYSTEMC}{\textsc{SystemC}\xspace} |
---|
51 | \newcommand{\SOCLIB}{\textsc{SoCLIB}\xspace} |
---|
52 | |
---|
53 | \ifx\pdfoutput\undefined |
---|
54 | \else |
---|
55 | \pdfpagewidth 21.0cm |
---|
56 | \pdfpageheight 29.7cm |
---|
57 | \fi |
---|
58 | \usepackage{hyperref} |
---|
59 | |
---|
60 | \voffset -1in |
---|
61 | \hoffset -1in |
---|
62 | \headheight 0pt |
---|
63 | \headsep 0pt |
---|
64 | \topmargin 25mm |
---|
65 | \oddsidemargin 29mm |
---|
66 | |
---|
67 | \textwidth 150mm |
---|
68 | \textheight 240mm |
---|
69 | \flushbottom |
---|
70 | \sloppy |
---|
71 | |
---|
72 | \tabcolsep 4pt |
---|
73 | \makeatletter |
---|
74 | \renewcommand{\section} |
---|
75 | {\@startsection |
---|
76 | {section}% |
---|
77 | {1}% |
---|
78 | {0mm}% |
---|
79 | {-.5\baselineskip}% |
---|
80 | {0.5\baselineskip}% |
---|
81 | {\newpage\flushleft\normalfont\Large\scshape}} |
---|
82 | |
---|
83 | \renewcommand{\subsection} |
---|
84 | {\@startsection |
---|
85 | {subsection}% |
---|
86 | {1}% |
---|
87 | {0mm}% |
---|
88 | {-.5\baselineskip}% |
---|
89 | {0.5\baselineskip}% |
---|
90 | {\flushleft\normalfont\large\scshape}} |
---|
91 | |
---|
92 | \renewcommand{\@seccntformat}[1]{{\csname the#1\endcsname}.\hspace{0.25em}} |
---|
93 | \makeatother |
---|
94 | \renewcommand{\thesection}{\arabic{section}} |
---|
95 | |
---|
96 | \renewcommand{\listinglabel}[1]{\rlap{\footnotesize\rmfamily\the#1}\hskip2em} |
---|
97 | |
---|
98 | %%%%%%%%%%%%%%%% |
---|
99 | % |
---|
100 | %%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
101 | \begin{document} |
---|
102 | \thispagestyle{empty} |
---|
103 | ~\vfill |
---|
104 | \begin{center} |
---|
105 | {\LARGE SystemCASS\\ SystemC Cycle Accurate System Simulator\\} |
---|
106 | \vfill |
---|
107 | \vfill |
---|
108 | %{\Large Documentation by Richard \textsc{Buchmann}} |
---|
109 | \vfill |
---|
110 | |
---|
111 | {\Large \today} |
---|
112 | |
---|
113 | \end{center} |
---|
114 | ~\vfill |
---|
115 | |
---|
116 | %%%%%%%%%% |
---|
117 | % |
---|
118 | %%%%%%%%%%%%%%%%%%%%%%%%% |
---|
119 | \section{\SYSTEMCASS Overview} |
---|
120 | \label{SystemCass-overview} |
---|
121 | |
---|
122 | \SYSTEMCASS is a simulator that executes models described in \textbf{SystemC}. |
---|
123 | Its goal is to provide cycle precise simulation of systems build with |
---|
124 | hardware and software components, in order to evaluate performances |
---|
125 | for \emph{i.e.} hardware/software partitioning, system validation, early |
---|
126 | software development. |
---|
127 | |
---|
128 | An example of system is present Figure~\ref{system}. |
---|
129 | |
---|
130 | \begin{figure}[hbtp]\center\leavevmode |
---|
131 | \includegraphics[width=.7\textwidth,angle=270]{SystemeType} |
---|
132 | \caption{Typical embedded system build around VCI interfaces.} |
---|
133 | \label{system} |
---|
134 | \end{figure} |
---|
135 | |
---|
136 | The simulator simulates a \textbf{SystemC} netlist of predefined and/or |
---|
137 | user defined components. |
---|
138 | The components used to validate the methodology\cite{iceec04-buch} are a part of \SOCLIB library. |
---|
139 | Those models are VCI, bit and cycle accurate using the finite state machine with datapath modeling (Figure~\ref{Automate}). |
---|
140 | |
---|
141 | \begin{figure}[hbtp]\center\leavevmode |
---|
142 | \includegraphics[width=.6\linewidth]{Automate} |
---|
143 | \caption{Finite State Machine Modeling} |
---|
144 | \label{Automate} |
---|
145 | \end{figure} |
---|
146 | |
---|
147 | SystemCASS is a SystemC subset including~: |
---|
148 | \begin{itemize} |
---|
149 | \item |
---|
150 | core class~: sc\_module, sc\_signal, sc\_in, sc\_out, sc\_inout... |
---|
151 | \item |
---|
152 | core functions~: sc\_start, sc\_stop, sc\_simulation\_time... |
---|
153 | \item |
---|
154 | basic data types~: sc\_i[u]nt, sc\_big[u]int... |
---|
155 | \end{itemize} |
---|
156 | |
---|
157 | But SystemCASS doesn't include standard channels, |
---|
158 | methodology-specific channels (master/slave library, verification library) |
---|
159 | and elementary channels (timer, mutex, semaphore, fifo, etc.). |
---|
160 | |
---|
161 | This cycle accurate engine gives higher simulation speed |
---|
162 | more suitable for embedded software development, |
---|
163 | and architectural exploration. |
---|
164 | |
---|
165 | %%%%%%%%%% |
---|
166 | % |
---|
167 | %%%%%%%%%%%%%%%%%%%%%%%%% |
---|
168 | \section{Installation} |
---|
169 | |
---|
170 | Set \textbf{SYSTEMC} environment variable to the \textbf{SystemCASS} base directory.\\ |
---|
171 | Change the current directory to \textbf{\$(SYSTEMC)/src}.\\ |
---|
172 | Run the Makefile.\\ |
---|
173 | |
---|
174 | The distribution is as follow~: |
---|
175 | \begin{itemize} \itemsep=-0.8ex |
---|
176 | \item |
---|
177 | \emph{src}~: |
---|
178 | Source files |
---|
179 | \item |
---|
180 | \emph{includes}~: |
---|
181 | Header files |
---|
182 | \item |
---|
183 | \emph{lib-linux}~: |
---|
184 | Debug and optimized libraries for linux distribution |
---|
185 | \item |
---|
186 | \emph{docs}~: |
---|
187 | Documentation |
---|
188 | \item |
---|
189 | \emph{examples}~: |
---|
190 | |
---|
191 | \begin{itemize} \itemsep=-0.8ex |
---|
192 | \item |
---|
193 | \emph{soclib\_date04}~: |
---|
194 | An hardware timer raises some interruptions on 4 Mips R3000 periodically. |
---|
195 | Whenever an interruption occurs, the application running on each CPU prints a "hello" message to its own output window. |
---|
196 | \item |
---|
197 | \emph{soclib\_spg}~: |
---|
198 | An specific hardware configures a DMA. The DMA copies some data into the |
---|
199 | a simple RAM component. |
---|
200 | \end{itemize} |
---|
201 | |
---|
202 | \end{itemize} |
---|
203 | |
---|
204 | %%%%%%%%%%%%%%%%%%%%%%% |
---|
205 | % |
---|
206 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ù |
---|
207 | \section{Simulator Execution} |
---|
208 | \label{debbuger-usage} |
---|
209 | To use SystemCASS simulator, you just need to include the SystemCASS headers |
---|
210 | and link to SystemCASS library. |
---|
211 | |
---|
212 | To debug, two ways are available~: |
---|
213 | \begin{itemize} |
---|
214 | \item |
---|
215 | link to the debug library and use a debugger. |
---|
216 | \item |
---|
217 | generate a trace file by using dedicated functions and use a VCD viewer. |
---|
218 | \end{itemize} |
---|
219 | |
---|
220 | %%%%%%%%%% |
---|
221 | % |
---|
222 | %%%%%%%%%%%%%%%%%%%%%%%%% |
---|
223 | |
---|
224 | \section{Simulator Compilation} |
---|
225 | |
---|
226 | Some macro definitions are available |
---|
227 | to accelerate the simulation, |
---|
228 | to check the netlist, variable dependancies, the scheduling |
---|
229 | to help on debugging |
---|
230 | and so on. |
---|
231 | |
---|
232 | You need to modify the Options.def file and rebuild the libraries. |
---|
233 | |
---|
234 | \subsection{Scheduling} |
---|
235 | |
---|
236 | The best performance you can reach using \SYSTEMCASS is obtained by using |
---|
237 | static scheduling. |
---|
238 | |
---|
239 | \SYSTEMCASS has two ways to compute the scheduling~: |
---|
240 | |
---|
241 | \begin{itemize} |
---|
242 | \item |
---|
243 | from the static sensitivity list (default)~: |
---|
244 | \SYSTEMC compatibility is good |
---|
245 | \item |
---|
246 | from the port dependency graph\cite{date04-mouchard} (USE\_PORT\_DEPENDENCY defined)~: |
---|
247 | The component designer need to declare the port dependancies in the |
---|
248 | constructor. |
---|
249 | The signal dependency graph is complete and then it has no cycle. |
---|
250 | At initialization step, the engine checks sensitivity list coherence.\\ |
---|
251 | \it{Syntax~: outPort(inPort);}\\ |
---|
252 | DUMP\_COMBINATIONAL\_LIST2DOT definition generates some DOT files to check |
---|
253 | dependancies. |
---|
254 | \end{itemize} |
---|
255 | |
---|
256 | The generated scheduling is written in code-XXX.cc file. |
---|
257 | KEEP\_GENERATED\_CODE definition allows to keep the file after simulation execution.\\ |
---|
258 | |
---|
259 | PRINT\_SCHEDULE definition prints the scheduling at execution time.\\ |
---|
260 | DUMP\_SCHEDULE\_STATS prints some miscellanous statistics.\\ |
---|
261 | NO\_STATIC\_SCHEDULE disables the static scheduling. |
---|
262 | |
---|
263 | %%%%%%%%%%%%%%% |
---|
264 | %\part{Creating new components for \SYSTEMCASS} |
---|
265 | %%%%%%%%%%%%%%% |
---|
266 | |
---|
267 | %\section{Component description} |
---|
268 | |
---|
269 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
270 | \bibliography{./SystemCASS} |
---|
271 | \bibliographystyle{unsrt} |
---|
272 | \end{document} |
---|
273 | |
---|