Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when using 'stable attribute #960

Closed
Schottkyc137 opened this issue Aug 29, 2024 · 0 comments
Closed

Bug when using 'stable attribute #960

Schottkyc137 opened this issue Aug 29, 2024 · 0 comments

Comments

@Schottkyc137
Copy link

Sorry for opening up so many issues lately 😬
Related to #495 ?

Name       WORK.TB.ARRAY_SIG$stable
Kind       function
Context    WORK.TB
Blocks     1
Registers  3
Types      4
Variables  0
Result     0..1
Parameters 1
  r0    context                         // P<WORK.TB>
Begin
   0: r1 := var upref 1, ARRAY_SIG      // @<WORK.TB-ARCH.T_RECORD${}> => WORK.TB-ARCH.T_RECORD${}
      r2 := const 2                     // # => 2
      invalid := event r1 length r2	 <----

** Fatal: argument to event is not a signal
[0x5acbe2eae1b6] ../src/diag.c:1048 diag_femit
[0x5acbe2eae1b6] ../src/diag.c:1073 diag_emit
[0x5acbe2dce024] ../src/util.c:585 fatal_trace
[0x5acbe2ddcc1d] ../src/vcode.c:5068 emit_signal_flag.lto_priv.0.cold
[0x5acbe2e8e7e1] ../src/vcode.c:5076 lower_decls.lto_priv.0
[0x5acbe2e49b39] ../src/lower.c:13108 lower_instance
[0x5acbe2e49b39] ../src/lower.c:1415 elab_lower.lto_priv.0
[0x5acbe2e4bae1] ../src/elab.c:1535 elab_architecture.lto_priv.0
[0x5acbe2debe83] ../src/elab.c:2302 elab
[0x5acbe2debe83] ../src/elab.c:465 elaborate
[0x5acbe2de8ca9] ../src/nvc.c:2088 process_command
[0x5acbe2de8558] ../src/nvc.c:1772 cover_report_cmd
[0x5acbe2de8558] ../src/nvc.c:2118 process_command
[0x5acbe2de4c66] ../src/nvc.c:2230 main

nvc 1.14-devel (1.13.0.r100.ge821b31a) (Using LLVM 14.0.0) [x86_64-pc-linux-gnu]

Please report this bug at https://github.com/nickg/nvc/issues

VHDL input:

entity tb is
end entity tb;

architecture arch of tb is
    type T_RECORD is record
        EL : bit;
    end record T_RECORD;

    type T_ARRAY is array (1 downto 0) of T_RECORD;

    signal array_sig : T_ARRAY;

    signal stable_sig : boolean;
begin
    stable_sig <= array_sig'stable;
end architecture arch;

seems to only happen with the 'stable attribute. Using, for example, 'active works as intended.

@nickg nickg closed this as completed in ea9bc49 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant