Skip to main content

ClockTreeVisualizer

Struct ClockTreeVisualizer 

Source
pub struct ClockTreeVisualizer {
    pub margin: u32,
    pub node_radius: u32,
    pub wire_width: u32,
    pub sink_color: String,
    pub internal_color: String,
    pub root_color: String,
    pub wire_color: String,
    pub text_color: String,
}
Expand description

SVG visualizer for DME clock trees.

Color-codes nodes by type (root=red, internal=blue, sinks=green), draws parent-child wires with length labels, and overlays delay/capacitance info. Optionally displays a skew analysis panel.

Fields§

§margin: u32§node_radius: u32§wire_width: u32§sink_color: String§internal_color: String§root_color: String§wire_color: String§text_color: String

Implementations§

Source§

impl ClockTreeVisualizer

Source

pub fn new() -> Self

Source

pub fn visualize_tree( &self, tree: &Tree, root: NodeIdx, sinks: &[Sink], filename: &str, width: u32, height: u32, analysis: Option<&SkewAnalysis>, ) -> String

Produce an SVG string visualizing the clock tree rooted at root.

  • tree — the arena-allocated clock tree (from DMEAlgorithm::get_tree())
  • root — root node index (returned by DMEAlgorithm::build_clock_tree)
  • sinks — original sink list (used to identify leaf nodes)
  • filename — if non-empty, save the SVG to this path
  • width, height — SVG canvas dimensions
  • analysis — optional SkewAnalysis to display in an info panel

Trait Implementations§

Source§

impl Default for ClockTreeVisualizer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.