zoukankan      html  css  js  c++  java
  • 数据发送模块---基于地址的检测(verilog代码)

    数据发送模块---基于地址的检测(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
  • 相关阅读:
    java字符串实现正序和倒序输出
    暑假前挑战赛1—— A,B题解
    深搜
    poj 1200 Crazy Search
    poj 1840 Eqs (hash)
    Choose the best route
    一个人的旅行
    畅通工程续
    最短路基础算法
    完全背包问题
  • 原文地址:https://www.cnblogs.com/chensimin1990/p/12897715.html
Copyright © 2011-2022 走看看