mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fix SystemVerilog support for .v files
This commit is contained in:
		
							parent
							
								
									9b66cb015b
								
							
						
					
					
						commit
						b5af9b9a8a
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -3382,10 +3382,14 @@ struct VerificPass : public Pass {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (GetSize(args) > argidx && (args[argidx] == "-auto_discover" || args[argidx] == "-hdl_sort"))
 | 
							if (GetSize(args) > argidx && (args[argidx] == "-auto_discover" || args[argidx] == "-hdl_sort"))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			// Always operate in SystemVerilog mode (overriding not supported)
 | 
								// Always operate in SystemVerilog mode
 | 
				
			||||||
			unsigned verilog_mode = veri_file::SYSTEM_VERILOG;
 | 
								unsigned verilog_mode = veri_file::SYSTEM_VERILOG;
 | 
				
			||||||
			const char* arg = args[argidx].c_str();
 | 
								const char* arg = args[argidx].c_str();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								// Treat .v as SystemVerilog too (overriding default behavior to treat it as VERILOG_2000)
 | 
				
			||||||
 | 
								hdl_file_sort::RemoveFileExt(".v");
 | 
				
			||||||
 | 
								hdl_file_sort::AddFileExtMode(".v", veri_file::SYSTEM_VERILOG);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Select analyze function
 | 
								// Select analyze function
 | 
				
			||||||
			auto analyze_function = (args[argidx] == "-auto_discover") ? hdl_file_sort::AnalyzeDiscoveredFiles : hdl_file_sort::AnalyzeSortedFiles;
 | 
								auto analyze_function = (args[argidx] == "-auto_discover") ? hdl_file_sort::AnalyzeDiscoveredFiles : hdl_file_sort::AnalyzeSortedFiles;
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue