Forum Discussion
Altera_Forum
Honored Contributor
9 years agoThank you for your answer,
--- Quote Start --- 1. This is a mix up between two things. You have a mix of subtype syntax and type syntax. subtype rang0to15 is natural range 0 to 15; -- no () needed --- Quote End --- Yes you are right. --- Quote Start --- 2. And I don't know what the Table_Nbres type is. You also cannot declare a range as a type. --- Quote End --- The type of Table_Nbres is: type tBCD7Seg is array (0 to 15) of std_logic_vector(7 downto 0); The type of Q7Seg is : (Declared in entity) Q7Seg: out std_logic_vector(7 downto 0) The type of iCntBCD is: This var contains the position in the table Table_Nbres. signal iCntBCD: natural (3 downto 0); Now; Q7Seg <= Table_Nbres((0 to 15)iCntBCD); (0 to 15) is a cast for iCntBCD IS IT RIGHT to declar the cast like this? OR WHAT IS WRONG? Thanks for your reply.