how to write a conditional assignment over generic or consta

S

sm.soimu@gmail.com

Guest
Hello,

I would like to write in VHDL an equivalent code for:

parameter INSTANCE = 1;
parameter DATA_WIDTH = (INSTANCE == 1) ? 8 : 16;

The equivalent for parameter statement should be generic or constant,
but I see no way to write the equivalent VHDL code for the above
VERILOG code.

Can anyone suggest any way to write it?

Thank you in advance!

Regards,
Sorin SOIMU
 
sm.soimu@gmail.com wrote:

parameter INSTANCE = 1;
parameter DATA_WIDTH = (INSTANCE == 1) ? 8 : 16;
Can anyone suggest any way to write it?
Write your own function.
http://groups.google.com/groups/search?q=vhdl+write+function+big_int

-- Mike Treseler
 

Welcome to EDABoard.com

Sponsor

Back
Top