mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Re-added SigMap::allbits()
This commit is contained in:
		
							parent
							
								
									0f94902125
								
							
						
					
					
						commit
						276101f032
					
				
					 2 changed files with 14 additions and 0 deletions
				
			
		|  | @ -935,6 +935,8 @@ class mfp | ||||||
| 	mutable std::vector<int> parents; | 	mutable std::vector<int> parents; | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|  | 	typedef typename idict<K, 0, OPS>::const_iterator const_iterator; | ||||||
|  | 
 | ||||||
| 	int operator()(const K &key) const | 	int operator()(const K &key) const | ||||||
| 	{ | 	{ | ||||||
| 		int i = database(key); | 		int i = database(key); | ||||||
|  | @ -1014,6 +1016,9 @@ public: | ||||||
| 	size_t size() const { return database.size(); } | 	size_t size() const { return database.size(); } | ||||||
| 	bool empty() const { return database.empty(); } | 	bool empty() const { return database.empty(); } | ||||||
| 	void clear() { database.clear(); parents.clear(); } | 	void clear() { database.clear(); parents.clear(); } | ||||||
|  | 
 | ||||||
|  | 	const_iterator begin() const { return database.begin(); } | ||||||
|  | 	const_iterator end() const { return database.end(); } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| } /* namespace hashlib */ | } /* namespace hashlib */ | ||||||
|  |  | ||||||
|  | @ -310,6 +310,15 @@ struct SigMap | ||||||
| 		apply(sig); | 		apply(sig); | ||||||
| 		return sig; | 		return sig; | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	RTLIL::SigSpec allbits() const | ||||||
|  | 	{ | ||||||
|  | 		RTLIL::SigSpec sig; | ||||||
|  | 		for (auto &bit : database) | ||||||
|  | 			if (bit.wire != nullptr) | ||||||
|  | 				sig.append(bit); | ||||||
|  | 		return sig; | ||||||
|  | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| YOSYS_NAMESPACE_END | YOSYS_NAMESPACE_END | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue