From 491f582f22b24ab49dd01e598386108cf80b7cbb Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 1 May 2008 13:56:01 +0200 Subject: [PATCH 1/1] match bit order of vga output to bit order of Spartan 3ADSP kit --- galaxian/galaxian.ucf | 20 ++++++++++++-------- galaxian/src/mc_top.v | 28 +++++++++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/galaxian/galaxian.ucf b/galaxian/galaxian.ucf index 44165bb..04fc691 100644 --- a/galaxian/galaxian.ucf +++ b/galaxian/galaxian.ucf @@ -57,14 +57,18 @@ NET "O_SOUND_OUT_L" LOC = "AA22" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 8; NET "O_SOUND_OUT_R" LOC = "V19" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 8; #------------------------------------------- #--------- VIDEO I/F ----------------------- -NET "O_VGA_R<2>" LOC = "K20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<1>" LOC = "F25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<0>" LOC = "F24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<2>" LOC = "M18" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<1>" LOC = "J23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<0>" LOC = "J22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<1>" LOC = "G23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<0>" LOC = "G24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<0>" LOC = "L20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<1>" LOC = "K20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<2>" LOC = "F25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<3>" LOC = "F24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<0>" LOC = "M19" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<1>" LOC = "M18" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<2>" LOC = "J23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<3>" LOC = "J22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<0>" LOC = "L22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<1>" LOC = "K21" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<2>" LOC = "G23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<3>" LOC = "G24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; NET "O_VGA_H_SYNCn" LOC = "K26" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; NET "O_VGA_V_SYNCn" LOC = "K25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; diff --git a/galaxian/src/mc_top.v b/galaxian/src/mc_top.v index 853c7ed..f6bbac4 100644 --- a/galaxian/src/mc_top.v +++ b/galaxian/src/mc_top.v @@ -95,9 +95,9 @@ output O_SOUND_OUT_L; output O_SOUND_OUT_R; // VGA (VIDEO) IF -output [2:0]O_VGA_R; -output [2:0]O_VGA_G; -output [1:0]O_VGA_B; +output [3:0]O_VGA_R; +output [3:0]O_VGA_G; +output [3:0]O_VGA_B; output O_VGA_H_SYNCn; output O_VGA_V_SYNCn; @@ -622,6 +622,10 @@ mc_vedio_mix MIX( ); +wire [2:0]W_VGA_R; +wire [2:0]W_VGA_G; +wire [1:0]W_VGA_B; + `ifdef VGA_USE mc_vga_if VGA( @@ -634,9 +638,9 @@ mc_vga_if VGA( .I_H_SYNC(W_H_SYNC), .I_V_SYNC(W_V_SYNC), // output -.O_R(O_VGA_R), -.O_G(O_VGA_G), -.O_B(O_VGA_B), +.O_R(W_VGA_R), +.O_G(W_VGA_G), +.O_B(W_VGA_B), .O_H_SYNCn(O_VGA_H_SYNCn), .O_V_SYNCn(O_VGA_V_SYNCn) @@ -644,11 +648,11 @@ mc_vga_if VGA( `else -assign O_VGA_R[2:0] = W_R; +assign W_VGA_R[2:0] = W_R; -assign O_VGA_G[2:0] = W_G; +assign W_VGA_G[2:0] = W_G; -assign O_VGA_B[1:0] = W_B; +assign W_VGA_B[1:0] = W_B; //assign O_VGA_H_SYNCn = W_H_SYNC | W_V_SYNC ; // AKIDUKI LCD USED assign O_VGA_H_SYNCn = ~W_H_SYNC ; @@ -656,6 +660,12 @@ assign O_VGA_V_SYNCn = ~W_V_SYNC ; `endif +assign O_VGA_R[3:1] = {W_VGA_R[0], W_VGA_R[1], W_VGA_R[2]}; + +assign O_VGA_G[3:1] = {W_VGA_G[0], W_VGA_G[1], W_VGA_G[2]}; + +assign O_VGA_B[3:2] = {W_VGA_G[0], W_VGA_G[1]}; + wire [7:0]W_SDAT_A; mc_sound_a MC_SOUND_A( -- 2.39.5