MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
592 stars 132 forks source link

slang-reflect don't support --no-sc option #885

Closed ckf104 closed 7 months ago

ckf104 commented 8 months ago

A simple test

package bar;
typedef struct packed {
        logic [3:0] a;
        logic [4:0] c;
} foo_struct /* public */;;
        typedef logic [4:0] data_t;
    typedef struct packed {
        foo_struct [5:0] b;
        data_t [15:0]  h;
        logic [31:0]  w;
    } bar_struct /* public */;
endpackage
$slang-reflect --version
slang-reflect version 5.0.17+a060f15c
$slang-reflect --no-sc test.sv --stdoutut
Headers for the struct bar_struct can not be generated without SystemC support. Please remove the option --no-sc.

Is this behavior expected?

Sustrak commented 7 months ago

Hi @ckf104, when a signal is bigger than 64 bits, the bar_struct in case of you example. You need to have SystemC support. I guess it won't be difficult to add support for non SystemC but currently is not supported.