Merge pull request #1264 from YosysHQ/eddie/fix_1254

opt_lut to ignore LUT cells, or those that drive bits, with (* keep *)
This commit is contained in:
Eddie Hung 2019-08-08 07:58:33 -07:00 committed by GitHub
commit ac2fc3a144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -101,6 +101,12 @@ struct OptLutWorker
{
if (cell->type == "$lut")
{
if (cell->has_keep_attr())
continue;
SigBit lut_output = cell->getPort("\\Y");
if (lut_output.wire->get_bool_attribute("\\keep"))
continue;
int lut_width = cell->getParam("\\WIDTH").as_int();
SigSpec lut_input = cell->getPort("\\A");
int lut_arity = 0;