Al, I think you are reading way to much into my message. It has really almost NOTHING to do with the IBIS specification and its links to the *-AMS languages and Berkeley SPICE. I am simply trying to write HSPICE equivalent modules in Verilog-A(MS), and this HSPICE syntax got me. The reason for doing this originates from Cadence's macro modeling proposal for IBIS, but this forum is not the proper place to discuss that subject. Yes, we can debate whether this syntax is needed in Verilog-AMS, and whether wrappers and other techniques could provide a similar solution, but that's besides the point. I was trying to find a way to make an EQUIVALENT, period. Now, as to the usefulness of being able to interpret a string as program code, check out Matlab's "eval" function. "Description eval(expression) executes expression, a string containing any valid MATLAB expression. You can construct expression by concatenating substrings and variables inside square brackets: expression = [string1, int2str(var), string2, ...]" I am not saying that everything Matlab is doing should be available in every other language, but apparently they thought it was useful enough to make it part of the basic Matlab package. Arpad ========================================================= -----Original Message----- From: Al Davis [mailto:adavis@kettering.edu] Sent: Tuesday, July 26, 2005 6:29 PM To: verilog-ams@eda.org; Muranyi, Arpad Subject: Re: SPICE compatibility issues On Tuesday 26 July 2005 07:27 pm, Muranyi, Arpad wrote: > There is also a significant variation in the world of > behavioral capabilities, the controlled sources. Some can do > derivatives and integrals, others can't. Some have event > triggered sources, others don't. And guess what, my > relentless questions on the `define and string parameters > came from my desire to implement an HSPICE compatible syntax, > in which a voltage or current source could be written this > way: > > E1 n1 n2 VOL='any_valid_HSPICE_syntax_expression' > I1 n1 n2 CUR='any_valid_HSPICE_syntax_expression' I think I know enough about IBIS to understand some hidden meaning in Arpad's questions. Verilog-AMS handles mixed language models in the way I was trying to promote for IBIS. There are no language features for this explicit purpose. Instead, an equivalence is documented. The requirement, which is met by the existing standard, is to be able to call a foreign model from Verilog, and a Verilog model from the foreign language. That's all. It isn't necessary to have a direct interface for everything. You can make a wrapper. IBIS uses a complex syntax for calling foreign language models. In addition to providing a call mechanism, the standard has restrictions on what primitives can be used in the called (foreign) model. It is necessary to specify what foreign language is used, a choice of SPICE, Verilog-AMS, and VHDL_AMS. I think this was a mistake. Just documenting an equivalence between the IBIS constructs and any one of the others would have been enough, and much easier, and better in the long run. Such an equivalence could also standardize how IBIS models are called from SPICE (and Verilog and VHDL). My macro language proposal (for IBIS) would have done this, but it was rejected. This example from HSPICE is an easy one. Those components are not supported, but you can make a wrapper: In HSPICE: .subckt my_e1_wrapper n1 n2 E1 n1 n2 VOL='any_valid_HSPICE_syntax_expression' .ends Now from Verilog... module my_module (n11 n22 n33); ..... my_e1_wrapper E1 (n1 n2); ..... endmoduleReceived on Wed Jul 27 09:21:47 2005
This archive was generated by hypermail 2.1.8 : Wed Jul 27 2005 - 09:21:51 PDT