Getting ready for a large refactor

This commit is contained in:
techav 2021-04-18 12:50:43 -05:00
parent c4bc1c4be5
commit 995be6b5dc
3 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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