admin管理员组文章数量:1303327
Consider these types
type pipi is array (natural range <>) of bit;
type papa is array (natural range <>) of pipi;
This constant declaration is allowed and the index constraint on (each?) pipi is inferred from the required default expression. The type of the inner expressions are also inferred. So, I am assuming that foo has type papa(0 to 1) and each element thereof has type pipi(0 to 1)
constant foo : papa := (0 => ('1', '1'), 1 => ('1', '1'))
This declaration is not allowed. In this case (each??) pipi has a different inferred index constraint.
constant foo : papa := (0 => ('1', '1'), 1 => ('1'))
If it really is the case that foo(0) have type pipi(0 to 1) and foo(1) have type pipi(0 to 0), then are they both subtypes of pipi? If yes, why are they not legal elements of papa? My only theory is that there is no each pipi and only one subtype exists for the elements of papa, whose index constraint clearly cannot be inferred.
本文标签:
版权声明:本文标题:vhdl - Why is an array whose elements are arrays with non-identical ranges not allowed, even if all indices and values are const 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741684608a2392370.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论