vt52-fpga
1.0.0 Initial
vt52-fpga is a serial terminal implemented on a FPGA
cursor_blinker.v
Go to the documentation of this file.
1
/**
2
* Cursor blinker (uses vblank as tick, blinks about once a second)
3
*/
4
module
cursor_blinker
5
(input clk,
6
input reset,
7
input tick,
8
input reset_count,
9
output wire blink_on
10
);
11
localparam BITS = 6;
12
reg has_incremented;
13
reg [BITS-1:0] counter;
14
always
@(posedge clk) begin
15
if
(reset) begin
16
counter <= 0;
17
has_incremented <= 0;
18
end
19
else
if
(reset_count) begin
20
counter <= 0;
21
has_incremented <= tick;
22
end
23
else
if
(tick && !has_incremented) begin
24
counter <= counter + 1;
25
has_incremented <= 1;
26
end
27
else
if
(!tick && has_incremented) begin
28
has_incremented <= 0;
29
end
30
end
31
assign blink_on = ~counter[BITS-1];
32
endmodule
cursor_blinker
module cursor_blinker(input clk, input reset, input tick, input reset_count, output wire blink_on)
Cursor blinker (uses vblank as tick, blinks about once a second)
Definition:
cursor_blinker.v:5
always
always(posedge clk)
Definition:
uart_rx.v:86
cursor_blinker.v
Generated on Fri Jan 27 2023 16:39:56 for vt52-fpga by
1.9.1