mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| module fulladder (A, B, CI, CO, Y);
 | |
|   input A;
 | |
|   input B;
 | |
|   input CI;
 | |
|   output CO;
 | |
|   assign CO = (((A&B)|(B&CI))|(CI&A)); // "(((A * B)+(B * CI))+(CI * A))"
 | |
|   output Y;
 | |
|   assign Y = ((A^B)^CI); // "((A^B)^CI)"
 | |
| endmodule
 |