Redian新闻
>
请教一个VERILOG的问题
avatar
请教一个VERILOG的问题# EE - 电子工程
s*y
1
在修改一个别人写的状态机。
always @ (posedge clk or posedge reset)
begin
if(reset) begin
enable <= 0;
.........
end
else begin
case (state)
.......
enable <= some logic;
endcase
end
end
这样就没有错误信息。
可是如果写成
always @ (posedge clk or posedge reset)
begin
if(reset) begin
enable <= 0;
.........
end
else state <= next_state;
end
always @ (sensitivity list)
begin
case (state)
........
enable = some logic;
endcase
end
avatar
j*j
2
it is pretty clear, you have multi-source on "enable".
simply to say, normally you can not set the value for the same variable ("
enable") in two "always" blocks. I think you can figure out WHY by yourself.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。