Framework Update 1/27/24

Updated framework and tested.
COCO3_Comp spreadsheet added.
This commit is contained in:
shodge12 committed 2024-01-27 01:10:55 -05:00
1 parent 9fe94bc5e7
commit 49428a29a7
7 files changed
+1873 -58

No files matched your search

+47 -36
View File
@@ -124,12 +124,6 @@ module sys_top
inout [6:0] USER_IO
);
`ifdef MISTER_DUAL_SDRAM
`ifndef MISTER_DISABLE_YC
`define MISTER_DISABLE_YC
`endif
`endif
////////////////////// Secondary SD ///////////////////////////////////
wire SD_CS, SD_CLK, SD_MOSI;
@@ -1020,13 +1014,11 @@ reg [5:0] adj_address;
reg [31:0] adj_data;
`ifndef MISTER_DEBUG_NOHDMI
pll_cfg pll_cfg
pll_cfg_hdmi pll_cfg_hdmi
(
.mgmt_clk(FPGA_CLK1_50),
.mgmt_reset(reset_req),
.mgmt_waitrequest(cfg_waitrequest),
.mgmt_read(0),
.mgmt_readdata(),
.mgmt_write(cfg_write),
.mgmt_address(cfg_address),
.mgmt_writedata(cfg_data),
@@ -1191,11 +1183,12 @@ always @(posedge clk_vid) begin
end
dv_de1 <= !{hss,dv_hs_osd} && vde;
dv_hs1 <= csync_en ? dv_cs_osd : dv_hs_osd;
dv_vs1 <= dv_vs_osd;
end
dv_d1 <= dv_data_osd;
dv_hs1 <= csync_en ? dv_cs_osd : dv_hs_osd;
dv_vs1 <= dv_vs_osd;
dv_d2 <= dv_d1;
dv_de2 <= dv_de1;
dv_hs2 <= dv_hs1;
@@ -1330,6 +1323,33 @@ osd vga_osd
wire vga_cs_osd;
csync csync_vga(clk_vid, vga_hs_osd, vga_vs_osd, vga_cs_osd);
`ifndef MISTER_DISABLE_YC
reg pal_en;
reg yc_en;
reg cvbs;
reg [16:0] ColorBurst_Range;
reg [39:0] PhaseInc;
wire [23:0] yc_o;
wire yc_hs, yc_vs, yc_cs;
yc_out yc_out
(
.clk(clk_vid),
.PAL_EN(pal_en),
.CVBS(cvbs),
.PHASE_INC(PhaseInc),
.COLORBURST_RANGE(ColorBurst_Range),
.hsync(vga_hs_osd),
.vsync(vga_vs_osd),
.csync(vga_cs_osd),
.dout(yc_o),
.din(vga_data_osd),
.hsync_o(yc_hs),
.vsync_o(yc_vs),
.csync_o(yc_cs)
);
`endif
`ifndef MISTER_DUAL_SDRAM
wire VGA_DISABLE;
wire [23:0] vgas_o;
@@ -1365,31 +1385,6 @@ csync csync_vga(clk_vid, vga_hs_osd, vga_vs_osd, vga_cs_osd);
);
`ifndef MISTER_DISABLE_YC
reg pal_en;
reg yc_en;
reg cvbs;
reg [16:0] ColorBurst_Range;
reg [39:0] PhaseInc;
wire [23:0] yc_o;
wire yc_hs, yc_vs, yc_cs;
yc_out yc_out
(
.clk(clk_vid),
.PAL_EN(pal_en),
.CVBS(cvbs),
.PHASE_INC(PhaseInc),
.COLORBURST_RANGE(ColorBurst_Range),
.hsync(vga_hs_osd),
.vsync(vga_vs_osd),
.csync(vga_cs_osd),
.dout(yc_o),
.din(vga_data_osd),
.hsync_o(yc_hs),
.vsync_o(yc_vs),
.csync_o(yc_cs)
);
assign {vga_o, vga_hs, vga_vs, vga_cs } = ~yc_en ? {vga_o_t, vga_hs_t, vga_vs_t, vga_cs_t } : {yc_o, yc_hs, yc_vs, yc_cs };
`else
assign {vga_o, vga_hs, vga_vs, vga_cs } = {vga_o_t, vga_hs_t, vga_vs_t, vga_cs_t } ;
@@ -1770,6 +1765,21 @@ module sync_fix
assign sync_out = sync_in ^ pol;
reg pol;
always @(posedge clk) begin
reg [31:0] cnt;
reg s1,s2;
s1 <= sync_in;
s2 <= s1;
cnt <= s2 ? (cnt - 1) : (cnt + 1);
if(~s2 & s1) begin
cnt <= 0;
pol <= cnt[31];
end
end
/*
always @(posedge clk) begin
integer pos = 0, neg = 0, cnt = 0;
reg s1,s2;
@@ -1785,6 +1795,7 @@ always @(posedge clk) begin
pol <= pos > neg;
end
*/
endmodule