mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	clmul passes lint
This commit is contained in:
		
							parent
							
								
									d7c540d047
								
							
						
					
					
						commit
						76bc1b5999
					
				@ -37,14 +37,26 @@ module clmul #(parameter WIDTH=32) (
 | 
			
		||||
  // Note: only generates the bottom WIDTH bits of the carryless multiply.
 | 
			
		||||
  //    To get the high bits or the reversed bits, the inputs can be shifted and reversed
 | 
			
		||||
  //    as they are in zbc where this is instantiated
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
  genvar i;
 | 
			
		||||
  for (i=0; i<WIDTH; i++) begin
 | 
			
		||||
    assign pp[i] = ((A & {(WIDTH){B[i]}}) << i); // Fill partial product array
 | 
			
		||||
    // ClmulResult ^= pp[i];
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  assign ClmulResult = pp.xor();
 | 
			
		||||
  */
 | 
			
		||||
  genvar i,j;
 | 
			
		||||
  for (i=1; i<WIDTH;i++) begin:outer //loop fills partial product array
 | 
			
		||||
    for (j=0;j<=i;j++) begin: inner
 | 
			
		||||
      assign pp[i][j] = A[i]&B[j];
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  for (i=1;i<WIDTH;i++) begin:xortree
 | 
			
		||||
    assign ClmulResult[i] = ^pp[i:0][i];
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  assign ClmulResult[0] = A[0]&B[0];
 | 
			
		||||
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user