When you create a Verilog-A version of a VHDL analog model, you'll want to verify that the two match. A convenient way to do this is to compare things like I-V curves, for example. The ADS simulator can place data for the I-V curve of your Verilog-A model directly into the dataset used by ADS Data Display. But how do you get the VHDL version in? First you'll have to export the data from your VHDL simulator. The most convenient format for ADS to read is a tab separated plain text file. However, for ADS to make sense of the data, it also needs information in the form of a header and a footer, so you might need to open up the raw data in a plain text editor and type them those in manually. There are several styles and formats possible, but let's pick a simple one but very flexible one. (The technical name is "Generic MDIF" if you want read the full specification in the doc.)
See the sample below. Lines that begin with ! are comments. The beginning of an array of data is marked with BEGIN nameofmydata. The next line, beginning with a %, specifies a column name and its data type e.g. Vd(real). You need one specification per column of data.
Then you have the tab separated data itself, two columns in my case. Finally, you need an END line. Here is a complete example:
!Optional comment like "this data was generated by running a VHDL model"
% Vd(real) Id(real)
To import its data via the Data File Tool, it is convenient to place the plain text file in the data folder of your workspace. The file name extension should be *.mdf . For example, if your workspace is C:\Users\cwarwick\Workspaces\shared_wrk, its data folder is C:\Users\cwarwick\Workspaces\shared_wrk\data and so the full path of your data file should be something like C:\Users\cwarwick\Workspaces\shared_wrk\data\myvhdldata.mdf
- From the Data Display menu bar, select Tools-->Data File Tool.
- From the Data File Tool dialog box, set the "Mode" radio button to "Read data file into dataset."
- Click on the "Browse...' and select your data file.
- From the "File format to read" list, select "MDIF"
- From the MDIF sub type list, select the last option "Generic MDIF"
- In the "Dataset name" text box type a name such as "VHDLcompare"
- Click on the "Read File' button.
- From the Data Display menu bar, select Insert-->Plot...
- Click anywhere on the drawing canvas.
- In the "Plot Trace & Attributes" dialog box, select VHDLcompare (or what ever name you gave it) from the drop down list.
- For an I-V type plot, first select the name of the current vector (Id in our example), then click on the ">>Add Vs..>>" button, then select the corresponding voltage vector (Vd in our case). Click on OK, to dismiss, and OK again to dismiss the dialog box and see your plot.
You can overlay data from other datasets such datasets generated by simulations including your Verilog-A model and check that the models match.