There is a new procedure merge() to merge the content of 2 diicts into
a third one. This procedure is defined outside of the t_dict protected
type.
Also a new get() function returning the data as std_logic_vector.
is added. It is needed to save the data in a unconstrained access type
which is used inside the merge() procedure. This get() function is
public. It can be used when no error return value is needed as you
get with the get() procedure. Instead an assertion is triggered when
the given key isn't found.
Three new methods to support iteration over the keys stored in the
dictionary:
* setFirst: set start of iterator to begin og dictionary
* setLast: set start of iterator to end of dictionary
* iter(dir): iterate over keys in dictionary in dir direction
The key pointer type t_dict_key_ptr is now moved to the public part
of the DictP package to support using in testbench code when saving the
keys with different lengths from iter() function.
Error return values are now of type t_dict_error with 3 possible values:
(NO_ERROR, KEY_INVALID, KEY_NOT_FOUND)
In procedure was a bug regarding the test of the position of the
founded key/value pair. Because of this bug, a segmentation fault
happened when deallocationg the key/value pair. This is fixed now by
checking both neighbor entries for null
A new packae DictP.vhd is added which contains a simple implementation
of a dictionary type. It consists of a protected type t_dict which
contains procedures & functions which serve as methods to interact with
the protected type. The t_dict type is realised by a (double)
linked-list using access types.
The key type is string of arbitrary size, the data type is
std_logic_vector of arbitrary size. The t_dict type provides following
interface methods:
* set: set a key/value pair
* get: get a key/value pair
* del: remove a key/value pair
* init: initialise the dictionary
* clear: remove all key/value pairs
* hasKey: check if a key exists in the dictionary
* size: get number of key/value pairs