Cadence® system design and verification solutions, integrated under our System Development Suite, provide the simulation, acceleration, emulation, and management capabilities.
Verification Suite Related Products A-Z
Cadence® digital design and signoff solutions provide a fast path to design closure and better predictability, helping you meet your power, performance, and area (PPA) targets.
Full-Flow Digital Solution Related Products A-Z
Cadence® custom, analog, and RF design solutions can help you save time by automating many routine tasks, from block-level and mixed-signal simulation to routing and library characterization.
Overview Related Products A-Z
Driving efficiency and accuracy in advanced packaging, system planning, and multi-fabric interoperability, Cadence® package implementation products deliver the automation and accuracy.
Cadence® PCB design solutions enable shorter, more predictable design cycles with greater integration of component design and system-level simulation for a constraint-driven flow.
An open IP platform for you to customize your app-driven SoC design.
Comprehensive solutions and methodologies.
Helping you meet your broader business goals.
A global customer support infrastructure with around-the-clock help.
24/7 Support - Cadence Online Support
Locate the latest software updates, service request, technical documentation, solutions and more in your personalized environment.
Cadence offers various software services for download. This page describes our offerings, including the Allegro FREE Physical Viewer.
The Cadence Academic Network helps build strong relationships between academia and industry, and promotes the proliferation of leading-edge technologies and methodologies at universities renowned for their engineering and design excellence.
Participate in CDNLive
A huge knowledge exchange platform for academia to network with industry. We are looking for academic speakers to talk about their research to the industry attendees at the Academic Track at CDNLive EMEA and Silicon Valley.
Come & Meet Us @ Events
A huge knowledge exchange platform for academia. We are looking for academic speakers to talk about their research to industry attendees.
Americas University Software Program
Join the 250+ qualified Americas member universities who have already incorporated Cadence EDA software into their classrooms and academic research projects.
EMEA University Software Program
In EMEA, Cadence works with EUROPRACTICE to ensure cost-effective availability of our extensive electronic design automation (EDA) tools for non-commercial activities.
Apply Now For Jobs
If you are a recent college graduate or a student looking for internship. Visit our exclusive job search page for interns and recent college graduate jobs.
Cadence is a Great Place to do great work
Learn more about our internship program and visit our careers page to do meaningful work and make a great impact.
Get the most out of your investment in Cadence technologies through a wide range of training offerings.
Overview All Courses Asia Pacific EMEANorth America
Instructor-led training [ILT] are live classes that are offered in our state-of-the-art classrooms at our worldwide training centers, at your site, or as a Virtual classroom.
Online Training is delivered over the web to let you proceed at your own pace, anytime and anywhere.
Exchange ideas, news, technical information, and best practices.
The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information.
It's not all about the technlogy. Here we exchange ideas on the Cadence Academic Network and other subjects of general interest.
Cadence is a leading provider of system design tools, software, IP, and services.
Get email delivery of the Cadence blog featured here
There are a number of ways to do embedded software development for Xilinx Zynq-7000 based designs. For embedded Linux projects, Zynq offers multiple storage options such as SD card and USB. It's also possible to use a ramdisk for the root file system during development. Today, I will cover how to use the Network File System (NFS), first to mount a file system on the host machine and then to mount the root file system over the network. As usual, we will do all this using the Zynq Virtual Platform from Cadence.
The Network File System has been around for a long time (approaching 30 years). I remember using diskless Sun workstations at my first job which mounted all directories from an NFS server. I also remember that when the server failed it was a complete work stoppage. Ironically, one of the applications in use was a Cadence schematic editor, but all I can remember is that it was something called ged.
Introduction to NFS
The Network File System allows one machine (the client) to mount a file system on another machine (the server). NFS is mostly commonly used on a network of UNIX or Linux workstations that share the same file systems for applications and user directories. The benefit for an embedded developer is that they can easily create software on a host machine (server) and immediately see the file changes from the target system (client). This eliminates the need to copy files using ssh or ftp and eliminates the risk of files becoming out of sync with the versions on the host machine. NFS is pretty slick, but there a few common pitfalls during setup.
This article covers the following topics:
NFS Server Setup
The first step to working with NFS is to install and run an NFS server. I will show how to do this on a Ubuntu 12.04 machine. The first step is easy -- install the NFS packages using:
$ sudo apt-get install nfs-kernel-server nfs-common
The next step is to specify which parts of the file system to share with NFS clients. Since I eventually want to get to a root file system over NFS, I will start with a simple root file system that is used by the Zynq Virtual Platform as a ramdisk. If you have the Zynq Virtual Platform you can use the file `ncroot`/tools/esl/platforms/zynq/hw_unit/bp_demo/tb/rootfs.cpio.gz
First, I create a directory to share via NFS in my home directory:
$ cd ; mkdir zynqfs
Then, extract the file system in this new directory
$ cd zynqfs ; gzip -d < `ncroot`/tools/esl/platforms/zynq/hw_unit/bp_demo/tb/rootfs.cpio.gz | cpio --extract
Now we have a directory ~/zynqfs ready to share with the Zynq Virtual Platform.
NFS exports are defined in the file /etc/exports
Edit this file (using sudo) to add an entry for the file system to be exported. I added the following:
The key options are rw for read and write and insecure to allow ports larger than 1024. I also allow access from any client machine using a * wildcard. Basically, I have no security in place, but I'm not concerned anybody at Cadence wants to mount and see this file system data.
After editing /etc/exports use the exportfs command to start the sharing.
$ sudo exportfs -a
Running the command with no arguments will show the exported file systems.
$ sudo /etc/init.d/nfs-kernel-server start
When it's all done the exportfs command shows the file system exported for anybody:
If anything goes wrong look in the file /var/log/syslog to see what happened. I used this to debug what happened when things didn't work on the first try.
Configuring the Zynq Linux Kernel
The Zynq Linux kernel must be configured to support NFS. The good news is I found the default kernel configurations for Zynq have the needed options already enabled so no changes are needed. If you are interested in what is required there are two options under File systems -> Network File Systems. These are "NFS client support" and "Root file system on NFS". The menuconfig is shown below:
Mounting an NFS File System from the Zynq Virtual Platform
The first way to use NFS with the Zynq Virtual Platform is to mount the exported directory from the simulated Zynq Virtual Platform. Since the Gigabit Ethernet Controller is modeled it is easy to mount the file system over the network and access the files on the host machine. For this test, I booted Linux with a ramdisk as the root file system and then used a mount command as shown below. Since I shared the same root file system over NFS you can compare the contents. The screen shot is shown below.
The only interesting option is -o nolock; I found that without this I got an error and could not mount the file system. I don't know the details, but disabling file locking makes it work.
This mount could be automated by putting an entry in /etc/fstab to mount automatically
Using NFS for the Zynq Virtual Platform Root File System
The last scenario is to use NFS for the root file system. This would be useful if a development task involves iterating through changes to the root file system that would take more time to create an SD card or USB image for every change. Using NFS, updates can be tried immediately without any scp or ftp, and if the changes require rebooting, it will be more efficient than updating an SD card or USB image.
Using an NFS root file system with the Zynq Virtual Platform requires a change to the Linux kernel command line. I did this by modifying the Linux device tree source file (.dts file) and re-building the device tree binary (.dtb file).
The key option is to specify the root file system as nfs and to specify the same file system mounted before:
After these changes are made, rebuild the .dtb file using the device tree compiler:
$ dtc -I dts -O dtb -o zynq-ep107.dtb zynq-ep107.dts
Now when the simulation runs the root file system will be mounted over NFS. Look for the "Mounted root (nfs filesystem)" in the screenshot:
To confirm it really works, create a new file on the host machine anywhere in the exported file system area and see it show up in the root file system of the Zynq simulation. Files can be edited from either side and the updates are immediately available, very cool!
Using NFS for embedded software development is a useful option for many projects. There are definitely trade-offs related to performance and flexibility. Virtual Platforms are more flexible to start with since they are just simulations on the host machine anyway. Maybe next time I will show another way to get the same benefits as NFS in terms of protecting from files being out of sync by using USB or SD card models.
Thanks for reading.