Skip to content

[circt-verilog] zero parameter at module declaration fails when used  #7753

Open
@dacsson

Description

@dacsson

I have a mmu.sv module for RISC-V implementation:

module mmu #(
    parameter integer DEVICE_COUNT = 0
) (
...
output logic [31:2] dev_addr[DEVICE_COUNT]
...

that is used in top module like:

mmu #(
        .DEVICE_COUNT(8)
    ) mmu (
...
        .dev_addr(
        '{
            rom_addr,
            ram_addr[0],
            ram_addr[1],
            ram_addr[2],
            ram_addr[3],
            led_addr,
            mtime_addr,
            mtimecmp_addr
        }

...

when trying to compile with circt-verilog mmu.sv i get this error:

core/mmu.sv:17:34: error: value must be positive
    output logic [31:2] dev_addr[DEVICE_COUNT],

is it impossible to compile such module? why so?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions