www.pudn.com > x86.rar > pop.v, change:2007-12-05,size:858b


module pop(PopOut, TagWordOut, PopIn, TagWordIn, Op1_Tag); 
input [2:0] PopIn,Op1_Tag; 
input [15:0] TagWordIn; 
output [2:0] PopOut; 
output [15:0] TagWordOut; 
 
reg [15:0] TagWordOut; 
reg [2:0] PopOut; 
 
 
 
always@(PopIn or TagWordIn or Op1_Tag) 
 begin 
  case(PopIn) 
 
   3'd0: PopOut = 3'd1; 
 
   3'd1: PopOut = 3'd2; 
 
   3'd2: PopOut = 3'd3; 
 
   3'd3: PopOut = 3'd4; 
 
   3'd4: PopOut = 3'd5; 
 
   3'd5: PopOut = 3'd6; 
 
   3'd6: PopOut = 3'd7; 
 
   3'd7: PopOut = 3'd0; 
 
  endcase 
  case(Op1_Tag) 
 
   3'd0: TagWordOut[1:0] = 2'b11; 
 
   3'd1: TagWordOut[3:2] = 2'b11; 
 
   3'd2: TagWordOut[5:4] = 2'b11; 
 
   3'd3: TagWordOut[7:6] = 2'b11; 
 
   3'd4: TagWordOut[9:8] = 2'b11; 
 
   3'd5: TagWordOut[11:10] = 2'b11; 
 
   3'd6: TagWordOut[13:12] = 2'b11; 
 
   3'd7: TagWordOut[15:14] = 2'b11; 
 
  endcase 
 
 end 
endmodule