⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i2c_master.v

📁 nios 嵌入式系统基础教程配套实验 定制基于AVALON总线的用户外设实验
💻 V
字号:
//Legal Notice: (C)2005 Altera Corporation. All rights reserved.  Your
//use of Altera Corporation's design tools, logic functions and other
//software and tools, and its AMPP partner logic functions, and any
//output files any of the foregoing (including device programming or
//simulation files), and any associated documentation or information are
//expressly subject to the terms and conditions of the Altera Program
//License Subscription Agreement or other applicable license agreement,
//including, without limitation, that your use is for the sole purpose
//of programming logic devices manufactured by Altera and sold by Altera
//or its authorized distributors.  Please refer to the applicable
//agreement for further details.

// synthesis translate_off
`timescale 1ns / 100ps
// synthesis translate_on
module i2c_master (
                    // inputs:
                     wb_adr_i,
                     wb_clk_i,
                     wb_cyc_i,
                     wb_dat_i,
                     wb_rst_i,
                     wb_stb_i,
                     wb_we_i,

                    // outputs:
                     scl_pad_io,
                     sda_pad_io,
                     wb_ack_o,
                     wb_dat_o,
                     wb_err_o,
                     wb_inta_o
                  );

  inout            scl_pad_io;
  inout            sda_pad_io;
  output           wb_ack_o;
  output  [ 31: 0] wb_dat_o;
  output           wb_err_o;
  output           wb_inta_o;
  input   [  2: 0] wb_adr_i;
  input            wb_clk_i;
  input            wb_cyc_i;
  input   [ 31: 0] wb_dat_i;
  input            wb_rst_i;
  input            wb_stb_i;
  input            wb_we_i;

  wire             scl_pad_io;
  wire             sda_pad_io;
  wire             wb_ack_o;
  wire    [ 31: 0] wb_dat_o;
  wire             wb_err_o;
  wire             wb_inta_o;
  oc_i2c_master the_oc_i2c_master
    (
      .scl_pad_io (scl_pad_io),
      .sda_pad_io (sda_pad_io),
      .wb_ack_o   (wb_ack_o),
      .wb_adr_i   (wb_adr_i),
      .wb_clk_i   (wb_clk_i),
      .wb_cyc_i   (wb_cyc_i),
      .wb_dat_i   (wb_dat_i),
      .wb_dat_o   (wb_dat_o),
      .wb_err_o   (wb_err_o),
      .wb_inta_o  (wb_inta_o),
      .wb_rst_i   (wb_rst_i),
      .wb_stb_i   (wb_stb_i),
      .wb_we_i    (wb_we_i)
    );



endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -