Hi Paul,
With respect the control string there is a difference between "3CC" and "3CC,3CC" in that the first string only applies to the first dimension, while the second applies to both dimensions. If you only want to change the second dimension you'd have to use ",3CC". The dimensions that are not given a value take on the default control, i.e. "1LL". If you'd change the behavior to "default to the last dimension" it would require explicit changes for dimensions that up-to-now would get the default "1LL" control. I would definitely not be in favor of that.
Perhaps for the "gratuitious orthogonality" for array-based table models we could also support null arguments, i.e.
x = $table_model(in1, in2, d1, , d3, , 12, "3CC,I,3CC;2");
This would be fine as long as all non-null arguments for the table model are arrays and the number of arguments matches the control string.
Nevertheless, I would be fine with disallowing "I" and ";2" for array-based table models.
Cheers,
Marq
-----Original Message-----
From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On Behalf Of Paul Floyd
Sent: Wednesday, May 23, 2012 11:40 AM
To: verilog-ams
Subject: Table model control strings
Hi
I've been wondering if either the "I" or ";<digit>" parts of the control
string make any sense when using array inputs. I suppose if we want
gratuitious orthogonality it would be possible to write
// in1, in2 real expressions, d1, d2, d3, i1, i2 arrays
x = $table_model(in1, in2, d1, d2, d3, i1, 12, "3CC,I,3CC;2");
but I hope that anyone in their right minds would write
x = $table_model(in1, in2, d1, d3, 12, "3CC,3CC");
The only possible use I can imagine would be if the control string were
non-constant.
Another thing I've been wondering about is whether the control string
should be strictly one of "all dimensions" or "no dimensions".
The LRM says that if there is no control string, then it defaults to
"1LL" for all dimensions. If there is control string, must there be at
least one control per dimension, or can there be fewer? For instance,
for a 2D table model, would "3CC" be allowable, with the second
dimension also being implicitly "3CC", or would "3CC,3CC" be required? I
think that 'default to the last dimension' is in spirit of the language,
like port declarations.
Regards
Paul
-- Dr Paul Floyd Mentor Graphics Corporation -- This message has been scanned for viruses and dangerous content by MailScanner, 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 Wed May 23 03:51:10 2012
This archive was generated by hypermail 2.1.8 : Wed May 23 2012 - 03:51:14 PDT