Netlist class. More...
#include <netlist.h>
Public Member Functions | |
void | cell_preallocate (std::size_t qnt) |
void | pin_preallocate (std::size_t qnt) |
void | net_preallocate (std::size_t qnt) |
netlist (standard_cell::standard_cells *std_cells) | |
Constructor. More... | |
void | register_cell_property (entity_system::property *property) |
Registers cell property. More... | |
void | register_pin_property (entity_system::property *property) |
Registers pin property. More... | |
void | register_net_property (entity_system::property *property) |
Registers net property. More... | |
void | module_name (std::string name) |
std::string | module_name () const |
const standard_cell::standard_cells & | std_cells () const |
Standard cells getter. More... | |
entity_system::entity | cell_find (std::string name) const |
Finds cell. More... | |
entity_system::entity | cell_insert (std::string name, std::string type) |
Inserts a new cell. More... | |
void | cell_remove (entity_system::entity cell) |
Removes a cell. More... | |
std::size_t | cell_count () const |
Returns the number of cells. More... | |
std::string | cell_name (entity_system::entity cell) const |
Cell name getter. More... | |
const std::vector < entity_system::entity > & | cell_pins (entity_system::entity cell) const |
Cell pins getter. More... | |
entity_system::entity | cell_std_cell (entity_system::entity cell) const |
Cell type getter. More... | |
bool | cell_std_cell (entity_system::entity cell, std::string type) |
Cell type setter. More... | |
bool | cell_std_cell (entity_system::entity cell, entity_system::entity std_cell) |
Cell type setter. More... | |
const entity_system::entity_system & | cell_system () const |
Cell system getter. More... | |
const cells & | cells_properties () const |
Cell properties getter. More... | |
entity_system::entity | pin_insert (entity_system::entity cell, std::string name) |
Inserts a new pin. More... | |
std::size_t | pin_count () const |
Returns the number of pins. More... | |
std::string | pin_name (entity_system::entity pin) const |
Pin name getter. More... | |
entity_system::entity | pin_owner (entity_system::entity pin) const |
Pin owner getter. More... | |
entity_system::entity | pin_net (entity_system::entity pin) const |
Pin net getter. More... | |
entity_system::entity | pin_std_cell (entity_system::entity pin) const |
Pin type getter. More... | |
entity_system::entity | pin_by_name (std::string name) const |
Finds pin. More... | |
const entity_system::entity_system & | pin_system () const |
Pin system getter. More... | |
const pins & | pins_properties () const |
Pin properties getter. More... | |
entity_system::entity | net_insert (std::string name) |
Inserts a new net. More... | |
entity_system::entity | net_insert (std::string name, std::size_t pin_count) |
Inserts a new net. More... | |
void | net_remove (entity_system::entity net) |
Removes a net. More... | |
std::size_t | net_count () const |
Returns the number of nets. More... | |
std::string | net_name (entity_system::entity net) const |
Net name getter. More... | |
const std::vector < entity_system::entity > & | net_pins (entity_system::entity net) const |
Net pins getter. More... | |
std::pair< std::vector < std::string > ::const_iterator, std::vector < std::string > ::const_iterator > | net_names () const |
Net names iterator. More... | |
const entity_system::entity_system & | net_system () const |
Net system getter. More... | |
entity_system::entity | net_by_name (std::string name) const |
Finds net. More... | |
const nets & | nets_properties () const |
Net properties getter. More... | |
void | connect (entity_system::entity net, entity_system::entity pin) |
Connects a pin to a net. More... | |
void | disconnect (entity_system::entity pin) |
Disconnects a pin from its net. More... | |
entity_system::entity | PI_insert (std::string name) |
Inserts a new primary input. More... | |
void | PI_remove (entity_system::entity PI) |
Removes a primary input. More... | |
std::size_t | PI_count () const |
Returns the number of primary inputs. More... | |
std::vector < entity_system::entity > ::const_iterator | PI_begin () const |
Primary input begin iterator. More... | |
std::vector < entity_system::entity > ::const_iterator | PI_end () const |
Primary input end iterator. More... | |
entity_system::entity | PO_insert (std::string name) |
Inserts a new primary output. More... | |
void | PO_remove (entity_system::entity PO) |
Removes a primary output. More... | |
std::size_t | PO_count () const |
Returns the number of primary outputs. More... | |
std::vector < entity_system::entity > ::const_iterator | PO_begin () const |
Primary output begin iterator. More... | |
std::vector < entity_system::entity > ::const_iterator | PO_end () const |
Primary output end iterator. More... | |
This class provides the basic netlist interface, such as cells, pins and nets manipulation.
ophidian::netlist::netlist::netlist | ( | standard_cell::standard_cells * | std_cells | ) |
Netlist constructor. Creates the entity systems for cells, pins and nets.
std_cells | Standard cells object. |
|
inline |
Returns the number of cells created in the cells system.
entity_system::entity ophidian::netlist::netlist::cell_find | ( | std::string | name | ) | const |
Finds a cell by its name.
name | Cell name. |
entity_system::entity ophidian::netlist::netlist::cell_insert | ( | std::string | name, |
std::string | type | ||
) |
Inserts a new cell in the netlist. A cell has a name and type associated to it.
name | Name of the cell, used to identify it. |
type | Standard cell type of the cell. |
|
inline |
Returns the name of a cell.
cell | Cell to get the name. |
|
inline |
Returns the pins of a cell.
cell | Cell to get the pins. |
void ophidian::netlist::netlist::cell_remove | ( | entity_system::entity | cell | ) |
Removes an existing cell from the netlist.
cell | Cell to be removed. |
|
inline |
Returns the standard cell type of a cell.
cell | Cell to get the type. |
bool ophidian::netlist::netlist::cell_std_cell | ( | entity_system::entity | cell, |
std::string | type | ||
) |
Sets the standard cell type of a cell. The number of pins of the current cell type and the new one must match.
cell | Cell to set the type. |
type | Name of the type to set for the cell. |
bool ophidian::netlist::netlist::cell_std_cell | ( | entity_system::entity | cell, |
entity_system::entity | std_cell | ||
) |
Sets the standard cell type of a cell. The number of pins of the current cell type and the new one must match.
cell | Cell to set the type. |
type | Entity of the type to set for the cell. |
|
inline |
Returns the cells entity system.
|
inline |
Returns the cells properties object.
void ophidian::netlist::netlist::connect | ( | entity_system::entity | net, |
entity_system::entity | pin | ||
) |
Connects a pin to a net. This method changes the pins property of the net to contain the new pin and the net property of the pin.
net | Net to be connnected. |
pin | Pin to be connected. |
void ophidian::netlist::netlist::disconnect | ( | entity_system::entity | pin | ) |
Disconnects a pin from its net. This method removes the pin from the net pins property and leaves the pin without a net.
pin | Pin to be disconnected. |
|
inline |
Finds a net by its name.
name | Net name. |
|
inline |
Returns the number of nets created in the pins system.
entity_system::entity ophidian::netlist::netlist::net_insert | ( | std::string | name | ) |
Inserts a new net in the netlist. A net has a name associated to it.
name | Name of the net, used to identify it. |
entity_system::entity ophidian::netlist::netlist::net_insert | ( | std::string | name, |
std::size_t | pin_count | ||
) |
Inserts a new net in the netlist. A net has a name associated to it.
name | Name of the net, used to identify it. |
pin_count | Number of pins the net will connect |
|
inline |
Returns the name of a net.
net | Net to get the name. |
|
inline |
Returns the beginning and end iterators of the net names property.
|
inline |
Returns the pins of a net.
net | Net to get the pins. |
void ophidian::netlist::netlist::net_remove | ( | entity_system::entity | net | ) |
Removes an existing net from the netlist.
net | Net to be removed. |
|
inline |
Returns the nets entity system.
|
inline |
Returns the nets properties object.
|
inline |
Returns an iterator pointing to the beginning of the primary inputs in the netlist.
|
inline |
Returns the number of primary inputs created in the netlist.
|
inline |
Returns an iterator pointing to the end of the primary inputs in the netlist.
entity_system::entity ophidian::netlist::netlist::PI_insert | ( | std::string | name | ) |
Inserts a new primary input in the netlist. A primary input is a pin without an owner.
name | Name of the primary input, used to identify it. |
void ophidian::netlist::netlist::PI_remove | ( | entity_system::entity | PI | ) |
Removes an existing primary input from the netlist.
PI | Primary input to be removed. |
|
inline |
Finds a pin by its name.
name | Pin name. |
|
inline |
Returns the number of pins created in the pins system.
entity_system::entity ophidian::netlist::netlist::pin_insert | ( | entity_system::entity | cell, |
std::string | name | ||
) |
Inserts a new pin in the netlist. A pin has a name and owner associated to it.
cell | Cell owner of the pin. |
name | Name of the pin, used to identify it. |
|
inline |
Returns the name of a pin.
pin | Pin to get the name. |
|
inline |
Returns the net of a pin.
pin | Pin to get the net. |
|
inline |
Returns the owner of a pin.
pin | Pin to get the owner. |
|
inline |
Returns the standard cell type of a pin.
pin | Pin to get the type. |
|
inline |
Returns the pins entity system.
|
inline |
Returns the pins properties object.
|
inline |
Returns an iterator pointing to the beginning of the primary outputs in the netlist.
|
inline |
Returns the number of primary outputs created in the netlist.
|
inline |
Returns an iterator pointing to the end of the primary outputs in the netlist.
entity_system::entity ophidian::netlist::netlist::PO_insert | ( | std::string | name | ) |
Inserts a new primary output in the netlist. A primary input is a pin without an owner.
name | Name of the primary output, used to identify it. |
void ophidian::netlist::netlist::PO_remove | ( | entity_system::entity | PO | ) |
Removes an existing primary output from the netlist.
PO | Primary output to be removed. |
void ophidian::netlist::netlist::register_cell_property | ( | entity_system::property * | property | ) |
Registers a property to the cells entity system.
property | Property to be registered. |
void ophidian::netlist::netlist::register_net_property | ( | entity_system::property * | property | ) |
Registers a property to the nets entity system.
property | Property to be registered. |
void ophidian::netlist::netlist::register_pin_property | ( | entity_system::property * | property | ) |
Registers a property to the pins entity system.
property | Property to be registered. |
|
inline |
Returns the standard cells object.