mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Old changes to old files
This commit is contained in:
		
							parent
							
								
									648a3aae09
								
							
						
					
					
						commit
						e709ad4145
					
				@ -163,7 +163,7 @@ module srtpreproc (
 | 
			
		||||
  assign D = {4'b0001, Int ? PreprocB : PreprocY};
 | 
			
		||||
 | 
			
		||||
  // Integer exponent and sign calculations
 | 
			
		||||
  assign intExp = zeroCntB - zeroCntA - Mod + (PreprocA >= PreprocB);
 | 
			
		||||
  assign intExp = zeroCntB - zeroCntA + (PreprocA >= PreprocB);
 | 
			
		||||
  assign intSign = Signed & (SrcA[`XLEN - 1] ^ SrcB[`XLEN - 1]);
 | 
			
		||||
 | 
			
		||||
  // Number of cycles of divider
 | 
			
		||||
@ -462,7 +462,7 @@ module srtpostproc(
 | 
			
		||||
  end
 | 
			
		||||
  assign floatRes = S[`DIVLEN] ? S[`DIVLEN:1] : S[`DIVLEN-1:0];
 | 
			
		||||
  assign intRes = intS[`DIVLEN] ? intS[`DIVLEN:1] : intS[`DIVLEN-1:0];
 | 
			
		||||
  assign shiftRem = (intRem >> (zeroCntD));
 | 
			
		||||
  assign shiftRem = (intRem >> (zeroCntD+1));
 | 
			
		||||
  always_comb begin
 | 
			
		||||
    if (Int) begin
 | 
			
		||||
      if (Mod) Result = shiftRem[`DIVLEN-1:0];
 | 
			
		||||
 | 
			
		||||
@ -70,9 +70,9 @@ module testbench;
 | 
			
		||||
  integer testnum, errors;
 | 
			
		||||
 | 
			
		||||
  // Equip Int, Sqrt, or IntMod test
 | 
			
		||||
  assign Int =  1'b0;
 | 
			
		||||
  assign Mod =  1'b0;
 | 
			
		||||
  assign Sqrt = 1'b1;
 | 
			
		||||
  assign Int =  1'b1;
 | 
			
		||||
  assign Mod =  1'b1;
 | 
			
		||||
  assign Sqrt = 1'b0;
 | 
			
		||||
 | 
			
		||||
  // Divider
 | 
			
		||||
  srt srt(.clk, .Start(req), 
 | 
			
		||||
@ -101,7 +101,7 @@ module testbench;
 | 
			
		||||
    begin
 | 
			
		||||
      testnum = 0; 
 | 
			
		||||
      errors = 0;
 | 
			
		||||
      $readmemh ("sqrttestvectors", Tests);
 | 
			
		||||
      $readmemh ("modtestvectors", Tests);
 | 
			
		||||
      Vec = Tests[testnum];
 | 
			
		||||
      a = Vec[`mema];
 | 
			
		||||
      {asign, aExp, afrac} = a;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user