Horizon
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
horizon::Block Class Reference

A block is one level of hierarchy in the netlist. More...

#include <block.hpp>

Public Member Functions

 Block (const UUID &uu, const json &, class IPool &pool)
 
 Block (const UUID &uu)
 
Netget_net (const UUID &uu)
 
std::string get_group_name (const UUID &uu) const
 
std::string get_tag_name (const UUID &uu) const
 
std::map< const class Part *, BOMRowget_BOM (const BOMExportSettings &settings) const
 
bool can_swap_gates (const UUID &comp, const UUID &g1, const UUID &g2) const
 
void swap_gates (const UUID &comp, const UUID &g1, const UUID &g2)
 
 Block (const Block &block)
 
void operator= (const Block &block)
 
void merge_nets (Net *net, Net *into)
 
void vacuum_nets ()
 deletes unreferenced nets
 
void vacuum_group_tag_names ()
 
Netextract_pins (const std::set< UUIDPath< 3 >> &pins, Net *net=nullptr)
 Takes pins specified by pins and moves them over to net. More...
 
void update_connection_count ()
 
void update_diffpairs ()
 
Netinsert_net ()
 creates new net More...
 
std::string get_net_name (const UUID &uu) const
 
ItemSet get_pool_items_used () const
 
json serialize ()
 

Static Public Member Functions

static Block new_from_file (const std::string &filename, IPool &pool)
 
static std::map< std::string, std::string > peek_project_meta (const std::string &filename)
 

Public Attributes

UUID uuid
 
std::string name
 
std::map< UUID, Netnets
 
std::map< UUID, Busbuses
 
std::map< UUID, Componentcomponents
 
std::map< UUID, NetClassnet_classes
 
uuid_ptr< NetClassnet_class_default = nullptr
 
std::map< UUID, std::string > group_names
 
std::map< UUID, std::string > tag_names
 
std::map< std::string, std::string > project_meta
 
BOMExportSettings bom_export_settings
 

Detailed Description

A block is one level of hierarchy in the netlist.

Right now, horizon doesn't support hierarchical designs, but provisions have been made where necessary.

A block stores Components (instances of Entities), Buses and Nets.

Member Function Documentation

◆ extract_pins()

Net * horizon::Block::extract_pins ( const std::set< UUIDPath< 3 >> &  pins,
Net net = nullptr 
)

Takes pins specified by pins and moves them over to net.

Parameters
pinsUUIDPath of component, gate and pin UUID
netthe destination Net or nullptr for new Net

◆ insert_net()

Net * horizon::Block::insert_net ( )

creates new net

Returns
pointer to new Net

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