sizer support for simple LPM MUX devices.

This commit is contained in:
Stephen Williams 2014-02-15 14:44:15 -08:00
parent 4e81939eda
commit 6b6574dd8a
1 changed files with 19 additions and 0 deletions

View File

@ -46,6 +46,21 @@ static void scans_lpms_add(ivl_scope_t, ivl_lpm_t lpm, struct sizer_statistics&s
stats.gate_count += 2*wid;
}
/*
* Count mux devices as 2m gates.
*/
static void scan_lpms_mux(ivl_scope_t, ivl_lpm_t lpm, struct sizer_statistics&stats)
{
// For now, don't generate statistics for wide mux devices.
if (ivl_lpm_size(lpm) > 2) {
stats.lpm_bytype[ivl_lpm_type(lpm)] += 1;
return;
}
unsigned wid = ivl_lpm_width(lpm);
stats.gate_count += 2*wid;
}
void scan_lpms(ivl_scope_t scope, struct sizer_statistics&stats)
{
for (unsigned idx = 0 ; idx < ivl_scope_lpms(scope) ; idx += 1) {
@ -70,6 +85,10 @@ void scan_lpms(ivl_scope_t scope, struct sizer_statistics&stats)
scan_lpms_ff(scope, lpm, stats);
break;
case IVL_LPM_MUX:
scan_lpms_mux(scope, lpm, stats);
break;
default:
stats.lpm_bytype[ivl_lpm_type(lpm)] += 1;
break;