home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / verilog / 290 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.2 KB  |  75 lines

  1. Newsgroups: comp.lang.verilog
  2. Path: sparky!uunet!Cadence.COM!cadence.com!cranston
  3. From: cranston@ayn.com (W. Scott Cranston)
  4. Subject: Re: Getting round verilog hierarchical structure
  5. In-Reply-To: dank@blacks.jpl.nasa.gov's message of Tue, 28 Jul 1992 00:14:59 GMT
  6. Message-ID: <CRANSTON.92Jul29102024@ayn.com>
  7. Sender: usenet@Cadence.COM (Usenet News)
  8. Nntp-Posting-Host: ayn
  9. Organization: Cadence Design Systems, Lowell MA, United States of America
  10. References: <Bs23x4.330@brunel.ac.uk> <dank.712282499@blacks.jpl.nasa.gov>
  11. Date: Fri, 17 Jul 1992 02:36:24 GMT
  12. Lines: 61
  13.  
  14. In article <dank.712282499@blacks.jpl.nasa.gov> dank@blacks.jpl.nasa.gov (Dan Kegel) writes:
  15.  
  16. > Chijioke.Anyanwu@brunel.ac.uk (Chijioke D Anyanwu) writes:
  17. > >Modules in Verilog are organised in a hierarchical structure which,
  18. > >presumably, is in keeping in line with standard programming practice.
  19. > >However, I've come up against situations when this rigid structure has
  20. > >been a problem. 
  21. > >As a simple example, consider the system below in which A, B and C are
  22. > >modules (representing hardware blocks) with dedicated links to each other.
  23. > > [ Diagram of A, B, and C, with a signal running from each to each. ]
  24. > Why not use an overlying module which invokes A, B, and C,
  25. > and uses module ports for all communication?
  26. > Seems more egalitarian than putting any of A, B, or C higher or lower.
  27. > - Dan Kegel (dank@blacks.jpl.nasa.gov)
  28.  
  29. Or...remember that one can always use a complete hierarchical path to
  30. access objects in any other module in the system.  
  31.  
  32. For instance:
  33.  
  34. module a;
  35.  
  36. wire m;
  37.  
  38. xor x1(m, b.t, c.t);
  39.  
  40. endmodule
  41.  
  42.  
  43. module b;
  44. wire w1, t;
  45.  
  46. nand n1(t, w1, c.t);
  47.  
  48. endmodule
  49.  
  50.  
  51. module c;
  52. wire w1, w2, t;
  53.  
  54. nor n1(t, w1, w2);
  55.  
  56. endmodule
  57.  
  58. I believe this will give you what you want.
  59.  
  60. Scott Cranston
  61. Cadence Design Systems
  62.  
  63.  
  64.  
  65. +---------^>        "The Spirit of Massachusetts is the Spirit of America"
  66. |        <                    -Massachusetts Division of Tourism
  67. +-------. \   7     "Right..."
  68.          \_\_/                -cranston@cadence.com
  69. --
  70. +---------^>        "The Spirit of Massachusetts is the Spirit of America"
  71. |        <                    -Massachusetts Division of Tourism
  72. +-------. \   7     "Right..."
  73.          \_\_/                -cranston@cadence.com
  74.