Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- constant generics are accepted by quartus and modelsim. If you get error then you got something else wrong. Your msb/lsb yes are driven by output s (possibly so from inside your component that has no inputs and it could be generating output only...??) however your msb/lsb is driving nothing and your top entity is not valid without ports. --- Quote End --- It is perfectly valid as a testbench (as this code would be) so you wouldnt compile it in quartus. There is not such thing as a constant generic. Generics are only constant at instantiation. You can still override top level generics from the command line of modelsim when you run something like: vsim -Gwidth=10 so the generic is not set until you actually run vsim. This is why the generic is not static or constant and hence why you get the error that the OP had. slices in port maps MUST be static.