首页 > 其他 > 详细

adi i2s 提供的axi_lite接口说明

时间:2018-04-27 19:04:01      阅读:348      评论:0      收藏:0      [点我收藏+]

总共定义了4个寄存器,位宽32位,也就是 偏移地址*4
以下是PS写数据
when 0 => I2S_RESET_REG <= wr_data;

when 1 => I2S_CONTROL_REG <= wr_data;

when 2 => I2S_CLK_CONTROL_REG <= wr_data;

when 6 => PERIOD_LEN_REG <= wr_data;

1:I2S_RESET_REG --地址0*4
i2s_reset <= I2S_RESET_REG(0);
--保留未用
tx_fifo_reset <= I2S_RESET_REG(1);
--》高有效
rx_fifo_reset <= I2S_RESET_REG(2);--》高有效复位
2:I2S_CONTROL_REG --地址1*4
tx_enable <= I2S_CONTROL_REG(0) = ‘1‘;

rx_enable <= I2S_CONTROL_REG(1) = ‘1‘;
3:I2S_CLK_CONTROL_REG ---地址2*4
bclk_div_rate <= to_integer(unsigned(I2S_CLK_CONTROL_REG(7 downto 0)));

lrclk_div_rate <= to_integer(unsigned(I2S_CLK_CONTROL_REG(23 downto 16)));
4:PERIOD_LEN_REG ----地址6*4
period_len <= to_integer(unsigned(PERIOD_LEN_REG(15 downto 0)));
收fifo的大小


以下是PS读数据
when 1 => rd_data <= I2S_CONTROL_REG and x"00000003";

when 2 => rd_data <= I2S_CLK_CONTROL_REG and x"00ff00ff";

when 6 => rd_data <= PERIOD_LEN_REG and x"0000ffff";

when 10 => rd_data <= rx_sample & std_logic_vector(to_unsigned(cnt, 8));---》地址10*4


when 10 --》高24位为采样接收的数据 -》低8位为分频计数器的值

adi i2s 提供的axi_lite接口说明

原文:https://www.cnblogs.com/yssrf-possible/p/8963693.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!