📄 system_top.v
字号:
module system_top( iRST_N, iCLK, oHCCP, oHCSI, oHSYNC, oVSYNC, oVGA_RED, oVGA_GREEN, oVGA_BLUE, iPUSHBUTTON );input iRST_N;input iCLK;input[ 3: 0] iPUSHBUTTON;output oHCCP;output oHCSI;output oHSYNC;output oVSYNC;output [ 2: 0] oVGA_RED;output [ 2: 0] oVGA_GREEN;output [ 2: 0] oVGA_BLUE;wire [7:0] port_id;wire write_strobe;wire read_strobe;wire [7:0] out_port;wire [7:0] in_port;wire interrupt;wire interrupt_ack;wire reset;wire iCLK;wire [ 9: 0] address;wire [17: 0] instruction;wire [ 7: 0] s_ADDR;wire [ 7: 0] s_DATARD_0;wire [ 7: 0] s_DATARD_1;wire [ 7: 0] s_DATARD_2;wire [ 7: 0] s_DATAWR;wire s_RD;wire s_WR;assign reset = ~iRST_N;parameter C_BASEADDR_HC164 = 8'h00;parameter C_BASEADDR_VGA = 8'h10;parameter C_BASEADDR_PUSHBUTTON = 8'h20;//----------------------------------------------------------------------------------//// declaration of KCPSM3////// declaration of program ROM////----------------------------------------------------------------------------------//// Start of test circuit description//kcpsm3 processor( .address(address), .instruction(instruction), .port_id(port_id), .write_strobe(write_strobe), .out_port(out_port), .read_strobe(read_strobe), .in_port(in_port), .interrupt(interrupt), .interrupt_ack(interrupt_ack), .reset(reset), .clk(iCLK));ram_inst program( .address(address), .instruction(instruction), .clk(iCLK));pbus pbus_inst( .iOUT_PORT(out_port), .iREAD_STROBE(read_strobe), .iWRITE_STROBE(write_strobe), .iPORT_ID(port_id), .oIN_PORT(in_port), .iDATARD_0(s_DATARD_0),//8'h0 .iDATARD_1(s_DATARD_1), .iDATARD_2(s_DATARD_2), .oADDR(s_ADDR), .oRD(s_RD), .oWR( s_WR), .oDATAWR(s_DATAWR)); picoblaze_hc164 #(.C_BASEADDR(C_BASEADDR_HC164)) hc164( .iCLK( iCLK), .iRST_N( iRST_N), .iADDR( s_ADDR), .iDATAIN( s_DATAWR), .iWR( s_WR), .iRD( s_RD), .oHC_DBUS(s_DATARD_0), .oHCCP( oHCCP), .oHCSI( oHCSI));picoblaze_vga #(.C_BASEADDR(C_BASEADDR_VGA))vga_inst( .iRST_N( iRST_N), .iCLK( iCLK), // 50MHZ .iADDR( s_ADDR), // PBus Bus Address .iDATAIN( s_DATAWR), // PBus Data in .iWR( s_WR), // PBus Write operation signal .iRD( s_RD), // PBus Read operation signal .oHC_DBUS( s_DATARD_1), // PBus Data Out .oHSYNC( oHSYNC), .oVSYNC( oVSYNC), .oVGA_RED( oVGA_RED), .oVGA_GREEN(oVGA_GREEN), .oVGA_BLUE( oVGA_BLUE)); picoblaze_pushbutton #(.C_BASEADDR(C_BASEADDR_PUSHBUTTON))pushbutton_inst( .iCLK( iCLK), .iRST_N( iRST_N), .iADDR( s_ADDR), .iDATAIN( s_DATAWR), .iWR( s_WR), .iRD( s_RD), .iPUSHBUTTON(iPUSHBUTTON), .oHC_DBUS( s_DATARD_2), .oINTERRUPT( interrupt));endmodule//----------------------------------------------------------------------------------//// END OF FILE EMBEDDED_KCPSM3.V////----------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -