2019-05-03 17:35:26 -05:00
|
|
|
module test (
|
|
|
|
input EN, CLK,
|
|
|
|
input [3:0] D,
|
|
|
|
output reg [3:0] Q
|
|
|
|
);
|
|
|
|
always @(posedge CLK)
|
|
|
|
if (EN) Q <= D;
|
|
|
|
|
|
|
|
specify
|
2019-07-03 04:22:10 -05:00
|
|
|
if (EN) (posedge CLK *> (Q : D)) = (1, 2:3:4);
|
2019-05-03 17:35:26 -05:00
|
|
|
$setup(D, posedge CLK &&& EN, 5);
|
|
|
|
$hold(posedge CLK, D &&& EN, 6);
|
|
|
|
endspecify
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module test2 (
|
2019-05-03 17:42:02 -05:00
|
|
|
input A, B,
|
2019-05-03 17:35:26 -05:00
|
|
|
output Q
|
|
|
|
);
|
2019-05-03 17:42:02 -05:00
|
|
|
xor (Q, A, B);
|
2019-05-03 17:35:26 -05:00
|
|
|
specify
|
|
|
|
//specparam T_rise = 1;
|
2019-05-03 17:42:02 -05:00
|
|
|
//specparam T_fall = 2;
|
|
|
|
`define T_rise 1
|
|
|
|
`define T_fall 2
|
|
|
|
(A => Q) = (`T_rise,`T_fall);
|
2019-05-03 17:54:25 -05:00
|
|
|
//(B => Q) = (`T_rise+`T_fall)/2.0;
|
|
|
|
(B => Q) = 1.5;
|
2019-05-03 17:35:26 -05:00
|
|
|
endspecify
|
|
|
|
endmodule
|
2019-06-28 12:12:48 -05:00
|
|
|
|
|
|
|
module issue01144(input clk, d, output q);
|
|
|
|
specify
|
|
|
|
(posedge clk => (q +: d)) = (3,1);
|
|
|
|
(posedge clk *> (q +: d)) = (3,1);
|
|
|
|
endspecify
|
|
|
|
endmodule
|
2020-02-12 14:16:01 -06:00
|
|
|
|
|
|
|
module test3(input clk, input [1:0] d, output [1:0] q);
|
|
|
|
specify
|
|
|
|
(posedge clk => (q +: d)) = (3,1);
|
|
|
|
(posedge clk *> (q +: d)) = (3,1);
|
|
|
|
endspecify
|
|
|
|
endmodule
|
2020-02-13 10:59:08 -06:00
|
|
|
|
|
|
|
module test4(input clk, d, output q);
|
|
|
|
specify
|
|
|
|
$setup(d, posedge clk, 1:2:3);
|
|
|
|
$setuphold(d, posedge clk, 1:2:3, 4:5:6);
|
|
|
|
endspecify
|
|
|
|
endmodule
|
2020-02-13 15:06:13 -06:00
|
|
|
|
|
|
|
module test5(input clk, d, e, output q);
|
|
|
|
specify
|
|
|
|
$setup(d, posedge clk &&& e, 1:2:3);
|
|
|
|
endspecify
|
|
|
|
endmodule
|
2020-02-13 19:58:43 -06:00
|
|
|
|
|
|
|
module test6(input clk, d, e, output q);
|
|
|
|
specify
|
|
|
|
(d[0] *> q[0]) = (3,1);
|
|
|
|
(posedge clk[0] => (q[0] +: d[0])) = (3,1);
|
|
|
|
endspecify
|
|
|
|
endmodule
|