LEC对于Verilog代码指导

版权声明:未经允许请不要转发 https://blog.csdn.net/qq_34110120/article/details/82144760

1.case情况列完整
Module xyz (sm, out);
input [1:0] sm;
output out;
regout;
always @(sm)
case (sm) //synopsysfull_case
2’b00: out = 2’b01;
2’b01: out = 2’b10;
2’b11: out = 2’b00;
endcase
endmodule
2.对于长的逻辑表达式写成短的模式可以降低比较的时间
assign pmo= (((x * y) & mask) + offset);
assign p= (x * y);
assign pm= (p& mask);
assign pmo= (pm+ offset);
3,。不要出现组合逻辑反馈环,比较点无法确定,而且无法确定比较情况

猜你喜欢

转载自blog.csdn.net/qq_34110120/article/details/82144760
今日推荐