90 lines
5.4 KiB
TeX
90 lines
5.4 KiB
TeX
\hypertarget{openchams_openChamsPres}{}\section{Presentation}\label{openchams_openChamsPres}
|
|
The {\bfseries Open\+C\+H\+A\+MS} format was developped as a part of the Chams Project (\href{http://www-soc.lip6.fr/recherche/cian/chams/}{\tt http\+://www-\/soc.\+lip6.\+fr/recherche/cian/chams/}). It aims at offering a convenient way to describe analogic circuits\textquotesingle{} netlists and is based on X\+ML. Some C\+H\+A\+MS specific informations, such as schematic properties, layout properties or sizing procedure, can be described in this format.~\newline
|
|
\hypertarget{openchams_openChamsAutrhos}{}\subsection{Author}\label{openchams_openChamsAutrhos}
|
|
Damien Dupuis\+: damien.\+dupuis(at)lip6(.)fr\hypertarget{openchams_openChamsDB}{}\section{Stand alone database structure}\label{openchams_openChamsDB}
|
|
The database has many objects that can be arranged in five categories\+:
|
|
\begin{DoxyItemize}
|
|
\item General
|
|
\begin{DoxyItemize}
|
|
\item Open\+Chams\+::\+Circuit
|
|
\item Open\+Chams\+::\+Name
|
|
\item Open\+Chams\+::\+Open\+Chams\+Exception
|
|
\end{DoxyItemize}
|
|
\item \mbox{\hyperlink{class_netlist}{Netlist}}
|
|
\begin{DoxyItemize}
|
|
\item Open\+Chams\+::\+Netlist
|
|
\item Open\+Chams\+::\+Instance
|
|
\item Open\+Chams\+::\+Device
|
|
\item Open\+Chams\+::\+Transistor
|
|
\item Open\+Chams\+::\+Parameters
|
|
\item Open\+Chams\+::\+Net
|
|
\end{DoxyItemize}
|
|
\item \mbox{\hyperlink{class_sizing}{Sizing}}
|
|
\begin{DoxyItemize}
|
|
\item Open\+Chams\+::\+Sizing
|
|
\item Open\+Chams\+::\+Operator
|
|
\item Open\+Chams\+::\+Simul\+Model
|
|
\end{DoxyItemize}
|
|
\item \mbox{\hyperlink{class_schematic}{Schematic}}
|
|
\begin{DoxyItemize}
|
|
\item Open\+Chams\+::\+Schematic
|
|
\item Open\+Chams\+::\+Port
|
|
\item Open\+Chams\+::\+Wire
|
|
\item Open\+Chams\+::\+Wire\+Point
|
|
\item Open\+Chams\+::\+Instance\+Point
|
|
\item Open\+Chams\+::\+Port\+Point
|
|
\item Open\+Chams\+::\+Intermediate\+Point
|
|
\end{DoxyItemize}
|
|
\item \mbox{\hyperlink{class_layout}{Layout}}
|
|
\begin{DoxyItemize}
|
|
\item Open\+Chams\+::\+Layout
|
|
\item Open\+Chams\+::\+Node
|
|
\item Open\+Chams\+::\+Bloc
|
|
\item Open\+Chams\+::\+Group
|
|
\end{DoxyItemize}
|
|
\end{DoxyItemize}\hypertarget{openchams_openChamsParser}{}\subsection{Using the parser}\label{openchams_openChamsParser}
|
|
Simply load an O\+P\+E\+N\+C\+H\+A\+MS file using the static function Open\+Chams\+::\+Circuit\+::read\+From\+File() and then get the netlist object (Open\+Chams\+::\+Circuit\+::get\+Netlist()) or the sizing procedure (Open\+Chams\+::\+Circuit\+::get\+Sizing(), might be N\+U\+LL) or any other useful information (see Open\+Chams\+::\+Circuit).\hypertarget{openchams_openChamsDriver}{}\subsection{Using the driver}\label{openchams_openChamsDriver}
|
|
Using the driver is very simple, user has to create an Open\+Chams\+::\+Circuit object and simply add Open\+Chams\+::\+Netlist (mandatory) and Open\+Chams\+::\+Sizing (optionnal) or Open\+Chams\+::\+Schematic (optionnal) or Open\+Chams\+::\+Layout (optinnal) to it. Finally use the Open\+Chams\+::\+Circuit\+::write\+To\+File() method to dump the database to file.\hypertarget{openchams_openChamsExamples}{}\section{Examples}\label{openchams_openChamsExamples}
|
|
As said is the global presentation, V\+L\+SI S\+A\+PD project provides C++ libraries and Python modules for each supported format. In this section we present simple code examples to parse and drive a O\+P\+E\+N\+C\+H\+A\+MS file using C++ or Python. The O\+P\+E\+N\+C\+H\+A\+MS files considered are the same for all examples\+: {\ttfamily inverter.\+xml} and {\ttfamily buffer.\+xml}
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
|
|
|
|
All source codes are available in the {\ttfamily examples} directory.\hypertarget{openchams_openChamsC}{}\subsection{C++}\label{openchams_openChamsC}
|
|
\hypertarget{openchams_openChamsParseC}{}\subsubsection{Parser}\label{openchams_openChamsParseC}
|
|
The following code ({\ttfamily parse\+Open\+Chams.\+cpp}) is an example of how to parse a O\+P\+E\+N\+C\+H\+A\+MS file using C++ library.
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
\hypertarget{openchams_openChamsDriveC}{}\subsubsection{Driver}\label{openchams_openChamsDriveC}
|
|
This C++ code ({\ttfamily drive\+Open\+Chams.\+cpp}) generates an inverter.\+xml file equivalent to the included one.
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
|
|
|
|
\begin{DoxyNote}{Note}
|
|
In order to compile these codes, a C\+Make\+Lists.\+txt file is provided. User must set the \$\+V\+L\+S\+I\+S\+A\+P\+D\+\_\+\+T\+OP variable before running these commands in the directory containing the C\+Make\+Lists.\+txt file\+:
|
|
\begin{DoxyCode}
|
|
%> mkdir build; cd build
|
|
%> cmake ..
|
|
%> make
|
|
\end{DoxyCode}
|
|
|
|
\end{DoxyNote}
|
|
\hypertarget{openchams_openChamsPython}{}\subsection{Python}\label{openchams_openChamsPython}
|
|
\hypertarget{openchams_openChamsParsePython}{}\subsubsection{Parser}\label{openchams_openChamsParsePython}
|
|
The following python script ({\ttfamily parse\+Open\+Chams.\+py}) is an example of how to parse a O\+P\+E\+N\+C\+H\+A\+MS file using python module.
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
\hypertarget{openchams_openChamsDrivePython}{}\subsubsection{Driver}\label{openchams_openChamsDrivePython}
|
|
This python script ({\ttfamily drive\+Open\+Chams.\+py}) generates an inverter.\+xml file equivalent to the included one.
|
|
\begin{DoxyCodeInclude}
|
|
\end{DoxyCodeInclude}
|
|
|
|
|
|
\begin{DoxyNote}{Note}
|
|
In order to run these two scripts ({\ttfamily parse\+Open\+Chams.\+py} \& drive\+Open\+Chams.\+py), user must ensure that \$\+P\+Y\+T\+H\+O\+N\+P\+A\+TH variable points to the directory containing O\+P\+E\+N\+C\+H\+A\+M\+S.\+so module.
|
|
\end{DoxyNote}
|