diff --git a/vgacount.sv b/vgacount.sv index 3028b3c..a60a069 100644 --- a/vgacount.sv +++ b/vgacount.sv @@ -54,12 +54,14 @@ always_comb begin nSync <= 1'b1; end + // VGA active video range if(count >= ACTBEGIN && count < ACTEND) begin activeVid <= 1'b0; end else begin activeVid <= 1'b1; end + // SE active video window within VGA active video range if(count >= SEACTBEGIN) begin activeSE <= 1'b0; end else begin diff --git a/vgagen.sv b/vgagen.sv index 86bb490..06d2b08 100644 --- a/vgagen.sv +++ b/vgagen.sv @@ -28,6 +28,23 @@ module vgagen ( vgacount #(800,592,688,576,736,512) hoz(nReset,pixClk,hCount,nhSync,hActive,hSEActive); vgacount #(525,421,423,411,456,342) ver(nReset,nhSync,vCount,nvSync,vActive,vSEActive); +/* +module vgacount ( + input wire nReset, // system reset signal + input wire clock, // counter increment clock + output logic [9:0] count, // count output + output wire nSync, // sync pulse + output wire activeVid, // active video signal + output wire activeSE // secondary active video signal (SE) +); +parameter COUNTMAX=800, + SYNCBEGIN=592, + SYNCEND=688, + ACTBEGIN=576, + ACTEND=736, + SEACTBEGIN=512; +*/ + endmodule `endif \ No newline at end of file diff --git a/vgaout.sv b/vgaout.sv index d0decb8..2378887 100644 --- a/vgaout.sv +++ b/vgaout.sv @@ -39,14 +39,14 @@ always_comb begin // combined video active signal if(hSEActive == 1'b1 && vSEActive == 1'b1) begin vidActive <= 1'b1; - end else if(hCount == 799 && vCount == 524) begin + /*end else if(hCount == 799 && vCount == 524) begin // this is the exception to ensure the first byte of video is loaded // just before the new frame starts vidActive <= 1'b1; end else if(vSEActive == 1'b1 && hCount == 10'd799) begin // this is the exception to ensure the first byte of video is loaded // just before a new line starts - vidActive <= 1'b1; + vidActive <= 1'b1;*/ end else begin vidActive <= 1'b0; end