blob: 3f1b47277dd11c0d882a30a9721e3ad9cf163df4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Demo for "final" smtc constraints
module demo4(input clk, rst, inv2, input [15:0] in, output reg [15:0] r1, r2);
always @(posedge clk) begin
if (rst) begin
r1 <= in;
r2 <= -in;
end else begin
r1 <= r1 + in;
r2 <= inv2 ? -(r2 - in) : (r2 - in);
end
end
endmodule
|