|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 yuanpin318 于 2018-11-20 18:44 编辑
看到几个例子,大家能帮忙解释一下吗?
(1)
case (xcount) inside
: junk<=1;
101: junk<=2;
: junk<=3;
endcase
(2)
case (xcode) inside
3'b00? : junk<=1;
3'b0?0 : junk<=2;
3'b?00 : junk<=3;
default: junk <='x;
endcase
(3)
function reg inbetween(input low, value, high);
begin
inbetween = value >= low && value <= high;
end
endfunction
case (1);
inbetween(1,xcount,100): junk<=1;
inbetween(101,xcount,101): junk<=2;
inbetween(102,xcount,200): junk<=3;
endcase |
|