Init Push
This commit is contained in:
16
examples/seq_auto_demo.v
Normal file
16
examples/seq_auto_demo.v
Normal file
@@ -0,0 +1,16 @@
|
||||
// SLWChipVerify 时序验证示例:
|
||||
// 在时钟上升沿把输入 din 锁存到输出 q;复位时清零 q。
|
||||
module seq_auto_demo(
|
||||
input clk,
|
||||
input rst,
|
||||
input [1:0] din,
|
||||
output reg [1:0] q
|
||||
);
|
||||
// 该寄存器逻辑用于演示自动时序激励与断言检查。
|
||||
always @(posedge clk or posedge rst) begin
|
||||
if (rst)
|
||||
q <= 2'd0;
|
||||
else
|
||||
q <= din;
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user