Forum Discussion
Altera_Forum
Honored Contributor
14 years ago@kaz
--- Quote Start --- Your test entity has only generic and your msb/lsb are undriven internal signals and this is not standard code. --- Quote End --- I disagree :) - msb and lsb signals are driven since they are mapped to 'out' ports of an instanciated component. - Entities without ports but only generics are pretty common for testbenches, there is nothing exotic here... @Tricky --- Quote Start --- Quote: @kaz This does not change anything... yes it does, because generics are not static. --- Quote End --- Sorry I was not clear. I meant I tried and I get the same error :) @Tricky --- Quote Start --- Almost, but not quite. A constant is a known value when you compile the code. A generic may not have a default value when you compile the code, so it is only fixed when you isntantiate the entity, so therefore it is not static, and hence the error when you compile the code. --- Quote End --- I see: functionally, I (designer) know that it must work (because of the way I caculate indexes and the range I authorized for the generic) but the compiler itself can not do this kind of thinking. So it can not perform sanity check on the way I slice the port among several signals at compilation time since it does not know the values that the generic has... That's why I get the error.