新手上路
- 积分
- 41
- 金钱
- 41
- 注册时间
- 2023-2-19
- 在线时间
- 6 小时
|
1金钱
我在学习该章节的时候,读完源码自己照着实验思路搭建工程,但是在设置FIFO时出了问题;
首先,工程代码:“
//FIFO 16bit 进, 32bit 出。
sfp_tx_2048x16 u_sfp_tx_2048x16 (
.rst (fifo_rst), // input wire rst
.wr_clk (clk_in), // input wire wr_clk
.rd_clk (tx_clk), // input wire rd_clk
.din (data_in_d0), // input wire [15 : 0] din
.wr_en (data_valid_in_d0), // input wire wr_en
.rd_en (fifo_rd_en), // input wire rd_en
.dout (fifo_dout), // output wire [31 : 0] dout
.full ( ), // output wire full
.empty (fifo_empty), // output wire empty
.almost_empty (fifo_almost_empty),// output wire almost_empty
.rd_data_count(rd_data_count) // output wire [10 : 0] rd_data_count
);
”
设置FIFO,写入数据16位位宽,读出是32位位宽。但是我在设置FIFO的时候发现dout的位宽只能是din的约数,不能是倍数;
比如我设置的FIFO
write width 16
write depth 16
而read width 只能在2、4、8、16这几个数中选择,无法选择32位,这是为什么?
使用的是VIVADO 2019.1
|
-
FIFO设置界面
|