nbsp; wb_ack_o<=!wb_ack_o; 168. end 169. else if(wb_ack_o) 170. wb_ack_o<=0; 171. 172. 173.endmodule 174. /* * * mycore.v * rill create 2013-03-26 * */
`include "orpsoc-defines.v" module mycore ( wb_clk, wb_rst, wb_dat_i, wb_adr_i, wb_sel_i, wb_cti_i, wb_bte_i, wb_we_i, wb_cyc_i, wb_stb_i, wb_dat_o, wb_ack_o, wb_err_o, wb_rty_o );
parameter addr_width = 32; parameter mycore_adr = 0; parameter idle=2'b00; parameter read=2'b01; parameter write=2'b10; parameter operate=2'b11; input [addr_width-1:0] wb_adr_i; input wb_stb_i; input wb_cyc_i; input [2:0] wb_cti_i; input [1:0] wb_bte_i; input wb_clk; input wb_rst; input [31:0] wb_dat_i; input [3:0] wb_sel_i; input wb_we_i; output reg [31:0] wb_dat_o; output reg wb_ack_o; output wb_err_o; output wb_rty_o; reg [addr_width-1:0]Cal_A,Cal_B,Result; reg A_Status,B_Status,R_Status; reg [1:0] stat,nextstat; assign wb_err_o=0; assign wb_rty_o=0; always @(posedge wb_clk) if(wb_rst) stat<=0; else stat<=nextstat; always @(stat,wb_adr_i) case(stat) idle: begin wb_dat_o=0; //wb_ack_o=0; if(wb_stb_i && wb_cyc_i && wb_we_i) begin nextstat=write; end else if(wb_stb_i && wb_cyc_i && !wb_we_i) begin nextstat=read; end &nbs 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|