//Slightly modified from the DE2 default design example // module VGA_Controller( // Host Side iCursor_RGB_EN, iCursor_X, iCursor_Y, iCursor_R, iCursor_G, iCursor_B, iRed, iGreen, iBlue, oAddress, oCoord_X, oCoord_Y, // VGA Side oVGA_R, oVGA_G, oVGA_B, oVGA_H_SYNC, oVGA_V_SYNC, oVGA_SYNC, oVGA_BLANK, oVGA_CLOCK, // Control Signal iCLK, iRST_N ); `include "VGA_Param.h" // Host Side output reg [19:0] oAddress; output reg [9:0] oCoord_X; output reg [9:0] oCoord_Y; input [3:0] iCursor_RGB_EN; input [9:0] iCursor_X; input [9:0] iCursor_Y; input [9:0] iCursor_R; input [9:0] iCursor_G; input [9:0] iCursor_B; input [9:0] iRed; input [9:0] iGreen; input [9:0] iBlue; // VGA Side output [9:0] oVGA_R; output [9:0] oVGA_G; output [9:0] oVGA_B; output reg oVGA_H_SYNC; output reg oVGA_V_SYNC; output oVGA_SYNC; output oVGA_BLANK; output oVGA_CLOCK; // Control Signal input iCLK; input iRST_N; // Internal Registers and Wires reg [9:0] H_Cont; reg [9:0] V_Cont; reg [9:0] Cur_Color_R; reg [9:0] Cur_Color_G; reg [9:0] Cur_Color_B; wire mCursor_EN; wire mRed_EN; wire mGreen_EN; wire mBlue_EN; assign oVGA_BLANK = oVGA_H_SYNC & oVGA_V_SYNC; assign oVGA_SYNC = 1'b0; assign oVGA_CLOCK = iCLK; assign mCursor_EN = iCursor_RGB_EN[3]; assign mRed_EN = iCursor_RGB_EN[2]; assign mGreen_EN = iCursor_RGB_EN[1]; assign mBlue_EN = iCursor_RGB_EN[0]; assign oVGA_R = ( H_Cont>=X_START+4 && H_Cont=Y_START && V_Cont=X_START+4 && H_Cont=Y_START && V_Cont=X_START+4 && H_Cont=Y_START && V_Cont=X_START && H_Cont=Y_START && V_Cont=X_START+8 && H_Cont=Y_START && V_Cont