liberty_db/internal_power/
mod.rs1use crate::{
2 Ctx,
3 ast::{Attributes, GroupComments, GroupFn},
4 common::items::WordSet,
5 expression::LogicBooleanExpression,
6 table::TableLookUp,
7};
8
9#[derive(Debug, Clone)]
10#[derive(liberty_macros::Group)]
11#[mut_set::derive::item]
12#[derive(serde::Serialize, serde::Deserialize)]
13#[serde(bound = "C::InternalPower: serde::Serialize + serde::de::DeserializeOwned")]
14pub struct InternalPower<C: 'static + Ctx> {
15 #[liberty(comments)]
17 comments: GroupComments,
18 #[liberty(extra_ctx)]
19 pub extra_ctx: C::InternalPower,
20 #[liberty(attributes)]
22 pub attributes: Attributes,
23 #[id]
28 #[liberty(simple)]
29 pub related_pin: WordSet,
30 #[id]
31 #[liberty(simple)]
32 pub related_pg_pin: WordSet,
33 #[liberty(simple)]
37 #[id]
38 pub when: Option<LogicBooleanExpression>,
39 #[liberty(complex)]
55 pub mode: Option<[String; 2]>,
56 #[liberty(group)]
60 #[liberty(after_build = TableLookUp::use_power_template)]
61 pub rise_power: Option<TableLookUp<C>>,
62 #[liberty(group)]
63 #[liberty(after_build = TableLookUp::use_power_template)]
64 pub fall_power: Option<TableLookUp<C>>,
65 #[liberty(group)]
66 #[liberty(after_build = TableLookUp::use_power_template)]
67 pub power: Option<TableLookUp<C>>,
68}
69
70impl<C: 'static + Ctx> GroupFn<C> for InternalPower<C> {}