mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	proc_mux: Fix crash when trying to optimize non-existant mux to shiftx
last_mux_cell can be NULL ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
		
							parent
							
								
									721fa1cbd8
								
							
						
					
					
						commit
						39380c45ba
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -361,7 +361,7 @@ RTLIL::SigSpec signal_to_mux_tree(RTLIL::Module *mod, SnippetSwCache &swcache, d
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		// Transform into a $shiftx where possible
 | 
			
		||||
		if (shiftx && last_mux_cell->type == "$pmux") {
 | 
			
		||||
		if (shiftx && last_mux_cell && last_mux_cell->type == "$pmux") {
 | 
			
		||||
			// Create bit-blasted $shiftx-es that shifts by the address line used in the case statement
 | 
			
		||||
			auto pmux_b_port = last_mux_cell->getPort("\\B");
 | 
			
		||||
			auto pmux_y_port = last_mux_cell->getPort("\\Y");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue