求助Verilog小程序问题所在
时间:10-02
整理:3721RD
点击:
假如ADDRESS的值为5'b0X000,执行完casex后A,B的值是多少?答案A=1,B=0.这是为什么?CASEX不是不考虑高阻值和不定位吗?那么casex语句中有两个语句可以执行了,那岂不矛盾了?
A=0;
B=0;
casex(ADDRESS);
5'b00?:A=1;
5'b01?:B=1;
5'b10?00,5'b11?00:
begin
A=1;
B=1;
end
endcase
A=0;
B=0;
casex(ADDRESS);
5'b00?:A=1;
5'b01?:B=1;
5'b10?00,5'b11?00:
begin
A=1;
B=1;
end
endcase
A branch is only executed if the corresponding label is the first one to match
the case expression.
