Functions in Lucid that accept constant values such as $pow() are typically replaced at syntesis time with constants.
This limitation leads to two unfortunate side effects.
First, Lucid modules with parameters are duplicated into unique modules without parameters at synthesis so that constants can be replaced in each one. This leads to bloat and potentially worse build performance as the Verilog tools must parse more code.
Second, these functions should be able to be used when the values are known and not just constant. This essentially means being able to use them with for loop variables.
The best fix for both of these is to create Verilog versions of the functions so that they can be properly translated instead of simply replaced.
Functions in Lucid that accept constant values such as
$pow()
are typically replaced at syntesis time with constants.This limitation leads to two unfortunate side effects.
First, Lucid modules with parameters are duplicated into unique modules without parameters at synthesis so that constants can be replaced in each one. This leads to bloat and potentially worse build performance as the Verilog tools must parse more code.
Second, these functions should be able to be used when the values are known and not just constant. This essentially means being able to use them with for loop variables.
The best fix for both of these is to create Verilog versions of the functions so that they can be properly translated instead of simply replaced.