ZLayout EDA Library v1.0.0
Advanced Electronic Design Automation Layout Library with Bilingual Documentation
Loading...
Searching...
No Matches
zlayout::components::Component Class Reference

Base class for all EDA components. More...

#include <component.hpp>

Inheritance diagram for zlayout::components::Component:
Collaboration diagram for zlayout::components::Component:

Public Member Functions

 Component (const std::string &name, ComponentCategory category)
virtual ~Component ()=default
const std::string & getName () const
const std::string & getType () const
ComponentCategory getCategory () const
void setName (const std::string &name)
void setType (const std::string &type)
void addChild (std::shared_ptr< Component > child)
void removeChild (const std::string &name)
std::shared_ptr< ComponentgetChild (const std::string &name) const
const std::vector< std::shared_ptr< Component > > & getChildren () const
std::shared_ptr< ComponentgetParent () const
void setParent (std::shared_ptr< Component > parent)
const geometry::RectanglegetBoundingBox () const
void setBoundingBox (const geometry::Rectangle &bbox)
geometry::Point getPosition () const
void setPosition (const geometry::Point &pos)
double getRotation () const
void setRotation (double angle)
void addPin (std::shared_ptr< Pin > pin)
void removePin (const std::string &name)
std::shared_ptr< PingetPin (const std::string &name) const
const std::vector< std::shared_ptr< Pin > > & getPins () const
void setProperty (const std::string &key, const std::string &value)
std::string getProperty (const std::string &key) const
const std::map< std::string, std::string > & getProperties () const
void setTimingInfo (const TimingInfo &timing)
const TimingInfogetTimingInfo () const
void setPowerInfo (const PowerInfo &power)
const PowerInfogetPowerInfo () const
void setElectricalInfo (const ElectricalInfo &electrical)
const ElectricalInfogetElectricalInfo () const
void setTechNode (TechNode node)
TechNode getTechNode () const
virtual void simulate (double time_step)
virtual void reset ()
virtual std::string getDescription () const
virtual geometry::Rectangle calculateHierarchicalBoundingBox () const
virtual double calculateTotalArea () const
virtual size_t getTotalGateCount () const
virtual std::vector< std::shared_ptr< Component > > flattenHierarchy () const
virtual std::string serialize () const
virtual void deserialize (const std::string &data)

Protected Attributes

std::string name_
std::string type_
ComponentCategory category_
std::vector< std::shared_ptr< Component > > children_
std::weak_ptr< Componentparent_
geometry::Rectangle bounding_box_
geometry::Point position_
double rotation_ = 0.0
std::vector< std::shared_ptr< Pin > > pins_
std::unordered_map< std::string, std::shared_ptr< Pin > > pin_map_
std::map< std::string, std::string > properties_
TimingInfo timing_
PowerInfo power_
ElectricalInfo electrical_
TechNode tech_node_ = TechNode::um_7

Detailed Description

Base class for all EDA components.

Definition at line 178 of file component.hpp.

Constructor & Destructor Documentation

◆ Component()

zlayout::components::Component::Component ( const std::string & name,
ComponentCategory category )

◆ ~Component()

virtual zlayout::components::Component::~Component ( )
virtualdefault

Member Function Documentation

◆ addChild()

void zlayout::components::Component::addChild ( std::shared_ptr< Component > child)

◆ addPin()

void zlayout::components::Component::addPin ( std::shared_ptr< Pin > pin)

◆ calculateHierarchicalBoundingBox()

virtual geometry::Rectangle zlayout::components::Component::calculateHierarchicalBoundingBox ( ) const
virtual

Reimplemented in zlayout::components::SoC.

◆ calculateTotalArea()

virtual double zlayout::components::Component::calculateTotalArea ( ) const
virtual

Reimplemented in zlayout::components::SoC.

◆ deserialize()

virtual void zlayout::components::Component::deserialize ( const std::string & data)
virtual

◆ flattenHierarchy()

virtual std::vector< std::shared_ptr< Component > > zlayout::components::Component::flattenHierarchy ( ) const
virtual

◆ getBoundingBox()

const geometry::Rectangle & zlayout::components::Component::getBoundingBox ( ) const
inline

Definition at line 201 of file component.hpp.

◆ getCategory()

ComponentCategory zlayout::components::Component::getCategory ( ) const
inline

Definition at line 186 of file component.hpp.

◆ getChild()

std::shared_ptr< Component > zlayout::components::Component::getChild ( const std::string & name) const

◆ getChildren()

const std::vector< std::shared_ptr< Component > > & zlayout::components::Component::getChildren ( ) const
inline

Definition at line 195 of file component.hpp.

◆ getDescription()

◆ getElectricalInfo()

const ElectricalInfo & zlayout::components::Component::getElectricalInfo ( ) const
inline

Definition at line 229 of file component.hpp.

◆ getName()

const std::string & zlayout::components::Component::getName ( ) const
inline

Definition at line 184 of file component.hpp.

◆ getParent()

std::shared_ptr< Component > zlayout::components::Component::getParent ( ) const
inline

Definition at line 197 of file component.hpp.

◆ getPin()

std::shared_ptr< Pin > zlayout::components::Component::getPin ( const std::string & name) const

◆ getPins()

const std::vector< std::shared_ptr< Pin > > & zlayout::components::Component::getPins ( ) const
inline

Definition at line 214 of file component.hpp.

◆ getPosition()

geometry::Point zlayout::components::Component::getPosition ( ) const
inline

Definition at line 204 of file component.hpp.

◆ getPowerInfo()

const PowerInfo & zlayout::components::Component::getPowerInfo ( ) const
inline

Definition at line 226 of file component.hpp.

◆ getProperties()

const std::map< std::string, std::string > & zlayout::components::Component::getProperties ( ) const
inline

Definition at line 219 of file component.hpp.

◆ getProperty()

std::string zlayout::components::Component::getProperty ( const std::string & key) const

◆ getRotation()

double zlayout::components::Component::getRotation ( ) const
inline

Definition at line 207 of file component.hpp.

◆ getTechNode()

TechNode zlayout::components::Component::getTechNode ( ) const
inline

Definition at line 232 of file component.hpp.

◆ getTimingInfo()

const TimingInfo & zlayout::components::Component::getTimingInfo ( ) const
inline

Definition at line 223 of file component.hpp.

◆ getTotalGateCount()

virtual size_t zlayout::components::Component::getTotalGateCount ( ) const
virtual

Reimplemented in zlayout::components::SoC.

◆ getType()

const std::string & zlayout::components::Component::getType ( ) const
inline

Definition at line 185 of file component.hpp.

◆ removeChild()

void zlayout::components::Component::removeChild ( const std::string & name)

◆ removePin()

void zlayout::components::Component::removePin ( const std::string & name)

◆ reset()

virtual void zlayout::components::Component::reset ( )
inlinevirtual

◆ serialize()

virtual std::string zlayout::components::Component::serialize ( ) const
virtual

◆ setBoundingBox()

void zlayout::components::Component::setBoundingBox ( const geometry::Rectangle & bbox)
inline

Definition at line 202 of file component.hpp.

◆ setElectricalInfo()

void zlayout::components::Component::setElectricalInfo ( const ElectricalInfo & electrical)
inline

Definition at line 228 of file component.hpp.

◆ setName()

void zlayout::components::Component::setName ( const std::string & name)
inline

Definition at line 188 of file component.hpp.

◆ setParent()

void zlayout::components::Component::setParent ( std::shared_ptr< Component > parent)
inline

Definition at line 198 of file component.hpp.

◆ setPosition()

void zlayout::components::Component::setPosition ( const geometry::Point & pos)
inline

Definition at line 205 of file component.hpp.

◆ setPowerInfo()

void zlayout::components::Component::setPowerInfo ( const PowerInfo & power)
inline

Definition at line 225 of file component.hpp.

◆ setProperty()

void zlayout::components::Component::setProperty ( const std::string & key,
const std::string & value )

◆ setRotation()

void zlayout::components::Component::setRotation ( double angle)
inline

Definition at line 208 of file component.hpp.

◆ setTechNode()

void zlayout::components::Component::setTechNode ( TechNode node)
inline

Definition at line 231 of file component.hpp.

◆ setTimingInfo()

void zlayout::components::Component::setTimingInfo ( const TimingInfo & timing)
inline

Definition at line 222 of file component.hpp.

◆ setType()

void zlayout::components::Component::setType ( const std::string & type)
inline

Definition at line 189 of file component.hpp.

◆ simulate()

Member Data Documentation

◆ bounding_box_

geometry::Rectangle zlayout::components::Component::bounding_box_
protected

Definition at line 259 of file component.hpp.

◆ category_

ComponentCategory zlayout::components::Component::category_
protected

Definition at line 252 of file component.hpp.

◆ children_

std::vector<std::shared_ptr<Component> > zlayout::components::Component::children_
protected

Definition at line 255 of file component.hpp.

◆ electrical_

ElectricalInfo zlayout::components::Component::electrical_
protected

Definition at line 273 of file component.hpp.

◆ name_

std::string zlayout::components::Component::name_
protected

Definition at line 250 of file component.hpp.

◆ parent_

std::weak_ptr<Component> zlayout::components::Component::parent_
protected

Definition at line 256 of file component.hpp.

◆ pin_map_

std::unordered_map<std::string, std::shared_ptr<Pin> > zlayout::components::Component::pin_map_
protected

Definition at line 265 of file component.hpp.

◆ pins_

std::vector<std::shared_ptr<Pin> > zlayout::components::Component::pins_
protected

Definition at line 264 of file component.hpp.

◆ position_

geometry::Point zlayout::components::Component::position_
protected

Definition at line 260 of file component.hpp.

◆ power_

PowerInfo zlayout::components::Component::power_
protected

Definition at line 272 of file component.hpp.

◆ properties_

std::map<std::string, std::string> zlayout::components::Component::properties_
protected

Definition at line 268 of file component.hpp.

◆ rotation_

double zlayout::components::Component::rotation_ = 0.0
protected

Definition at line 261 of file component.hpp.

◆ tech_node_

TechNode zlayout::components::Component::tech_node_ = TechNode::um_7
protected

Definition at line 274 of file component.hpp.

◆ timing_

TimingInfo zlayout::components::Component::timing_
protected

Definition at line 271 of file component.hpp.

◆ type_

std::string zlayout::components::Component::type_
protected

Definition at line 251 of file component.hpp.


The documentation for this class was generated from the following file: