mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	rtlil: Add lsb() msb() SigSpec helpers
				
					
				
			This commit is contained in:
		
							parent
							
								
									032fab1f54
								
							
						
					
					
						commit
						84568453f8
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -921,6 +921,9 @@ public:
 | 
				
			||||||
	RTLIL::SigSpec extract(int offset, int length = 1) const;
 | 
						RTLIL::SigSpec extract(int offset, int length = 1) const;
 | 
				
			||||||
	RTLIL::SigSpec extract_end(int offset) const { return extract(offset, width_ - offset); }
 | 
						RTLIL::SigSpec extract_end(int offset) const { return extract(offset, width_ - offset); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						RTLIL::SigBit lsb() const { log_assert(width_); return (*this)[0]; };
 | 
				
			||||||
 | 
						RTLIL::SigBit msb() const { log_assert(width_); return (*this)[width_ - 1]; };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void append(const RTLIL::SigSpec &signal);
 | 
						void append(const RTLIL::SigSpec &signal);
 | 
				
			||||||
	inline void append(Wire *wire) { append(RTLIL::SigSpec(wire)); }
 | 
						inline void append(Wire *wire) { append(RTLIL::SigSpec(wire)); }
 | 
				
			||||||
	inline void append(const RTLIL::SigChunk &chunk) { append(RTLIL::SigSpec(chunk)); }
 | 
						inline void append(const RTLIL::SigChunk &chunk) { append(RTLIL::SigSpec(chunk)); }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue