23 std::string sink_color;
24 std::string internal_color;
25 std::string root_color;
26 std::string wire_color;
27 std::string text_color;
31 const std::string& sink_color =
"#4CAF50",
32 const std::string& internal_color =
"#2196F3",
33 const std::string& root_color =
"#F44336",
34 const std::string& wire_color =
"#666666",
35 const std::string& text_color =
"#333333")
37 node_radius(node_radius),
38 wire_width(wire_width),
39 sink_color(sink_color),
40 internal_color(internal_color),
41 root_color(root_color),
42 wire_color(wire_color),
43 text_color(text_color) {}
46 const std::string& filename =
"clock_tree.svg",
int width = 800,
47 int height = 600,
const SkewAnalysis* analysis =
nullptr);
50 std::vector<NodeIdx> collect_all_nodes(
const Tree& tree,
NodeIdx root);
52 std::tuple<double, double, double, double> calculate_bounds(
53 const std::vector<NodeIdx>& node_indices,
const std::vector<Sink>& sinks,
56 std::vector<std::string> draw_wires(
58 const std::function<std::pair<double, double>(
double,
double)>& scale_coord);
60 std::vector<std::string> draw_nodes(
61 NodeIdx root,
const Tree& tree,
const std::vector<Sink>& sinks,
62 const std::function<std::pair<double, double>(
double,
double)>& scale_coord);
64 std::vector<std::string> create_analysis_box(
const SkewAnalysis& analysis,
int width);
68 const std::vector<Sink>& sinks,
70 const std::string& filename =
"clock_tree_interactive.svg",
71 int width = 1000,
int height = 700);
82 const std::string& filename
83 =
"clock_tree_comparison.svg",
84 int width = 1200,
int height = 800);
88 const std::string& filename
89 =
"delay_model_comparison.svg");
Visualizes clock trees in SVG format.
Definition visualize_clock_tree.hpp:18
std::string visualize_tree(const Tree &tree, NodeIdx root, const std::vector< Sink > &sinks, const std::string &filename="clock_tree.svg", int width=800, int height=600, const SkewAnalysis *analysis=nullptr)
ClockTreeVisualizer(int margin=50, int node_radius=8, int wire_width=2, const std::string &sink_color="#4CAF50", const std::string &internal_color="#2196F3", const std::string &root_color="#F44336", const std::string &wire_color="#666666", const std::string &text_color="#333333")
Definition visualize_clock_tree.hpp:30
Arena-allocated tree of TreeNodes.
Definition dme_algorithm.hpp:102
Deferred Merge Embedding (DME) algorithm for clock tree synthesis.
Definition svg_utils.hpp:12
std::string create_interactive_svg(const Tree &tree, NodeIdx root, const std::vector< Sink > &sinks, const SkewAnalysis *analysis=nullptr, const std::string &filename="clock_tree_interactive.svg", int width=1000, int height=700)
std::size_t NodeIdx
Node index type used throughout the DME algorithm.
Definition dme_algorithm.hpp:31
std::string create_delay_model_comparison(const TreeComparisonData &linear_tree_data, const TreeComparisonData &elmore_tree_data, const std::string &filename="delay_model_comparison.svg")
std::string create_comparison_visualization(const std::vector< TreeComparisonData > &trees_data, const std::string &filename="clock_tree_comparison.svg", int width=1200, int height=800)
void visualize_example_tree()
Stores the results of the clock skew analysis for a clock tree.
Definition dme_algorithm.hpp:334
Definition visualize_clock_tree.hpp:73
std::vector< Sink > sinks
Definition visualize_clock_tree.hpp:76
NodeIdx root
Definition visualize_clock_tree.hpp:75
SkewAnalysis analysis
Definition visualize_clock_tree.hpp:77
const Tree * tree
Definition visualize_clock_tree.hpp:74
std::string title
Definition visualize_clock_tree.hpp:78