OpenEdv-开源电子网
标题:
"65.4.3 光口编码模块设计"实验问题求解
[打印本页]
作者:
一只大啥bi
时间:
2026-1-5 16:39
标题:
"65.4.3 光口编码模块设计"实验问题求解
我在学习该章节的时候,读完源码自己照着实验思路搭建工程,但是在设置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
作者:
一只大啥bi
时间:
2026-1-5 16:39
找到原因了,是深度设置不够
欢迎光临 OpenEdv-开源电子网 (https://www.openedv.com/)
Powered by Discuz! X3.4