This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

port to the Nios II processor


Recently we've been working on a port of eCos to Altera's Nios II soft
processor. A preliminary version based on the 2.0 release of eCos is
available for download through the Nios forum
(http://www.niosforum.com). This patch updates that initial port with
the intention of getting it included in the public CVS repository. 

There are things that still need to be addresses here, for example I
need to add documentation and ensure that it will build using a Linux
host, however I wanted to provide an early posting to try and get
feedback as quickly as possible.

The architecture port itself is fairly standard. As you'll see from this
patch, it is heavily based on the MIPS port. However there are some
features which are peculiar to using a soft processor that I feel I
should point out.

The Nios II processor is intended for use in a programmable FPGA device,
which means that the hardware environment can be configured by the user.
This is done using the Altera SOPC Builder tool. This allows you to:
select memory devices; map in peripherals; select processor features;
etc. etc. What this means is that no two Nios II users will have exactly
the same platform, since each user will configure their FPGA contents to
match their specific requirements.

When a system is built using SOPC builder, a description of the system
is stored in a generated text file (called a PTF file). One of the goals
of this port is to take a users PTF file and automatically configure
eCos to match their hardware, i.e. we wanted to avoid requiring the user
to have to write their own platform port, or manually edit a lot of CDL
options to set base addresses, irq numbers etc., given that all the
information was already there in a machine readable format.

This is done in two parts. Firstly a CDL fragment is automatically
generated based on the PTF contents. This sets default values and limits
available options to match what's actually present in the hardware. This
CDL fragment is generated using a wrapper script for configtool named
(imaginatively) nios2configtool. It is still possible to run configtool
directly when targeting Nios II, but that means you will then have to
set all options manually. 

The second part of this process is that at build time two header files
are automatically generated which provide macros that describe the
system configuration. These macros are used (amongst other things) by
device drivers to automatically instantiate and configure device driver
instances to match the devices found in the PTF file. I've grouped all
the drivers that work this way into a single directory named "sopc"
beneath "devs".   

That's a quick summary of the more peculiar features of this port.

I understand that I'll almost certainly need to sign over the copyright
on this before it can make it into CVS, but if you have any technical
comments in the mean time - I'd greatly appreciate them.

To actually build any code using this port, you'll need a copy of the
tools provided in the Nios II development kit. This version of the port
requires version 1.1 of the kit. This is due for release in the next
couple of weeks. Once it becomes available, it will be possible to
download an evaluation version which contains everything you'll need
(including the GNU tools) from:
https://www.altera.com/support/software/download/sof-download_center.htm
l.

For the benefit of the mail system, I've split this patch into two
parts. This first part is the architecture port itself. The second part
(to come) contains the associated device drivers.

All feedback greatly appreciated,

Iain.


Attachment: nios2_arch.diff
Description: nios2_arch.diff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]