Home > Community > Blogs > System Design and Verification > welcome to the zynq 7000 virtual platform
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

Register | Membership benefits
Get email delivery of the System Design and Verification blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Welcome to the Zynq-7000 Virtual Platform

Comments(0)Filed under: System Design and Verification, ARM, linux, SystemC, TLM, FPGA, software, virtual platforms, virtual prototypes, Cortex-A9, Zynq, extensible, Zynq-7000', EPP, Xilinx

As you might guess we are pretty excited about the Virtual Platform development for the Zynq-7000 EPP.

The FPGA world has changed a lot from 1995 when I was an FAE at Cypress Semiconductor selling and supporting programmable logic devices. This was during the transition from schematic capture to HDLs. It was the days of PALASM and ABEL, and then the first VHDL and Verilog synthesis tools for FPGAs. Back then nobody did much simulation; after all it was a reprogrammable device (except for those anti-fuse FPGAs). How hard could it be?

One of my first jobs after college was for a server company that built a multi-processor server out of Pentium processors and small PLDs. There was some simulation, using Verilog-XL from Cadence, but the primary technique was plug-and-debug. After all, there were a finite number of combinations for each programmable device and programming took only seconds so it was just a matter of putting the right bits into each device and the system would be ready to ship. Since then I'm sure FPGA designs have become more complex and logic simulation is a required step to have any hope of getting systems to work correctly.

What about embedded software?

We currently live at a time when software is easy to change, updates are frequent, and quality is a constant challenge. One would think the combination of reprogrammable hardware and easy to change software would eliminate the need for simulation, but it has not. The introduction of an Extensible Virtual Platform for Zynq is confirmation that fast simulation for embedded software development is alive and well.

Recently, I read Paul Allen's book, Idea Man, and was intrigued to learn how he simulated the 8008 on a main frame and later PDP-10 because he didn't have hardware while he was developing BASIC. It's a great story about he took his code to New Mexico and ran it on the hardware for the first time with great success. Today, the concept is the same, the processor is a bit more complex and BASIC has turned into the Linux kernel for ARM.

Embedded Linux

A couple of months ago Linux celebrated its 20th birthday. It sounds pretty old, but Linux appears everywhere in products ranging from super computers, to servers, to consumer electronics, to mobile phones. It's likely a large number of Zynq designs will use Linux as an operating system. With its approximately 30,000 files and 10+ million lines of code it a challenge to learn and use it. Xilinx has done a great job to make it easier by providing a customized solution for Zynq, but there is still a lot to learn and a Virtual Platform is a great way to do it.

With the launch of the Zynq Virtual Platform this will be the place to learn about a number of topics related to Virtual Platform development and usage.

Some of the platform creation topics include:

  • Creating SystemC TLM-2.0 models of new hardware
  • Extending Zynq by adding those new SystemC models
  • Using virtualization for Zynq I/O interfaces
  • Profiling simulation and optimizing for performance
  • Understanding just-in-time code morphing used in simulators like the Imperas simulator used to model the ARM Cortex-A9 in the Zynq Virtual Platform

Virtual Platform usage topics related to embedded software will include

  • Understanding bootloaders
  • Creating of file systems
  • Understanding flash
  • Developing and debugging Linux device drivers
  • Using the Zynq software toolchain
  • Various techniques for software debugging
  • Profiling software to optimize performance

One of the great things about Zynq is the Xilinx open source initiative. Almost all of the Virtual Platform projects we normally work on involve proprietary hardware designs which are not released yet and we cannot talk about any details. Zynq is a refreshing change which will greatly broaden the knowledge and usage of Virtual Platforms for simulation.

Here's the 1st Zynq Trivia question. We know that each port of ARM Linux has a unique machine identifier. All of the machines are registered in a Machine Registry.

What is the Zynq Machine ID?

Looking at the data base it could be 3343 or 3378.

Normally the boot loader places the machine ID in register r1 and one of the first steps in booting Linux is to lookup the processor type and the machine type and check that the machine type matches one of the values in the list of supported machines. The unique thing I found for Zynq Linux is that the bootloader is not required to put the right value in the register r1. For some reason it is done automatically by the kernel start-up code. Take a look at the Zynq kernel source tree and find the file arch/arm/kernel/head.S.


There is an instruction there to directly stuff the machine ID into r1. This is different than all other ARM Linux platforms I have constructed. All of the others pretty much hang during the early boot code if the machine id doesn't match the expected machine type (without much clue about why it is stuck) because the bootloader is expected to put the machine ID into r1.

The correct answer is 3343. Putting a breakpoint on start_kernel and looking at r1 will show 0xd0f

Since we saw the code setting the r1 value we can also match it to the define in the file include/generated/mach-types.h

#define MACH_TYPE_XILINX               3343

In conclusion, if you are configuring a boot loader for Zynq to run Linux there is no need to worry about the machine ID, it will all be taken care of for you and will just work, and now you know the machine ID for Zynq.

Thanks to everybody who stopped by the Xilinx booth at ARM Techcon to see the Zynq Virtual Platform demo.

Jason Andrews



Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. 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. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.