|
FAQ
|
|
|
Analysis ToolsDASE includes a time-domain analyzer much like a very sophisticated oscilloscope. Also included is a spectrum analyzer with multiple analysis modes and channel power integration. A file analysis tool is also included which allows statistical analysis of data files Finally, DASE comes with a receive spur analysis utility which generates spurious signal results for multi-stage heterodyne receiver design.
DecimationDecimation is may be applied to all function blocks. The execution of a decimated block may also be staggered as would be used in a poly-phase structure. DataDASE can import and export signal data files in the standard delimited text format common to spreadsheet and other engineering tools like MathCad and MatLab. OscilloscopeThe oscilloscope tool allows simultaneous monitoring of up
to 3 output ports and is designed to look and feel as much as possible like a laboratory oscilloscope. Vertical or
horizontal cursors permit measurement of time
intervals or level differences. The display traces are shown in green (channel
1) red (channel 2) and light blue (channel 3). Each signal may be assigned a
trace name
in the oscilloscope’s attributes dialog box. (Left,
double-click the block icon or pull down the speed menu with the right mouse
button.) The user scrolls between the real time modes via a push
button in the scope display window. The real-time modes determine how data
will be collected during a simulation run whereas the file-modes determine how
data from stored files is to be displayed. The real-time modes are described as
follows: TIMED MODE
: The timed mode allows the user to collect data over a segment of the
simulation run. The start and duration times
are entered in the start time and sample window edit boxes as shown in Figure 6. The first data point
will be collected when the elapsed time of the simulation exceeds the number
entered in the start time box and will
end when the time since data collection began exceeds the value entered in the sample
window box. A maximum of 5156
sample points may be collected. EVENT MODE
: The event is the only mode that defines the collection interval in terms of a
single occurrence of some state of a signal. This means that the collection
interval is triggered by a transition
on either one of the input channels or the trigger channel. The time between the
trigger point and the beginning of data collection may be adjusted in steps of
1/8 sample window. A setting of zero will cause the trigger point and the start
of data collection to be the same time. A setting of 1/2 would capture 1/2
sample window of data prior to the trigger event and 1/2 sample window
afterwards etc. The trigger level is defined by the user as a floating point
number (trig level edit box) and
positive or negative slope triggering may be selected via pushbutton control. NORMAL MODE : In normal mode, data is captured during the entire run. In the normal mode most parameters (e.g. time/div, trig level etc. may be adjusted during the run and are locked when a run is ended. These parameters are unlocked when the user releases the data via the Data| Release menu item or by pressing the F9 key.
Analysis Cursors
Horizontal or vertical cursors are available to measure
differential times or amplitudes. These are activated via the Tools|Show
Cursors
menu. The cursors will only activate when valid data is present (e.g. after or
during a run). When activated , a colored box will appear in the lower left
corner of the oscilloscope's CRT. The color indicates which channel the
measurement cursors are slaved to or is gray for time analysis. Once activated, the cursors will appear,
one-at-a-time, when the user next presses the left mouse button in the
oscilloscope’s CRT window
. The first click will invoke one cursor and a second, the remaining cursor. (To
invoke both cursors, the mouse clicks must be somewhat distant from each other.
If you have trouble invoking both cursors, try increasing the size of the tool.)
The cursors are placed in the desired location by dragging them with the mouse
after depressing the left button. Which cursor is moved depends on which one the
mouse was closest to when the left button was pushed. Display
Options
The display options of a typical laboratory oscilloscope
are available in the oscilloscope tool. Vertical sensitivity is adjusted via the
units/di
v scroll list boxes. Additional
control over this parameter is available by changing the probe atten value (default equals one). Large signals may be
attenuated by setting this value
greater than one while added sensitivity can be achieved by making it less than
one. Time per horizontal division is adjusted by the time/div
listbox conditioned on the constraints mentioned above. Other display options
for the real-time modes are described below: Name s:Names may be assigned to the three traces by entering them in the oscilloscope's attributes dialog box. These names will be displayed for each channel below the oscilloscope's CRT and will be retained until the entries in the dialog box are changed. The user should change the entries anytime a new signal is connected to a channel. When set to a file-mode, the name of the file will be displayed.
Triggers
:
The normal and event
modes start data collection when the trigger signal passes the level set in the trig level edit box. The normal
mode will re-enable the trigger after each sweep whereas the event
mode will collect data only once. The oscilloscope can be made to trigger on
either of the three channel ports or the trigger input port. The trigger sense may be selected as either positive edge or negative edge by clicking the appropriate button. Trace Start Box :A trace start box
is provided to indicate the time in the simulation run corresponding to the
first data point in a trace. This information is valuable when one needs to
relate signal activity observed on the oscilloscope with other signal activity
in the simulation. The value in the trace
start box is not valid for the
display of signal files since the oscilloscope may display real-time and file
signals simultaneously. Vertical Mode Options :The display of real-time signals can employ three vertical
modes: AC
, GND
, DC
, DC_OFFSET
and POLAR
. These are selected via the mode
listboxes. There are also listings for the file display modes (SCATTER
, FILE_I
, FILE_I_OSET
, FILE_Q
, FILE_Q_OSET
, EYE_I
, EYE_I_OSET
, EYE_Q
and EYE_Q_OSET
) which are explained in the users manual. The POLAR option allows a complex signal to be displayed using a single channel. Simulation FilesDase simulation files can be shared with other users. This permits reuse of previous work and integration of that work into larger simulations. Simulation size (number of blocks) is limited only by the available memory of the computer.
Unlimited nesting of simulations is possible in DASE. This a simulation within a simulation is called an encapsulation. Encapsulations may be saved just like simulations and used like a library function within other simulations or encapsulations. Spectrum Analyzer The spectrum analyzer tool provides course or fine spectral analysis of complex input signals. Like most blocks in DASE, it operates in the complex time domain. The available sweep range in Hz is constrained by the user selected sample rate and by aliasing considerations when the left or right regions of the display approach ± (Sample Rate)/2. Specifically, the sweep range is set so that the response of the resolution filter (pre-detection) is 20 dB lower at the (Sample Rate)/2 than it is at the sweep ends. The display traces are shown in green (channel 1) red (channel 2) and light blue (channel 3). Each signal may be assigned a trace name in the spectrum analyzer’s attributes dialog box. (Left, double-click the block icon or pull down the speed menu with the right mouse button.) Unlike the oscilloscope tool, the memory allocated for the
spectral display is of fixed size. The
coarse display resolution mode leaves much of this memory empty which results in
a comb-like display when switching from coarse to fine resolution until the next
full sweep has filled all memory locations. Settings can be changed during a run
but if the run ends before a full retrace is completed, some of the trace will
reflect the old settings. Three display modes are available: normal, channelized, FFT magnitude and FFT angle. These modes are selected via the listbox located below each channel number. Each will be described in sequence. Normal mode The normal display mode is similar to that found in a laboratory instrument. Sweep time is dependent on the resolution and video bandwidth settings just as with a laboratory spectrum analyzer. For resolution bandwidth set much higher than the freq/div, the sweep is too fast and the display becomes meaningless. Sweep averaging is available. Three scalings of the sweep time are available via the Display|Fast Sweep , Display|Medium Sweep and Display|Slow Sweep menu options. The faster sweep modes are provided to allow a ‘quick look’ at a signals spectrum. For minimum distortion, the Display|Slow Sweep menu option should be selected. Just as in the case of a laboratory instrument, sweep time must be sufficiently slow to accommodate the response time of the resolution and video filters. For this reason the normal mode can result in long run times to collect an entire spectrum. However, the normal mode requires the lowest number of operations per sample period of any of the spectrum analyzer modes and therefore allows the overall simulation to execute more quickly. If rapid presentation of a spectrum is needed, the channelized mode ( Section 3.2.2 ) should be used. Channelized Mode For speedy generation of spectral results, DASE provides a channelized mode of operation in the spectrum analyzer tool. In this mode, each frequency point of the plot is calculated once during a simulation sample period. This method results in the fastest generation of a signal’s spectrum but due to the large number of calculations performed during each sample period, the entire simulation is slowed down considerably. In the channelized mode, the spectrum will appear to rise from the bottom of the display at a rate determined by the settings of the resolution and video filters. FFT Magnitude Mode and FFT Angle Mode In addition to the conventional spectrum analyzer mode, this tool offers FFT analysis of the input signals. All of the options available in the FFT tool (section 3.3 ) tool are included in the spectrum analyzer. The magnitude mode displays the magnitude of the FFT bin results while the angle mode displays the angle value of the bin results. In the magnitude mode, the vertical sensitivity is controlled by the vertical scale buttons. In the angle mode, the results are shown with zero in the vertical center and +/- 180 degrees being the top and bottom of the display respectively. Analysis Cursors Two cursors allow the user to determine the spacing in Hz between two points of the sweep or the difference in amplitude between two points in the vertical dimension. These cursors are activated via the Tools|Show Cursors menu . The analysis mode is set to the horizontal mode (frequency span between cursors) via the Tools|Horz menu and to the vertical mode (amplitude delta between cursors) via the Tools|Vert menu. Once activated, the cursors will appear, one-at-a-time, when the user next presses the left mouse button in the spectrum analyzer's CRT window. The first click will invoke one cursor and a second, the remaining cursor. (To invoke both cursors, the mouse clicks must be somewhat distant from each other. If you have trouble invoking both cursors, try increasing the size of the tool.) As with the oscilloscope tool, the cursors are placed in the desired location by dragging them with the mouse after depressing the left button. Which cursor is moved depends on which one the mouse was closest to when the left button was pushed. Integration of Spectrum segments Integration of power density, between two frequencies, is provided via a menu-activated dialog box accessible via the Tools|PWRINTEGRATION menu. Any of the three channels may be integrated if it has valid data. The result is displayed as a decibel ratio to total power over the sweep range so for an integration of one side of a symmetric spectrum, the result will be - 3 dB. Caution must be used when using spectral integration on spectra with both discrete and continuos components as the displayed power is a function of resolution BW for continuous spectra but not for discrete spectra (just as with a real spectrum analyzer). The relative shape of continuous spectra depend on the resolution bandwidth since it determines how much power is reported at each trace point. Just as with laboratory analyzers, accurate capture of complicated spectra requires that the resolution bandwidth be narrow with respect to variations in the signal spectra. If the display resolution is set to fine, the power integration dialog box has options for fast or slow scrolling of the integration endpoints. The scroll rate is toggled by clicking the scroll rate button. While the power integration dialog box will report a result for FFT traces, this result is for the normal display mode data of the associated channel. For a channel with no data collected in the normal mode, the power integration dialog box will report results for a flat line. User Configurable Block FilesOne of the most powerful features of DASE is the extensibility offered by user configurable blocks (UCB). A UCB is a custom dynamic-link library (DLL ) that is created by you to provide a model that cannot be built from the blocks included in the DASE library. (Or that is faster than what could be built from the library blocks.) The UCB option includes a linkable object file ( UCB.OBJ), template files (UCBlbls.tpH and user.tpc), header files (UCB.H and UCBmacro.H), module definition file ucb.def, a debug access file (UCBDebug.cpp) and a resource file (UBC.RC) which provide your code with an interface to the DASE environment. The template file should be modified by you as described below and saved as *.h files for use in you DLL build. Also included are the following header files that must be included in your code: const.h , overload.h, vardefs.h, structs.h, huge.h, blkstruc.h and blhs.h. Code You Must WriteThe only code you must write to create a UCB is:1)three exportable functions ( one to initialize the block prior to a simulation run, another to execute the processing you want to be done during a simulation run and a third to execute any post run processing you need) and 2)modify and rename the template header file UCBlbls.tpH to assign input and output port names, define your attributes and to define your error messages. (Instructions for these modifications are found in the file itself.) and 3) rename and use the module definition file ucb.def in your DLL project . The three procedure written by you and called by DASE are explained in the table below . The template file user.tpc ( included in the UCB option) should be renamed as desired and used as a starting point for writing these procedures. Procedures written by you and called by DASE
Support for the attributes dialog box is provided by UCB.OBJ. You may define as many as 16 input ports and 16 output ports. The size of the UCB on the screen will adjust for the number of ports. You may define 10 integer attribute parameters, 10 character strings attributes and 10 double attribute parameters to control the attributes of the block. These parameters are adjusted in the attributes dialog box just like DASE library blocks. Access to these parameters is provided through MACROS (UCBMACRO.H) that you include in your source code. The MACROS use the pointer ptrBD that is passed to your functions. Some MACROS which accept a pointer (ptrSS) provide access to the simulation sample parameters as defined in the table below. Names for your parameters are set in your renamed version of the header file UCBlbls.tph. You may wish to use some of the parameters to report block results in which case you will wish to disable user input to the associated windows in the attribute dialog box. This is accomplished by setting the elements of the INTWinDisabale, DBLWinDisable and CHARWinDisable arrrays defined in UCBlbls.tph. If the 3rd element of the INTWinDisable array is set to 1, the window edit window for the 3rd integer parameter will be disabled. You may set the value of the displayed parameter as needed in your code but will be unable to change the value displayed in the edit window while the dialog box is displayed. When you create your own variables as part of your UCB code, care must be taken to isolate multiple instances of your custom block from each other. Windows allows only one instance of a DLL so all automatic and data segment variables will be common among multiple instances of your custom block. The recommended method for obtaining unique variables for each instance of your block is to make these variables part of the three memory blocks mentioned below. The attributes controlled by the attributes dialog box are isolated for you. Simulation Sample
Parameters Accessible to User Configured Blocks
The file UCBMACRO.H also includes macros to access block input elements and to assign values to the block output elements. MACROS for setting error messages and warnings are also included in UCBMACRO.h. You may define up to 16 error messages and 16 warnings to be used by your block. These message strings are defined by you in your modified and renamed version of UCBlbls.h. Errors and warnings must be set as part of your initialization function. (e.g. Using the macro “SETERROR1(ptrBlkData)” in the initialization procedure will cause the string ‘err1’ (see UCBlbls.h) to be displayed in the run-status window message listbox. The block number will automatically be added to the message. ) Messages are cleared at the beginning of each new run. Any error messages will prevent a run from proceeding. Warnings will cause the run to be paused but it may be continued. Additional memory space that will be saved as part of a
simulation file (*.sim) may be allocated by you. Once allocated this memory
should be managed using three handles accessed via the GETMEM
1, GETMEM2, GETMEM3, SETMEM
1, SETMEM2 and SETMEM3 macros (UCBMACRO.h). When you allocate memory you should
store the associated handle in one of these three locations using the SETMEM*
macros. The handles may be retrieved using the GETMEM*
macros. Once memory has been allocated, you must store the
size (in bytes) using the SETMEM1SIZE, SETMEM2SIZE or SETMEM3SIZE macros. The
size may be retrieved via the GETMEM1SIZE
, GETMEM2SIZE or
GETMEM3SIZE macros. Once allocated and stored, the memory becomes a part of that
instance of your block and will be saved and recreated when your *.sim file is
saved and opened respectively. To avoid reallocating memory the GETMEM# macros
may be used look for non-zero handles indicating the required memory has already
been allocated or was allocated during a previous instance of the simulation and
is available. (Handle values are preset to NULL for each new instance of a UCB.)
All data that you wish to save as part of a simulation run should be placed in
one of these two locations. Note that although a single DLL
is used to support multiple instances of a user configurable
block the data for each instance resides in the *.sim file associated with that
instance. If you use these memory
mechanisms to store data that will not be saved, you should free the memory
handles at the end of the run or when the data is no longer needed to avoid
memory leaks. Memory size is limited only by the computer in use. Memory
should be allocated using the GlobalAlloc function in the Windows API. Pointers
to your data should be obtained/released using the GlobalLock/GlobalUnlock
functions respectively. Registering User-Configurable Blocks with DASEOnce you have written and built your DLL, you must let DASE know of its existence so it will be listed in the user-configurable block section of the DASE block library. A utility is provided to automate this process. The utility is activated via the Utilities|Make UCB File menu item of the block editor window. Simply select the DLL you wish to register and click the ‘Create’ button in the dialog box. Custom Exported ProceduresSince a user controlled block is a DLL you, are free to write and export procedures for use by other user controlled blocks you have created. If you assign ordinal numbers to these functions you should use numbers greater than 256 to avoid conflicts with existing exported functions in the code provided to you as part of the user controlled block option. (For information on writing DLL’s consult any Windows application development text.) Whether or not you write procedures for export , you must retain the ordinal assignments defined in the file ucb.def. You should rename this file and use it as the module definition file for your DLL. If you generate a new module definition file via some utility (e.g. Borland’s impdef) you must modify the ordinal assignments for the files listed in ucb.def to match the ordinal numbers therein. Debugging User-Configurable-Block DLL’sTo facilitate the debugging of your DLL, DASE was compiled with a code file (Debug.cpp) that has its debug attributes turned on. Debug.cpp is included in the files distributed with DASE and can be found in the directory in which DASE was installed. The code found in Debug.cpp is executed as part of opening a simulation file allowing DASE to be halted as a file is opened. To debug a UCB DLL, setup your debugger to run DASE, and load the module UCBDebug.obj. Set a breakpoint at any point in the source file Debug.cpp. Continue the run. The debugger will hit the breakpoint once for each block in the simulation. When the desired UCB DLL is loaded, you can load its source file and set breakpoint in your code as desired. You must be sure to enable the debugging options when you compile your DLL if you wish to debug at the source-code level. Remember to rename the ucb.def file to match the name of
your DLL and to also change the “UCB” and “UCB.DLL” entries in this file
to “your name” and “your name.DLL” respectively.
|
|
Send mail to webmaster@softanalytics.com with
questions or comments about this web site.
|