例化4个fifo核,使5X5卷积模版中25个数据同时输出,进而在一个始终内完成卷积运算。
代码如下:
module kernel5x5(clk,rst,a,a11,a12,a13,a14,a15,a21,a22,a23,a24,a25,a31,a32,a33,a34,a35,a41,a42,a43,a44,a45,a51,a52,a53,a54,a55,
rd1,wr1,rd2,wr2,rd3,wr3,rd4,wr4,full1,empty1,full2,empty2,full3,empty3,full4,empty4,cnt
);
input clk;
input rst;
input [7:0] a;
output [7:0] a11,a12,a13,a14,a15,a21,a22,a23,a24,a25,a31,a32,a33,