Hello Marq, Prasanna and others, After thinking about it a little further, the following `default_transition directive can be either correct or incorrect. It just depends when the directive argument is applied w.r.t. parsing of the file. `define SCALE (3.112) `default_transition (timescale*`SCALE) module example (); electrical net; parameter real timescale = 1n; real value; analog begin .... V(net) <+ transition(value, 0.0); end endmodule If this is done during parsing, then the directive argument can be treated as macro_text syntax. If the directive is applied after parsing, then the directive argument would have to be treated as expression syntax. The LRM is not clear when this directive should be applied. Regards Graham -----Original Message----- From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org]On Behalf Of Tamhankar Prasanna-A14507 Sent: Thursday, 12 May 2005 4:40 PM To: 'Marq Kole' Cc: verilog-ams@eda.org Subject: RE: `default_transition Hi Marq, Glad you raised it, I agree, reducing it to a single real number is too harsh, Graham Helwig and I were discussing this issue few days ago to allow things like `default_transition (`SCALE*`TIMESCALE) i.e. allow operators and expressions as long as they can be reduced to a single real number pre-simulation. Graham will forward you the syntax snippet we were discussing regarding the transition_time. Regards, Prasanna ------------------------------------------------------ Prasanna Tamhankar Freescale Semiconductors, Adelaide +61 8 81683585 ------------------------------------------------------ -----Original Message----- From: Marq Kole [mailto:marq.kole@philips.com] Sent: Wednesday, 11 May 2005 5:24 PM To: Tamhankar Prasanna-A14507 Cc: 'verilog-ams@eda.org' Subject: Re: `default_transition Prasanna and others, I think reducing the constant_expression in this case to a single real number is a bit too harsh. What is needed is the concept of a compiler directive constant expression, that can only contain integers, reals, arithmetic operators, and macros (in a limited form). This would allow such things as: `default_transition 1.2 * `MY_DEFAULT_TRANSITION_TIME So the syntax would become: default_transition_compiler_directive ::= `default_transition transition_time transition_time ::= compiler_directive_constant_expression compiler_directive_constant_expression ::= compiler_directive_constant_primary | unary_operator compiler_directive_constant_primary | compiler_directive_constant_expression binary_operator compiler_directive_constant_expression compiler_directive_constant_primary ::= decimal_number | real_number | compiler_directive_constant_expression_macro compiler_directive_constant_expression_macro ::= `define text_macro_name compiler_directive_constant_expression On the other hand, if the only actual use of the default transition compiler directive is with numbers only, I have no problem with reducing the constant expression to a real number. I do think that it is useful to have access to macros as that would allow more control over this compiler directive, for instance from the command line -- assuming the simulator/compiler supports the definition of macros from the command line (which is not in the standard). Regards, Marq Marq Kole Competence Leader Analog Simulation, Philips ED&T Tamhankar Prasanna-A14507 <Prasanna.Tamhankar@freescale.com> Sent by: owner-verilog-ams@eda.org 03-05-2005 09:48 To: "'verilog-ams@eda.org'" <verilog-ams@eda.org> cc: (bcc: Marq Kole/EHV/RESEARCH/PHILIPS) Subject: `default_transition Classification: Hi all, Currently, the syntax for `default_transition is default_transition_compiler_directive ::= `default_transition transition_time transition_time ::= constant_expression Because `default_transition can *only* be outside a module scope, one cannot have any constant_expression for the transition_time (because constant_expression includes module specific things too, like parameter_identifier) , this should be changed to transition_time ::= real_number Thanks, Prasanna ------------------------------------------------------ Prasanna Tamhankar Freescale Semiconductors, Adelaide +61 8 81683585 ------------------------------------------------------Received on Thu May 12 01:16:00 2005
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 01:16:11 PDT