sv_parser_syntaxtree/specify_section/
specify_path_delays.rs

1use crate::*;
2
3// -----------------------------------------------------------------------------
4
5#[derive(Clone, Debug, PartialEq, Node)]
6pub enum PathDelayValue {
7    ListOfPathDelayExpressions(Box<ListOfPathDelayExpressions>),
8    Paren(Box<PathDelayValueParen>),
9}
10
11#[derive(Clone, Debug, PartialEq, Node)]
12pub struct PathDelayValueParen {
13    pub nodes: (Paren<ListOfPathDelayExpressions>,),
14}
15
16#[derive(Clone, Debug, PartialEq, Node)]
17pub struct ListOfPathDelayExpressions {
18    pub nodes: (List<Symbol, TPathDelayExpression>,),
19}
20
21#[derive(Clone, Debug, PartialEq, Node)]
22pub struct TPathDelayExpression {
23    pub nodes: (PathDelayExpression,),
24}
25#[derive(Clone, Debug, PartialEq, Node)]
26pub struct PathDelayExpression {
27    pub nodes: (ConstantMintypmaxExpression,),
28}
29
30#[derive(Clone, Debug, PartialEq, Node)]
31pub enum EdgeSensitivePathDeclaration {
32    Parallel(Box<EdgeSensitivePathDeclarationParallel>),
33    Full(Box<EdgeSensitivePathDeclarationFull>),
34}
35
36#[derive(Clone, Debug, PartialEq, Node)]
37pub struct EdgeSensitivePathDeclarationParallel {
38    pub nodes: (ParallelEdgeSensitivePathDescription, Symbol, PathDelayValue),
39}
40
41#[derive(Clone, Debug, PartialEq, Node)]
42pub struct EdgeSensitivePathDeclarationFull {
43    pub nodes: (FullEdgeSensitivePathDescription, Symbol, PathDelayValue),
44}
45
46#[derive(Clone, Debug, PartialEq, Node)]
47pub struct ParallelEdgeSensitivePathDescription {
48    pub nodes: (
49        Paren<(
50            Option<EdgeIdentifier>,
51            SpecifyInputTerminalDescriptor,
52            Option<PolarityOperator>,
53            Symbol,
54            Paren<(
55                SpecifyOutputTerminalDescriptor,
56                Option<PolarityOperator>,
57                Symbol,
58                DataSourceExpression,
59            )>,
60        )>,
61    ),
62}
63
64#[derive(Clone, Debug, PartialEq, Node)]
65pub struct FullEdgeSensitivePathDescription {
66    pub nodes: (
67        Paren<(
68            Option<EdgeIdentifier>,
69            ListOfPathInputs,
70            Option<PolarityOperator>,
71            Symbol,
72            Paren<(
73                ListOfPathOutputs,
74                Option<PolarityOperator>,
75                Symbol,
76                DataSourceExpression,
77            )>,
78        )>,
79    ),
80}
81
82#[derive(Clone, Debug, PartialEq, Node)]
83pub struct DataSourceExpression {
84    pub nodes: (Expression,),
85}
86
87#[derive(Clone, Debug, PartialEq, Node)]
88pub enum EdgeIdentifier {
89    Posedge(Box<Keyword>),
90    Negedge(Box<Keyword>),
91    Edge(Box<Keyword>),
92}
93
94#[derive(Clone, Debug, PartialEq, Node)]
95pub enum StateDependentPathDeclaration {
96    IfSimple(Box<StateDependentPathDeclarationIfSimple>),
97    IfEdgeSensitive(Box<StateDependentPathDeclarationIfEdgeSensitive>),
98    IfNone(Box<StateDependentPathDeclarationIfNone>),
99}
100
101#[derive(Clone, Debug, PartialEq, Node)]
102pub struct StateDependentPathDeclarationIfSimple {
103    pub nodes: (Keyword, Paren<ModulePathExpression>, SimplePathDeclaration),
104}
105
106#[derive(Clone, Debug, PartialEq, Node)]
107pub struct StateDependentPathDeclarationIfEdgeSensitive {
108    pub nodes: (
109        Keyword,
110        Paren<ModulePathExpression>,
111        EdgeSensitivePathDeclaration,
112    ),
113}
114
115#[derive(Clone, Debug, PartialEq, Node)]
116pub struct StateDependentPathDeclarationIfNone {
117    pub nodes: (Keyword, SimplePathDeclaration),
118}
119
120#[derive(Clone, Debug, PartialEq, Node)]
121pub struct PolarityOperator {
122    pub nodes: (Symbol,),
123}