|
HAL
v4.5.0-299-g9ee015483
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
Classes | |
| struct | Diagnostic |
| struct | VoidPtrHash |
| struct | PairPtrEq |
| class | ClockTree |
Typedefs | |
| using | Branch = std::vector< std::pair< const void *, PtrType > > |
Enumerations | |
| enum | PtrType { UNKNOWN , GATE , NET } |
| enum class | Severity { warning , error } |
| enum class | DiagnosticCode { invalid_clock_pin_count , unconnected_clock_pin , invalid_clock_net_sources , unrouted_clock_net , multi_driven_clock_net } |
Functions | |
| Result< std::vector< Branch > > | recover_branches (const ClockTree &clock_tree) |
| Result< std::monostate > | export_dot (const ClockTree &clock_tree, const std::string &pathname, const std::optional< std::string > &x_key=std::nullopt, const std::optional< std::string > &y_key=std::nullopt) |
| bool | is_ff (const Gate *gate) |
| bool | is_latch (const Gate *gate) |
| bool | is_buffer (const Gate *gate) |
| bool | is_inverter (const Gate *gate) |
| bool | is_delay (const Gate *gate) |
| bool | is_mux (const Gate *gate) |
| bool | is_oscillator (const Gate *gate) |
| bool | is_pll (const Gate *gate) |
| bool | is_control_pin (PinType pin_type) |
| bool | is_connected_to_control_pin (const Endpoint *endpoint) |
| std::optional< double > | read_parameter_coordinate (const Gate *gate, const std::string &name) |
| using hal::cte::Branch = typedef std::vector<std::pair<const void *, PtrType> > |
Definition at line 71 of file clock_tree.h.
|
strong |
| Enumerator | |
|---|---|
| invalid_clock_pin_count | |
| unconnected_clock_pin | |
| invalid_clock_net_sources | |
| unrouted_clock_net | |
| multi_driven_clock_net | |
Definition at line 52 of file clock_tree.h.
| enum hal::cte::PtrType |
| Enumerator | |
|---|---|
| UNKNOWN | |
| GATE | |
| NET | |
Definition at line 48 of file clock_tree.h.
|
strong |
| Enumerator | |
|---|---|
| warning | |
| error | |
Definition at line 50 of file clock_tree.h.
| Result< std::monostate > hal::cte::export_dot | ( | const ClockTree & | clock_tree, |
| const std::string & | pathname, | ||
| const std::optional< std::string > & | x_key = std::nullopt, |
||
| const std::optional< std::string > & | y_key = std::nullopt |
||
| ) |
Write a clock tree to a DOT file.
Gates get the coordinates of their location in the layout, unless the keys of both coordinates are given: then they are read from the gate parameters of these names, e.g., from Verilog instance parameters, which unlike a location can be negative.
| [in] | clock_tree | - The clock tree. |
| [in] | pathname | - The path of the file to write. |
| [in] | x_key | - The name of the parameter that holds the x-coordinate, or std::nullopt to use the location. |
| [in] | y_key | - The name of the parameter that holds the y-coordinate, or std::nullopt to use the location. |
Definition at line 93 of file dot_export.cpp.
References ERR, ERR_APPEND, hal::Gate::get_id(), hal::cte::ClockTree::get_igraph(), hal::Gate::get_location_x(), hal::Gate::get_location_y(), hal::Gate::get_name(), hal::GateType::get_name(), hal::cte::ClockTree::get_ptr_from_vertex(), hal::Gate::get_type(), hal::Gate::has_location(), is_delay(), is_inverter(), log_warning, NET, net, OK, read_parameter_coordinate(), hal::core_strings::to(), type, x, and y.
Referenced by hal::PYBIND11_PLUGIN().
| bool hal::cte::is_buffer | ( | const Gate * | gate | ) |
Definition at line 53 of file utils.cpp.
References hal::c_buffer, hal::Gate::get_type(), and hal::GateType::has_property().
Referenced by hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_connected_to_control_pin | ( | const Endpoint * | endpoint | ) |
Definition at line 89 of file utils.cpp.
References hal::Endpoint::get_pin(), hal::BasePin< T >::get_type(), and is_control_pin().
Referenced by hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_control_pin | ( | PinType | pin_type | ) |
Definition at line 83 of file utils.cpp.
References hal::clock, hal::enable, hal::reset, hal::select, and hal::set.
Referenced by is_connected_to_control_pin().
| bool hal::cte::is_delay | ( | const Gate * | gate | ) |
Definition at line 63 of file utils.cpp.
References hal::delay, hal::Gate::get_type(), and hal::GateType::has_property().
Referenced by export_dot(), and hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_ff | ( | const Gate * | gate | ) |
Definition at line 43 of file utils.cpp.
References hal::ff, hal::Gate::get_type(), and hal::GateType::has_property().
Referenced by hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_inverter | ( | const Gate * | gate | ) |
Definition at line 58 of file utils.cpp.
References hal::c_inverter, hal::Gate::get_type(), and hal::GateType::has_property().
Referenced by export_dot(), and hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_latch | ( | const Gate * | gate | ) |
Definition at line 48 of file utils.cpp.
References hal::Gate::get_type(), hal::GateType::has_property(), and hal::latch.
Referenced by hal::cte::ClockTree::from_netlist().
| bool hal::cte::is_mux | ( | const Gate * | gate | ) |
Definition at line 68 of file utils.cpp.
References hal::c_mux, hal::Gate::get_type(), and hal::GateType::has_property().
| bool hal::cte::is_oscillator | ( | const Gate * | gate | ) |
Definition at line 73 of file utils.cpp.
References hal::Gate::get_type(), hal::GateType::has_property(), and hal::oscillator.
| bool hal::cte::is_pll | ( | const Gate * | gate | ) |
Definition at line 78 of file utils.cpp.
References hal::Gate::get_type(), hal::GateType::has_property(), and hal::pll.
| std::optional< double > hal::cte::read_parameter_coordinate | ( | const Gate * | gate, |
| const std::string & | name | ||
| ) |
Read a coordinate from a gate parameter, e.g., a Verilog instance parameter.
The parameter must hold a finite number and nothing else apart from surrounding white space, e.g., "-600", "12.5" or "0x10", which is how HAL stores bit vectors.
| [in] | gate | - The gate. |
| [in] | name | - The name of the parameter. |
Definition at line 94 of file utils.cpp.
References hal::error, hal::Result< T >::get(), hal::DataContainer::get_parameter_value(), hal::Result< T >::is_error(), and name.
Referenced by hal::ctv::build_layout(), and export_dot().
Recover all branches of a clock tree.
Runs a depth-first search from every root and collects each root-to-sink path. A sink is a vertex without successors. Vertices reachable over several paths show up in several branches.
| [in] | clock_tree | - The clock tree. |
Definition at line 78 of file branches.cpp.
References ERR, hal::cte::ClockTree::get_ptr_from_vertex(), hal::cte::ClockTree::get_roots(), and OK.
Referenced by hal::PYBIND11_PLUGIN().