Verilog assignment
Posted 飞鸢逐浪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Verilog assignment相关的知识,希望对你有一定的参考价值。
Verilog
case-sensitive, all keywords are lowercase
1 continuous assignment
assign data_left = data_right; // right drive left(net)
例 1) mux
assign data_out = select ? data_in1 : data_in0;
2 procedural assignment
1) blocking ("=")
execute sequential
2) nonblocking ("<=")
read (right) -> schedule (left) -> execute (<=)
例 2) synchronizer
reg [1:0] data_sync; always @ (posedge clk or posedge rst) begin if (rst) data_sync <= 2‘b00; else data_sync <= {data_sync[0], data_in}; end assign data_out = data_sync[1]; synchronizer
以上是关于Verilog assignment的主要内容,如果未能解决你的问题,请参考以下文章