Full documentation for spice parser / driver
This commit is contained in:
parent
b62e6fb0c1
commit
23d80412d5
|
@ -568,7 +568,7 @@ WARN_LOGFILE =
|
|||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = "." "../src/cif" "../src/agds" "../src/dtr" "../src/openChams ../src/spice"
|
||||
INPUT = "." "../src/cif" "../src/agds" "../src/dtr" "../src/openChams" "../src/spice"
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class Circuit
|
||||
*
|
||||
* This class is the root class which means that having this object in hand allows to get/set any information contained in the Spice file parsed/drived.
|
||||
*/
|
||||
|
||||
/*! \fn Circuit::Circuit()
|
||||
* \brief creates a new circuit
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Circuit::getTitle()
|
||||
* \brief returns the title of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<std::string>& Circuit::getIncludes()
|
||||
* \brief returns the includes of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<std::pair<std::string, std::string> >& Circuit::getLibraries()
|
||||
* \brief returns the libraries of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::map<std::string, std::string>& Circuit::getOptions()
|
||||
* \brief returns the options of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::map<std::string, std::string>& Circuit::getParameters()
|
||||
* \brief returns the parameters of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<Subckt*>& Circuit::getSubckts()
|
||||
* \brief returns the subckts of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<Instance*>& Circuit::getInstances()
|
||||
* \brief returns the instances of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<Source*>& Circuit::getSources()
|
||||
* \brief returns the sources of the circuit.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Circuit::setTitle(std::string title)
|
||||
* \brief sets the title of the circuit.
|
||||
*
|
||||
* \param title the title of the circuit
|
||||
*/
|
||||
|
||||
/*! \fn inline void Circuit::addInclude(std::string include)
|
||||
* \brief adds an include to the circuit.
|
||||
*
|
||||
* \param include the include to add.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Circuit::addLibrary(std::string file, std::string type = "")
|
||||
* \brief adds a library to the circuit.
|
||||
*
|
||||
* \param file the file describing the library to add.
|
||||
* \param type the type if several exist in the same file (this argument is optionnal)
|
||||
*/
|
||||
|
||||
/*! \fn inline void Circuit::addInstance(Instance* instance)
|
||||
* \brief adds an instance to the circuit.
|
||||
*
|
||||
* \param instance the instance to add.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Circuit::addSource(Source* source)
|
||||
* \brief adds a source to the circuit.
|
||||
*
|
||||
* \param source the source to add.
|
||||
*/
|
||||
|
||||
/*! \fn void Circuit::addOption(std::string name, std::string value)
|
||||
* \brief adds an option to the circuit.
|
||||
*
|
||||
* \param name the name of the option.
|
||||
* \param value the value of the option.
|
||||
*
|
||||
* \note The value is represented as a std::string to keep the optionnal unity.
|
||||
*/
|
||||
|
||||
/*! \fn void Circuit::addParameter(std::string name, std::string value)
|
||||
* \brief adds a parameter to the circuit.
|
||||
*
|
||||
* \param name the name of the parameter.
|
||||
* \param value the value of the parameter.
|
||||
*
|
||||
* \note The value is represented as a std::string to keep the optionnal unity.
|
||||
*/
|
||||
|
||||
/*! \fn Subckt* Circuit::addSubckt(std::string name)
|
||||
* \brief adds a subcircuit to the circuit.
|
||||
*
|
||||
* \param name the name of the subckt.
|
||||
*
|
||||
* \return the newly created Subckt.
|
||||
*/
|
||||
|
||||
/*! \fn void Circuit::writeToFile(const std::string filePath)
|
||||
* \brief writes the database to file.
|
||||
*
|
||||
* \param filePath the destination file.
|
||||
*/
|
||||
|
||||
/*! \fn static Circuit* Circuit::readFromFile(const std::string filePath)
|
||||
* \brief creates and returns a Circuit object based on a database source file.
|
||||
*
|
||||
* \param filePath the source file name.
|
||||
*
|
||||
* \return the newly created Circuit.
|
||||
*/
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class SpiceException
|
||||
*
|
||||
* This class describes the exceptions throwed by the Spice library in case of errors.
|
||||
*/
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class Instance
|
||||
*
|
||||
* This class describes an instance of the global circuit.
|
||||
* It is the base class of SPICE::Capacitor, SPICE::Mosfet and SPICE::Resistor.
|
||||
*/
|
||||
|
||||
/*! \fn Instance::Instance(std::string name, std::string model)
|
||||
* \brief creates a new instance.
|
||||
*
|
||||
* \param name the name of the instance.
|
||||
* \param model the model of the instance.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Instance::getName()
|
||||
* \brief returns the name of the instance.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Instance::getModel()
|
||||
* \brief returns the model of the instance.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<std::string>& Instance::getConnectors()
|
||||
* \brief returns the connectors of the instance.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::map<std::string, std::string>& Instance::getParameters()
|
||||
* \brief returns the parameters of the instance.
|
||||
*/
|
||||
|
||||
/*! \fn std::string Instance::getParameterValue(std::string name)
|
||||
* \brief returns the value (as string) of a parameter of the instance.
|
||||
*
|
||||
* \param name the name of the parameter from which to get value.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Instance::addConnector(std::string connector)
|
||||
* \brief adds a connector to the instance.
|
||||
*
|
||||
* \param connector the connector to add.
|
||||
*/
|
||||
|
||||
/*! \fn void Instance::addParameter(std::string name, std::string value)
|
||||
* \brief add a parameter to the instance.
|
||||
*
|
||||
* \param name the name of the parameter.
|
||||
* \param value the value of the parameter.
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class Capacitor
|
||||
*
|
||||
* This class describes a capacitor which is a specialized instance which has a positive and a negative connector and a value.
|
||||
*/
|
||||
|
||||
/*! \fn Capacitor::Capacitor(std::string name, std::string pos, std::string neg, std::string value)
|
||||
* \brief creates a new capacitor.
|
||||
*
|
||||
* \param name the name of the capacitor.
|
||||
* \param pos the positive connector of the capacitor.
|
||||
* \param neg the negative connector of the capacitor.
|
||||
* \param value the value of the capacitor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Capacitor::getPositive()
|
||||
* \brief returns the positive connector of the capacitor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Capacitor::getNegative()
|
||||
* \brief returns the negative connector of the capacitor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Capacitor::getValue()
|
||||
* \brief returns the value of the capacitor.
|
||||
*/
|
||||
|
||||
|
||||
/*! \class Resistor
|
||||
*
|
||||
* This class describes a resistor which is a specialized instance which has two connectors and a value.
|
||||
*/
|
||||
|
||||
/*! \fn Resistor::Resistor(std::string name, std::string first, std::string second, std::string value)
|
||||
* \brief creates a new resistor.
|
||||
*
|
||||
* \param name the name of the resistor.
|
||||
* \param first the first connector of the resistor.
|
||||
* \param second the second connector of the resistor.
|
||||
* \param value the value of the resistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Resistor::getFirst()
|
||||
* \brief returns the first connector of the resistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Resistor::getSecond()
|
||||
* \brief returns the second connector of the resistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Resistor::getValue()
|
||||
* \brief returns the value of the resistor.
|
||||
*/
|
||||
|
||||
|
||||
/*! \class Mosfet
|
||||
*
|
||||
* This class describes a mosfet transistor which is a specialized instance which has four connectors (grid, drain, source and bulk).
|
||||
*/
|
||||
|
||||
/*! \fn Mosfet::Mosfet(std::string name, std::string drain, std::string grid, std::string source, std::string bulk, std::string model)
|
||||
* \brief creates a new mosfet transistor.
|
||||
*
|
||||
* \param name the name of the transistor.
|
||||
* \param drain the drain connector of the transistor.
|
||||
* \param grid the grid connector of the transistor.
|
||||
* \param source the source connector of the transistor.
|
||||
* \param bulk the bulk connector of the transistor.
|
||||
* \param model the model of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getName()
|
||||
* \brief returns the name of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getDrain()
|
||||
* \brief returns the drain connector of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getGrid()
|
||||
* \brief returns the grid connector of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getSource()
|
||||
* \brief returns the source connector of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getBulk()
|
||||
* \brief returns the bulk connector of the transistor.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Mosfet::getModel()
|
||||
* \brief returns the model of the transistor.
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class Source
|
||||
*
|
||||
* This abstract class is a base class for SPICE::Current and SPICE::Voltage sources.
|
||||
*/
|
||||
|
||||
/*! \fn Source::Source(std::string name, std::string pos, std::string neg, std::string value)
|
||||
* \brief creates a new source.
|
||||
*
|
||||
* \param name the name of the source.
|
||||
* \param pos the positive connector of the source.
|
||||
* \param neg the negative connector of the source.
|
||||
* \param value the value of the source.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Source::getName()
|
||||
* \brief returns the name of the source.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Source::getPositive()
|
||||
* \brief returns the positive connector of the source.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Source::getNegative()
|
||||
* \brief returns the negative connector of the source.
|
||||
*/
|
||||
|
||||
/*! \fn inline std::string Source::getValue()
|
||||
* \brief returns the value of the source.
|
||||
*/
|
||||
|
||||
|
||||
/*! \class Current
|
||||
*
|
||||
* This class describes a current source.
|
||||
*/
|
||||
|
||||
/*! \fn Current::Current(std::string name, std::string pos, std::string neg, std::string value)
|
||||
* \brief creates a new current source.
|
||||
*
|
||||
* \param name the name of the source.
|
||||
* \param pos the positive connector of the source.
|
||||
* \param neg the negative connector of the source.
|
||||
* \param value the value of the source.
|
||||
*/
|
||||
|
||||
|
||||
/*! \class Voltage
|
||||
*
|
||||
* This class describes a voltage source.
|
||||
*/
|
||||
|
||||
/*! \fn Voltage::Voltage(std::string name, std::string pos, std::string neg, std::string value)
|
||||
* \brief creates a new voltage source.
|
||||
*
|
||||
* \param name the name of the source.
|
||||
* \param pos the positive connector of the source.
|
||||
* \param neg the negative connector of the source.
|
||||
* \param value the value of the source.
|
||||
*/
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
namespace SPICE {
|
||||
/*! \class Subckt
|
||||
*
|
||||
* This class describes a subckt of the global circuit.
|
||||
*/
|
||||
|
||||
/*! \fn Subckt::Subckt(std::string name)
|
||||
* \brief creates a new subckt.
|
||||
*
|
||||
* \param name the name of the subckt
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::string Subckt::getName()
|
||||
* \brief returns the name of the subckt.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<std::string>& Subckt::getInterfaces()
|
||||
* \brief returns the interfaces of the subckt.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<Instance*>& Subckt::getInstances()
|
||||
* \brief returns the instances of the subckt.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::map<std::string, std::string>& Subckt::getParameters()
|
||||
* \brief returns the parameters of the subckt.
|
||||
*/
|
||||
|
||||
/*! \fn inline const std::vector<std::string>& Subckt::getComments()
|
||||
* \brief returns the comments of the subckt.
|
||||
*
|
||||
* \note comments of a subckt are the first lines of the subckt to describe the interfaces of the subckt.
|
||||
*/
|
||||
|
||||
|
||||
/*! \fn inline void Subckt::addInterface(std::string name)
|
||||
* \brief adds an interface to the subckt.
|
||||
*
|
||||
* \param name the name of the interface to add.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Subckt::addInstance (Instance* instance)
|
||||
* \brief adds an instance to the subckt.
|
||||
*
|
||||
* \param instance the instance to add.
|
||||
*/
|
||||
|
||||
/*! \fn inline void Subckt::addComment(std::string comment)
|
||||
* \brief adds a comment to the subckt.
|
||||
*
|
||||
* \param comment the comment to add.
|
||||
*
|
||||
* \note comments of a subckt are the first lines of the subckt to describe the interfaces of the subckt.
|
||||
*/
|
||||
|
||||
/*! \fn void Subckt::addParameter(std::string name, std::string value)
|
||||
* \brief adds a parameter to the subckt.
|
||||
*
|
||||
* \param name the name of the parameter to add.
|
||||
* \param value the value of the parameter to add.
|
||||
*/
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue