Browse Source

fix error

pull/1/head
wonderfullook 2 years ago
parent
commit
d7827efb83
  1. 1166
      rgb_lcd/lcd_800_400/color_bar/Tang_Nano_20K_LCD.fs
  2. 13
      rgb_lcd/lcd_800_400/color_bar/Tang_nano_20K_LCD.gprj.user
  3. 2
      rgb_lcd/lcd_800_400/color_bar/impl/project_process_config.json
  4. 2
      rgb_lcd/lcd_800_400/color_bar/src/TOP.v
  5. 45
      rgb_lcd/lcd_800_400/color_bar/src/VGAMod.v

1166
rgb_lcd/lcd_800_400/color_bar/Tang_Nano_20K_LCD.fs

File diff suppressed because it is too large Load Diff

13
rgb_lcd/lcd_800_400/color_bar/Tang_nano_20K_LCD.gprj.user

@ -0,0 +1,13 @@
<?xml version="1" encoding="UTF-8"?>
<!DOCTYPE ProjectUserData>
<UserConfig>
<Version>1.0</Version>
<FlowState>
<Process ID="Synthesis" State="0"/>
<Process ID="Pnr" State="0"/>
<Process ID="Gao" State="0"/>
<Process ID="Rtl_Gao" State="0"/>
</FlowState>
<ResultFileList/>
<Ui>000000ff00000001fd00000002000000000000025b0000031efc0200000001fc0000004c0000031e0000000000fffffffaffffffff0200000003fb00000030004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00440065007300690067006e0100000000ffffffff0000000000000000fb00000032004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00500072006f00630065007300730100000000ffffffff0000000000000000fb00000036004600700067006100500072006f006a006500630074002e00500061006e0065006c002e0048006900650072006100720063006800790100000000ffffffff0000000000000000000000030000072000000181fc0100000001fc00000000000007200000000000fffffffaffffffff0100000002fb00000032004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00470065006e006500720061006c0100000000ffffffff0000000000000000fb0000002e004600700067006100500072006f006a006500630074002e00500061006e0065006c002e004900730073007500650100000000ffffffff0000000000000000000004bf0000031e00000004000000040000000800000008fc000000010000000200000003000000220043006f00720065002e0054006f006f006c006200610072002e00460069006c00650100000000ffffffff0000000000000000000000220043006f00720065002e0054006f006f006c006200610072002e004500640069007401000000a0ffffffff0000000000000000000000240043006f00720065002e0054006f006f006c006200610072002e0054006f006f006c00730100000164ffffffff0000000000000000</Ui>
</UserConfig>

2
rgb_lcd/lcd_800_400/color_bar/impl/project_process_config.json

@ -21,6 +21,7 @@
"Generate_Post_PNR_Simulation_Model_File" : false, "Generate_Post_PNR_Simulation_Model_File" : false,
"Generate_Post_Place_File" : false, "Generate_Post_Place_File" : false,
"Generate_SDF_File" : false, "Generate_SDF_File" : false,
"Generate_VHDL_Post_PNR_Simulation_Model_File" : false,
"GwSyn_Loop_Limit" : 2000, "GwSyn_Loop_Limit" : 2000,
"HOTBOOT" : false, "HOTBOOT" : false,
"I2C" : false, "I2C" : false,
@ -66,6 +67,7 @@
"Show_All_Warnings" : false, "Show_All_Warnings" : false,
"Synthesis On/Off Implemented as Translate On/Off" : false, "Synthesis On/Off Implemented as Translate On/Off" : false,
"Synthesize_tool" : "GowinSyn", "Synthesize_tool" : "GowinSyn",
"TclPre" : "",
"TopModule" : "TOP", "TopModule" : "TOP",
"USERCODE" : "default", "USERCODE" : "default",
"Unused_Pin" : "As_input_tri_stated_with_pull_up", "Unused_Pin" : "As_input_tri_stated_with_pull_up",

2
rgb_lcd/lcd_800_400/color_bar/src/TOP.v

@ -19,7 +19,7 @@ Gowin_rPLL chip_pll
VGAMod VGAMod_inst VGAMod VGAMod_inst
( (
.nRST ( Reset_Button), .nRST ( !Reset_Button),
.PixelClk ( CLK_PIX ), .PixelClk ( CLK_PIX ),
.LCD_DE ( LCD_DEN ), .LCD_DE ( LCD_DEN ),

45
rgb_lcd/lcd_800_400/color_bar/src/VGAMod.v

@ -27,9 +27,10 @@ module VGAMod
localparam H_FrontPorch= 16'd210; localparam H_FrontPorch= 16'd210;
localparam Width_bar = 45;
reg [15:0] BarCount;
parameter BarCount = 16; // RGB565
localparam Width_bar = WidthPixel / 16;
localparam PixelForHS = WidthPixel + H_BackPorch + H_FrontPorch; localparam PixelForHS = WidthPixel + H_BackPorch + H_FrontPorch;
@ -63,26 +64,24 @@ module VGAMod
( LineCount >= V_BackPorch ) && ( LineCount >= V_BackPorch ) &&
( LineCount <= LineForVS-V_FrontPorch-1 ))&& PixelClk ? 1'b1 : 1'b0; ( LineCount <= LineForVS-V_FrontPorch-1 ))&& PixelClk ? 1'b1 : 1'b0;
assign LCD_R = ( PixelCount < Width_bar * BarCount )? 5 'b00000 : assign LCD_R = PixelCount < H_BackPorch + Width_bar * 0 ? 5'b00000 :
( PixelCount < (Width_bar * (BarCount +1 )) ? 5'b00001 : PixelCount < H_BackPorch + Width_bar * 1 ? 5'b00001 :
( PixelCount < (Width_bar * (BarCount +2 )) ? 5'b00010 : PixelCount < H_BackPorch + Width_bar * 2 ? 5'b00010 :
( PixelCount < (Width_bar * (BarCount +3 )) ? 5'b00100 : PixelCount < H_BackPorch + Width_bar * 3 ? 5'b00100 :
( PixelCount < (Width_bar * (BarCount +4 )) ? 5'b01000 : PixelCount < H_BackPorch + Width_bar * 4 ? 5'b01000 :
( PixelCount < (Width_bar * (BarCount +5 )) ? 5'b10000 : 5'b00000 ))))); PixelCount < H_BackPorch + Width_bar * 5 ? 5'b10000 : 5'b00000 ;
assign LCD_G = ( PixelCount < (Width_bar * (BarCount +5 )))? 6'b000000 : assign LCD_G = PixelCount < H_BackPorch + Width_bar * 6 ? 6'b000001 :
( PixelCount < (Width_bar * (BarCount +6 )) ? 6'b000001 : PixelCount < H_BackPorch + Width_bar * 7 ? 6'b000010 :
( PixelCount < (Width_bar * (BarCount +7 )) ? 6'b000010 : PixelCount < H_BackPorch + Width_bar * 8 ? 6'b000100 :
( PixelCount < (Width_bar * (BarCount +8 )) ? 6'b000100 : PixelCount < H_BackPorch + Width_bar * 9 ? 6'b001000 :
( PixelCount < (Width_bar * (BarCount +9 )) ? 6'b001000 : PixelCount < H_BackPorch + Width_bar * 10 ? 6'b010000 :
( PixelCount < (Width_bar * (BarCount +10 )) ? 6'b010000 : PixelCount < H_BackPorch + Width_bar * 11 ? 6'b100000 : 6'b000000 ;
( PixelCount < (Width_bar * (BarCount +11 )) ? 6'b100000 : 6'b000000 ))))));
assign LCD_B = PixelCount < H_BackPorch + Width_bar * 12 ? 5'b00001 :
assign LCD_B = ( PixelCount < (Width_bar * (BarCount +11 )))? 5'b00000 : PixelCount < H_BackPorch + Width_bar * 13 ? 5'b00010 :
( PixelCount < (Width_bar * (BarCount +12 )) ? 5'b00001 : PixelCount < H_BackPorch + Width_bar * 14 ? 5'b00100 :
( PixelCount < (Width_bar * (BarCount +13 )) ? 5'b00010 : PixelCount < H_BackPorch + Width_bar * 15 ? 5'b01000 :
( PixelCount < (Width_bar * (BarCount +14 )) ? 5'b00100 : PixelCount < H_BackPorch + Width_bar * 16 ? 5'b10000 : 5'b00000 ;
( PixelCount < (Width_bar * (BarCount +15 )) ? 5'b01000 :
( PixelCount < (Width_bar * (BarCount +16 )) ? 5'b10000 : 5'b00000 )))));
endmodule endmodule

Loading…
Cancel
Save