mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	btor
This commit is contained in:
		
							parent
							
								
									09bd82db21
								
							
						
					
					
						commit
						ffd768ce86
					
				
					 4 changed files with 816 additions and 0 deletions
				
			
		
							
								
								
									
										22
									
								
								techlibs/common/pmux2mux.v
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								techlibs/common/pmux2mux.v
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| module \$pmux (A, B, S, Y); | ||||
| 
 | ||||
| wire [1023:0] _TECHMAP_DO_ = "proc; clean"; | ||||
| 
 | ||||
| parameter WIDTH = 1; | ||||
| parameter S_WIDTH = 1; | ||||
| 
 | ||||
| input [WIDTH-1:0] A; | ||||
| input [WIDTH*S_WIDTH-1:0] B; | ||||
| input [S_WIDTH-1:0] S; | ||||
| output reg [WIDTH-1:0] Y; | ||||
| 
 | ||||
| integer i; | ||||
| 
 | ||||
| always @* begin | ||||
|         Y <= A; | ||||
|         for (i = 0; i < S_WIDTH; i=i+1) | ||||
|                 if (S[i]) | ||||
|                         Y <= B[WIDTH*i +: WIDTH]; | ||||
| end | ||||
| 
 | ||||
| endmodule | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue