mirror of https://github.com/YosysHQ/abc.git
Merge pull request #521 from fxreichl/master
Fix issue with constant replacements
This commit is contained in:
commit
68bf7cba8e
|
|
@ -61033,7 +61033,7 @@ int Abc_CommandAbc9eSLIM( Abc_Frame_t * pAbc, int argc, char ** argv ) {
|
|||
}
|
||||
params.synthesis_approach = atoi(argv[globalUtilOptind]);
|
||||
globalUtilOptind++;
|
||||
if ( params.synthesis_approach < 0 || params.synthesis_approach > 2)
|
||||
if ( params.synthesis_approach < 0 || params.synthesis_approach > 3)
|
||||
goto usage;
|
||||
break;
|
||||
case 'I':
|
||||
|
|
@ -61249,7 +61249,7 @@ int Abc_CommandAbc9elSLIM( Abc_Frame_t * pAbc, int argc, char ** argv ) {
|
|||
}
|
||||
params.synthesis_approach = atoi(argv[globalUtilOptind]);
|
||||
globalUtilOptind++;
|
||||
if ( params.synthesis_approach < 0 || params.synthesis_approach > 2)
|
||||
if ( params.synthesis_approach < 0 || params.synthesis_approach > 3)
|
||||
goto usage;
|
||||
break;
|
||||
case 'I':
|
||||
|
|
|
|||
|
|
@ -83,11 +83,13 @@ namespace eSLIM {
|
|||
}
|
||||
int replacement_size = synth.getSizeFromActivationVars(last_model);
|
||||
int replacement_delay = synth.getDelayFromDelayVariables(last_model);
|
||||
assert (replacement_delay > 0);
|
||||
std::vector<bool> model = synth.reduceDelay(replacement_size, replacement_delay - 1);
|
||||
if (model.size() > 0) {
|
||||
replacement_size = synth.getSizeFromActivationVars(model);
|
||||
std::swap(last_model, model);
|
||||
assert (replacement_delay > 0 || replacement_size == 0);
|
||||
if (replacement_delay > 0) { // a constant circuit has already optimal depth
|
||||
std::vector<bool> model = synth.reduceDelay(replacement_size, replacement_delay - 1);
|
||||
if (model.size() > 0) {
|
||||
replacement_size = synth.getSizeFromActivationVars(model);
|
||||
std::swap(last_model, model);
|
||||
}
|
||||
}
|
||||
return synth.getReplacement(last_model, replacement_size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ namespace eSLIM {
|
|||
std::cout << "PThreads not available, minimize random window.\n";
|
||||
std::uniform_int_distribution<> udist(0, windows.size() - 1);
|
||||
int wid = udist(rng);
|
||||
eSLIM_Man<SynthesisEngine, SelectionStrategy>::applyeSLIM(windows[wid], cfg, wlogs[wid])
|
||||
eSLIM_Man<SynthesisEngine, SelectionStrategy>::applyeSLIM(windows[wid], cfg, wlogs[wid]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue