Add support for giving both strengths to a pull device.

In the standard a pull device can be given both a 1 and 0 strength.
Only the appropriate one is actually used. This patch adds support
for giving both pull strength to a pull device.
This commit is contained in:
Cary R 2011-01-28 17:25:58 -08:00 committed by Stephen Williams
parent 424fba819e
commit 6ddf754082
1 changed files with 16 additions and 0 deletions

16
parse.y
View File

@ -2560,10 +2560,26 @@ module_item
{ pform_makegates(PGBuiltin::PULLUP, $3, 0, $5, 0); { pform_makegates(PGBuiltin::PULLUP, $3, 0, $5, 0);
} }
| K_pullup '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';'
{ pform_makegates(PGBuiltin::PULLUP, $3, 0, $7, 0);
}
| K_pullup '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';'
{ pform_makegates(PGBuiltin::PULLUP, $5, 0, $7, 0);
}
| K_pulldown '(' dr_strength0 ')' gate_instance_list ';' | K_pulldown '(' dr_strength0 ')' gate_instance_list ';'
{ pform_makegates(PGBuiltin::PULLDOWN, $3, 0, $5, 0); { pform_makegates(PGBuiltin::PULLDOWN, $3, 0, $5, 0);
} }
| K_pulldown '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';'
{ pform_makegates(PGBuiltin::PULLDOWN, $5, 0, $7, 0);
}
| K_pulldown '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';'
{ pform_makegates(PGBuiltin::PULLDOWN, $3, 0, $7, 0);
}
/* This rule handles instantiations of modules and user defined /* This rule handles instantiations of modules and user defined
primitives. These devices to not have delay lists or strengths, primitives. These devices to not have delay lists or strengths,
but then can have parameter lists. */ but then can have parameter lists. */