Requisicao.java 942 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package cache;
  7. /**
  8. *
  9. * @author Juninho Carlos
  10. */
  11. public class Requisicao {
  12. public int palavra;
  13. public int conjunto;
  14. public long endereco;
  15. public long limiteSup;
  16. public long limiteInf;
  17. public boolean read;
  18. public Requisicao(long address,boolean read){
  19. long aux;
  20. this.read = read;
  21. this.palavra = (int)(address/4)%32;
  22. this.endereco = address;
  23. aux = address/128;
  24. if(aux > 31){
  25. aux = aux%32;
  26. this.conjunto = (int)aux;
  27. }else{
  28. this.conjunto = (int)aux;
  29. }
  30. this.limiteInf = address - palavra*4;
  31. this.limiteSup = limiteInf + 124;
  32. }
  33. }