mirror of
https://github.com/UzixLS/TSConf_MiST.git
synced 2025-07-19 07:11:22 +03:00
rtc: fix time counting when there is no usb-rtc
This commit is contained in:
11
rtl/tsconf.v
11
rtl/tsconf.v
@ -956,10 +956,13 @@ module tsconf
|
|||||||
|
|
||||||
// MC146818A RTC
|
// MC146818A RTC
|
||||||
reg ena_0_4375mhz;
|
reg ena_0_4375mhz;
|
||||||
always @(posedge fclk) begin
|
always @(posedge clk) begin
|
||||||
reg [5:0] div;
|
reg [7:0] div;
|
||||||
div <= div + 1'd1;
|
if (div == 191)
|
||||||
ena_0_4375mhz <= !div; //28MHz/64
|
div <= 0;
|
||||||
|
else
|
||||||
|
div <= div + 1'd1;
|
||||||
|
ena_0_4375mhz <= !div;
|
||||||
end
|
end
|
||||||
|
|
||||||
mc146818a mc146818a
|
mc146818a mc146818a
|
||||||
|
Reference in New Issue
Block a user