aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cost.h
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-15 06:48:40 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-15 06:48:40 -0700
commit91f6cdfef6af69b7fe9203ee4d501ab6e6f1a830 (patch)
treeb749ff51dec39f145cc25a1df262de7412f5c45a /kernel/cost.h
parent1551e14d2d688982f22f416a55a3212796a82421 (diff)
parent704686774e28b9b602874264df2c0f96841be05e (diff)
downloadyosys-91f6cdfef6af69b7fe9203ee4d501ab6e6f1a830.tar.gz
yosys-91f6cdfef6af69b7fe9203ee4d501ab6e6f1a830.tar.bz2
yosys-91f6cdfef6af69b7fe9203ee4d501ab6e6f1a830.zip
Merge remote-tracking branch 'origin/master' into eddie/fix_1284_again
Diffstat (limited to 'kernel/cost.h')
-rw-r--r--kernel/cost.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/kernel/cost.h b/kernel/cost.h
index 10fa50fb3..ea2a4c1f0 100644
--- a/kernel/cost.h
+++ b/kernel/cost.h
@@ -28,44 +28,44 @@ struct CellCosts
{
static const dict<RTLIL::IdString, int>& default_gate_cost() {
static const dict<RTLIL::IdString, int> db = {
- { "$_BUF_", 1 },
- { "$_NOT_", 2 },
- { "$_AND_", 4 },
- { "$_NAND_", 4 },
- { "$_OR_", 4 },
- { "$_NOR_", 4 },
- { "$_ANDNOT_", 4 },
- { "$_ORNOT_", 4 },
- { "$_XOR_", 5 },
- { "$_XNOR_", 5 },
- { "$_AOI3_", 6 },
- { "$_OAI3_", 6 },
- { "$_AOI4_", 7 },
- { "$_OAI4_", 7 },
- { "$_MUX_", 4 },
- { "$_NMUX_", 4 }
+ { ID($_BUF_), 1 },
+ { ID($_NOT_), 2 },
+ { ID($_AND_), 4 },
+ { ID($_NAND_), 4 },
+ { ID($_OR_), 4 },
+ { ID($_NOR_), 4 },
+ { ID($_ANDNOT_), 4 },
+ { ID($_ORNOT_), 4 },
+ { ID($_XOR_), 5 },
+ { ID($_XNOR_), 5 },
+ { ID($_AOI3_), 6 },
+ { ID($_OAI3_), 6 },
+ { ID($_AOI4_), 7 },
+ { ID($_OAI4_), 7 },
+ { ID($_MUX_), 4 },
+ { ID($_NMUX_), 4 }
};
return db;
}
static const dict<RTLIL::IdString, int>& cmos_gate_cost() {
static const dict<RTLIL::IdString, int> db = {
- { "$_BUF_", 1 },
- { "$_NOT_", 2 },
- { "$_AND_", 6 },
- { "$_NAND_", 4 },
- { "$_OR_", 6 },
- { "$_NOR_", 4 },
- { "$_ANDNOT_", 6 },
- { "$_ORNOT_", 6 },
- { "$_XOR_", 12 },
- { "$_XNOR_", 12 },
- { "$_AOI3_", 6 },
- { "$_OAI3_", 6 },
- { "$_AOI4_", 8 },
- { "$_OAI4_", 8 },
- { "$_MUX_", 12 },
- { "$_NMUX_", 10 }
+ { ID($_BUF_), 1 },
+ { ID($_NOT_), 2 },
+ { ID($_AND_), 6 },
+ { ID($_NAND_), 4 },
+ { ID($_OR_), 6 },
+ { ID($_NOR_), 4 },
+ { ID($_ANDNOT_), 6 },
+ { ID($_ORNOT_), 6 },
+ { ID($_XOR_), 12 },
+ { ID($_XNOR_), 12 },
+ { ID($_AOI3_), 6 },
+ { ID($_OAI3_), 6 },
+ { ID($_AOI4_), 8 },
+ { ID($_OAI4_), 8 },
+ { ID($_MUX_), 12 },
+ { ID($_NMUX_), 10 }
};
return db;
}
@@ -92,8 +92,8 @@ struct CellCosts
{
RTLIL::Module *mod = design->module(cell->type);
- if (mod->attributes.count("\\cost"))
- return mod->attributes.at("\\cost").as_int();
+ if (mod->attributes.count(ID(cost)))
+ return mod->attributes.at(ID(cost)).as_int();
if (mod_cost_cache.count(mod->name))
return mod_cost_cache.at(mod->name);