\hypertarget{openchams_openChamsPres}{}\section{Presentation}\label{openchams_openChamsPres}
The {\bfseries Open\-C\-H\-A\-M\-S} 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' netlists and is based on X\-M\-L. Some C\-H\-A\-M\-S specific informations, such as schematic properties, layout properties or sizing procedure, can be described in this format.\par
\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 \hyperlink{class_open_chams_1_1_circuit}{Open\-Chams\-::\-Circuit}
\item Open\-Chams\-::\-Name
\item \hyperlink{class_open_chams_1_1_open_chams_exception}{Open\-Chams\-::\-Open\-Chams\-Exception}
\end{DoxyItemize}
\item Netlist
\begin{DoxyItemize}
\item \hyperlink{class_open_chams_1_1_netlist}{Open\-Chams\-::\-Netlist}
\item \hyperlink{class_open_chams_1_1_instance}{Open\-Chams\-::\-Instance}
\item \hyperlink{class_open_chams_1_1_device}{Open\-Chams\-::\-Device}
\item \hyperlink{class_open_chams_1_1_transistor}{Open\-Chams\-::\-Transistor}
\item \hyperlink{class_open_chams_1_1_parameters}{Open\-Chams\-::\-Parameters}
\item \hyperlink{class_open_chams_1_1_net}{Open\-Chams\-::\-Net}
\end{DoxyItemize}
\item Sizing
\begin{DoxyItemize}
\item \hyperlink{class_open_chams_1_1_sizing}{Open\-Chams\-::\-Sizing}
\item \hyperlink{class_open_chams_1_1_operator}{Open\-Chams\-::\-Operator}
\item \hyperlink{class_open_chams_1_1_simul_model}{Open\-Chams\-::\-Simul\-Model}
\end{DoxyItemize}
\item Schematic
\begin{DoxyItemize}
\item \hyperlink{class_open_chams_1_1_schematic}{Open\-Chams\-::\-Schematic}
\item \hyperlink{class_open_chams_1_1_port}{Open\-Chams\-::\-Port}
\item \hyperlink{class_open_chams_1_1_wire}{Open\-Chams\-::\-Wire}
\item \hyperlink{class_open_chams_1_1_wire_point}{Open\-Chams\-::\-Wire\-Point}
\item \hyperlink{class_open_chams_1_1_instance_point}{Open\-Chams\-::\-Instance\-Point}
\item \hyperlink{class_open_chams_1_1_port_point}{Open\-Chams\-::\-Port\-Point}
\item \hyperlink{class_open_chams_1_1_intermediate_point}{Open\-Chams\-::\-Intermediate\-Point}
\end{DoxyItemize}
\item Layout
\begin{DoxyItemize}
\item \hyperlink{class_open_chams_1_1_layout}{Open\-Chams\-::\-Layout}
\item \hyperlink{class_open_chams_1_1_node}{Open\-Chams\-::\-Node}
\item \hyperlink{class_open_chams_1_1_bloc}{Open\-Chams\-::\-Bloc}
\item \hyperlink{class_open_chams_1_1_group}{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\-M\-S file using the static function \hyperlink{class_open_chams_1_1_circuit_ad0aa3183bdea59e62f69c295026b7fe7}{Open\-Chams\-::\-Circuit\-::read\-From\-File()} and then get the netlist object (\hyperlink{class_open_chams_1_1_circuit_a4085d6a7b6958ffdd7ab5df7e6d6e53f}{Open\-Chams\-::\-Circuit\-::get\-Netlist()}) or the sizing procedure (\hyperlink{class_open_chams_1_1_circuit_a0ce52bc8747f684ec0123faa8ff97b6d}{Open\-Chams\-::\-Circuit\-::get\-Sizing()}, might be N\-U\-L\-L) or any other useful information (see \hyperlink{class_open_chams_1_1_circuit}{Open\-Chams\-::\-Circuit}).\hypertarget{openchams_openChamsDriver}{}\subsection{Using the driver}\label{openchams_openChamsDriver}
Using the driver is very simple, user has to create an \hyperlink{class_open_chams_1_1_circuit}{Open\-Chams\-::\-Circuit} object and simply add \hyperlink{class_open_chams_1_1_netlist}{Open\-Chams\-::\-Netlist} (mandatory) and \hyperlink{class_open_chams_1_1_sizing}{Open\-Chams\-::\-Sizing} (optionnal) or \hyperlink{class_open_chams_1_1_schematic}{Open\-Chams\-::\-Schematic} (optionnal) or \hyperlink{class_open_chams_1_1_layout}{Open\-Chams\-::\-Layout} (optinnal) to it. Finally use the \hyperlink{class_open_chams_1_1_circuit_a2eb07935ec946a07edcee2255b781193}{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\-S\-I S\-A\-P\-D 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\-M\-S file using C++ or Python. The O\-P\-E\-N\-C\-H\-A\-M\-S 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\-M\-S file using C++ library.
\begin{DoxyCodeInclude}
\textcolor{preprocessor}{#include }
\textcolor{preprocessor}{#include }
\textcolor{preprocessor}{#include