17 lines
428 B
Verilog
17 lines
428 B
Verilog
// 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
|