element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog Arty-S7-Rover (summary)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dramoz
  • Date Created: 24 Jul 2022 4:33 AM Date Created
  • Views 1021 views
  • Likes 7 likes
  • Comments 5 comments
  • 7 Ways to Leave Your Spartan-6
  • 7 Ways to Leave Your Spartan-6 FPGA: Arty S7 Activities
  • Spartan_Migration
Related
Recommended

Arty-S7-Rover (summary)

dramoz
dramoz
24 Jul 2022

Trolleybus Arty-S7-Rover (summary)

Disclaimer

Write a summary blog, 7 Ways to Leave Your Spartan-6 FPGA element14 Community challenge.

The Arty-S7-Rover is a small functional autonomous vehicle based on the Digilent Arty S7-50 board. The project was done for the 7 Ways to Leave Your Spartan-6 FPGA element14 Community challenge.

All the files are open-source, MIT license and can be downloaded from GitHub Logo-imgdramoz

Summary

  • What I learned about the Spartan-7 FPGA
  • What I learned about VexRiscv
  • What's next?

Arty S7 - Spartan-7

When I started this journey, my knowledge of the Xilinx Spartan devices was what I got from my University courses, back in the day. I do most of my work at Eideticomas an HDL Verification Engineer, with Xilinx and open source tools like CoCoTB/Verilator.

The devices we target are Ultrascale+ (Virtex/Kintex), with hundreds of thousands of logic resources - which are not "cheap" (as compared to a Spartan-7, but you can always find something bigger and pricier VERSAL - hopefully one day I can put my hands on one of this). As for my own projects, I switch between ESP32 boards or the ZynQ Ultrascale+.

The Spartan-7 was something I did not know I was missing. I was impressed by the available logic resources. DSP blocks and plenty of LUTs/FFs to have several RISC-V implementations in one small FPGA.

In terms of tools, Vivado ML is definitely a huge improvement over the old ISE. Things are easier to do and the results are acceptable.

The Arty S7 development board is a great starting point. It comes with a lot of IO ports and the necessary LEDs, and buttons, ... to do some productive work.

VexRiscv

Working with RISC-V, a different soft-processor core like Xilinx MicroBlaze was interesting and challenging. It was a long slow slope learning curve, but worth the time spent. There were a lot of concepts I have forgotten over time, principally as these days, most works on microcontrollers or microprocessors are done with the aid of IDE that already provided required bare metal startup code, register space and "complete" C/C++ std support functions.

HDL

Using the VexRiscv instead of other soft cores alternatives, gave me the opportunity to get a better understanding of the RISC-V ISA (Instruction Set Architecture). Also, the need to implement some basic RTL blocks was a good task to refresh some gone knowledge in Verilog and HDL.

One interesting challenge what the use of two different but similar languages for design. The Verilog syntax was based on C. Therefore, sometimes while coding RTL some C/C++ constructs were mixed or vice-versa.

Pencil Although I have not compared yet my current implementation against a Microblaze soft core with Vivado IP integrator, I think the current implementation requires less logic and interconnections resources. Without taking into account the soft core processors, the extra logic and paths when using the AXI4 to connect peripherals would require extra resources that can be costly. Note, that I think that it should be possible to use a Microblaze without AXI4, but I have not gone there yet. Nevertheless, I think that with Vivado IP Integrator aid it would be faster to deploy an application - if no experience or resource reuse is available.

CoCoTB/Verilator

When working with FPGAs, simulating first is key. Debugging time of untested RTL code directly on an FPGA is costly and a long task. Fortunately, there are free available tools to speed up the first debugging stages. Using the Vivado simulator is a good starting point, but for complex designs simulation time becomes prohibitive. Most of the errors I have were easy to debug with CoCoTB/Verilator by using Python to generate the testcases.

Warning Improving your testing skills while working with embedded systems (with or without FPGAs) is a key to successfully deploying projects.

Future work

This is an ongoing project, and there are several features coming later. Among them, the next ones are:

  • Arty-S7-Rover

    • RTL

      • Move the whole DC motor control to an RTL IP
      • Add one PWM for each RGB colour
      • Add an LCD
    • VexRiscv

      • add JTAG support for debugging and programming
      • add DDR support
      • add FPU (floating point unit)
      • Connect to WiFi (ESP32)
      • Implement INT (interrupts) handling to remove polling
      • Multi-core with FreeRTOS VexRiscv implementation could be in the planning.
    • UART: add TX/RX FIFOs + improve handshaking (e.g. remove TX bit set)

    • Hardware

      • Add battery sensors
      • Check other DC motor drivers' options
      • Improve DC motors control with a PID - HW/RTL vs FW/C++ implementation
  • Tools

    • Better integration of verification tools: currently the verification process is a two-step, involving compiling the firmware (FW) and then running the simulation / or generating the bitstream. Both should be integrated into a single Makefilethat check for FW changes and compile as required/generates a new bitstream as required.
    • Check the Vivado IP Integrator flow: I decided not to follow the usual IP integrator flow as I wanted to keep things as simple as possible given the allocated time for this project and the short deadline (~8 weeks when you only have nights and a couple of hours on weekends is not that much)

Point right As a side note, I recently got a Spartan Edge Accelerator Board GitHub Logo which has a Spartan-7 XC7S15. The XC7S15 has fewer resources than the Arty S7, but it comes with an ESP32 (WiFi/Bluetooth) and is also Arduino compatible (at 5Vdc)- so the plan is to port the current HDL implementation and see how it goes in terms of resources.

Final Remarks

This was an interesting journey. As my work mostly goes around HDL Verification, I usually have little time to explore HDL and RTL coding. The experience was fruitful - I remembered and learned a lot during the process and it was interesting to see how much FPGAs have grown over the decades - especially in the low-cost devices. Having free tools is a plus, relatively cheap FPGA boards like the Arty-S7 are great not only for hobbyists but for any competent project.

I would like to thank element14 Community, Digilent and img|img for making these projects a possibility.

I would also like to thank the Open Community RISC-V International| img, Logo and CoCoTB. It would have not be possible to do any of this without the many hours spend on coding and debugging the tools.


GitHub Octocatimgdramoz


© Danilo Ramos, 2022

  • Sign in to reply
  • dramoz
    dramoz over 2 years ago in reply to dramoz

    I will post more guides later after I am back, unfortunately I ran out of time and I decided to post what I have done so far for the Spartan challenge before leaving last week.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dramoz
    dramoz over 2 years ago in reply to dramoz

    Finally, you can test your design with:

    - Simulation tools, like Vivado Simulator or Verilator/CoCoTB. It is always recommended to simulate your designs before downloading them to an FPGA. It is way easier to debug in a simulation environment rather than trying to figure out why your design is not working in the FPGA.

    - Real deployment with tools like a Logic or Protocol Analyzer. Also Vivado offers an IP block called System ILA, where you can connect it to your design and check your internal signals as required.

    As a final comment, in the case of embedded processors you can use a JTAG debugger to halt the implemented core and use GDB to debug your firmware.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dramoz
    dramoz over 2 years ago in reply to dramoz

    The task of an HDL verification engineering is to create a testplan and implement a set of test cases to validate the expected functionality of the design.

    To get some metrics, we usually use code coverage and functional coverage.
    - Code coverage is an easy one as you just measure if a line of code was executed (branching, toggling of signals are also checked)
    - Functional coverage required a good knowledge of the design specifications and features. You can use language specifics constructs like cover points in  SystemVerilog, or/and define your own tests properly.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dramoz
    dramoz over 2 years ago in reply to javagoza

    Hi, sorry for the late reply. I am travelling without my laptop.

    HDL stands for Hardware Description Language, which is a broad term for any language used to build hardware/logic gates for an ASIC or in this case FPGAs (you will find some call it gateware, like firmware or software)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • javagoza
    javagoza over 2 years ago

    dramoz , thanks for the introduction to VexRiscv I didn't know about it.


    I'm curious: What exactly does an HDL Verification Engineer do? What is HDL verification in that context?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube