Forum Discussion
Altera_Forum
Honored Contributor
14 years agoAdding and resizing in one step
Hi, Is there a way to add two unsigned numbers and extract only the x most significant bits from it in one step? I want something like this: sum <= resize(number1 + number2,4) In...
Altera_Forum
Honored Contributor
14 years agoI see, that the construct (slice of a type conversion function) is supported in Quartus 12, with or without VHDL 2008 activation.
In Quartus V9.0, the expression is accepted without throwing an error, but doesn't assign a value to the LHS. A slice of a regular function call works in Quartus 9. I don't think that the slice of a type conversion function is a VHDL 2008 feature. It's something that you can read into the general properties of a "globally static primary", although I never found it mentioned in literature. Thanks for suggesting the interesting construct.