Nanoprotect
Newbie level 4
Hi All
Using Lattice ispLEVER - ispMACH4256ZE.
Can anyone suggest why most of the registers are being pruned from the following code please?
See fitter errors at end of post:
Fitter Errors:
@W: CG532 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":19:1:19:7|Initial statement will only initialize memories through the usage of $readmemh and $readmemb. Everything else is ignored
@W: CL169 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register x[2:0]
@W: CL279 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register bits 14 to 8 of cnt[14:0]
@W: CL279 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register bits 5 to 0 of pwm_cnt[6:0]
Using Lattice ispLEVER - ispMACH4256ZE.
Can anyone suggest why most of the registers are being pruned from the following code please?
See fitter errors at end of post:
Code:
module PWM(pwm_out);
output reg pwm_out;
reg [14:0] cnt;
reg [6:0] pwm_val[7:0];
reg [2:0] x;
reg [6:0] pwm_cnt;
defparam I1.TIMER_DIV = "128";
OSCTIMER I1 (.DYNOSCDIS(1'b0), .TIMERRES(1'b0), .OSCOUT(osc_clk), .TIMEROUT(tmr_clk));
initial
begin
$readmemb("LED_LUT.txt", pwm_val);
end
always @(posedge tmr_clk)
begin
cnt <= cnt + 1;
if(!cnt)
x <= x + 1;
pwm_cnt <= cnt[7] ? ~cnt[6:0] : cnt[6:0];
pwm_out <= (pwm_cnt > pwm_val[x]) ? 0 : 1;
end
endmodule
@W: CG532 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":19:1:19:7|Initial statement will only initialize memories through the usage of $readmemh and $readmemb. Everything else is ignored
@W: CL169 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register x[2:0]
@W: CL279 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register bits 14 to 8 of cnt[14:0]
@W: CL279 :"C:\users\karl\documents\lattice\breathingleds\breathingleds.v":24:1:24:6|Pruning register bits 5 to 0 of pwm_cnt[6:0]
Last edited by a moderator: