Cadence® system design and verification solutions, integrated under our System Development Suite, provide the simulation, acceleration, emulation, and management capabilities.
System Development 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.
Get the most out of your investment in Cadence technologies through a wide range of training offerings.
This course combines our Allegro PCB Editor Basic Techniques, followed by Allegro PCB Editor Intermediate Techniques.
Virtuoso Analog Design Environment Verifier 16.7
Learn learn to perform requirements-driven analog verification using the Virtuoso ADE Verifier tool.
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 two choices for how to handle USB devices in a virtual platform. A USB device can be modeled using C/C++ programming, or a physical USB device can be plugged into a computer and attached to the simulator. The Xilinx QEMU for Zynq uses physical USB devices. The Cadence SystemC Virtual Platform for Zynq uses either technique.
One of the drawbacks I learned when using physical USB devices is the need for root permission to access the Linux device node from user space. This is required to open the driver and perform operations to control the USB device from an application. There are a couple of techniques I found when considering the best solution:
All of this assumes you have root permission (or sudo capability) on your machine.
First, I found that running QEMU as root is not too difficult; just put a sudo in front of the command used to start qemu-system-arm. For example, for Zynq QEMU, I added the sudo xterm -e in front of the command so it runs as root in a new terminal and then I added the USB device I want to attach to the simulator using -usbdevice.
Doing the same for the Cadence Virtual Platform for Zynq is not as easy. The SystemC simulator spawns multiple programs and just putting sudo in front of nscs_run or irun doesn't work very well because the permission doesn't always flow down to all of the child programs that get launched. Running the simulator as root is also undesirable because logfiles will be created with root permission. This makes it hard to read them using a normal user account. Because of all this a better solution is needed.
The second solution of changing permission on /proc/bus/usb didn't help me much because the kernel on my machine didn't have usbfs enabled and thus /proc/bus/usb didn't even show up. Newer Linux kernels don't use this method anymore to identify and export information about USB devices. It is possible to enable it by building a new kernel, but it's not something I was interested in doing.
The best solution I found to connect a physical USB device to the Zynq SystemC simulation involves using udev to assign the permissions when the USB device is plugged in. For reference, this was tested on Ubuntu 12.04.
First, create a new file in /etc/udev/rules.d
The first USB device I worked with was a Kingston memory stick so I created the file named 80-kingston.rules
The name of the file is not too important as long as it ends in .rules. The files are read in lexical order so the files starting with numbers are read first then the files with letters are read. The other files on my system in this directory started with lower numbers so I just picked 80.
Here are the contents of the file; it contains the vendor id and the product id for the USB device as given by the lsusb command. These are important as they are used to identify which USB device to connect to a virtual platform simulation. QEMU uses the same vendor id and product id scheme.
I made the group adm, but this can be any group of which you are a member. Use the groups command to see what groups you are in. This will enable permission for the users in the group to use the USB device from user space and have it work in the simulation. There are other ways to grant specific user permission or all users permission, but this is one way that works and makes sense to me.
Now restart udev and plug in the USB device.
$ sudo restart udev
Now the simulation has permission to use the USB device and attach it to the simulated hardware. There is no need to run as root anymore!
To use the USB device in a Cadence virtual platform simulation, edit the hardware configuration file (.cfg extension) and add the product id and vendor id to the USB device description. More details are available in the Virtual Platform for Xilinx Zynq-7000 EPP User Guide.
Here is a screenshot of the USB memory stick contents as seen from my host machine.
Here is a screenshot of the same USB memory stick when mounted by the Linux running on the Cadence virtual platform for Zynq:
Hopefully, this background on how to work with physical USB devices helps solve the common first question about using physical USB devices attached to virtual platforms and how to obtain permission to attach the USB device to a simulation running on a Linux host machine. There are great benefits obtained by using a physical USB device, but as you can see it requires some special handling and may not be suitable if you are running on a server in another part of the world.