Some minor problems with Annex D are also noted in http://eda.org/svdb/bug_view_page.php?bug_id=1256 -- Brad -----Original Message----- From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Gordon Vreugdenhil Sent: Monday, April 03, 2006 1:50 PM To: SV_EC List Subject: [sv-ec] Problems with Appendix D - "Linked List" In Appendix D, List is described as being a 'include of a set of parameterized class definitions. This appears to be a flawed approach due to how parameterized class specializations are defined in 7.23. Consider: ------ file p.sv package pkg; 'include <List.svh> function void dump_list(input List#(int) thelist); ... endfunction endpackage ------ file top.sv module top; import pkg::*; 'include <List.svh> List#(int) mylist; .... initial pkg::dump_list(mylist); endmodule This will fail. The **included** parameterized class definitions create two "universes" of incompatible types; the specialization inside top and the one inside pkg are different types. Moving the 'include in top.sv outside of the module still doesn't help since then the parameterized class (and its specializations) are bound to the $unit and are not shared with the ones in package pkg. It isn't obvious that List is really needed in SV; queues have closely related functionality that it doesn't seem that List presents that much additional functionality -- a few additional methods (swap, etc) but it isn't obvious that we should retain it at all. If we do want to retain List, at the very least the List type should move to package std so that the type specializations can be usefully shared through the design (which I expect was the original intent). Gord -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Mon Apr 3 13:55:37 2006
This archive was generated by hypermail 2.1.8 : Mon Apr 03 2006 - 13:55:40 PDT