You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.fixed_pkg.all;
use ieee.math_real.all;
use std.textio.all;
packagevector_types_pkgistypesfixed_vectorisarray (naturalrange<>) of sfixed;
typeufixed_vectorisarray (naturalrange<>) of ufixed;
endpackage;
packagebodyvector_types_pkgisfunctionto_sfixed_vector (val : std_logic_vector; format : sfixed_vector) return sfixed_vector isconstant elem_proto : format'element := (others=>'0');
constant wi_elem : natural:= elem_proto'length;
constant num_elem : natural:= format'length;
constant val_up : std_logic_vector(0to val'length-1) := val;
variable norm : sfixed_vector(0to num_elem-1)(elem_proto'range);
variable result : format'subtype;
beginassert val'length= wi_elem*num_elem
report"Input vector size doesn't match format size."severityfailure;
for ii in0to num_elem-1loop
norm(ii) := sfixed(val_up(ii*wi_elem to (ii+1)*wi_elem-1));
endloop;
result := norm;
return result;
endfunction;
endpackagebody;
$ ghdl.exe -a -fsynopsys --warn-no-hide --std=08 --work=work types_broken.2008.vhd
types_broken.2008.vhd:4162:45:error: 'others' choice not allowed foran aggregatein this context
constant elem_proto : format'element := (others => '0'); ^types_broken.2008.vhd:4200:45:error: 'others' choice not allowed for an aggregate in this context constant elem_proto : format'element := (others =>'0');
^
types_broken.2008.vhd:4256:38:error: 'others' choice not allowed foran aggregatein this context
constant aa_elem : aa'element := (others => '0'); ^types_broken.2008.vhd:4257:38:error: 'others' choice not allowed for an aggregate in this context constant bb_elem : bb'element := (others =>'0');
^
types_broken.2008.vhd:4266:38:error: 'others' choice not allowed foran aggregatein this context
constant aa_elem : aa'element := (others => '0'); ^types_broken.2008.vhd:4267:38:error: 'others' choice not allowed for an aggregate in this context constant bb_elem : bb'element := (others =>'0');
^
Here's a link to my github where the code is stored:
Compile in questasim, fails in ghdl:
Here's a link to my github where the code is stored:
https://github.com/wm2015email/MISC/tree/main/ghdl_bug_2008
The text was updated successfully, but these errors were encountered: