Skip to content

Multi-dimensional input/output declarations #10

@eymre

Description

@eymre

I guess the grammar file needs update to the following lines to support multi-dimensional ports.

SVParser.g4:

Old:

inout_declaration
  : KW_INOUT ( net_type )? ( KW_SIGNED )? ( range )? list_of_port_identifiers
  ;
input_declaration
  : KW_INPUT ( net_type )? ( KW_SIGNED )? ( range )? list_of_port_identifiers
  | KW_INPUT variable_port_type list_of_variable_identifiers
  ;
output_declaration
  : KW_OUTPUT ( net_type )? ( KW_SIGNED )? ( range )? list_of_port_identifiers
  | KW_OUTPUT variable_port_type list_of_variable_identifiers
  ;

New:

// I/O declaration may have multi-dimensional range
inout_declaration
  : KW_INOUT ( net_type )? ( KW_SIGNED )? ( range )* list_of_port_identifiers
  ;
input_declaration
  : KW_INPUT ( net_type )? ( KW_SIGNED )? ( range )* list_of_port_identifiers
  | KW_INPUT variable_port_type list_of_variable_identifiers
  ;
output_declaration
  : KW_OUTPUT ( net_type )? ( KW_SIGNED )? ( range )* list_of_port_identifiers
  | KW_OUTPUT variable_port_type list_of_variable_identifiers
  ;

Thanks,

Edit: Formatting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions