General Description: How do I generate a clock in the simulator that has a delayed starting time?
ソリューション
To create a clock that has a delayed starting time and then maintains a regular duty cycle (50% in this case) from then on, follow these steps:
1.After you compile the design, click the "FunSim..." button and the XPLA Professional software will display waveforms. 2.Create the stimulus you need and the reference clock. 3.Click the "Save" button and XPLA Professional software will create two files, [design].scl and [design].net where [design] is your design name. 4.Edit the [design].scl file so that the statements for the reference clock (CLK1) and the out-of-phase clock (CLK2) look something like this (please note the spacing):
S 1 (50, 100, ETC) CLK1 S 1 (TIME=25: 50, 100, ETC) CLK2
In the above two statements, CLK1 starts with the value of '1' and transitions every 50nS. CLK2 starts with the value of '1' and after 25ns, it begins to transition every 50nS. This will result in CLK2 being the same frequency as CLK1, but because of the delayed starting time (TIME=25:), CLK2 will be out-of -phase with CLK1. You may need to adjust these numbers to match the frequency and phase shift that you need. 5.From the directory in which you have XPLA Professional installed, (typically C:\XPLA), copy the file xpla.lib into your design directory. 6.Open a DOS window and change the directory to your design directory. 7.From the DOS prompt, execute the following commands:
(this will generate .bin) c:\xpla\simnet3 [design].net where "xpla" is the location of your XPLA Professional software and [design] is your design file name. Please note the spacing.
(this will generate .scr) c:\xpla\simscl3 [design].bin [design].scl
(this will generate .res) c:\xpla\simrun3 [design].bin [design].scr
8.You now have a file [design].res that shows the results of the simulation. Open the functional simulator by pressing the "FunSim..." button. 9.At this point you may get an error message saying "SCL Not Recognized". Press the "OK" button and the ASCII version of the [design].scl file will open. If this occurs just close the editor window. 10.In the simulator user interface, click File | Open and select [design].res and you can see the results.