"RISING": begin
always @(posedge CLK, posedge RST) begin
- count <= count - 1'd1;
- if(count == 0)
- count <= COUNT_TO;
-
if(RST)
- count <= 0;
+ count <= 0;
+ else begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+ end
end
end
"FALLING": begin
always @(posedge CLK, negedge RST) begin
- count <= count - 1'd1;
- if(count == 0)
- count <= COUNT_TO;
-
if(!RST)
- count <= 0;
+ count <= 0;
+ else begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+ end
end
end
"LEVEL": begin
always @(posedge CLK, posedge RST) begin
if(RST)
- count <= 0;
+ count <= 0;
else begin
count <= count - 1'd1;
"RISING": begin
always @(posedge CLK, posedge RST) begin
- count <= count - 1'd1;
- if(count == 0)
- count <= COUNT_TO;
-
if(RST)
count <= 0;
+ else begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+ end
end
end
"FALLING": begin
always @(posedge CLK, negedge RST) begin
- count <= count - 1'd1;
- if(count == 0)
- count <= COUNT_TO;
-
if(!RST)
count <= 0;
+ else begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+ end
end
end