Files
SLWChipVerify/examples/seq_auto_demo.v
2026-04-19 16:14:05 +08:00

17 lines
428 B
Verilog
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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