• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
            • Parse-expressions
            • Parse-udps
            • Parse-statements
            • Parse-property
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
            • Parse-insts
            • Parse-functions
            • Parse-assignments
            • Parse-clocking
            • Parse-strengths
            • Vl-parse-genvar-declaration
            • Vl-parse
            • Parse-netdecls
            • Parse-asserts
            • Vl-maybe-parse-lifetime
            • Parse-dpi-import-export
            • Parse-ports
              • Parse-port-types
              • Creating-portdecls/vardecls
              • Verilog-2005-ports
              • Sv-non-ansi-portdecls
              • Vl-parse-ansi-port-declaration-2005
              • Vl-parse-1+-port-declarations-separated-by-commas-2005
              • Vl-parse-ansi-port-declaration
              • Vl-parse-1+-ansi-port-declarations
              • Verilog-2005-portdecls
                • Vl-parse-basic-port-declaration-tail
                • Vl-parse-port-declaration-noatts-2005
                • Vl-parse-port-declaration-atts-2005
                • Vl-parse-1+-identifiers-separated-by-commas
                • Vl-parse-port-declaration-noatts
                • Vl-parse-output-reg-port-tail
            • Parse-timeunits
            • Seq
            • Parse-packages
            • Parse-eventctrl
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
          • Vl-load
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-preprocess-debug
          • Vl-write-preprocessor-debug-file
          • Vl-read-file-report-gather
          • Vl-load-descriptions
          • Vl-load-files
          • Translate-off
          • Vl-load-read-file-hook
          • Vl-read-file-report
          • Vl-loadstate-pad
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-loadstate->warnings
          • Vl-iskips-report
          • Vl-descriptionlist
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Parse-ports

Verilog-2005-portdecls

Parsing for Verilog-2005 port declarations.

Here is the grammar we're implementing.

port_declaration ::= {attribute_instance} inout_declaration
                   | {attribute_instance} input_declaration
                   | {attribute_instance} output_declaration

inout_declaration ::= 'inout' [net_type] ['signed'] [range] list_of_port_identifiers

input_declaration ::= 'input' [net_type] ['signed'] [range] list_of_port_identifiers

output_declaration ::= 'output' [net_type] ['signed'] [range] list_of_port_identifiers
                     | 'output' 'reg' ['signed'] [range] list_of_variable_port_identifiers
                     | 'output' output_variable_type list_of_variable_port_identifiers

net_type ::= 'supply0' | 'supply1' | 'tri' | 'triand' | 'trior' | 'tri0' | 'tri1'
           | 'uwire' | 'wire' | 'wand' | 'wor'

list_of_port_identifiers ::= identifier { ',' identifier }

list_of_variable_port_identifiers ::=
   identifier ['=' expression] { ',' identifier [ '=' expression ] }

output_variable_type ::= 'integer' | 'time'

list_of_port_declarations ::= '(' port_declaration { ',' port_declaration } ')'
                            | '(' ')'

Subtopics

Vl-parse-basic-port-declaration-tail
Matches [net_type] ['signed'] [range] list_of_port_identifiers.
Vl-parse-port-declaration-noatts-2005
Verilog-2005 Only. Match inout_declaration | input_declaration | output_declaration.
Vl-parse-port-declaration-atts-2005
Verilog-2005 Only. Matches port_declaration in ansi-style port lists.
Vl-parse-1+-identifiers-separated-by-commas
Matches identifier { ',' identifier }
Vl-parse-port-declaration-noatts
Matches port_declaration for Verilog-2005 or SystemVerilog-2012, except for the initial attributes. Used for port declarations within modules.
Vl-parse-output-reg-port-tail
We've just matched 'output reg'. Now match ['signed'] [range] list_of_variable_port_identifiers.