1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-26 06:29:29 +00:00
8bitworkshop/presets/verilog/test_hvsync.v

28 lines
570 B
Coq
Raw Normal View History

`include "hvsync_generator.v"
module test_hvsync_top(clk, hsync, vsync, rgb);
input clk;
output hsync, vsync;
output [2:0] rgb;
wire inDisplayArea;
wire [8:0] CounterX;
wire [8:0] CounterY;
hvsync_generator hvsync_gen(
.clk(clk),
.hsync(hsync),
.vsync(vsync),
.inDisplayArea(inDisplayArea),
.CounterX(CounterX),
.CounterY(CounterY)
);
wire r = inDisplayArea &&
(((CounterX&7)==0) || ((CounterY&7)==0));
wire g = inDisplayArea && CounterY[4];
wire b = inDisplayArea && CounterX[4];
assign rgb = {b,g,r};
endmodule