⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opb_vga.v

📁 Xilinx ISE9.x FPGACPLD设计指南 原书光盘上的源码 包含大量vhdl源码
💻 V
字号:
// --------------------------------------------------------------------- // File     :opb_vga.v// Module   :opb_vga// Function :It is top module of vga controller.// --------------------------------------------------------------------- // keywords : // ---------------------------------------------------------------------// Remarks  :// --------------------------------------------------------------------- // History: // Version  Date            Author          Description // v0.0     2006/08/16      Jiang Zuojie    Original //     // --------------------------------------------------------------------- `define    Width_color_data    9`define    Width_bit_color     3module opb_vga ( iCLK,                 iRST,                 iOPB_ABUS,                 iOPB_DBUS,                 iOPB_BE,                 iOPB_RNW,                 iOPB_SELECT,                 iOPB_SEQADDR,                                    oHC_DBUS,                 oHC_XFERACK,                 oHC_errAck,                  oHC_toutSup,                 oHC_retry,                                      oRed     ,                 oGreen     ,                 oBlue     ,                 oHsync ,                 oVsync                );                 //==============================================================================// PARAMETER//==============================================================================           parameter C_BASEADDR = 32'h8000_0000;                              parameter C_HIGHADDR = 32'h8000_00ff;                                                                                                // parameter C_EXT_RESET_HIGH = 1'b0;  //==============================================================================// Port Declaration: important signals, DBUS, ABUS, RNW, ACK, SELECT//==============================================================================                                                                                             input                                              iCLK          ;  // OPB Bus clock                         input                                              iRST        ;  // System RST Low Active                 input       [ 31 : 0 ]                             iOPB_ABUS     ;  // Address Bus 32 bits                   input       [ 31 : 0 ]                             iOPB_DBUS     ;  // Data Bus input 32 bits                input       [  3 : 0 ]                             iOPB_BE       ;  // Byte Enable Singal => Ingore          input                                              iOPB_RNW      ;  // Read and Write Signal                 input                                              iOPB_SELECT   ;  // Module Select Signal                  input                                              iOPB_SEQADDR  ;  // Don't use                                                                    output                                             oHC_errAck    ;  // Don't Use. Connectted to GND output                                             oHC_toutSup   ;  // Don't Use. Connectted to GND output                                             oHC_retry     ;  // Don't Use. Connectted to GND                                                                  output      [ 31 : 0 ]                             oHC_DBUS      ;  // Data Bus output 32bits                output                                             oHC_XFERACK   ;  // Bus Acknowledge Signal                    output      [ `Width_bit_color - 1 : 0 ]           oRed            ;  //8bit one color output , total is 24bit coloroutput      [ `Width_bit_color - 1 : 0 ]           oGreen            ;  output      [ `Width_bit_color - 1 : 0 ]           oBlue            ;  output                                             oHsync        ;  //horizontal synchronize signaloutput                                             oVsync        ;  //horizontal synchronize signal//==============================================================================// Net Declaration//============================================================================== wire        [ `Width_color_data - 1 : 0 ]          wColor_data  ;  //output to colormap     //==============================================================================//Instantiation//==============================================================================myVGA    myVGA_0      ( .Sys_clk      ( iCLK ) ,                        .Sys_rst    ( iRST   ) ,                        .iBusdata     ( wColor_data ) ,                        .R            ( oRed ) ,                        .G            ( oGreen ) ,                        .B            ( oBlue ) ,                        .Hsync        ( oHsync ) ,                        .Vsync        ( oVsync )                       );                 opb_ipif   #(.C_BASEADDR( C_BASEADDR ))opb_ipif_0                       ( .iCLK         ( iCLK ) ,                    					    .iRST                 ( iRST ) ,              					    .iOPB_ABUS    ( iOPB_ABUS ) ,              					    .iOPB_DBUS    ( iOPB_DBUS ) ,              					    .iOPB_BE      ( iOPB_BE ) ,              					    .iOPB_RNW     ( iOPB_RNW ) ,              					    .iOPB_SELECT  ( iOPB_SELECT ) ,              					    .iOPB_SEQADDR ( iOPB_SEQADDR ) ,              			                  					    .oHC_errAck   ( oHC_errAck ) ,              					    .oHC_toutSup  ( oHC_toutSup ) ,              					    .oHC_retry    ( oHC_retry ) ,                           					    .oHC_DBUS     ( oHC_DBUS ) ,              					    .oHC_XFERACK  ( oHC_XFERACK ) ,                                     					    .oColor_data  ( wColor_data )              	      		      );   	      		      endmodule                    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -