Skip to content

Does nvc correctly dump enum arrays to .fst #1362

@m-kru

Description

@m-kru

VHDL example:

entity test is end entity;

architecture enum_test of test is

  type state_t is (ONE, TWO, THREE);
  type state_array_t is array (0 to 1) of state_t;
  signal states : state_array_t := (others => ONE);

begin

  main : process begin
    wait for 2 ns;
    states(0) <= TWO;
    wait for 2 ns;
    states(1) <= TWO;
    wait for 2 ns;
    states(0) <= THREE;
    wait for 2 ns;
    std.env.finish;
  end process;

end architecture;

Run it with:

nvc -a test.vhd
nvc -e test
nvc -r test --wave --dump-arrays

This is what I can see in GTKWave:

Image

And this is what I can see in Surfer:

Image

I guess there should be two lines. One for each state.

At first, I thought that both GTKWave and Surfer have similar bug. However, Kevin Laeufer in the following issue Surfer#474 suggested that this might be a bug in nvc.

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