`include "vga_sync.v"
`include "vga_textgrid22x.v"
module vga_text
(
input reset,
input clk,
output wire [2:0] rgb,
output wire vga_hs,
output wire vga_vs,
output wire pix_clk,
output wire blank,
output wire cclk2,
output wire [5:0] cx2,
output wire [5:0] cy2,
input wire [7:0] char
);
// 640x480 VGA display
wire [2:0] pixel;
wire [9:0] hcount, vcount;
assign rgb = pixel;
vga_sync vga1(clk,vga_hs,vga_vs,hcount,vcount,pix_clk,blank);
// vga text grid
wire [2:0] vtpix;
wire [5:0] cx, cy;
wire cclk;
wire [10:0] charrgb; // {rgb,char} where rgb=3 bits, char=8 bits
// wire [5:0] cx2, cy2;
// wire cclk2;
wire [10:0] charrgb2;
vga_textgrid22x vt(clk, pix_clk, hcount, vcount, vtpix,
cx, cy, cclk, charrgb,
cx2, cy2, cclk2, charrgb2);
assign charrgb = 11'b0;
assign charrgb2 = {3'b111, char};
// cumulative video pixel
wire fpixel = (hcount==0 | hcount==639 | vcount==0 | vcount==479);
wire [2:0] cumpix = ( {3{fpixel}} | vtpix );
assign pixel = cumpix & ~{3{blank}};
endmodule // vga_text
This page: |
Created: | Sun Dec 11 09:59:58 2005 |
|
From: |
./vga_text.v |