Menu

#104 changed behavior of conversion from array of std_logic to std_logic_vector

1.0
closed
None
2015-12-22
2015-12-22
No

In the attached code I use the type defined as:
type t_test_vec is array (10 downto -1) of std_logic;
signal test_vec : t_test_vec := (others => '0');

When I convert it to the std_logic_vector:
pr_vec(std_logic_vector(test_vec));

everything works correctly in
GHDL 0.31 (20140108) [Dunoon edition]
Compiled with GNAT Version: 4.9.2
GCC back-end code generator

however now I have switched to:
GHDL 0.33 (20150921) [Dunoon edition]
Compiled with GNAT Version: GPL 2014 (20140331)
GCC back-end code generator

and I get the following error:
$ ghdl -a --std=93c bug_tb.vhd
$ ghdl -e --std=93c bug_tb
$ ./bug_tb
./bug_tb:error: bound check failure at bug_tb.vhd:35
./bug_tb:error: simulation failed

I don't know if this is a bug in the version 0.33, or is it more strict in interpretation of the standard?

Regards,
Wojtek Zabolotny

1 Attachments

Discussion

  • Wojciech Zabolotny

    One important addition.
    Everything works correctly in both versions, if the type is defined as:
    type t_test_vec is array (10 downto 0) of std_logic;

     
  • Wojciech Zabolotny

    oooops, it seems that it is just another result of change discussed here:
    https://sourceforge.net/p/ghdl-updates/tickets/102/ ?

     
  • Tristan Gingold

    Tristan Gingold - 2015-12-22

    Yes, this is exactely the same issue as ticket 102.

    Regards,
    Tristan.

     
  • Tristan Gingold

    Tristan Gingold - 2015-12-22
    • status: open --> closed
    • assigned_to: Tristan Gingold
     

Log in to post a comment.

MongoDB Logo MongoDB