Jeremy W. Langston

Personal Website

DE2-70 SOPC Tutorial Introduction – A list of problems…and solutions!

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.

  1. 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.
  2. 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.
  3. 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.
  4. In Step 7: The PIO is under Peripherals -> Microcontroller Peripherals -> PIO (Parallel I/O).
  5. In Step 9: The JTAG UART is under Interface Protocols -> Serial -> JTAG UART.
  6. 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.
  7. 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.
  8. 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;

  9. 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
  10. 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.
  11. I skipped over the Assembly programming section because this tutorial already gave me a headache.  I’m not a masochist.
  12. 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.
  13. 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*) 0x21010

      int main()
      {
      printf(“Hello from Nios II!\n”);
      while (1){
      *LEDs = *Switches;
      }
      return 0;
      }

  14. 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”.
  15. 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!

50 Comments

  1. Kumpulan situs informasi Bocoran RTP Slot Gacor Hari Ini Paling dipercaya

  2. Slot Ajaibmerupakan agen gacor di bumi dengan berbagai macam fitur fitur yang menarik untuk meraih hasil jackpot uang yang lebih besar. Menyediakan berbagai macam pembayaran seperti Bank transfer,Ewallet,Qris Dan Pulsa tanpa potongan.

  3. In the blog post titled “DE2-70 SOPC Tutorial Introduction: A List of Problems and Solutions,” the author discusses the difficulties that arise when working with digital circuit design using the DE2-70 board. With the aim of helping readers overcome these challenges, the author provides a comprehensive list of potential issues and their corresponding solutions, ranging from basic setup problems to more complex programming errors and troubleshooting techniques.

  4. I’ve been using free essay writing tool essaywriters.ai for several assignments, and their AI essay writing service continues to impress me. The essays generated by the AI writer are flawless, surpassing my expectations each time. The content is well-structured, cohesive, and supported by thorough research. The tool itself is incredibly user-friendly, allowing me to input my preferences effortlessly. The speed at which the essays are produced is astounding, enabling me to save valuable time without compromising on quality. Essaywriters.ai is a game-changer in the world of essay outsourcing.

  5. Thanks for your post.
    Your Jewelercart online store is just a few clicks away.
    Join the many jewelry businesses that have trusted jewelercart E‑commerce platform to sell online.

  6. This is a very good tip especially to those new to the blogosphere.
    Brief but very accurate information… Appreciate your sharing this one.
    A must read article!

  7. RHRazu stands out as the Best SEO Expert in Bangladesh, boasting an extensive track record spanning more than ten years in this dynamic field. Throughout his career, he has provided invaluable assistance to a multitude of clients, consistently delivering exceptional results.

  8. It’s a wonderful post, very useful to all. https://igtoolsnet.in/

  9. That is all the helpful information I needed. I appreciate you sharing.

  10. I am not familiar with this information. It is quite beneficial to me. I appreciate you sharing. Minesweeper

  11. I am not familiar with this information. It is quite beneficial to me. I appreciate you sharing.

  12. I like the helpful info you provide in the articles. I will bookmark

    Free Cell Phone No Deposit No Activation Fee

  13. Hey, Thank you for sharing the such a good and informative information. Are you looking for best gummsi gummies online store than we have gummsi gummies very tasty in the different flavor.

  14. Hi there! Do you use Twitter? I’d like to follow you if that would be okay. I’m definitely enjoying your blog and look forward to new updates.

    https://www.safecasinosite.net/

  15. I sincerely appreciate the information and advice you have shared. Thank you for sharing all this wonderful information.
    Igtools

  16. I sincerely appreciate the information and advice you have shared. Thank you for sharing all this wonderful information.

  17. I sincerely appreciate the information and advice you have shared.
    Thank you for sharing all this wonderful information.

  18. Very great article. I have more knowledge about motherboards and CPUs

  19. I appreciate the useful information you offer in your writings.

  20. I appreciate the useful details you include in your writings.

  21. I appreciate the useful details you include in your writings. thanks for sharing.

  22. “Great read on the DE2-70 SOPC Tutorial! Love the insightful breakdown of problems and solutions. If you’re looking for expert guidance in Logo design Berlin is the place to be!”

  23. This software is the intangible artisan that molds the machine’s potential into tangible feats of functionality and innovation. Its intricate code weaves the fabric of digital progress.
    https://crackgift.com/
    https://crackist.com/
    https://crackwest.com/
    https://plugin-torrent.com/

  24. Behind the scenes of many successful rap songs, there’s often an uncredited author – the ghost writer. These talented individuals are the creative minds who collaborate with rappers to create verses that align with the artist’s style and message. ghost writers for rappers bring their storytelling skills to the forefront, ensuring that the lyrical content is both engaging and authentic.

  25. Friday Night Funkin is a popular music and rhythm game. In this game, you will play the main character Boyfriend and try to win musical confrontations with other characters such as Girlfriend, Daddy Dearest and Pico. You will have to press the correct keys in rhythm to perform moves and defeat your opponents. The game has unique graphics and vibrant music, giving players interesting and challenging experiences.

  26. the unseen architects behind compelling novels. They possess a remarkable skill for weaving intricate plots, creating vivid characters, and crafting immersive settings. These professionals excel in the art of storytelling, making them invaluable partners for authors seeking to bring their imaginative visions to life. Whether you’re an established writer in search of fresh perspectives, a time-strapped creative seeking assistance, or an aspiring author with a unique story to share, fiction ghostwriters for hire offer the expertise to transform your ideas into polished manuscripts. They are the bridge between inspiration and publication, elevating narratives with their creative flair and literary prowess.

  27. Thank you for sharing this wonderful post.I appreciate your hardwork to make this post. https://nivafollowers.in/

  28. article very good approach towards data you provides good work. May all your dreams come true and may you find happiness and success in all your endeavors. Best wishes to you always.

  29. Article!! This is really informative and knowledgeable for us, so thank you for sharing this information with us, it will really work. Love Your Blog.

  30. texasholdemsite.info

    October 23, 2023 at 4:40 am

    Này, địa điểm tuyệt vời!! Người đàn ông… đẹp… Thật tuyệt vời. Tôi sẽ đánh dấu blog của bạn và nhận thêm các thông tin…Tôi rất vui khi tìm được rất nhiều thông tin hữu ích trong bài viết này,

    https://www.texasholdemsite.info/
    chúng ta cần tìm hiểu thêm về vấn đề này, cảm ơn đã chia sẻ.

  31. Excellent guide, many thanks for providing! Working in a warm environment on my DE2-70 SOPC project made me realise how important a good air conditioner. Being overheated can make it difficult to concentrate, so having a trustworthy air conditioner can help you be more productive.

  32. It is a very difficult task for college students to keep their education cost to a minimum level. As an alumni of LUMS, I can say for sure that if I were not guided by my adults, maybe I would have been lost. I just heared about Terasic DE2-70 Cyclone II development board from your blog and I am planning to buy it.

  33. Great. I have been looking for such detailed instructions for a long time. I also have an interesting article about buying real estate in the UAE – https://emirates.estate.

  34. Although I’m sure you’ll need the information from the previous post, you should still study more about the popular run 3 game genre.

  35. A watch party extension is a software add-on or feature that enables users to watch and chat about online videos or streaming content simultaneously with friends, often integrated into platforms like Netflix or Amazon Prime. Turn any night into a cinematic experience with our Watch Party Extension. Share the joy of movies, together, wherever you are.

  36. very good article.. thank you very much. keep sharing

  37. Unleash the power of buy LinkedIn hacklink to supercharge your profile! Increase connections and visibility effortlessly. Also, don’t miss out on the Twitter action—buy real Twitter likes for a social media strategy that gets noticed

  38. Revamp your strategy buy LinkedIn hacklink for instant profile elevation! Connect with industry professionals seamlessly. To complement your social media game, why not buy real Twitter likes and amplify your Twitter presence? It’s the perfect one-two punch

  39. Filmplus, led by Emmy Galilea, provides a diverse selection of movies and TV shows on Android, featuring easy navigation and excellent streaming quality.

  40. Great job! Your effort and creativity shine through in this work. Keep up the good work, and I look forward to seeing more from you in the future.
    Are you searching for the best YouTube downloader mp4? then, don’t worry and install our browser extension and download Youtube videos in MP4 format and enjoy hassle-free content. This is the best extension and free to use that allows you to have your favorite shows in MP4 format.

  41. Are you searching for the best YouTube downloader mp4? then, don’t worry and install our browser extension and download Youtube videos in MP4 format and enjoy hassle-free content. This is the best extension and free to use that allows you to have your favorite shows in MP4 format.

  42. Dive into the world of digital design with DE2-70 SOPC Tutorial Introduction. A List of Problems and Solutions! A prominent book writing company has painstakingly curated it. This lesson will walk you through the complex world of SOPC, delivering not only a list of obstacles but carefully created answers. With the help of our book writing services, each page translates complex challenges into understandable teachings, assuring an educational voyage for both students and experts. Discover the secrets of DE2-70 SOPC with a comprehensive resource meant to educate and empower.

  43. Dive into the world of digital design with DE2-70 SOPC Tutorial Introduction – A List of Problems…and Solutions! meticulously curated by a leading book writing company. This tutorial serves as your guide through the intricate landscape of SOPC, providing not only a list of challenges but expertly crafted solutions. With the expertise of our book writing company, every page transforms complex problems into accessible lessons, ensuring an enlightening journey for learners and professionals alike. Uncover the secrets of DE2-70 SOPC with a comprehensive resource designed to illuminate and empower.

  44. I usually watch them to learn something new and then play Tiny Fishing for fun; if you’re looking for a good knockout game, you should give it a shot. Make the boys think they’re smarter than you do.

  45. The best music of all time is included in Spotify Premium APK, enjoy music without interruption from ads.

  46. Spotify Premium APK

    January 29, 2024 at 8:50 pm

    The best music of all time is in Spotify Premium APK, enjoy music without interruption from ads , enjoy life’s music.

  47. This post is not just informative but impressive also. It is really what I wanted to see hope in future you will continue for sharing such an excellent post.
    vulmsloginn

  48. This post is not just informative but impressive also. It is really what I wanted to see hope in the future you will continue sharing such an excellent post.
    https://vulmsloginn.pk/

  49. Your content is your company’s image and the key to connecting with your customers. But it’s not just about how it looks. It’s also about how it reads!

Leave a Reply

Your email address will not be published.

© 2024 Jeremy W. Langston

Theme by Anders NorenUp ↑