AXIã¤ã³ã¿ãã§ã¼ã¹ã«å¯¾ãã¦ãRAMãå®è£ ãã¦ããã
- blockram_test_v1_0_S00_AXI.v
// Add user logic here reg [C_S_AXI_DATA_WIDTH-1:0] mem_ram[1024-1: 0]; wire mem_wren, mem_rdenn; assign mem_wren = axi_wready && S_AXI_WVALID ; assign mem_rden = axi_arv_arr_flag ; //& ~axi_rvalid always @ (posedge S_AXI_ACLK) begin mem_ram [axi_awaddr[11: 2]] <= S_AXI_WDATA[31: 0]; end always @ (posedge S_AXI_ACLK) begin if (!S_AXI_RESETN) begin axi_rdata <= 32'h0; axi_rvalid <= 0; axi_rresp <= 0; end else begin if (axi_arv_arr_flag && ~axi_rvalid) begin axi_rvalid <= 1'b1; axi_rresp <= 2'b0; // 'OKAY' response axi_rdata <= mem_ram [axi_araddr[11: 2]]; end else if (axi_rvalid && S_AXI_RREADY) begin axi_rvalid <= 1'b0; end end // else: !if(!S_AXI_RESETN) end // always @ (posedge S_AXI_ACLK) // User logic ends
ã¾ãç°¡åãªå®è£ ãªã®ã§ãããã«ã§ããã¨æãã®ã ããå°ãæ¹é ããã¨ãã«ãã¹ã¯ãªãããåããªããªã£ã¦ãã¾ã£ãããã調æ»ä¸ããã