mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Add an SigSpec::at(offset, defval) convenience method
This commit is contained in:
		
							parent
							
								
									3a87dc3524
								
							
						
					
					
						commit
						54708dfbd7
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -818,6 +818,7 @@ public: | |||
| 
 | ||||
| 	operator std::vector<RTLIL::SigChunk>() const { return chunks(); } | ||||
| 	operator std::vector<RTLIL::SigBit>() const { return bits(); } | ||||
| 	RTLIL::SigBit at(int offset, const RTLIL::SigBit &defval) { return offset < width_ ? (*this)[offset] : defval; } | ||||
| 
 | ||||
| 	unsigned int hash() const { if (!hash_) updhash(); return hash_; }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue