home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11645 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  3.5 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ames!pacbell.com!charon.amdahl.com!amdahl!amdcad!angelo!roberts
  2. From: roberts@angelo.amd.com (Dave Roberts)
  3. Newsgroups: comp.arch
  4. Subject: Logic Minimization Algorithms
  5. Message-ID: <1992Dec15.024904.22554@amd.com>
  6. Date: 15 Dec 92 02:49:04 GMT
  7. Sender: usenet@amd.com (NetNews)
  8. Organization: Advanced Micro Devices, Santa Clara, CA
  9. Lines: 69
  10. Nntp-Posting-Host: angelo
  11.  
  12.  
  13. I couldn't think of a more appropriate news group to post this in, so
  14. here goze:
  15.  
  16. What sort of algorithms are typically used to minimize logic equations
  17. specified in high level hardware description languages (PAL software,
  18. Verilog, etc.)?
  19.  
  20. I've read and understand Quine-McClusky, and doodled around with
  21. implementing my own versions.  It seems to work well except for the
  22. final step: choosing a set of prime implicants from the set that you
  23. just produced (by reductions of the form x * y + x * ~y = x, for those
  24. of you who don't remember.  Prime implicants are those product terms
  25. that can't be reduced any further by the application of the above
  26. identity).
  27.  
  28. The book that I read that had this in it does the following: it
  29. enumerates all the minterms used by the original function and finds a
  30. set of prime implicants that covers all the minterms.
  31.  
  32. A few problems that I ran into when I fiddling around:
  33.  
  34. (1) Often the input function isn't specified as a sum of minterms.
  35. It's specified as a sum of product terms which may or may not be
  36. minterms.  Some of the minterms have usually been combined or reduced
  37. already.  Generating all the minterms could be infeasible for
  38. functions will a large number of variables.  For instance, if you
  39. think about it, a function with 32 variables could easily generate
  40. over 1 million minterms, as 2^32 is 4G.  Representing this with any
  41. sort of data structure could easily exhaust all your memory, physical
  42. or virtual.
  43.  
  44. (2) If the minterms can't be enumerated, it doesn't seem like the
  45. prime implicants that have been generated can be tested for coverage
  46. against the minterms.  Minterms are needed to give a shot at an
  47. optimal solution.  Testing for coverage against the input product
  48. terms, which remember may be prereduced terms, not minterms, could
  49. lead to a very non-optimal selection of prime implicants.  For
  50. instance, in the worst case, the routine might be handed the set of
  51. prime implicants to start with.  If the resulting prime implicants of
  52. the reduction process (which are the exact same ones are were input to
  53. the routine since no reduction is possible because they are prime
  54. implicants) are tested against the input set, the routine would
  55. determine that all the prime implicants would be necessary to cover
  56. the input pterms.  Clearly, this may not be the case, and a suboptimal
  57. solution would result.
  58.  
  59. (3) Even if the minterms can be enumerated, it seems like finding the
  60. set of optimal prime implicants is on the order of n!, where n is the
  61. number of prime implicants left after the reduction.  Depending on the
  62. number of variables and the function, this could be a lot.  How is, or
  63. rather, is this done in a reasonable time?  Are optimal solutions
  64. sought?  Are heuristics applied, with suboptimal solutions derived, as
  65. a result?
  66.  
  67. So I guess my question is, how are these problems overcome?  Do people
  68. use other algorithms than Quine-McClusky instead that don't suffer
  69. these problems?  If so, what are they?
  70.  
  71. Does someone have references of articles that describe this stuff?
  72. Articles themselves?
  73.  
  74. What about publicly available source code that implements the various
  75. algorithms?
  76.  
  77. Thanks for any help people can give to satisfy my curiousity.
  78.  
  79. Dave Roberts
  80. roberts@brahms.amd.com
  81.