Skip to content

Commit

Permalink
Add the body of the decrecated functions. Test launch for data_type (…
Browse files Browse the repository at this point in the history
…125 tests) and com (132 tests) with Modelsim 2020.1. All tests pass. Note that no tb nor the codec_2008 has been modified
  • Loading branch information
dalex78 committed Apr 28, 2022
1 parent b963424 commit 8b8c2db
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions vunit/vhdl/data_types/src/codec.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -776,4 +776,23 @@ package body codec_pkg is
return decode_raw_std_ulogic_array(code, code'length * basic_code_length);
end function;


--===========================================================================
-- Deprecated functions - Maintained for backward compatibility.
--===========================================================================

-- Deprecated. Maintained for backward compatibility.
function get_range(code : code_t) return range_t is
constant range_left : integer := decode_integer(code(code'left to code'left+code_length_integer-1));
constant range_right : integer := decode_integer(code(code'left+code_length_integer to code'left+code_length_integer*2-1));
constant is_ascending : boolean := decode_boolean(code(code'left+code_length_integer*2 to code'left+code_length_integer*2+code_length_boolean-1));
constant ret_val_ascending : range_t(range_left to range_right) := (others => '0');
constant ret_val_descending : range_t(range_left downto range_right) := (others => '0');
begin
assert False report
"This function ('get_range') is deprecated. Please use 'decode_range' from codec_pkg.vhd"
severity warning;
return decode_range(code);
end function;

end package body;

0 comments on commit 8b8c2db

Please sign in to comment.