Steven Sharp wrote: > ... I don't think that the data type declaration syntax > belongs anywhere but in a declaration (typedef or object declaration). In > other contexts, the syntax is ambiguous. For example: > > typedef logic [N-1:0] T1; > typedef logic T2 [N-1:0]; > > parameter type p = logic [N-1:0]; > > It is clear what types T1 and T2 represent, because the position of the > name in the declaration syntax disambiguates them. But it is not clear > what type p is supposed to represent. Is it similar to T1 or T2? And > putting type() around it doesn't help. > > Steven Sharp > sharp@cadence.com > Steven, So would you favor eliminating the assignment "=" from the syntax of parameter type altogether? parameter type my_type P; /* was: parameter type P = my_type */ parameter type logic [N-1:0] P1; /* matches T1 */ parameter type logic P2 [N-1:0]; /* matches T2 */ Notice the similarity, then, between a "parameter type" and a "typedef". To me this argues for replacing the keyword "type" here and using "typedef". The keyword "parameter" becomes just a modifier indicating that this typedef can be overridden at elaborate-time. Greg Jaxon Disclaimer: The above daydream has nothing to do with anyone's product plans or LRM proposals - it's simply design speculation.Received on Mon Jan 23 10:57:06 2006
This archive was generated by hypermail 2.1.8 : Mon Jan 23 2006 - 10:58:30 PST