You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Verilog can be compiled in a way that ignores the parameters as compile-time constructs. That makes testing generic components harder as I cannot just parametrize test to test edge cases for IP block.
It would be nice if verilog could compile code to templated class:
module(clk, out);
parameter WIDTH = 32;
parameter MAX = 64;
input bit clk;
output bit [WIDTH-1:0] out;
initial out = 0;
always_ff @(posedge clk) begin
out <= (out == MAX - 1) ? 0 : out + 1;
end
endmodule
Author Name: Maciej Piechotka
Original Redmine Issue: 1189 from https://www.veripool.org
Currently the Verilog can be compiled in a way that ignores the parameters as compile-time constructs. That makes testing generic components harder as I cannot just parametrize test to test edge cases for IP block.
It would be nice if verilog could compile code to templated class:
Would compile to:
(This is an example - using functions would require using C++ constexpr functions or something similar)
The text was updated successfully, but these errors were encountered: