end
"LEVEL": begin
+ always @(posedge CLK or RST) begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+
+ if(RST)
+ count <= 0;
+ end
end
default: begin
count <= COUNT_TO;
//Resets
- if(RST) begin
+ if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
end
"LEVEL": begin
+ always @(posedge CLK or RST) begin
+
+ //Main counter
+ if(KEEP) begin
+ end
+ else if(UP)
+ count <= count + 1'd1;
+ else
+ count <= count - 1'd1;
+
+ //Wrapping
+ if(count == 0 && !UP)
+ count <= COUNT_TO;
+ if(count == 14'h3fff && UP)
+ count <= COUNT_TO;
+
+ //Resets
+ if(RST) begin
+ if(RESET_VALUE == "ZERO")
+ count <= 0;
+ else
+ count <= COUNT_TO;
+ end
+
+ end
end
default: begin
count <= COUNT_TO;
//Resets
- if(RST) begin
+ if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
end
"LEVEL": begin
+ always @(posedge CLK or RST) begin
+
+ //Main counter
+ if(KEEP) begin
+ end
+ else if(UP)
+ count <= count + 1'd1;
+ else
+ count <= count - 1'd1;
+
+ //Wrapping
+ if(count == 0 && !UP)
+ count <= COUNT_TO;
+ if(count == 8'hff && UP)
+ count <= COUNT_TO;
+
+ //Resets
+ if(RST) begin
+ if(RESET_VALUE == "ZERO")
+ count <= 0;
+ else
+ count <= COUNT_TO;
+ end
+
+ end
end
default: begin
end
"LEVEL": begin
+ always @(posedge CLK or RST) begin
+ count <= count - 1'd1;
+ if(count == 0)
+ count <= COUNT_TO;
+
+ if(RST)
+ count <= 0;
+ end
end
default: begin