Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

77 lines
3.0 KiB

  1. subroutine Bit_Specification
  2. use sROP_Other_Variables
  3. use sROP_Variables
  4. use CStringConfigurationVariables
  5. use SimulationVariables
  6. implicit none
  7. INTEGER :: io
  8. integer :: i , BitClass_name
  9. real(8) :: rd
  10. !data%State%ROP_Spec%H1=1.9
  11. !data%State%ROP_Spec%H2=7.
  12. !data%State%ROP_Spec%H3=1.
  13. !data%State%ROP_Spec%wdmax=7.
  14. data%State%ROP_Spec%BitClass = (data%Configuration%StringConfiguration%BitDefinition%BitCodeHundreds*100)+(data%Configuration%StringConfiguration%BitDefinition%BitCodeTens*10)+data%Configuration%StringConfiguration%BitDefinition%BitCodeOnes
  15. rd = SNGL(data%State%ROP_Spec%BitClass)/10.d0
  16. data%State%ROP_Spec%BrCoef = ( (SNGL(data%State%ROP_Spec%BitClass)/10.d0)-(DINT(rd)) )*10.d0
  17. BitClass_name = (data%State%ROP_Spec%BitClass)/10
  18. if ( (any(BitClass_name==(/11,12,13,14,21,22,23,24,31,32,33,34,41/))) ) then
  19. open(unit=233,file="Bit_Database.TXT")
  20. READ (233,*)
  21. DO i=1,13!(14-1(/=10))
  22. READ (233,*) data%State%ROP_Spec%name, data%State%ROP_Spec%H1, data%State%ROP_Spec%H2, data%State%ROP_Spec%H3, data%State%ROP_Spec%wdmax
  23. if ( data%State%ROP_Spec%name==BitClass_name ) then
  24. exit
  25. end if
  26. END DO
  27. close (233)
  28. else
  29. data%State%ROP_Spec%H1=1.50d0
  30. data%State%ROP_Spec%H2=1.0d0
  31. data%State%ROP_Spec%H3=.020d0
  32. data%State%ROP_Spec%wdmax=10.0d0
  33. end if
  34. !if(print_log) print*, 'data%State%ROP_Spec%H1=' , data%State%ROP_Spec%H1
  35. !if(print_log) print*, 'data%State%ROP_Spec%H2=' , data%State%ROP_Spec%H2
  36. !if(print_log) print*, 'data%State%ROP_Spec%H3=' , data%State%ROP_Spec%H3
  37. !if(print_log) print*, 'data%State%ROP_Spec%wdmax=' , data%State%ROP_Spec%wdmax
  38. !if(print_log) print*, 'data%State%ROP_Spec%name=' , data%State%ROP_Spec%name
  39. ! filename = 'Bit_Database.TXT'
  40. !open (UNIT=3, FILE=filename )
  41. !!if(print_log) print*, 'data%State%ROP_Spec%wdmax1=' , data%State%ROP_Spec%wdmax
  42. ! !if(print_log) print*, 'data%State%ROP_Spec%name1=' , data%State%ROP_Spec%name
  43. !!openif: if ( data%State%ROP_Spec%status == 0 ) then
  44. ! read (3,*,IOSTAT=data%State%ROP_Spec%status) ! Get next value
  45. ! readloop: do i=1,14
  46. ! read (3,*,IOSTAT=data%State%ROP_Spec%status) data%State%ROP_Spec%name, data%State%ROP_Spec%H1, data%State%ROP_Spec%H2, data%State%ROP_Spec%H3, data%State%ROP_Spec%wdmax ! Get next value
  47. ! !if(print_log) print*, 'data%State%ROP_Spec%wdmax=' , data%State%ROP_Spec%wdmax
  48. ! !if(print_log) print*, 'data%State%ROP_Spec%name=' , data%State%ROP_Spec%name
  49. ! if ( data%State%ROP_Spec%status /= 0 ) exit ! EXIT if not valid.
  50. ! if ( data%State%ROP_Spec%name == data%State%ROP_Spec%BitClass/10) exit
  51. ! end do readloop
  52. !!endif openif
  53. end subroutine