home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / tech / palsum8 / decode.doc < prev    next >
Text File  |  1986-11-14  |  4KB  |  80 lines

  1.  
  2.                     ADDRESS DECODING PROGRAM
  3.                          by Bryon Moyer
  4.  
  5. This  program  generates Boolean Equations for  address  decoding
  6. applications.   All  you have to provide is the number of address
  7. pins (up to 16), and the bottom and top addresses of the range to
  8. be decoded, and the program will crank out the Boolean Equations.
  9.  
  10. The procedure is really quite simple and painless.  The following
  11. are  just some helpful hints in case something just doesn't  make
  12. sense.
  13.  
  14. To invoke the program, merely type
  15.  
  16.                          DECODE
  17.  
  18. You  can  either generate equations on the screen,  or have  them 
  19. sent to a file.   If you choose to have them sent to a file, they 
  20. will be sent to a file named "decode.out".  Note that if you have 
  21. run this program previously,  you will already have a file  named 
  22. "decode.out"  if you did not rename it afterwards.   The  program 
  23. will  let  you quit and rename the old file so that you will  not 
  24. lose it.   If you continue the program instead, the old file will 
  25. be lost.
  26.  
  27. The  prompts should lead you through the  procedure.   Note  that
  28. when the addresses are requested,
  29.  
  30.      -- enter them in HEX (upper or lower case).
  31.  
  32.      -- use  as  many  digits as appropriate for  the  number  of
  33.         address  bits  you are using,  including all leading  0s.
  34.  
  35.         For instance,  if the bottom address is 0, then you would
  36.         enter 0 for 1 - 4 address bits,  but enter 000 for 9 - 12
  37.         bits.   If you don't do this, the program will keep after
  38.         you until you appease it.
  39.  
  40.      -- don't  enter an address that's out of range;  you'll  get
  41.         caught.
  42.  
  43.      -- don't enter a bottom address that's greater than the  top
  44.         address.   First,  this  makes  no  sense.   Second,  the
  45.         program won't let you.
  46.  
  47. When  you enter an appropriate address,  the program will echo it
  48. in BINARY.
  49.  
  50. After the top and bottom addresses have been entered, the program
  51. will calculate the equations and print them out.  The output name
  52. will  be Xi,  where i just keeps track of the number of equations
  53. you have generated.  ALL input pins are specified as Aj,  where j
  54. is  the  appropriate  bit.     Thus,   if  8  address  lines  are
  55. specified,   then the  input  pins  will  be  A7...A0,   with  A7
  56. being  the  most significant bit.
  57.  
  58. After  the equation has been displayed,  the program will  report
  59. the number of product terms and inputs used.  This may be trivial
  60. for some equations,  but, for instance, if you specify 16 address
  61. lines,  and  have bottom address 0001 and  top address FFFE,  240
  62. product terms  result;  I  challenge you to count them  as   they 
  63. scroll merrily by.
  64.  
  65. At  this  point,  you will be offered the opportunity  to  decode
  66. another address range.  When asked, if you enter anything but "Y"
  67. (or "y"), it will assume "no", and terminate the program.
  68.   
  69. If  you have generated a file containing the   equations,  rename 
  70. the  file after you are done if you wish to keep it.   Otherwise, 
  71. the  next time you run this program,  you will have to rename  it 
  72. then.  You will   also need   to use an editor to perform  global 
  73. replacements   of  default   pin  names  with the ones you  want.     
  74. Note  that  the equations are generated as active HI signals;  if 
  75. you want active LO signals,  be sure to add a slash ('/') to  the 
  76. left-hand  side of the equations.    You can then merge this file  
  77. in with  your  PDS file.
  78.  
  79. Happy decoding...
  80.