mirror of
https://github.com/supleed2/ELEC70056-HSV-CW2.git
synced 2024-12-22 21:55:48 +00:00
add updated vga files
This commit is contained in:
parent
3c60629d48
commit
8ae5a07fca
|
@ -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)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue