mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Added support for YOSYS_COVER_FILE env variable
This commit is contained in:
		
							parent
							
								
									1b0d5fc22d
								
							
						
					
					
						commit
						798f713629
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		|  | @ -750,11 +750,18 @@ int main(int argc, char **argv) | |||
| 	yosys_design = NULL; | ||||
| 
 | ||||
| #ifndef NDEBUG | ||||
| 	if (getenv("YOSYS_COVER_DIR")) | ||||
| 	if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE")) | ||||
| 	{ | ||||
| 		char filename_buffer[4096]; | ||||
| 		FILE *f; | ||||
| 
 | ||||
| 		if (getenv("YOSYS_COVER_DIR")) { | ||||
| 			snprintf(filename_buffer, 4096, "%s/yosys_cover_%d_XXXXXX.txt", getenv("YOSYS_COVER_DIR"), getpid()); | ||||
| 		FILE *f = fdopen(mkstemps(filename_buffer, 4), "w"); | ||||
| 			f = fdopen(mkstemps(filename_buffer, 4), "w"); | ||||
| 		} else { | ||||
| 			snprintf(filename_buffer, 4096, "%s", getenv("YOSYS_COVER_FILE")); | ||||
| 			f = fopen(filename_buffer, "w"); | ||||
| 		} | ||||
| 
 | ||||
| 		if (f == NULL) | ||||
| 			log_error("Can't create coverage file `%s'.\n", filename_buffer); | ||||
|  |  | |||
|  | @ -1947,6 +1947,7 @@ bool RTLIL::SigSpec::operator <(const RTLIL::SigSpec &other) const | |||
| 			return chunks_[i] < other.chunks_[i]; | ||||
| 		} | ||||
| 
 | ||||
| 	cover("kernel.rtlil.sigspec.comp_lt.equal"); | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
|  | @ -1978,6 +1979,7 @@ bool RTLIL::SigSpec::operator ==(const RTLIL::SigSpec &other) const | |||
| 			return false; | ||||
| 		} | ||||
| 
 | ||||
| 	cover("kernel.rtlil.sigspec.comp_eq.equal"); | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue