mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Remove .c_str() calls from log()/log_error()
There are some leftovers, but this is an easy regex-based approach that removes most of them.
This commit is contained in:
		
							parent
							
								
									c2291c10a6
								
							
						
					
					
						commit
						e0ae7b7af4
					
				
					 140 changed files with 623 additions and 623 deletions
				
			
		| 
						 | 
				
			
			@ -298,7 +298,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
					if ((!sig_fed_by_xor[input] && !sig_fed_by_io[input]) ||
 | 
			
		||||
						(sig_fed_by_io[input] && ibuf_out_to_packed_reg_cell[input] != cell))
 | 
			
		||||
					{
 | 
			
		||||
						log("Buffering input to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
						log("Buffering input to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
						auto xor_to_ff_wire = makexorbuffer(module, input, cell->name.c_str());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -320,7 +320,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
 | 
			
		||||
					if (!sig_fed_by_pterm[clock] && !sig_fed_by_bufg[clock])
 | 
			
		||||
					{
 | 
			
		||||
						log("Buffering clock to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
						log("Buffering clock to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
						auto pterm_to_ff_wire = makeptermbuffer(module, clock);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -338,7 +338,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
					{
 | 
			
		||||
						if (!sig_fed_by_pterm[set] && !sig_fed_by_bufgsr[set])
 | 
			
		||||
						{
 | 
			
		||||
							log("Buffering set to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
							log("Buffering set to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
							auto pterm_to_ff_wire = makeptermbuffer(module, set);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -352,7 +352,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
					{
 | 
			
		||||
						if (!sig_fed_by_pterm[reset] && !sig_fed_by_bufgsr[reset])
 | 
			
		||||
						{
 | 
			
		||||
							log("Buffering reset to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
							log("Buffering reset to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
							auto pterm_to_ff_wire = makeptermbuffer(module, reset);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -369,7 +369,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
						ce = sigmap(cell->getPort(ID(CE))[0]);
 | 
			
		||||
						if (!sig_fed_by_pterm[ce])
 | 
			
		||||
						{
 | 
			
		||||
							log("Buffering clock enable to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
							log("Buffering clock enable to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
							auto pterm_to_ff_wire = makeptermbuffer(module, ce);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -389,7 +389,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
					if ((!sig_fed_by_xor[input] && !sig_fed_by_ff[input]) ||
 | 
			
		||||
						packed_reg_out[input])
 | 
			
		||||
					{
 | 
			
		||||
						log("Buffering input to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
						log("Buffering input to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
						auto xor_to_io_wire = makexorbuffer(module, input, cell->name.c_str());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -404,7 +404,7 @@ struct Coolrunner2FixupPass : public Pass {
 | 
			
		|||
						oe = sigmap(cell->getPort(ID::E)[0]);
 | 
			
		||||
						if (!sig_fed_by_pterm[oe] && !sig_fed_by_bufgts[oe])
 | 
			
		||||
						{
 | 
			
		||||
							log("Buffering output enable to \"%s\"\n", cell->name.c_str());
 | 
			
		||||
							log("Buffering output enable to \"%s\"\n", cell->name);
 | 
			
		||||
 | 
			
		||||
							auto pterm_to_oe_wire = makeptermbuffer(module, oe);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,12 +46,12 @@ static void run_ice40_braminit(Module *module)
 | 
			
		|||
			continue;
 | 
			
		||||
 | 
			
		||||
		/* Open file */
 | 
			
		||||
		log("Processing %s : %s\n", RTLIL::id2cstr(cell->name), init_file.c_str());
 | 
			
		||||
		log("Processing %s : %s\n", RTLIL::id2cstr(cell->name), init_file);
 | 
			
		||||
 | 
			
		||||
		std::ifstream f;
 | 
			
		||||
		f.open(init_file.c_str());
 | 
			
		||||
		if (f.fail()) {
 | 
			
		||||
			log("Can not open file `%s`.\n", init_file.c_str());
 | 
			
		||||
			log("Can not open file `%s`.\n", init_file);
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -294,7 +294,7 @@ struct MicrochipDffOptPass : public Pass {
 | 
			
		|||
					ports += " + S";
 | 
			
		||||
				if (worthy_post_ce)
 | 
			
		||||
					ports += " + CE";
 | 
			
		||||
				log("  Merging D%s LUTs for %s/%s (%d -> %d)\n", ports.c_str(), log_id(cell), log_id(sig_Q.wire),
 | 
			
		||||
				log("  Merging D%s LUTs for %s/%s (%d -> %d)\n", ports, log_id(cell), log_id(sig_Q.wire),
 | 
			
		||||
				    GetSize(lut_d.second), GetSize(final_lut.second));
 | 
			
		||||
 | 
			
		||||
				// Okay, we're doing it.  Unmap ports.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -305,7 +305,7 @@ unmap:
 | 
			
		|||
				if (worthy_post_r) ports += " + R";
 | 
			
		||||
				if (worthy_post_s) ports += " + S";
 | 
			
		||||
				if (worthy_post_ce) ports += " + CE";
 | 
			
		||||
				log("  Merging D%s LUTs for %s/%s (%d -> %d)\n", ports.c_str(), log_id(cell), log_id(sig_Q.wire), GetSize(lut_d.second), GetSize(final_lut.second));
 | 
			
		||||
				log("  Merging D%s LUTs for %s/%s (%d -> %d)\n", ports, log_id(cell), log_id(sig_Q.wire), GetSize(lut_d.second), GetSize(final_lut.second));
 | 
			
		||||
 | 
			
		||||
				// Okay, we're doing it.  Unmap ports.
 | 
			
		||||
				if (worthy_post_r) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue