-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClauseCalculation.v
50 lines (40 loc) · 989 Bytes
/
ClauseCalculation.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 27.12.2021 15:13:16
// Design Name:
// Module Name: ClauseCalculation for XOR
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module ClauseCalculation(
input [2-1:0] features,
input [4-1:0] exclude_state,
output reg clause
);
wire [4-1:0] literals;
reg [4-1:0] in_and;
integer i;
assign literals={features,~features};
always @(literals,exclude_state)
begin
for (i=0; i<4; i=i+1)
begin
if (exclude_state[i]==1)
in_and[i]=1;
else
in_and[i]=literals[i];
end
clause=&in_and;
end
endmodule