I tried to convert multiple bits to single bit using type casting method, but lint checker (LEDA) is not allowing [0:0] and points it as error. Does [0:0] means an array still?
Code used:
module xyz(
input x,
input rst,
input din,
output reg dout
);
logic [1:0] i_clk;
logic [0:0] clk;
assign i_clk = logic'(x );
assign clk = logic'(i_clk);
always_ff @(posedge clk) begin
if (rst)
dout <= '0;
else
dout <= din;
end
endmodule
LEDA Design checker command line:
leda -top xyz filename.v -config leda_config.tcl +v2k -sverilog
leda_config.tcl:
rule_deselect -all rule_select -rule W450
Error looks like:
Multi-bit expression (e.g., a[2:0]) used as clock