Skip to content

ghdl compilation of VST files, arrays of size 1 get treated as "bit" by ghdl

a signal which is bit_vector(1 downto 1) is being created:

  signal dec30_dec30_rc_sel        :  bit_vector(1 downto 1);
  signal dec30_dec30_sv_in2        :  bit_vector(1 downto 1);
  signal dec30_dec30_sv_in3        :  bit_vector(1 downto 1);
  signal dec30_dec30_upd           :  bit_vector(1 downto 1);
  signal dec58_dec58_ldst_len      :  bit_vector(3 downto 3);

then it is referred to here:

  subckt_442_dec30 : cmpt_dec30
  port map ( opcode_in           => opcode_in(31 downto 0)
           , dec30_function_unit => dec30_dec30_rc_sel(1)

because dec30_dec30_rc_sel is declared as a bit_vector, but ghdl sees that it is a single bit, it cannot be accessed

../vst_src/cmpt_dec_171.vst:1456:37: can't associate indexed name with signal interface "dec30_function_unit"
../vst_src/cmpt_dec_171.vst:1456:37: (type of indexed name is bit)