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

No implicit resolution function for record containing fields of resolved type. #202

Closed
kraigher opened this issue Jun 2, 2015 · 0 comments
Labels

Comments

@kraigher
Copy link
Contributor

kraigher commented Jun 2, 2015

Both ModelSim and GHDL accept this code. I guess there is an implicit resolution function for a composite type containing fields of resolved types. I could not find it by searching the LRM though.

library ieee;
use ieee.std_logic_1164.all;

entity ent is
end entity;

architecture a of ent is
  type rec_t is record
    field : std_logic;
  end record;

  signal sig : rec_t;
begin

  p1 : process
  begin
    sig <= (others => '0');
    wait;
  end process;

  p2 : process
  begin
    sig <= (others => '1');
    wait;
  end process;

  monitor : process (sig)
  begin
    report std_logic'image(sig.field);
  end process;

end architecture;
nvc -a bug.vhd && nvc -e ent && nvc -r ent
/usr/lib/llvm-3.5/bin/opt -O2 -o /home/kraigher/repo/nvc_bugs/work/_WORK.ENT.final.bc /home/kraigher/repo/nvc_bugs/work/_WORK.ENT.elab.bc
** Fatal: group :ent:sig has multiple drivers but no resolution function
    File bug.vhd, Line 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants