I recently purchased a Terasic DE2-70 Cyclone II development board. The makers have two prices: $599 commercial and $349 academic. If you’re a college student, the academic price is still too much. After I got a job, made some money, and saved up, I sent the Taiwanese company Terasic a little email. I told them I recently graduated and wanted to get the academic price, stating that I would be using it for personal learning, etc. They were more than happy to offer the discount, so I’m now the proud owner of a DE2-70. (By the way, they ship from Taiwan – viz. $40 shipping from the other side of the world.)
Well, having gone through Altera’s “Introduction to the Altera SOPC Builder Using VHDL Design” to remember how to use the software, I found multiple problems with the tutorial as it is. I hope that listing the solutions here will help people in the same situation. Some of these issues are obvious, and some are a bit more subtle.
I am using Quartus II 7.2 and NiosII 7.2.
- In Step 1: “In your project, choose the EP2C35F672C6 chip as the target device, because this is the FPGA on the DE2 board”. Well, the DE2-70 uses a different chip. Choose the EP2C70F896C6. This can be verified by simply looking at the text printed on the FPGA.
- In Step 1: “You can choose a different directory or project name, but be aware that the SOPC Builder software does not permit the use of spaces in file names”. This is true and I just wanted to make it obvious that you can’t have a space *anywhere* in the pathname. For example, you would have problems in SOPC Builder if your project was in “C:\Program Files\…” since that path contains a space.
- In Step 6: “In the On-Chip Memory Configuration Wizard window, shown in Figure 8, set the memory width to 32 bits and the total memory size to 4 Kbytes”. As I’ll be getting to shortly, the 4kB is not enough for the NiosII project. Crank it up to 64kB for plenty of breathing room.
- In Step 7: The PIO is under Peripherals -> Microcontroller Peripherals -> PIO (Parallel I/O).
- In Step 9: The JTAG UART is under Interface Protocols -> Serial -> JTAG UART.
- After Step 11: Write down the base addresses of the PIOs after auto-assigning the addresses. These will be needed for NiosII, as they are treated as memory-mapped I/O.
- Before Step 12: There are a couple “To Do”‘s in the message window of SOPC Builder about the NiosII CPU that need to be addressed: the reset and exception vectors. Double-click the NiosII component you instantiated to open up the properties window you were at before. Now that you have on-chip memory instantiated, click on the Reset Vector and Exception Vector Memory drop-down boxes and select the name of your memory (e.g. “onchip_mem”). Leave the offsets the way they are (0x0 and 0x20). Don’t worry about the “Warning: Switches: PIO inputs are not hardwired in test bench. Undefined values will be read from PIO inputs during simulation.”, this tutorial doesn’t do any test benches.
- Importing DE2_70_pin_assignments.csv. This comma-separated file is located on the DE2-70 CD included with the kit, and it can also be found on the internets. Mmm, google. The naming convention for this Altera-supplied file changed from DE2 to DE2-70. Open it and take a look. There are now lower-case ‘i’s and ‘o’s before many of the hard-wired signals denoting them as input and output. Remember this! The HDL code needs to change reflecting this. Otherwise the .csv needs changing, but I don’t suggest it. Here’s my resulting code (remember, the port names may be different for your SOPC component):
- LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;ENTITY lights IS
PORT (
iSW : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
iKEY : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
iCLK_50 : IN STD_LOGIC;
oLEDG : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
);
END lights;ARCHITECTURE Structure OF lights IS
COMPONENT nios_system is
port (
— 1) global signals:
signal clk : IN STD_LOGIC;
signal reset_n : IN STD_LOGIC;— the_LEDs
signal out_port_from_the_LEDs : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);— the_Switches
signal in_port_to_the_Switches : IN STD_LOGIC_VECTOR (7 DOWNTO 0)
);
END COMPONENT;BEGIN
NiosII: nios_system PORT MAP(iCLK_50, iKEY(0), oLEDG, iSW);
END Structure;
- LIBRARY ieee;
- Before Section 3.2: If you’ve tried to do a full compilation at this point, you will probably see an unexpected error:
- Error: Can’t place pins assigned to pin location Pin_AD25 (IOC_X95_Y2_N1)
Info: Pin iSW[7] is assigned to pin location Pin_AD25 (IOC_X95_Y2_N1)
Info: Pin ~LVDS195p/nCEO~ is assigned to pin location Pin_AD25 (IOC_X95_Y2_N1)
Error: Can’t fit design in device
Error: Quartus II Fitter was unsuccessful. 2 errors, 3 warnings
Info: Allocated 215 megabytes of memory during processing
Error: Processing ended: Sun Oct 18 19:11:13 2009
Error: Elapsed time: 00:00:03
Error: Quartus II Full Compilation was unsuccessful. 2 errors, 152 warnings - Here is the fix:
- In Quartus-II select menu Assignments>Device…
- Select button “Device and Pin Options…”
- Select the tab “Dual-Purpose Pins”
- Under the list of “Dual-purpose pins:” change the “Value” property of nCEO to “Use as regular I/O”.
- Click OK
- Error: Can’t place pins assigned to pin location Pin_AD25 (IOC_X95_Y2_N1)
- After Section 3.2: If you are using the Web edition or didn’t buy the full license for the Altera IP, you probably got a pop-up window after programming the device stating “OpenCore Plus Status Click Cancel to stop using OpenCore Plus IP. Time remaining: unlimited”. Do not close this window if you intend on using the NiosII IDE to run on the hardware. Just leave the window up and close when you are done, or have a problem with Quartus or SOPC Builder.
- I skipped over the Assembly programming section because this tutorial already gave me a headache. I’m not a masochist.
- In Section 4.2: When you create a new project, create it in the following way: File -> New -> Project… and select “Nios II C/C++ Application”. Also, use the Hello World template. It sets everything up for you, gives you printf functionality to the console, but takes up a bit more space.
- lights.c: Here’s what I have in my file. Again, it might be a bit different for the base addresses.
- #include <stdio.h>
#define Switches (volatile char*) 0x21000
#define LEDs (char*) 0x21010int main()
{
printf(“Hello from Nios II!\n”);
while (1){
*LEDs = *Switches;
}
return 0;
}
- #include <stdio.h>
- After all of that is done, you right-click on your project in NiosII IDE (e.g. hello_world_0) and click “Run As -> Nios II Hardware”.
- Done! You can now move the switches (SW7 – 0) and see the LEDG7-0 change. You can also reset the CPU using KEY0.
I know how frustrating it can be trying to learn something when the tutorial is wrong. Hope this helps!
October 29, 2020 at 3:19 pm
Very nice blog and article, thanks for sharing your experience with us!
Best regards
Nomes de bebês e significado dos nomes
Escolher um nome para seu bebê pode parecer uma das tarefas dificeis durante a gravidez. Nomes estrangeiros para bebês onde você encontra uma infinidade de nomes de diversas culturas e origens, o nome lembra você de alguém ou tem alguma associação positiva ao nome de seu bebê. É por isso que navegar nas principais listas de nomes de bebês como esta pode ajudar a inspirar você e até mesmo alertá-lo sobre nomes que você pode não ter considerado antes. Além de nomes de bebês, também temos os países em inglês, onde você encontra todos os países do mundo no idioma inglês.
best Regards and thanks again
November 2, 2020 at 11:16 am
Thanks for sharing such problem and solution. If you want to know about health and pharmacy related info, Visit us: PharmaEducation :Simplifying Pharma Learning.
November 23, 2020 at 4:11 pm
شركة تعقيم بالمدينة المنورة
November 26, 2020 at 9:21 am
You still able to overcome it even the tutorial is wrong. Good job
November 26, 2020 at 9:23 am
Look like it’s something related to programming. But which application normally it is used for?
November 28, 2020 at 2:57 am
Thanks for this great content.
November 30, 2020 at 8:17 am
I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed…
December 10, 2020 at 11:16 pm
Congratulations on receiving a great response to your post! We at the Myassignmenthelpau platform understand how difficult it can be for the students to manage complicated assignments in high school, college, or university, therefore, we have introduced an exclusive Assignment Help Los Angeles facility that will cater to all your writing requirements precisely.
January 5, 2021 at 7:49 am
Moreover, to change flights within 24 hours of the reservations there are no charges in the flight. And if you make reservations at the last moment, you have to pay extra charges apart from the flight fare in addition.
visit Talk to Live Person at Frontier Airlines
January 19, 2021 at 2:36 pm
Excellent work. Yours appreciate able efforts in this blog are really helpful and satisfactory for me. You mentioned quality information. I will suggest your blog to others. This article will be helpful to them. For more quality, unique information I use the (Package point)guide its also a helpful guide regarding different bundle updates like SMS or Jazz Call Package etc. keep sharing your informative and unique knowledge with us. I will wait for your more unique articles.
January 25, 2021 at 1:34 pm
“Sfull.net Download Facebook video to your phone, PC, or tablet with highest quality. Use our Facebook video downloader with your browser. No need to install any software. Support both Android, and iOS.
– Địa chỉ: 59 Lê Đức Thọ, Nam Từ Liêm, Mỹ Đình, Hà Nội
– Email : sfull.net@gmail.com
#sfull, #downloadvideofacebook, #facebookdownloader”
January 25, 2021 at 10:45 pm
We find a word software has just been updated to bring the best experience to the web community.
January 28, 2021 at 5:13 am
When it comes to printing then canon mx490 wireless printer is the users first choice but in general, people may face common printer error which can be resolved with simple steps follow the link to know more.
January 29, 2021 at 12:41 pm
The article has some good and serviceable information. It was very well authored and easy to understand. cpr training
January 29, 2021 at 12:42 pm
The article has some good and serviceable information. It was very well authored and easy to understand.
February 4, 2021 at 4:00 pm
خرید کاندوم یکی از جذاب ترین جنبه های خرید در زندگی زناشویی است اگر نیاز به خرید کاندوم یا بهداشت جنسی دارید. می توانید از کامش تهیه کنید
March 5, 2021 at 8:29 am
we are providing the jazz call and Ufone call packages with detail
https://www.mobilepackages.co/p/jazz-call-package.html
https://www.mobilepackages.co/p/ufone-call-packages.html
May 17, 2021 at 5:06 am
Hi,
I haven’t seen such an excellent article before. It is really very useful & amazing. Visit our site 123.hp.com/ojpro8710 for much useful information about printer setup, driver download & wireless setup.
May 23, 2021 at 12:56 am
Hi,
I haven’t seen such an excellent article before. It is really very useful & amazing. Visit our site 123.hp.com/ojpro9015 for much useful information about printer setup, driver download & wireless setup.
May 30, 2021 at 4:24 am
Hai,
Thank You for the information . it is very useful , visit our page123hpcomsetup
123-hp-com-setup
how-to-print
June 9, 2021 at 3:00 am
I enjoyed over read your blog post. Your blog have nice information. Myself Jordy, I am a Sr. Accounting Consultant and I have 10 years of experience in providing complete accounting solutions for small and mid-sized managed businesses. I’ve been worked with many reputed companies including fortune 500 organizations.
Today, I give you information regarding Quickbooks errors like quickbooks error 15311, quickbooks update error 15311
June 17, 2021 at 4:08 am
Your article is very good
June 17, 2021 at 5:26 am
Dumps4Expert offers real exam dumps with actual exam dumps questions that will help you to prepare according to the real certification exams
SAA-C02 exam dumps
June 26, 2021 at 4:39 am
Quickbooks Web Connector Error QBWC:
If you are getting Quickbooks Web Connector Error QBWC then you will get either “Quickbooks web Connector Error QBWC1085” or “Exception error”.
the QB Web Connector will not allow you to write down the log files.
Without even a Log file the Quickbooks software will open.
The issue with your log file.
Quickbooks Web Connector will start working automatically without a log file.
July 8, 2021 at 7:23 pm
The article has some good and serviceable informatio
July 9, 2021 at 6:33 am
In order to talk to a real person at Lufthansa airlines, you may use Lufthansa’s phone number 802-532-5150 or 1 (800) 645-3880. Lufthansa customer service team provides prompt services to the customers, But in case you can not able to get in touch with Lufthansa customer service by phone then opt for email service or live chat with a Lufthansa representative.
July 11, 2021 at 9:14 pm
great and useful post.
July 19, 2021 at 6:15 am
Intellectual Property Law can be complex, and, depending on your particular issue, you might need to consult with an immigration
July 21, 2021 at 3:05 am
Great post, thank you
July 23, 2021 at 5:14 am
Thanks for this article
August 7, 2021 at 4:36 pm
isimli çakmak tesbih takımı modelleri
August 11, 2021 at 1:02 am
Thanks for sharing such a problem and solution. If you want to know how to write a law essay and get good grades. For good grades, you have to contact professional law essay writers who provide information and help you to complete your essay.
Thank you for sharing this issue and its solution. If you want to learn how to create a legal essay that will get you high scores, keep reading. To get high scores, you need to hire professional law essay writers” that can provide you with knowledge and assist you in finishing your essay.
August 11, 2021 at 11:57 am
Today, the phenomena of using internet network
and multimedia application had increasing growth.
Transformation and transmission of information or image over
the network can be easily done by public. Therefore, security is
an important issue in communication and storage of data;
particularly images. Due on this issue, encryption is found to be
one of the efficient ways to ensure security. Thus, this research
was proposed to implement an image encryption algorithm on
the Altera DE2-70 FPGA board (Cyclone II EP2C70F896).
August 25, 2021 at 12:02 pm
El servicio por las llamadas es el servicio más preferido por todos los pasajeros. Este servicio de la aerolínea viene con muchos beneficios y facilita muchos servicios solo por una llamada.
Si está pensando sobre, ¿Cómo se puede llamar a Delta Airlines?, no se preocupe, solo necesita pasar unos pasos para hacerlo.
Marque al Número de teléfono de Delta Airlines.
Responda a las preguntas automatizadas para seguir con el proceso IVR.
Seleccione su lengua preferida para acceder a este servicio.
Entre la lista de los servicios facilitados por una llamada, elija el servicio que quiere acceder.
Si necesita el servicio de un representante, haga clic en 5.
August 25, 2021 at 12:03 pm
El servicio por las llamadas es el servicio más preferido por todos los pasajeros. Este servicio de la aerolínea viene con muchos beneficios y facilita muchos servicios solo por una llamada.
Si está pensando sobre, ¿Cómo se puede llamar a Delta Airlines?, no se preocupe, solo necesita pasar unos pasos para hacerlo.
Marque al Número de teléfono de Delta Airlines.
Responda a las preguntas automatizadas para seguir con el proceso IVR.
Seleccione su lengua preferida para acceder a este servicio.
Entre la lista de los servicios facilitados por una llamada, elija el servicio que quiere acceder.
Si necesita el servicio de un representante, haga clic en 5.
August 25, 2021 at 12:23 pm
Waw… What a list!
August 30, 2021 at 3:19 am
If you are feel boring to see your system fonts then install there mentioned fonts and make stylish in your system. jual hot water boiler here you have no need any type of requirement
September 4, 2021 at 5:19 am
Waw… What a list! thanks
September 7, 2021 at 6:26 am
Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.
September 9, 2021 at 1:28 am
Thanks for this article it help me a lot.
September 10, 2021 at 3:30 am
THANKS FOR YOUR ARTICLE. IT WAS INTERESTING AND INFORMATIVE.
September 16, 2021 at 12:53 am
This is an example of edu website link. though it is not that worthy.
September 17, 2021 at 3:56 am
Your article is very good, I have read a lot of articles but I am really impressed with your writing style. I will review this post.
September 24, 2021 at 8:35 am
Your article is very good, I have read a lot of articles but I am really impressed with your writing style. Check the new uk lottery result is all about the recent result.health lottery results
September 27, 2021 at 12:22 am
icustomerservicenumber.net is a one-stop platform that facilitates flyers with incredible deals and discounts. Get hands on jaw-dropping deals and fly without shelling out your dollars. Endless flight options are available, pick the right one and feed the wanderer in you to the maximum extent.
September 29, 2021 at 7:52 am
Your article is very good, I have read a lot of articles but I am really impressed with your writing style Also check the UK lottery result is all about the recent Thunderball result.
October 3, 2021 at 1:03 pm
Hi there,
Very nice post and blog, I found it very explanatory and informative, thank you very much for sharing your knowledge and wisdom with us.
take care and stay positive
Your follower
Lisa from Middle Names ideias for a lot of baby names.
regards
October 6, 2021 at 10:36 pm
Thanks for sharing all these solutions. It’s a great help in solving the probs. I appreciate your efforts & help.
October 11, 2021 at 1:01 am
Welcome to a reputable SEO agency Melbourne. We never get bored of inventing new ideas by stepping into Google’s and other search engines’ new algorithm shoes. Furthermore, we leave our doors open at all times to allow a fresh breeze of ideas and creativity to pass through.
October 13, 2021 at 4:29 am
Your chat with Taiwan’s company quite so interesting love your blogs