Hello! My name is Tophu.
Recently, I have been able to use some features of Quartus® II that I had never used before, and I am finding them more and more useful.
This time, I would like to introduce to you the usefulness and usage of IP with my actual experience.
(I had a setback because I could not use it well...) 1.
1. What is IP?
Simply put, an IP is a design that Altera prepares in advance.
Please refer to the article "Wrinkles" for more information about IP.
IP can reduce design man-hours, so we wanted to be able to use it.
So, I decided to generate a simple IP called ALTSQRT from the IP Catalog.
(I will explain the function of this IP later...)
2. How to use the IP
1. Select the IP you want to generate from the Quartus IP Catalog (Tools menu) and double-click or click the Add button. (Figure 1)
Figure 1: Selecting an IP
2. Specify the destination folder and the file name of the IP (sqrt in this case) at the end of the folder, and select the HDL language type (Verilog in this case) (Figure 2)
Figure 2: Specify folder and IP name, select language
3. The screen (wizard) for the selected IP will appear.
Using this wizard, you can easily parameterize the IP to meet your specifications (Figure 3).
For more detailed information on this IP, click the Documentation button in the upper right corner to display the user guide.
Figure 3: Wizard screen to parameterize the IP
The function of this IP called ALTSQRT is to "output the value squared with the input value".
After completing the settings, click Finish.
This completes the IP generation.
I immediately decided to incorporate the IP into my design, and when I checked the folder that I had specified as the IP generation destination, sqrt.v was generated!
At this point I would say
I thought, “In the .v file, there is a description of a function that outputs a value that is a square of the input value.”
and I was curious as to what kind of description it contained.
So I decided to look at the contents of the file,
I went to Quartus II's File menu ⇒ Open, specified sqrt.v, and clicked [Open (O)].
Then I found ......,
Figure 4.
What? The wizard came up again? (Figure 4.)
This would take me back to 3. and the same thing would happen all over again.
I was a bit surprised, as I had expected to see the design by language.
I gave up looking at the design code and registered the design file I had created to the project. (Figure 5)
Figure 5.
I was looking at the sqrt.v file in the Project Navigator (Files).
I felt the urge to look at the contents of the file again, so I double-clicked it.
Then I found ......
Figure 6. .v file opened by double-clicking in Project Navigator (Files)
To my surprise, the code appeared! (Figure 8)
Perhaps my thoughts were conveyed.
...But actually, (as I learned later from a senior colleague)
After specifying the sqrt.v file in Open (File menu) in Figure 4
"Open as Options" from "Auto" to "Text" and click the [Open (O)] button, sqrt.v will open in a text editor.
Oh, I was just ignorant. Shame on me...
Scrolling down the code, I could also see the HDL code that declares the module, connects the port, and instantiates it.
Register sqrt.v as the top level design of the project and run the compilation.
Check the simulation to see if the circuit is as specified.
The simulation results are shown in waveforms.
The square root of the input value (radical) is shown as the output value (q), indicating that the design was generated according to the specifications. (Figure 7)
*The value radical - q2 is calculated for remainder.
Figure 7: ModelSim simulation results
Conclusion
・Using IP, design creation can be done easily.
New Engineer's Blush Blog Articles