mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	rtlil: add AttrObject::has_attribute.
This commit is contained in:
		
							parent
							
								
									ff7a1a1568
								
							
						
					
					
						commit
						b6f624b56b
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		|  | @ -273,6 +273,11 @@ bool RTLIL::Const::is_fully_undef() const | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | bool RTLIL::AttrObject::has_attribute(RTLIL::IdString id) const | ||||||
|  | { | ||||||
|  | 	return attributes.count(id); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void RTLIL::AttrObject::set_bool_attribute(RTLIL::IdString id, bool value) | void RTLIL::AttrObject::set_bool_attribute(RTLIL::IdString id, bool value) | ||||||
| { | { | ||||||
| 	if (value) | 	if (value) | ||||||
|  |  | ||||||
|  | @ -656,6 +656,8 @@ struct RTLIL::AttrObject | ||||||
| { | { | ||||||
| 	dict<RTLIL::IdString, RTLIL::Const> attributes; | 	dict<RTLIL::IdString, RTLIL::Const> attributes; | ||||||
| 
 | 
 | ||||||
|  | 	bool has_attribute(RTLIL::IdString id) const; | ||||||
|  | 
 | ||||||
| 	void set_bool_attribute(RTLIL::IdString id, bool value=true); | 	void set_bool_attribute(RTLIL::IdString id, bool value=true); | ||||||
| 	bool get_bool_attribute(RTLIL::IdString id) const; | 	bool get_bool_attribute(RTLIL::IdString id) const; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue