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. Way cool! Some very valid points! I appreciate you writing this article and the rest of the site is really good.

  2. Extremely go through article. I have never seen such beautiful article. Learn many things from Maleficent Costume. I hope you continue to have high-quality articles like this to share with everyone

  3. Extremely go through article. I have never seen such beautiful article. Learn many things from Maleficent Costume.

  4. Thankyou for this information, I am really glad to see this post. I also want to recommend you to try this Chicago Jacket.

  5. Questo tutorial DE2-70 SOPC è una risorsa preziosa! Affronta i problemi comuni e offre soluzioni chiare. Perfetto per chi cerca di superare le difficoltà e migliorare le proprie competenze

  6. Procedural content generation (PCG) involves creating game content algorithmically rather than manually. This technique is particularly useful for generating large, complex game worlds and levels. By using algorithms to generate terrains, dungeons, and even character designs, developers can create a vast amount of content with relatively low development effort. Popular algorithms for PCG include Perlin noise for terrain generation and cellular automata for dungeon creation.

  7. Take My Online Quiz – Test Your Knowledge!
    Challenge yourself with this fun and interactive quiz! Test your knowledge and see how you score. Take my online quiz now and share your results with friends!

  8. 个人信息安全问题在澳洲网课代修 http://www.wangkedaixiu.com/wkdx/aus/ 中尤为突出。为了进行代修,学生必须向代修机构提供大量个人信息,包括学号、课程登录信息等。这些信息一旦被不法分子获取,可能会被用来进行各种非法活动,如身份盗用、账户盗窃等。此外,代修机构本身的安全措施是否到位也值得怀疑。一些不法机构可能会在获取学生信息后进行敲诈勒索,或将信息贩卖给第三方,给学生带来严重的隐私泄露风险。因此,学生在选择网课代修服务时,必须充分考虑个人信息安全问题,谨防信息泄露和被滥用。

  9. Thank you for sharing this post, I appreciate your work.

  10. Lotus365 offers a thrilling gaming experience with its extensive selection of games. With a user-friendly interface and robust security measures, it provides a safe and enjoyable platform for all players.

  11. Charlie Macdonald

    June 25, 2024 at 5:18 am

    Experience new thrills by getting your reddy anna book id. The simple sign-up process ensures you can start quickly. Stay connected with real-time updates and reliable support.

  12. Talon McIntosh

    June 28, 2024 at 10:09 am

    Get your reddy anna book id for immediate access to cricket insights. The booking process is seamless and efficient. Enjoy comprehensive match coverage. For any help, customer support is available 24/7.

  13. Enhance your cricket experience with reddyanna. Enjoy easy booking options and in-depth player insights, complemented by 24/7 customer support. Make the most of every match by booking now.

  14. Hey there! Great tutorial, really helpful for beginners. One tip I found useful: when setting up your DE2-70, consider the mod apk of extra patience. It goes a long way! Cheers!

  15. Hey there! Thanks for this tutorial, it’s super helpful. I encountered a similar issue and found that using a different USB cable was like a mod apk – it solved everything! Keep up the great work!

  16. Unlock exclusive rewards by placing your first cricplus bet today enjoy seamless navigation, instant ID acquisition, and top-tier security. Elevate your cricket experience with Cricplus and reap the benefits of multiple rewards. Join now and transform your betting journey.

  17. Elevate your gaming experience with cricplus bet enjoy continuous rewards and nonstop customer support on a user-friendly platform. Sign up today for a hassle-free and enjoyable journey, fully supported and enhanced by our exceptional services.

  18. Davian Griffin

    July 15, 2024 at 7:00 am

    The cricplus app offers real time odds and detailed match analysis, helping you make informed decisions. The app’s user-friendly interface makes navigation simple and efficient, ensuring a responsible and engaging experience for all users.

  19. Harris Proctor

    July 15, 2024 at 7:03 am

    For nonstop cricket action, download the cricplus app it’s simple to join and gives you access to exciting matches. Enjoy free rewards and reliable 24/7 customer support with the cricplus app. Join today and be part of the fun.

  20. Charley Mejia

    July 15, 2024 at 7:04 am

    The cricplus app offers a simple and secure way to join the cricket fun. Their easy-to-use interface ensures your information is safe, and our 24/7 customer support is always available to help. Download today and explore all the exciting features.

  21. Congrats on scoring the Terasic DE2-70 Cyclone II at a great price! It’s awesome that they offered you the academic discount for personal learning. For anyone overwhelmed with online classes, Scholarly Help has a solution. If you’re stuck with extensive daily tasks, their pay someone to take my online class for me service ensures perfect grades!

  22. Get Varsity Jackets provides the best NBA, NFL, and MLB outfits at low rates without compromising on quality. Our products cater to sports enthusiasts who demand both style and affordability. Whether you’re a fan of basketball, football, or baseball, our collection has something for you. Check out our top-selling boston celtics bomber jackett for a perfect blend of comfort and fashion.

  23. Wallace Duarte

    July 27, 2024 at 1:02 am

    The LED irregular shaped mirror is designed to enhance any space with its contemporary style and practical illumination. The frameless design and integrated LED lighting make it a perfect addition to modern interiors.

  24. With lplwin staying connected to sports action is hassle-free. The site is user-friendly and secure. Get live scores and match highlights easily. Customer support is available 24/7.

  25. 24k bet delivers an exceptional online betting experience, featuring a vast selection of sports and casino games for enthusiasts.

  26. 24kbet is a popular online gaming platform offering a wide range of online games and sports betting options.

  27. cricket world cup is the pinnacle of One Day International cricket, featuring the world’s top teams competing for the ultimate glory.

  28. maxxwin is a dynamic online platform offering a wide range of gaming and betting opportunities, designed for those who aim to maximize their winnings and enjoy a premium gaming experience.

  29. Thank you for sharing your detailed experience with the Terasic DE2-70 Cyclone II board and the adjustments needed for Altera’s tutorial. Your insights and solutions are invaluable for others navigating the same challenges. It’s great to see your perseverance pay off, and your willingness to help others in the community is truly commendable! To stay updated on the latest cryptocurrency trends, don’t forget to check out the SOL USDT here

  30. Share your 24kbet referral code with friends and earn rewards! Use your special referral code to invite others and enjoy exclusive bonuses, free bets, and other exciting benefits for both you and your friends.

  31. Engaging Content! I was captivated from the start to the finish. Your writing style is both engaging and educational. descargar minecraft apk

  32. Viaje a todos los destinos a precios económicos con Fareskytrip. Call at +52 55 8526 3538
    Viaje a todos los destinos a precios económicos con Fareskytrip. Call at +52 55 8526 3538

  33. For the latest drivers and support, visit Brother Windows Solutions Center, where you can find the appropriate software to keep your Brother printer running efficiently.

  34. Amazing article. Are you new to Clash Royale and don’t know how to build decks with Clash Royale deckbuilder? Don’t worry, The Clash Royale deck builder is a powerful tool designed for players to create and optimize their decks in the popular mobile game, Clash Royale. By allowing users to experiment with different combinations of cards and strategies, it helps players craft decks that align with their play style and the current meta. You can learn to craft powerful decks through a helpful blog post.

  35. Discover the excitement of online betting with Fairplay24, India’s trusted platform. Enjoy a secure and reliable betting experience, with a wide range of sports and events to wager on. Join us for fair play, competitive odds, and thrilling wins!
    know more :-https://thefairplay.ind.in/

  36. Satbet is a premier online platform offering a comprehensive suite of betting options, including casino games and sports betting. Known for its user-friendly interface and cutting-edge features, Satbet provides a seamless experience for both novice and experienced bettors. With a focus on delivering insightful analysis, up-to-date market trends, and responsible gaming practices, SatBet stands out as a trusted destination for all your betting needs. Whether you’re looking to place a strategic sports bet or try your luck at exciting casino games, Satbet has you covered.

    Visit on: https://satbetin.in/

  37. Your blog consistently delivers high-quality content, making it a valuable resource for all of us. I highly recommend checking out the selena gomez trench coat only murders from California jacket for a stylish and memorable look.

  38. Our focus on elopements means we provide a personalized experience, ensuring your unique love story is beautifully documented in stunning, high-quality images. Ready to make your elopement unforgettable? Visit our website to explore our portfolio and book your session today!

  39. MyCFAVisit Survey by Chick fil A is one of the few fast food chains that are deeply concerned about getting customer satisfaction

  40. Thanks for sharing. I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.

  41. The anti-ban feature in WhatsApp Gold is a game-changer for me. No more worrying about my account getting blocked!

  42. Thanks for sharing these detailed insights on using the Terasic DE2-70 board! Your troubleshooting tips for the Altera SOPC Builder and Nios II setup are invaluable for anyone navigating these challenges. It’s great to see your dedication to helping others learn. Keep up the fantastic work!

    P.S For legal assistance, click Lawyer for more information.

  43. Your blog is truly insightful! I appreciate the way you’ve explained the research process—it’s clear and engaging. It’s always a challenge to keep things simple while being thorough. For students who might need extra support during their thesis journey, I highly recommend checking out Global Assignment Help Australia. They offer fantastic Thesis Writing Help for anyone looking to refine their research and writing skills

  44. I can’t believe focusing long enough to research; much less write this kind of article. You’ve outdone yourself with this material without a doubt. It is one of the greatest contents. NJMCDirect

  45. You have shared very informative article with us. Thanks for sharing it.
    For more information about Betpro Account

  46. “Sugar Defender has really helped me keep my blood sugar levels in check. I used to experience a lot of fluctuations, but since I started taking this supplement, my levels have been much more stable. I also feel more energized throughout the day. I’m really happy with the results and would definitely recommend this product to others.”

  47. “I was looking for something natural to help with my blood sugar levels, and Sugar Defender has exceeded my expectations. My levels have been much more stable since I started using it, and I feel great! It’s easy to take, and I haven’t experienced any side effects. I would definitely recommend it to anyone dealing with blood sugar issues.”

  48. Fantastic article! I found your insights very helpful. For anyone working on business communication assignments, our Business Communication Assignment Help service offers expert guidance to help you excel. Keep up the great work with your blog

Leave a Reply

Your email address will not be published.

© 2024 Jeremy W. Langston

Theme by Anders NorenUp ↑