verilog 语法问题求解
个位大大打扰了问个问题问题1:moduleMul(inputclk,inputsigned[7:0]da,inputsigned[7:0]db,outputregsign...
个位大大打扰了 问个问题问题1:
module Mul
(
input clk,
input signed [7:0] da,
input signed [7:0] db,
output reg signed [15:0] dout_mul
);
// Declare input and output registers
reg signed [7:0] dataa_reg;
reg signed [7:0] datab_reg;
wire signed [15:0] mult_out;
// Store the result of the multiply
assign mult_out = dataa_reg * datab_reg;
// Update data
always @ (posedge clk)
begin
dataa_reg <= da;
datab_reg <= db;
dout_mul <= mult_out;
end
endmodule
Golaced 8:36:44
中assign mult_out = dataa_reg * datab_reg;
是什么意思啊 是两个数据 合并在一起吗?
问题2:
module add(bin,ain,out);
output signed [7:0] out;
input signed [7:0]bin,ain;
assign out=ain/2+bin/2;
endmodule
assign out=ain/2+bin/2;这个除2是除0000010的意思吗?
第三个问题:
module Filter2(input signed [15:0] din,
input clk,
output signed [31:0] y,
output reg signed out );
parameter FN = 32;
reg signed [15:0] shift [0:FN];
reg signed [32:0] sum;
always @(posedge clk)
begin
integer i; 展开
module Mul
(
input clk,
input signed [7:0] da,
input signed [7:0] db,
output reg signed [15:0] dout_mul
);
// Declare input and output registers
reg signed [7:0] dataa_reg;
reg signed [7:0] datab_reg;
wire signed [15:0] mult_out;
// Store the result of the multiply
assign mult_out = dataa_reg * datab_reg;
// Update data
always @ (posedge clk)
begin
dataa_reg <= da;
datab_reg <= db;
dout_mul <= mult_out;
end
endmodule
Golaced 8:36:44
中assign mult_out = dataa_reg * datab_reg;
是什么意思啊 是两个数据 合并在一起吗?
问题2:
module add(bin,ain,out);
output signed [7:0] out;
input signed [7:0]bin,ain;
assign out=ain/2+bin/2;
endmodule
assign out=ain/2+bin/2;这个除2是除0000010的意思吗?
第三个问题:
module Filter2(input signed [15:0] din,
input clk,
output signed [31:0] y,
output reg signed out );
parameter FN = 32;
reg signed [15:0] shift [0:FN];
reg signed [32:0] sum;
always @(posedge clk)
begin
integer i; 展开
展开全部
assign mult_out = dataa_reg * datab_reg;
//意思时,dataa_reg乘以datab_reg,结果给mult_out。
assign out=ain/2+bin/2;这个除2是除0000010的意思吗?
//一般来说,未定义位宽的常数,在仿真是,默认为32bit,即2就是32‘h0000_0002。综合时会优化,可能是2’b10,也可能采用移位表示除以2。
问题三,看不到。
//意思时,dataa_reg乘以datab_reg,结果给mult_out。
assign out=ain/2+bin/2;这个除2是除0000010的意思吗?
//一般来说,未定义位宽的常数,在仿真是,默认为32bit,即2就是32‘h0000_0002。综合时会优化,可能是2’b10,也可能采用移位表示除以2。
问题三,看不到。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询