Board logo

标题: 如何使用自定义逻辑?看IIC的例子吧[转帖] [打印本页]

作者: xuyanchen    时间: 2005-11-3 09:28     标题: 如何使用自定义逻辑?看IIC的例子吧[转帖]

you can easily connect the I2C Wishbone core to the NIOS processor

1. Within SOPC builder, generate interface to user logic.
2. Select bus interface type: avalon register slave.
3. Add "i2c_master_top.v" design file.
4. Read port list from file.
5. Connect the signals as follow:
wb_adr_i <=> address
wb_dat_i <=> writedata
wb_dat_o <=> readdata
wb_we_i <=> write
wb_stb_i <=> chipselect
wb_cyc_i <=> chipselect
wb_inta_o <=> irq
wb_clk_i <=> clk
wb_ack_o <=> waitrequest_n
wb_rst_i <=> always0
arst_i <=> reset_n
scl_pad_i <=> export
scl_pad_o <=> export
scl_padoen_o <=> export
sda_pad_i <=> export
sda_pad_o <=> export
sda_padoen_o <=> export
6. Under timing tab, leave the setup, wait and hold settings at 0 cycles.


You can now access the I2C core via included "oc_i2c_master.h".
点击下载






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0