vscode-terosHDL icon indicating copy to clipboard operation
vscode-terosHDL copied to clipboard

Schematic viewer build failed with systemverilog file

Open ilongshan opened this issue 2 years ago • 1 comments

Describe the bug Schematic viewer failed with the following systemverilog file:

Code

`ifndef INCLUDED_types_def
`define INCLUDED_types_def

typedef struct packed {
    logic                               sao_merge_left_flag  ;
    logic                               sao_merge_up_flag    ;
    logic             [0:2][1:0]        sao_type_idx         ;
    logic signed [0:2][0:4][3:0]        sao_offset           ;

    logic             [0:2][4:0]        sao_band_position    ;
    logic             [0:2][1:0]        sao_eo_class         ;

} sao_params_t;


typedef struct packed {
    logic               [11:0]       reserved;
    logic               [ 3:0]       num_of_pics;
    logic [0:15][14:0]       deltaPoc; 
} rps_t;


typedef struct packed {
    logic signed [1: 0][14:0]         mv     ;
} Mv;

typedef struct packed {
    Mv                                 mv         ;
    logic               [ 3:0]         refIdx     ;

} MvField;

`define BitsMvf 34

typedef struct packed {
    logic              [11:0]   x0;
    logic              [11:0]   y0;
    logic              [ 6:0]   CbSize;
    logic         [3:0][ 6:0]   nPbW;
    logic         [3:0][ 6:0]   nPbH;
    logic         [3:0][ 5:0]   xPb;
    logic         [3:0][ 5:0]   yPb;
    MvField       [3:0]         mvf;
    logic         [3:0]         parse_done;
} PuInfo;


`endif

Please complete the following information:

  • OS: macOS Ventura 13.4.1
  • VSCode version: 1.80.1

Screenshots image

Additional context The terosHDL version is V5.0.5

ilongshan avatar Jul 19 '23 16:07 ilongshan

@ilongshan The reason it fails is because it can not find a top level. Toplevel keywords are defined in this line:

packages/colibri/src/utils/hdl_utils.ts regex = /(?<type>module|program|interface|package|primitive|config|property)\s+(?:automatic\s+)?( <name>\w+)/gm;

gmartina avatar May 27 '24 17:05 gmartina