Skip to content

Use of variables before declaration in spi_host.sv commit 1e5da83 #146

@Soeren-Petersen

Description

@Soeren-Petersen

In ibex-demo-system/rtl/system/spi_host.sv I have a problem compiling with Cadence Xcelium 24.09-s008.
The
65: typedef enum logic[1:0] {
66: IDLE,
67: START,
68: SEND,
69: STOP
70: } spi_state_t;
and
75: spi_state_t state_q, state_d;

comes after (line 65 to 75) the first use of them (line 35)

34: logic sck_en;
35: assign sck_en = (state_q == SEND);

Is that allowed in other tools?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions