Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI guess I have never tried to do more than a width-1 in a generic before. I would probably add a generic which is IN_DATA_WIDTH, then replace the port with to IN_DATA_WIDTH-1. Then in the code of the file maybe check to make sure IN_DATA_WIDTH = 2**channelwidth/chancount, and assert an error if it is not. That way you have a check to make sure everything is correct. I don't know if this is the best way to do it but it would most likely solve your current problem. Just my .02