FPGADesignElements icon indicating copy to clipboard operation
FPGADesignElements copied to clipboard

`clog` function should not be idempotent

Open soronpo opened this issue 1 year ago • 0 comments

The docs state: "Since this is an included file, it must be idempotent. (defined only once globally)" This is incorrect, since the function is included in the body of a module, whereas define CLOG2_FUNCTION is set globally. Every module that needs this function should have it included, and therefore ifndef should not be used.

BTW, it's amazing how many simulators get this wrong. Only Verilator actually got this right.

soronpo avatar Feb 06 '25 17:02 soronpo