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: 'static + 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)]
#[id]
pub when: Option<LogicBooleanExpression>,
#[liberty(complex)]
pub mode: Option<[String; 2]>,
#[liberty(group)]
#[liberty(after_build = TableLookUp::use_power_template)]
pub rise_power: Option<TableLookUp<C>>,
#[liberty(group)]
#[liberty(after_build = TableLookUp::use_power_template)]
pub fall_power: Option<TableLookUp<C>>,
#[liberty(group)]
#[liberty(after_build = TableLookUp::use_power_template)]
pub power: Option<TableLookUp<C>>,
}
impl<C: 'static + Ctx> GroupFn<C> for InternalPower<C> {}