Permalink
Browse files

ledm.v: make prescaler count to zero, to avoid using comparator

  • Loading branch information...
1 parent 1ec6828 commit 41394c1381ea9cb667f78fa282c6b19b5a2f6ee8 @wpwrak wpwrak committed Jan 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 cores/ledm/rtl/ledm.v
View
@@ -100,10 +100,10 @@ always @(posedge sys_clk) begin: _
end
end
- if (pre_count < prescaler) begin
- pre_count <= pre_count+1'd1;
+ if (pre_count) begin
+ pre_count <= pre_count-1'd1;
end else begin
- pre_count <= 0;
+ pre_count <= prescaler;
if (pwm_count)
tick();
else

0 comments on commit 41394c1

Please sign in to comment.