Forum Discussion
Altera_Forum
Honored Contributor
14 years agobtw, what are you trying to compile this code in? You cannot compile this code in Quartus, which is probably why you're getting a range constraint violation, because Quartus wants to map integers to 32 bits, and you only asked for 1 bit. (As well as non of the textio stuff being appropriate).
The first line should work fine in Modelsim.