With a functional Engineering Change Order (ECO) problem, the quality of patch plays an important role in the performance of the patched circuit. In this contest, contestants need to generate patch functions that will make two circuits equivalent, while minimizing the resource cost of the generated patches. Resource cost is the comprehensive physical cost of all the patches, and minimizing the resource cost implies improving patch quality (timing, power, or area). The resource cost of patches can be modeled as a weighting function with respect to several physical properties of nodes used for patches.
In this contest, we have assigned each internal node a reasonable constant weight to represent the corresponding physical cost if the node is used for generating patches. Also, the resource cost of the patches is calculated as the weight summation of patches’ support nodes. This formulation can elegantly identify wanted algorithms for the resource-aware patch generation problem.
Fig. 1. Resource-aware patch generation problem.
In a modern design flow, if some functionality has to be changed or functional bugs are found at late stages, restarting the whole synthesis and verification flow is impractical. To save time and cost, automating Engineering Change Orders (ECOs) is more practical. As illustrated in Fig. 1, an automated ECO process can identify the differences between the old circuit $F$ and the new circuit $G$, and generate a corresponding patch function such that $F’$ (the resultant circuit after applying the patch to the old circuit $F$) and $G$ become equivalent. In addition, patch generation plays an important role in the ECO problem because the quality of patch directly influences the performance of the patched circuit.
In an industrial design flow, the functional ECO tool, e.g., Cadence Encounter Conformal ECO Designer [1], has been widely used for industrial cases for years. Although the patch size is an important metric for patch quality, patch generation must consider other physical issues, including timing and power closure, to solve the ECO problem practically.
In academic research, several studies [2-9] have proposed different kinds of algorithms to generate patches. The work has primarily focused on minimizing the patch size. The generated patches, however, may be unusable in industrial problems due to the lack of consideration of physical issues.
Recently, some research addressed the physical issues in functional ECO [10] and some searched for better base functions to generate a target function with better result [11]. In this contest, we will focus on the resource-aware patch generation problem to motivate new ideas for solving the practical ECO problem.
The objective of this contest is to develop a flexible, scalable, and practical resource-aware patch generation algorithm that can be utilized in industry tools. In this contest, we provide benchmarks that are representatives of industrial problems to facilitate the academic research. Although existing work may not provide feasible solutions for these benchmarks, we look forward to inspiring new research into the functional ECO.
Given two circuits $F$ and $G$, and the weight information of internal nodes in $F$, contestants need to utilize internal nodes in $F$ as supports, called base nodes, to generate patch functions with minimum resource cost at a specific set of target points in $F$ such that $F’$, the patched circuit, and G are equivalent, as Fig. 2 shows. The resource cost is calculated by the weight summation of the used based nodes.
Fig. 2. Problem formulation.
The requested program must be run on a Linux system. The time limit of running each testcase is 1800 seconds. Parallel computation with multiple threads or processes is not allowed. The executable file should be named “rpgen” and accepts five arguments:
./rpgen <F.v> <G.v> <weight.txt> <patch.v> <out.v>
<F.v> and <G.v> describe gate-level circuits in Verilog. They have only one module, named top, and contain only primitive gates without hierarchical structure. Target points are indicated by wire declaration with names t_0, t_1, …, t_n in <F.v>; target points are floating and are inputs of some gates. The format is:
module top ( <name0>, <name1>, … ); //F.v |
module top ( <name0>, <name1>, … ); //G.v |
<weight.txt> describes the weight information of internal nodes of <F.v> with the following format:
<name0> <weight0>
<name1> <weight1>
<name2> <weight2>
…
Node name and the corresponding weight are separated by a space character, and different nodes are described in different lines. Internal nodes without assigned weights have Infinite (INF) weight.
<patch.v> describes the generated patch. It is a gate-level circuit in Verilog, which has only one module, named patch, and only contain primitive gates without hierarchical structure. The format is:
module patch ( <name0>, <name1>, … );
input <name0>, <name1>, …;
output <name0>, <name1>,…;
wire <name0>, <name1> , …;
<primitive gate type> ( <name0>, <name1>, … );
<primitive gate type> ( <name0>, <name1>, … );
…
endmodule
Note that only one module can be in <patch.v>, even if there are multiple target points, in which case the patch module would have multiple output ports.
<out.v> describes the patched circuit $F’$. The content of <out.v> must be the same as <F.v>, except for the added patch instance. The patch must be represented as a module instance and must be added at the end of the top module (before the endmodule line), as shown in the following example:
module top ( <name0>, <name1>, … );
input <name0>, <name1>, …;
output <name0>, <name1>,…;
wire <name0>, <name1> , …;
wire t_0, t_1, …; //target points
<primitive gate type> ( <name0>, <name1>, … );
<primitive gate type> ( <name0>, t_0, <name1>, … );
…
patch p0 (t_0, t_1, …, <name0>, <name1>, …); // patch instance
endmodule
In summary, we will check the following items in the output files:
F.v | Weight.txt | G.v |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3; wire t_0; and (g1, a, b); xor (g2, a, c); nor (g3, b, c); and (y1, g1, g2); or (y2, t_0, g3); endmodule |
a 5 b 5 c 5 g1 2 g2 2 g3 1 y1 1 |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3, g4; not (g1, c); and (g2, a, g1); nor (g3, a, b); and (g4, b, c); and (y1, b, g2); or (y2, g2, g3, g4); endmodule |
![]() |
![]() |
Team A uses {a, b, c} as the base nodes to generate the patch at t_0. The corresponding resource cost is 15.
patch.v | out.v |
module patch (y, a, b, c); input a, b, c; output y; wire w1, w2; and (w1, a, b); xor (w2, a, c); or (y, w1, w2); endmodule |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3; wire t_0; and (g1, a, b); xor (g2, a, c); nor (g3, b, c); and (y1, g1, g2); or (y2, t_0, g3); patch p0 (.y(t_0), .a(a), .b(b), .c(c)); endmodule |
![]() |
Team B uses {a, b, c} as the base nodes to generate the patch at t_0. The corresponding resource cost is 15.
patch.v | out.v |
module patch (y, a, b, c); input a, b, c; output y; and (w1, a, b); not (w2, a); and (w3, w2, c); or (y, w1, w3); endmodule |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3; wire t_0; and (g1, a, b); xor (g2, a, c); nor (g3, b, c); and (y1, g1, g2); or (y2, t_0, g3); patch p0 (.y(t_0), .a(a), .b(b), .c(c)); endmodule |
![]() |
Team C uses {g1, g2} as the base nodes to generate the patch at t_0. The corresponding resource cost is 4.
patch.v | out.v |
module patch (y, a, b); input a, b; output y; or (y, a, b); endmodule |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3; wire t_0; and (g1, a, b); xor (g2, a, c); nor (g3, b, c); and (y1, g1, g2); or (y2, t_0, g3); patch p0 (.y(t_0), .a(g1), .b(g2)); endmodule |
![]() |
Team D uses {g1, g2} as the base nodes to generate the patch at t_0. The corresponding resource cost is 4. However, the circuit in out.v with patch patch.v is not equivalent to the circuit in G.v.
patch.v | out.v |
module patch (y, a, b); input a, b; output y; and (y, a, b); endmodule |
module top (y1, y2, a, b, c); input a, b, c; output y1, y2; wire g1, g2, g3; wire t_0; and (g1, a, b); xor (g2, a, c); nor (g3, b, c); and (y1, g1, g2); or (y2, t_0, g3); patch p0 (.y(t_0), .a(g1), .b(g2)); endmodule |
![]() |
For each case, the result will be evaluated by the following criteria:
For example in Section V, Team D gets score of 0 because the patched circuit is not equivalent to the circuit in <G.v>. Next, the resource cost of {Team A, Team B, Team C} is {15, 15, 4}, respectively, and Team C is the first since Team C has the least resource cost. However, because Team A and Team B have the same resource cost, we rank them according to the patch size. The patch size is evaluated by the gate count of a patch, so the patch sizes of Team A and Team B are 3 and 4, respectively. Thus, Team A is the second and Team B is the third. Finally, the scores of {Team A, Team B, Team C, Team D} are {7, 5, 10, 0}, accordingly.
In this contest, there will be a half of single fix problems and a half of multiple fix problems for evaluation, either public or hidden.
The team earning the highest accumulated scores for all the benchmarks wins the contest.
In the final test, just for unit1, the teams with the same result and with runtime less than 1 second get the same rank and scores because unit1 is a simple case from the problem description.
For example:
team 1: resource cost = 10, patch size = 4, time = 0.1; team 2: resource cost = 10, patch size = 4, time = 0.2.
team 3: resource cost = 15, patch size = 4, time = 0.1; team 4: resource cost = 15, patch size = 4, time = 0.2.
Both team 1 and team 2 get score of 10 (Rank 1), and both team 3 and team 4 get score of 7 (Rank 2).
You can skip this part if you are familiar with ECO background or algorithms.
P.S.
Since unit1 is a simple case from the problem description, the teams with the same result and with runtime less than 1 second get the same rank and scores.
For example, team 1: resource cost = 10, patch size = 4, time = 0.1; team 2: resource cost = 10, patch size = 4, time = 0.2.
Both team 1 and team 2 get score of 10 (Rank 1).
P.S.
Since unit1 is a simple case from the problem description, the teams with the same result and with runtime less than 1 second get the same rank and scores
The baseline algorithm utilizes pattern simulation and observes the simulation signatures to generate patch function. We first use the example in Section V to demonstrate the algorithm.
Fig. 3. Exhaustive simulation results of F.v and G.v.
Fig. 4. Simulation tables for F.v with t_0 = 0, F.v with t_0 = 1, and G.v, respectively.
Fig. 5. Figure out Son, Soff, and Sdc for t_0.
Fig. 6. Table I.
Fig. 7. Table II.
Fig. 8. Synthesize the patch t_0 = g1 OR g2 according to Table II.
Fig. 9. The example with random simulation.
Algorithm: Patch_Generation_Single_Fix(F, G) |
//Assume there is only one target point t_0 01: Simulate input patterns for circuits {F(t_0 = 0), F(t_0 = 1), G};// exhaustive or random; step (a) 02: Build up the simulation tables {T(F, t_0 = 0), T(F, t_0 = 1), TG} for {F(t_0 = 0), F(t_0 = 1), G}, respectively;// step (a) 03: Observe output values in {T(F, t_0 = 0), T(F, t_0 = 1), TG} and mark the NEQ bits in {T(F, t_0 = 0), T(F, t_0 = 1)}; // step (b) 04: Generate {Son, Soff, Sdc} for t_0;// step (c) // by flipping t_0 values at NEQ bits in {T(F, t_0 = 0), T(F, t_0 = 1)} and validating through re-simulation // Son: the pattern set where t_0 should be 1 for EQ // Soff: the pattern set where t_0 should be 0 for EQ // Sdc: the pattern set where t_0 can be either 1 or 0 05: if Son ∩ Soff is ∅ do 06: Build up simulation table Tnew_t_0 for new behavior of t_0 based on {Son, Soff, Sdc};// step (d) 07: repeat 08: Choose base nodes B;// your method 09: Transform table Tnew_t_0 to Tbase_node based on B;// step (e) 10: if Tbase_node has conflict do 11: continue; 12: end if 13: Synthesize patch R based on Tbase_node;// your method; step (f) 14: break; 15: end repeat 16: return R; 17: end if 18: return Fail. |
To clarify the program requirement and restriction regarding submitted files and multiple processes, we have modified the corresponding description in Section IV.
Here is the detailed explanation:
1. You must submit an executable file called ‘rpgen’, and we will run it with required arguments to evaluate your results.
2. Using open source tools is allowed. If your program needs to call other executable files, we strongly recommend contestants to embed the open source codes into
your program and submit only one file rpgen. Otherwise, please make sure your program can link and execute other files/executable files correctly in our environment.
3. For the sake of fairness, parallel computation with multiple threads or processes is not allowed. Using multiple processes without parallel computation is allowed.
4. If you want to check whether you set up your submitted file correctly in our environment, please remember to submit your program in Alpha and Beta tests.