diff options
| author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-02-16 07:48:44 -0800 | 
|---|---|---|
| committer | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-02-16 07:48:44 -0800 | 
| commit | 2eabe43efa59f7264fec9252a79f937c6bd58a31 (patch) | |
| tree | 6d0cb63017af1ee536d2e7d8839b7422c4f3189a | |
| parent | 6fed2dc996a57b0f7c4205e1d76da865dd410982 (diff) | |
| parent | cf25dc9ce7216f740611d802eba6f978d18899e3 (diff) | |
| download | yosys-2eabe43efa59f7264fec9252a79f937c6bd58a31.tar.gz yosys-2eabe43efa59f7264fec9252a79f937c6bd58a31.tar.bz2 yosys-2eabe43efa59f7264fec9252a79f937c6bd58a31.zip | |
Merge https://github.com/cliffordwolf/yosys
| -rw-r--r-- | kernel/celltypes.h | 2 | ||||
| -rw-r--r-- | passes/techmap/techmap.cc | 10 | 
2 files changed, 9 insertions, 3 deletions
| diff --git a/kernel/celltypes.h b/kernel/celltypes.h index 04db5125e..8f31d0172 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -313,7 +313,7 @@ struct CellTypes  		if (type == "$_OR_")  			return const_or(arg1, arg2, false, false, 1);  		if (type == "$_NOR_") -			return eval_not(const_and(arg1, arg2, false, false, 1)); +			return eval_not(const_or(arg1, arg2, false, false, 1));  		if (type == "$_XOR_")  			return const_xor(arg1, arg2, false, false, 1);  		if (type == "$_XNOR_") diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index b351d3be8..e85714b57 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -327,8 +327,9 @@ struct TechmapWorker  		for (auto &it : tpl->cells_)  		{  			std::string c_name = it.second->name.str(); +			bool techmap_replace_cell = (!flatten_mode) && (c_name == "\\_TECHMAP_REPLACE_"); -			if (!flatten_mode && c_name == "\\_TECHMAP_REPLACE_") +			if (techmap_replace_cell)  				c_name = orig_cell_name;  			else  				apply_prefix(cell->name.str(), c_name); @@ -358,6 +359,11 @@ struct TechmapWorker  			if (c->attributes.count("\\src"))  				c->add_strpool_attribute("\\src", extra_src_attrs); + +			if (techmap_replace_cell) +				for (auto attr : cell->attributes) +					if (!c->attributes.count(attr.first)) +						c->attributes[attr.first] = attr.second;  		}  		for (auto &it : tpl->connections()) { @@ -1005,7 +1011,7 @@ struct TechmapPass : public Pass {  		log("constant value.\n");  		log("\n");  		log("A cell with the name _TECHMAP_REPLACE_ in the map file will inherit the name\n"); -		log("of the cell that is being replaced.\n"); +		log("and attributes of the cell that is being replaced.\n");  		log("\n");  		log("See 'help extract' for a pass that does the opposite thing.\n");  		log("\n"); | 
