|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- module timer (bus_e bus);
-
- integer counter = 0;
- integer reload_val;
-
-
- always @ (posedge bus.clk or bus.reset) begin
- if (!bus.reset) begin
- counter <= 0;
- bus.out_10s <= 0;
- end else begin
- if(counter <= 100) begin
- counter++;
- bus.out_10s <= 0;
- end else begin
- counter <= 0;
- bus.out_10s <= 1;
- end
- end
-
- end
-
- endmodule : timer
|