O
OutputLogic
Guest
I've the following code:
localparam MY_PARAM = my_function(p1,p2...);
function [5:0] my_function;
...
Sometimes the function returns 7-bit value (a bug).
I'm running synthesis and simulation of that code with two commercial
synthesis tools and two simulators (remain unnamed),
and get three different results:
1. synthesis error
2. warning: size mismatch
3. nothing: synthesizes and simulates correctly, the result is
silently converted to 32-bit
Which one is correct, or it's a gray area in the Verilog spec.
Thanks,
Evgeni
localparam MY_PARAM = my_function(p1,p2...);
function [5:0] my_function;
...
Sometimes the function returns 7-bit value (a bug).
I'm running synthesis and simulation of that code with two commercial
synthesis tools and two simulators (remain unnamed),
and get three different results:
1. synthesis error
2. warning: size mismatch
3. nothing: synthesizes and simulates correctly, the result is
silently converted to 32-bit
Which one is correct, or it's a gray area in the Verilog spec.
Thanks,
Evgeni