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