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

'nets argument to convert must be a signal' when working with records and functions #1094

Open
Schottkyc137 opened this issue Dec 10, 2024 · 1 comment

Comments

@Schottkyc137
Copy link

Not sure what the underlying issue is but this is as far broken down as I could:

entity A is
  port (din : BIT_VECTOR(4 downto 0));
end A;

architecture arch of A is
begin
end architecture;

package pkg_B is
  function init return natural;
end pkg_B;

package body pkg_B is
  function init return natural is
  begin
    return 1;
  end init;
end pkg_B;

use work.pkg_B.init;

package pkg_C is
	type bar is record
		field  : BIT_VECTOR(init downto 0);
	end record;
end package pkg_C;

use work.pkg_C.bar;

entity B is
end entity B;

architecture rtl of B is

  signal foo : bar;

  function bar_to_bitvector(bar_obj: bar) return BIT_VECTOR is
	begin
		return (4 downto 0 => '0');
	end;

begin

  test_inst: entity work.A
  port map(din => bar_to_bitvector(foo));
end architecture;
@nickg
Copy link
Owner

nickg commented Dec 11, 2024

I've fixed the crash but found another bug which will prevent this from working properly.

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

2 participants