For explaining, I have just used one of my earlier example in the post : Explaining testbench code using a counter design. Lets go step by step, see the images for easier understanding of the steps. Open the images in a new tab in your browser if they are not clear enough.
1)Once the coding is done( I mean both the testbench and the design to be tested) make sure you select the top entity(testbench code) in the Xilinx window as shown below. Many people just select any other file and click the compilation button.
Note down the red markings in the image below. Points to be noted are:
- Choose View as simulation.
- Select the top entity i.e. the testbench. If the wrong file is selected for simulation then the waveform in ISim will be blank and you will see no waveform.
- Double click on the Behavioral check syntax for compiling the design or for finding out any syntax errors.
- If the above step is successful then double click on Simulate Behavioral Model. If there are syntax errors in step 3 then you may have to check your code.
2)Now ISim will open in a new window with waveforms. Note down the toolbar at the bottom. Check the below image for knowing what each button does. You can also hover your mouse over the button and they will display the function of that button.
3)Mostly the signals in the wavforms will be displayed as binary numbers or integers. But you can change this basic setting. See the image below.
4)Another interesting thing you can do is adding the internal signals to the waveform which is not displayed by default. By default ISim displays only the signals which are declared in the testbench code. But if there are many sub entities then you may need to see them for debugging purpose. See the image below for how to do it.
- Go to the Instance and process names on the left side of the ISim window.
- Select the Instance name whose internal signals you want to observe.
- All the signals declared in that particular instance will be displayed on the immediate right tab now, under simulation objects.
- Now select the signals you want to display. You can use keyboard short cuts like shift and Ctrl for selecting multiple signal names.
- Now drag and drop these select signals into the immediate right tab under signal Name in waveform window.
- For updating these signal values you have to restart the simulation and run it again.
5)You may have noticed that in ISim, all the additional signals you added in step (4) are reset when you close the ISim window. This is little bit annoying since you have to add all the internal signals again. But you need not worry about it. Follow the steps:
- Add the required signals into the waveform as described in step 4.
- Save the waveform file by clicking, Ctrl + S . Give an appropriate name to the wave file.
- Now close ISim and go back to the Xilinx ISE window.
- Right click on simulate behavioral model.
- Choose the option Process properties.
- A new window will open as shown below in the image.
- Select the check box, Use custom waveform configuration file.
- Choose the waveform file you just saved in the custom waveform configuration file.
Thats it for now. Hope these explain the things better. Thanks.
hey i have been designing a 128 bit vedic multiplier there is no syntax error in it although it has some warning messages. but at the time of simulation when i am forcing any value it says:
ReplyDeleteISim>
# isim force add {/onetwentyeightbit_mult/a6} 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 -radix bin
/onetwentyeightbit_mult/a6: Could not convert given string value 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 to an appropriate value.
ISim>
or
ISim>
# isim force add {/onetwentyeightbit_mult/a6} 111111111 -radix bin
/onetwentyeightbit_mult/a6: The value 111111111 is bigger than the identifier size in this context.
so please could you tell me the fault i am attempting.and yes it was running fine till 16 bit.
Hello, I have a question about Isim simulator. I'm simulating a verilog file which as a RAM memory created and initialized, like this:
ReplyDeletereg [7:0] memoria1 [0:255];
initial begin
memoria1[1]=8;
memoria1[2]=125;
.
.
.
memoria1[206]=45;
end
But when I simulate the verilog test fixture associated to this verilog file, the Isim simulator only displays the RAM memory up to the 63th address... I have 206 address with data and I can only see up to the 63th address. Is this some kind of limitation of the simulator or I'm doing something wrong?
Thanks in advance!
Cheers
This comment has been removed by the author.
ReplyDelete