Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- The line
localparam integer COUNT = CLK_FREQ*BLINK_PERIOD;
Is a conversion from real to integer ... isn't that what you want? Cheers, Dave --- Quote End --- Hey, I missed that. Let me try and I'll report. Thanks! --- EDIT --- Yes, it seems to be working reliably. At least the floating point numbers that I tried and can't be represented exactly as integers are converted precisely to the cast-respective integer value. With this I can also emulate ceils and floors. Both parameter and localparam work. Thanks again! Best.