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

30 lines
512 B
Coq
Raw Normal View History

`include "hvsync_generator.v"
2018-02-03 20:20:56 +00:00
module test_hvsync_top(
input clk,
output hsync,
output vsync,
output [2:0] rgb
);
wire display_on;
wire [8:0] hpos;
wire [8:0] vpos;
hvsync_generator hvsync_gen(
.clk(clk),
.reset(0),
.hsync(hsync),
.vsync(vsync),
.display_on(display_on),
.hpos(hpos),
.vpos(vpos)
);
wire r = display_on && (((hpos&7)==0) || ((vpos&7)==0));
wire g = display_on && vpos[4];
wire b = display_on && hpos[4];
assign rgb = {b,g,r};
endmodule