数据发送模块---基于地址的检测(verilog代码)
`timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: chensimin // // Create Date: 2020/04/24 15:21:43 // Design Name: // Module Name: send_data // Project Name: // Target Devices: // Tool Versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// module send_data( input wire clk, input wire rst, input wire [31 : 0] address, input wire valid, output reg [31 : 0] data ); always @(posedge clk or posedge rst) begin if(rst) data <= 0; else if(valid) begin case(address) 32'h40000000 : data <= 6; 32'h40000004 : data <= 7; 32'h40000008 : data <= 8; default : data <= 0; endcase end end endmodule