回复 3# 陈涛
版主,我想问一个 有无符号数运算 综合的问题,我没有仿真综合后的网表进行求证,就直接来问问吧:表达式1:
reg [4:0] result,a,b;
assign result=$signed(a)+$signed(b);
DC综合的时候报,Warming: signed to unsigned assignment occurs. (VER-318)
其中,DC对VER-318的说明中有一段是,“According to Verilog standard 2001, the tool converts the signed operand a to an unsigned value in the second assignment. The a operand is not sign-extended and the Presto HDL Compiler issues the following warning message: signed to unsigned conversion occurs ”
问题1:
这是说,在表达式1中 其实等价于这个表达式 result=a+b;??
但是,IEEE_std_1364-2005 P65 却说5.5.1 Rules for expression types
The following are the rules for determining the resulting type of an expression:
— Expression type depends only on the operands. It does not depend on the left-hand side (if any).
问题2:
就是说,其实运算时的符号是由RHS的操作数决定的,与LHS无关,
是这个意思吗? 若是的话,这不就跟DC自己的解释矛盾了?
问题3:
DC读入的verilog的RTL代码,能加参数 区别是 95,01,还是05的 语法规范吗?
问题4:
表达式2:
reg [4:0] result;
reg signed [4:0]a,b;
assign result=a+b;
表达式2与表达式1 ,是等价的吧?
谢谢 |