请教signed signal的声明
时间:10-02
整理:3721RD
点击:
请教,module spe的输入i_tap0是负数,那么我只需要在该模块的接口定义signed就可以了,还是在top层或spe的上一层,或spe的上面所有层涉及到i_tap0的地方都声称 singed? 谢谢
tb.u_dut.u4_vpe0.u_spe0.i_tap0[11:0] //这是i_tap0的路径,有很多层
module spe #(parameter COEF_WIDTH = 12, COMP_WIDTH = 8, RGB_WIDTH = 10)
(
input i_clk,
input i_rst_n,
input signed [COEF_WIDTH-1:0] i_tap0,
input signed [COEF_WIDTH-1:0] i_tap1,
input i_data_vld,
output [RGB_WIDTH-1:0] o_data
);
tb.u_dut.u4_vpe0.u_spe0.i_tap0[11:0] //这是i_tap0的路径,有很多层
module spe #(parameter COEF_WIDTH = 12, COMP_WIDTH = 8, RGB_WIDTH = 10)
(
input i_clk,
input i_rst_n,
input signed [COEF_WIDTH-1:0] i_tap0,
input signed [COEF_WIDTH-1:0] i_tap1,
input i_data_vld,
output [RGB_WIDTH-1:0] o_data
);
个人认为在对这个信号有符号数操作所在的模块进行声明。
我没有过这样在接口定义,况且我对verilog也不熟悉O(∩_∩)O。
这样就可以了
