mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	RTLIL::S{0,1} -> State::S{0,1}
This commit is contained in:
		
							parent
							
								
									e6d5147214
								
							
						
					
					
						commit
						7164996921
					
				
					 15 changed files with 86 additions and 86 deletions
				
			
		|  | @ -36,7 +36,7 @@ struct MaccmapWorker | |||
| 
 | ||||
| 	void add(RTLIL::SigBit bit, int position) | ||||
| 	{ | ||||
| 		if (position >= width || bit == RTLIL::S0) | ||||
| 		if (position >= width || bit == State::S0) | ||||
| 			return; | ||||
| 
 | ||||
| 		if (bits.at(position).count(bit)) { | ||||
|  | @ -53,7 +53,7 @@ struct MaccmapWorker | |||
| 
 | ||||
| 		if (do_subtract) { | ||||
| 			a = module->Not(NEW_ID, a); | ||||
| 			add(RTLIL::S1, 0); | ||||
| 			add(State::S1, 0); | ||||
| 		} | ||||
| 
 | ||||
| 		for (int i = 0; i < width; i++) | ||||
|  | @ -80,7 +80,7 @@ struct MaccmapWorker | |||
| 			else | ||||
| 			{ | ||||
| 				add(module->And(NEW_ID, a, RTLIL::SigSpec(b[i], width)), false, do_subtract); | ||||
| 				a = {a.extract(0, width-1), RTLIL::S0}; | ||||
| 				a = {a.extract(0, width-1), State::S0}; | ||||
| 			} | ||||
| 	} | ||||
| 
 | ||||
|  | @ -88,10 +88,10 @@ struct MaccmapWorker | |||
| 	{ | ||||
| 		int start_index = 0, stop_index = GetSize(in1); | ||||
| 
 | ||||
| 		while (start_index < stop_index && in1[start_index] == RTLIL::S0 && in2[start_index] == RTLIL::S0 && in3[start_index] == RTLIL::S0) | ||||
| 		while (start_index < stop_index && in1[start_index] == State::S0 && in2[start_index] == RTLIL::S0 && in3[start_index] == RTLIL::S0) | ||||
| 			start_index++; | ||||
| 
 | ||||
| 		while (start_index < stop_index && in1[stop_index-1] == RTLIL::S0 && in2[stop_index-1] == RTLIL::S0 && in3[stop_index-1] == RTLIL::S0) | ||||
| 		while (start_index < stop_index && in1[stop_index-1] == State::S0 && in2[stop_index-1] == RTLIL::S0 && in3[stop_index-1] == RTLIL::S0) | ||||
| 			stop_index--; | ||||
| 
 | ||||
| 		if (start_index == stop_index) | ||||
|  | @ -222,7 +222,7 @@ struct MaccmapWorker | |||
| 					RTLIL::SigSpec in3 = summands[i+2]; | ||||
| 					RTLIL::SigSpec out1, out2; | ||||
| 					fulladd(in1, in2, in3, out1, out2); | ||||
| 					RTLIL::SigBit extra_bit = RTLIL::S0; | ||||
| 					RTLIL::SigBit extra_bit = State::S0; | ||||
| 					if (!tree_sum_bits.empty()) { | ||||
| 						extra_bit = tree_sum_bits.back(); | ||||
| 						tree_sum_bits.pop_back(); | ||||
|  | @ -240,8 +240,8 @@ struct MaccmapWorker | |||
| 		RTLIL::Cell *c = module->addCell(NEW_ID, "$alu"); | ||||
| 		c->setPort("\\A", summands.front()); | ||||
| 		c->setPort("\\B", summands.back()); | ||||
| 		c->setPort("\\CI", RTLIL::S0); | ||||
| 		c->setPort("\\BI", RTLIL::S0); | ||||
| 		c->setPort("\\CI", State::S0); | ||||
| 		c->setPort("\\BI", State::S0); | ||||
| 		c->setPort("\\Y", module->addWire(NEW_ID, width)); | ||||
| 		c->setPort("\\X", module->addWire(NEW_ID, width)); | ||||
| 		c->setPort("\\CO", module->addWire(NEW_ID, width)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue