add updated vga files

This commit is contained in:
Alden0012 2022-12-16 22:11:31 +00:00
parent 3c60629d48
commit 8ae5a07fca
2 changed files with 57 additions and 54 deletions

View file

@ -36,6 +36,7 @@
module VGAInterface(
input CLK,
input resetn,
input [7:0] COLOUR_IN,
output reg [7:0] cout,
output reg hs,
@ -61,12 +62,14 @@ wire TrigHOut, TrigDiv;
wire [9:0] HorzCount;
wire [9:0] VertCount;
wire reset = ~resetn;
//Divide the clock frequency
GenericCounter #(.COUNTER_WIDTH(1), .COUNTER_MAX(1))
FreqDivider
(
.CLK(CLK),
.RESET(1'b0),
.RESET(reset),
.ENABLE_IN(1'b1),
.TRIG_OUT(TrigDiv)
);
@ -76,7 +79,7 @@ GenericCounter #(.COUNTER_WIDTH(10), .COUNTER_MAX(HorzTimeToFrontPorchEnd))
HorzAddrCounter
(
.CLK(CLK),
.RESET(1'b0),
.RESET(reset),
.ENABLE_IN(TrigDiv),
.TRIG_OUT(TrigHOut),
.COUNT(HorzCount)
@ -87,7 +90,7 @@ GenericCounter #(.COUNTER_WIDTH(10), .COUNTER_MAX(VertTimeToFrontPorchEnd))
VertAddrCounter
(
.CLK(CLK),
.RESET(1'b0),
.RESET(reset),
.ENABLE_IN(TrigHOut),
.COUNT(VertCount)
);