Geoffrey.Coram wrote: >Shalom - >There is perhaps a difference in understanding of what "compilation" >means. In the Verilog-A compact modeling world, we have these >very complicated modules that get "compiled" from Verilog-A to >C and then to object code that is dynamically linked into the >simulator. This is somewhat different from the "compilation" >that I think digital Verilog simulators do when they set up >a particular netlist to run (and run quickly). > > Pretty much the same for digital these days. >LRM 2.2 does, indeed, have that paragraph -- taken directly >from 1364-1995 (section 3.10). All the analog simulators >I've used take that with a nudge and a wink and allow the >parameter value to be changed. Of course, since the 1364 >LRM doesn't know what a "dc sweep" is, one could argue that >a "dc sweep" is really a set of runs, in each of which the >parameter value is constant. I believe there are open issues >for Verilog-AMS about cleaning up the mixed-signal initialization >and fully explaining what a "dc sweep" means. > > There's nothing to stop vendors giving users a compile option to make parameters run-time constants or runtime variables, how you actually modify them during a run and what the scope of the change is is up for debate. E.g. if you have a default temperature parameter that is passed down the hierarchy then if you change it at the top wouldn't you want it to change all the way down? - in which case you want it to behave more like a signal (you don't want to use a signal if your tools are going to think it's a real [physical] wire). Most of this kind of stuff can be fixed by the use of syntax like 'const' and using references rather than copying values around - don't know if SV supports parameter references, maybe it needs to be added. Kev. >-Geoffrey > > >"Bresticker, Shalom" wrote: > > >>On the contrary, the 2.2 LRM says, >> >>"Parameters represent constants, hence it is illegal to modify their >>value at runtime. However, parameters can be modified at compilation >>time to have values which are different from those specified in the >>declaration assignment. This allows customization of module instances. A >>parameter can be modified with the defparam statement or in the >>module_instance statement." >> >>A -defparam on the command line is just a substitute for a defparam >>statement in the code. It is still evaluated at compilation time. >> >>You should have some basic understanding of what compilers do. >>Among others things, compilers translate the source code into a data >>structure. Changing the data structure requires a recompilation. It may >>be an incremental recompilation, but a recompilation nevertheless. >> >>There might be special cases of parameters which you could change >>without requiring a recompilation, such as a transistor value, but that >>is not changing the data structure. >> >>Shalom >> >> > > >Received on Wed Jan 4 09:40:52 2006
This archive was generated by hypermail 2.1.8 : Wed Jan 04 2006 - 09:40:56 PST