Is T a valid data type for a net? Yes, because T is an unpacked struct. Does each element of it, as required by bullet 2, have a valid data type for a net? Yes, because 'a' has data type 'reg', which is identical to 'logic', the default data type of a net. As required by bullet 1, 'logic' is a 4-state integral type. 'arr' is an unpacked array. Does each element of it, as required by bullet 2, have a valid data type for a net? Yes, because each is a packed array of 'reg', hence each has a 4-state integral type, as required by bullet 1. -- Brad ________________________________ From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of danielm Sent: Friday, July 13, 2007 4:22 AM To: sv-ec@eda.org Subject: [sv-ec] unpacked array embedded in struct as wire type How to interpret below LRM statement: >If a data type is not specified in the net declaration, then the data type of the net is logic.Certain restrictions apply to the data type of a net. A valid data type for a net shall be one of the following: >a) A 4-state integral type, including a packed array or packed struct >b) An unpacked array or unpacked struct, where each element has a valid data type for a net Is it allowed to have net with type : struct with unpacked array inside - example: typedef struct {reg a; reg [3:0] arr [10];} T; wire T w; Maybe LRM may be worded more precise here. DANiel -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Jul 13 08:15:57 2007
This archive was generated by hypermail 2.1.8 : Fri Jul 13 2007 - 08:16:23 PDT