sv_parser_syntaxtree/declarations/
interface_declarations.rs1use crate::*;
2
3#[derive(Clone, Debug, PartialEq, Node)]
6pub struct ModportDeclaration {
7 pub nodes: (Keyword, List<Symbol, ModportItem>, Symbol),
8}
9
10#[derive(Clone, Debug, PartialEq, Node)]
11pub struct ModportItem {
12 pub nodes: (
13 ModportIdentifier,
14 Paren<List<Symbol, ModportPortsDeclaration>>,
15 ),
16}
17
18#[derive(Clone, Debug, PartialEq, Node)]
19pub enum ModportPortsDeclaration {
20 Simple(Box<ModportPortsDeclarationSimple>),
21 Tf(Box<ModportPortsDeclarationTf>),
22 Clocking(Box<ModportPortsDeclarationClocking>),
23}
24
25#[derive(Clone, Debug, PartialEq, Node)]
26pub struct ModportPortsDeclarationSimple {
27 pub nodes: (Vec<AttributeInstance>, ModportSimplePortsDeclaration),
28}
29
30#[derive(Clone, Debug, PartialEq, Node)]
31pub struct ModportPortsDeclarationTf {
32 pub nodes: (Vec<AttributeInstance>, ModportTfPortsDeclaration),
33}
34
35#[derive(Clone, Debug, PartialEq, Node)]
36pub struct ModportPortsDeclarationClocking {
37 pub nodes: (Vec<AttributeInstance>, ModportClockingDeclaration),
38}
39
40#[derive(Clone, Debug, PartialEq, Node)]
41pub struct ModportClockingDeclaration {
42 pub nodes: (Keyword, ClockingIdentifier),
43}
44
45#[derive(Clone, Debug, PartialEq, Node)]
46pub struct ModportSimplePortsDeclaration {
47 pub nodes: (PortDirection, List<Symbol, ModportSimplePort>),
48}
49
50#[derive(Clone, Debug, PartialEq, Node)]
51pub enum ModportSimplePort {
52 Ordered(Box<ModportSimplePortOrdered>),
53 Named(Box<ModportSimplePortNamed>),
54}
55
56#[derive(Clone, Debug, PartialEq, Node)]
57pub struct ModportSimplePortOrdered {
58 pub nodes: (PortIdentifier,),
59}
60
61#[derive(Clone, Debug, PartialEq, Node)]
62pub struct ModportSimplePortNamed {
63 pub nodes: (Symbol, PortIdentifier, Paren<Option<Expression>>),
64}
65
66#[derive(Clone, Debug, PartialEq, Node)]
67pub struct ModportTfPortsDeclaration {
68 pub nodes: (ImportExport, List<Symbol, ModportTfPort>),
69}
70
71#[derive(Clone, Debug, PartialEq, Node)]
72pub enum ModportTfPort {
73 MethodPrototype(Box<MethodPrototype>),
74 TfIdentifier(Box<TfIdentifier>),
75}
76
77#[derive(Clone, Debug, PartialEq, Node)]
78pub enum ImportExport {
79 Import(Box<Keyword>),
80 Export(Box<Keyword>),
81}