Patrick, As to which of the two styles to pick I can't say, because I am not all that informed on the "design" of the language itself and I don't want to propose something that goes against the grains of those who do. My personal opinion would be to add this capability to the existing $table_model keyword, simply because the file reading (or input syntax) portion of this capability would be identical to what $table_model already has. Currently the $table_model takes an argument which tells it where to find a value in a table. In order to get the entire table returned we would only need to change the definition of this input argument. We could say, for example, that if this argument is not there or has a special value, the function returns the entire table instead of a single value. This is not a big change to what is in $table_model already, and seems that it would be a lot easier to do than invent a new set of keywords the way you suggested. On the other hand, I agree, your other suggestion may provide more flexibility down the road, but for now this may be a good start. Thanks, Arpad ====================================================== ________________________________ From: Patrick O'Halloran [mailto:patrick@tiburon-da.com] Sent: Monday, May 14, 2007 9:12 AM To: Muranyi, Arpad; verilog-ams@eda.org Subject: RE: $table_model() requirements Hi Arpad, I was thinking if we had: Table tbl = $build_table(..); Then you might have functions like, y = $interp(tbl,...) // interpolate the table arr = $table_to_array(tbl, lookup_vars); // convert (possibly a cross section) of a table to an array Or, we could continue to add functionality into the existing function. That is, for a table of dimension n, and m lookup args, then return an array of dimension n-m. I'm more in favor of having a table object and a set of support functions - build it, interp it, translate it, etc. That keeps the common use of interpolation usable. Regards, Patrick From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On Behalf Of Muranyi, Arpad Sent: Monday, May 14, 2007 8:57 AM To: verilog-ams@eda.org Subject: RE: $table_model() requirements Having said that, I remember there was a time when I really wished that the $table_model had a feature to return the vector(s) as is in the tables of the file without any interpolation, or any massaging. Basically work as if it was a file to array function. Could this feature be considered for it? Thanks, Arpad ======================================================= -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon May 14 11:10:47 2007
This archive was generated by hypermail 2.1.8 : Mon May 14 2007 - 11:10:56 PDT