In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what the skills of using ModelSim are, the content is concise and easy to understand, and it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Skills of using modelsim
In order to make it easier for you to observe the waveforms, we will briefly explain several common gadgets in ModelSim software, as shown in figure 2.15.
The front several magnifying glass-like tools are to zoom in and out, the mouse over the icon will show their shortcut keys, the middle yellow icon is used to mark on the waveform, and the latter is used to run the simulation. pause the simulation, rerun and other functions. The interface shown in the following figure is made by us using the above tools.
In this page, we will cooperate with our code to give you a simple analysis of this waveform, first of all, we can see that we added a yellow mark in the 0ns time, in order not to let the yellow mark move, we locked the yellow mark, we can also change its name to the name we want to represent, here we modify to Start, that is, the beginning of the simulation. We are reviewing how our incentive signals are written, as shown below.
Initial begin # 0 CLK_50M = 1 roomb0; # 10000 RST_N = 1 roomb0; # 10000 RST_N = 1 roomb1; # 10000000$ stop; end always # 10000 begin CLK_50M = ~ CLK_50M End endmodule We compare the code, compare the simulation waveform, we can see that, first of all, at the 0ns, we assign the CLK_50M signal to 0, we observe the waveform, the CLK_50M signal is indeed low, and then we wait for 10ns, and we assign the RST_N to 0. At this time, we should note that because we have waited for the 10ns always module to be executed, CLK_50M is equal to 1. We looked at the waveform, and sure enough, RST_N=0,CLK_50M=1 And so on, until the end of the simulation, after watching the excitation signal, let's take a look at whether our LED1 signal is 1us flipped once. Look at the picture we marked the first rising edge of the LED1 signal, and you can see that the time of the first rising edge is 1030ns, and then we mark the falling edge of the LED1 signal. You can also see that it is 1050ns1050ns1030ns1020ns (even though 1.02us), which does not seem to be accurate. This simulation is so unreliable! As a matter of fact, this is not the case, and we can consider it. Here is the time to witness the miracle: our clock rate is 50MHz, the cycle is 20ns, we set it 50 times, 50*20ns happens to be our 1us, but here is a bug, what bug, 0-50 is actually 51 times, 51*20ns=1020ns, that is to say, our simulation is not wrong, we made a mistake. We just need to change the 50 in the Verilog program to 49 to fix the bug. This is why we want to simulate, obviously feel that the code we write is very reliable, as long as a simulation will give away. Let's take a look at this detailed diagram, as shown in the figure, from which we can see that CLK has changed, and so have our LED1 signals. They change at the same time without any delay. This is a good explanation of why we say functional simulation (that is, pre-simulation), it does not consider delay. Here we need to pay attention to: we modify the Verilog program code and simulation file code (as long as we do not modify the port signal), we do not need to recompile the project, we just close the ModelSim simulation software and click again to start the simulation. If we modify the input and output of the port, it is better to recompile it here, and we need to regenerate the simulation template file to modify it. What are the skills of using ModelSim? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.