Muranyi, Arpad wrote: >Thank you to all of you who responded to my question >even though it is debatable whether I picked the right >forum to ask it... I did hesitate when I wrote it, but >decided to do it anyways, because I see compile time >and runtime mentioned in the LRM quite a bit. > >Regarding the sweep simulations, I feel I need to clarify >what I meant. I wasn't referring to DC sweeps. I had >transient (time domain) or frequency domain simulations >in mind, which is being rerun multiple times while changing >parameter values for each iteration. For example, a >termination resistor would be simulated with values of >40 to 60 Ohms at 1 Ohm increments, a total of 21 simulation >runs. > >Now, if this termination resistor is part of a more complicated >behavioral model of a driver, which is inside a huge library >with many such modules (to make things worse), it would be >important for me to know whether this driver model and >consequently the library file will be recompiled or not >(meaning converted to a DLL or some sort of an executable >binary) before each such simulation begins. > >Take this further one step, I wonder what happens if this >"resistor" is described as a non-linear I-V curve, which >is passed in as an array parameter to the behavioral buffer >model, in which the size of the array is not predetermined >inside the module, i.e. it is resizable. > >Contrast this question to the case when I am making changes >to the equations in my behavioral model with my text editor. >It goes without any doubt that it will be recompiled before >the simulation can start. > >Does a resizable array result in such recompilations when >its size is changing due to passing a different array length >into it when the module is instantiated? (This question may >apply to multiple runs as described above, as well as to a >single run having multiple instances of the same module with >different array sizes passed into it). > >The reason I wonder is because array sizes can't be changed >during runtime according to the LRM. It must be known at >compile time. Does this imply that changing the array >parameter size requires a re-compilation? > > No. The code (C/C++) generated for a library component can use varibles that will be set at elaboration, i.e. constant items in the Verilog-A are not necessarily constant in the C/C++. This is a fairly standard trade-off, the more flexible the compiled code is the less efficiently it will run. If you want the fastest simulation you may want to recompile on a per-instance basis post-elaboration (making everything possible a run-time constant), but that slows down your simulator start-up considerably, expands the memory footprint and is probably deterimental to i-cache usage. As before: this is mostly an implementation issue, not a language definition issue. Kev. >Thanks, > >Arpad >============================================================ > > > >Received on Wed Jan 4 12:02:22 2006
This archive was generated by hypermail 2.1.8 : Wed Jan 04 2006 - 12:02:57 PST