O
Olaf Petzold
Guest
Hi,
I've read the FAQ 4.2.21 "How to Convert Between Enumeration and
Integer Values". Anyway, I have questions to these function:
function slv2pec (
signal id : std_logic_vector(2 downto 0))
-- signal id : std_logic_vector(natural range <>)
return pattern_edge_comb_t is
begin
-- Error: No feasible entries for infix operator "<".
-- assert (pattern_edge_comb_t'high < 4) -- Line 89
-- report "Conversation error (wrong assumptions)." severity
error;
return pattern_edge_comb_t'val(to_integer(unsigned(id))); --L91
end function slv2pec;
with:
type pattern_edge_comb_t is (
unknown,
and_comb,
or_comb,
xor_comb);
I would like write the signal is unconstrained, but I get a syntax
error on this. Would be very usefull.
Furthermore the assert is recommanded by me ;-)
** Error: (89): No feasible entries for infix operator "<".
** Error: (89): Type error resolving infix expression "<".
Last, I get the synthesis error:
line 91: Attribute is not authorized : 'val'.
How can I resolve this problems?
Thanks and Regards,
Olaf
I've read the FAQ 4.2.21 "How to Convert Between Enumeration and
Integer Values". Anyway, I have questions to these function:
function slv2pec (
signal id : std_logic_vector(2 downto 0))
-- signal id : std_logic_vector(natural range <>)
return pattern_edge_comb_t is
begin
-- Error: No feasible entries for infix operator "<".
-- assert (pattern_edge_comb_t'high < 4) -- Line 89
-- report "Conversation error (wrong assumptions)." severity
error;
return pattern_edge_comb_t'val(to_integer(unsigned(id))); --L91
end function slv2pec;
with:
type pattern_edge_comb_t is (
unknown,
and_comb,
or_comb,
xor_comb);
I would like write the signal is unconstrained, but I get a syntax
error on this. Would be very usefull.
Furthermore the assert is recommanded by me ;-)
** Error: (89): No feasible entries for infix operator "<".
** Error: (89): Type error resolving infix expression "<".
Last, I get the synthesis error:
line 91: Attribute is not authorized : 'val'.
How can I resolve this problems?
Thanks and Regards,
Olaf