mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-29 18:52:30 +00:00 
			
		
		
		
	Merge pull request #4776 from YosysHQ/krys/get_blackbox_attribute
Move get_blackbox_attribute method to Module instead of AttrObject
This commit is contained in:
		
						commit
						646c5a19a8
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -814,6 +814,7 @@ struct RTLIL::AttrObject | ||||||
| 	void set_bool_attribute(const RTLIL::IdString &id, bool value=true); | 	void set_bool_attribute(const RTLIL::IdString &id, bool value=true); | ||||||
| 	bool get_bool_attribute(const RTLIL::IdString &id) const; | 	bool get_bool_attribute(const RTLIL::IdString &id) const; | ||||||
| 
 | 
 | ||||||
|  | 	[[deprecated("Use Module::get_blackbox_attribute() instead.")]] | ||||||
| 	bool get_blackbox_attribute(bool ignore_wb=false) const { | 	bool get_blackbox_attribute(bool ignore_wb=false) const { | ||||||
| 		return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox)); | 		return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox)); | ||||||
| 	} | 	} | ||||||
|  | @ -1291,6 +1292,10 @@ public: | ||||||
| 	virtual void optimize(); | 	virtual void optimize(); | ||||||
| 	virtual void makeblackbox(); | 	virtual void makeblackbox(); | ||||||
| 
 | 
 | ||||||
|  | 	bool get_blackbox_attribute(bool ignore_wb=false) const { | ||||||
|  | 		return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox)); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	void connect(const RTLIL::SigSig &conn); | 	void connect(const RTLIL::SigSig &conn); | ||||||
| 	void connect(const RTLIL::SigSpec &lhs, const RTLIL::SigSpec &rhs); | 	void connect(const RTLIL::SigSpec &lhs, const RTLIL::SigSpec &rhs); | ||||||
| 	void new_connections(const std::vector<RTLIL::SigSig> &new_conn); | 	void new_connections(const std::vector<RTLIL::SigSig> &new_conn); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue