mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 17:31:40 +02:00
use repeats for converted unbased-unsized literals
- reduces the number of cast functions which are generated - adjust package_function_cast to preserve cast converage - fix issue where cast functions would be generated before localparam substitution within a procedure
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package P;
|
||||
function automatic logic [7:0] f(input logic [2:0] p);
|
||||
logic [7:0] r;
|
||||
r = '0;
|
||||
r[p+:2] = '1;
|
||||
localparam T = $bits(r[7:0]);
|
||||
r = T'(1'sb0);
|
||||
r[p+:2] = $bits(r[p+:2])'(1'sb1);
|
||||
return r;
|
||||
endfunction
|
||||
endpackage
|
||||
|
||||
Reference in New Issue
Block a user