Advertisement
nightmodeapiarchive

working_top.v

Jul 18th, 2024 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SystemVerilog 0.74 KB | Source Code | 0 0
  1. module top
  2. (
  3.     input SPIMOSI,
  4.     input SPICLK,
  5.     input SPICS,
  6.     input SYSCLK,
  7.     input btnA,
  8.     output VGA_VSYNC,
  9.     output VGA_HSYNC,
  10.     output VGA_R,
  11.     output VGA_G,
  12.     output VGA_B
  13. );
  14. wire MAIN_CLK;
  15. wire VSYNC;
  16. wire HSYNC;
  17. wire RED;
  18. Gowin_rPLL PLL_INST(
  19.     .clkout(MAIN_CLK),    //output clkout(~200.5mhz)
  20.     .clkin(SYSCLK)        //input clkin(27mhz)
  21. );
  22. vga VGA_INST(
  23.     .CLK(MAIN_CLK),
  24.     .VSYNC(VSYNC),
  25.     .R(RED),
  26.     .HSYNC(HSYNC)
  27. );
  28. assign VGA_HSYNC = HSYNC;
  29. assign VGA_VSYNC = VSYNC;
  30. //assign VGA_R = RED;     //the problematic line
  31. assign VGA_R = RED & btnA;//the only line that changed - now works, of course the color(red) signal drops out when i press the button but that's expected
  32. endmodule
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement