use crate::{
Ctx,
ast::{Attributes, GroupComments, GroupFn},
common::items::WordSet,
expression::LogicBooleanExpression,
table::TableLookUp,
};
#[derive(Debug, Clone)]
#[derive(liberty_macros::Group)]
#[mut_set::derive::item]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(bound = "C::InternalPower: serde::Serialize + serde::de::DeserializeOwned")]
pub struct InternalPower<C: Ctx> {
#[liberty(comments)]
comments: GroupComments,
#[liberty(extra_ctx)]
pub extra_ctx: C::InternalPower,
#[liberty(attributes)]
pub attributes: Attributes,
#[id]
#[liberty(simple)]
pub related_pin: WordSet,
#[id]
#[liberty(simple)]
pub related_pg_pin: WordSet,
#[liberty(simple(type = Option))]
#[id]
pub when: Option<LogicBooleanExpression>,
#[liberty(complex(type = Option))]
pub mode: Option<[String; 2]>,
#[liberty(group(type = Option))]
#[liberty(after_build = crate::table::use_power_template!)]
pub rise_power: Option<TableLookUp<C>>,
#[liberty(group(type = Option))]
#[liberty(after_build = crate::table::use_power_template!)]
pub fall_power: Option<TableLookUp<C>>,
#[liberty(group(type = Option))]
#[liberty(after_build = crate::table::use_power_template!)]
pub power: Option<TableLookUp<C>>,
}
impl<C: Ctx> GroupFn<C> for InternalPower<C> {}