In my generic linked list/scoreboard, pop when the list is empty is an assert failure.
OTOH, if you are looking to return type'left, why not just declare a local variable:
impure function pop return data_t is
variable result : data_t ; -- defaults to left most value of type
begin
if not empty then
result := top.value ; -- get
-- remove top cell from list
return result ;
else
report "FIFO_PKG: POP called when list empty" severity failure ;
return result ; -- type'left by default
end if ;
end function pop ;
I have the following already on the VHDL-201X list. Do you have any more?
Cannot have arrays of protected types.
Cannot have function/procedure arguments that are access types
(or records that contain access types) in protected type member functions.
Drop me a line as I have a package that you may like.