Cyclone V, Nios II, Ecos, hal-synth on Nios - Repost with clean subject line.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cyclone V, Nios II, Ecos, hal-synth on Nios - Repost with clean subject line.

John Carter-2
Sorry subject line in previous post, copy / paste failure. :-(

So we have been running the open source version of Ecos on Cyclone III on Leon2.

We are now considering moving to Cyclone V running Linux on Nios2.

As a porting step, we want to port the Ecos i86 synth HAL to nios, and
run our existing application as a multithreaded Ecos application
residing within a single Linux process.

The obvious way to go about it would be to mash up the nios HAL
available from here...
   http://www.ecoscentric.com/ecospro/nios2.shtml
with the i86 synth hal.

But the fine fine print seems problematic....

> Congratulations, your purchase of the Altera Nios II Development Kit - either the Stratix® II FPGA Edition or the Cyclone® II FPGA Edition, entitles you to a free copy of eCosCentric's eCosPro Starter Kit. The Starter Kit includes all the necessary tools, runtime code and documentation you need to develop royalty and license fee free embedded applications running on Altera's Nios II core.


Alas, we have Cyclone V developer kits and intent to deploy on Cyclone V.

I have a vague memory of reading or hearing that Altera paid for the
Nios port with the aim of selling more chips.

So it would make sense that the actual fine print of that deal didn't
limit it to those older generation chips.

Anybody know for sure?

Alternately, if that fine print says what it says and is immutable..

We could take the open source ecos and rewrite the approximately 800
lines of i386 assembler into Nios.

Or perhaps we could create a CPU agnostic version out of signals and
libc getcontext / swapcontext.

Any ideas? Or suggestions?


--
John Carter
Phone : (64)(3) 358 6639
Tait Electronics
PO Box 1645 Christchurch
New Zealand

--

------------------------------
This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer
------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Cyclone V, Nios II, Ecos, hal-synth on Nios - Repost with clean subject line.

Grant Edwards-6
On 2016-03-01, John Carter <[hidden email]> wrote:

>> Congratulations, your purchase of the Altera Nios II Development
>> Kit - either the Stratix® II FPGA Edition or the Cyclone® II FPGA
>> Edition, entitles you to a free copy of eCosCentric's eCosPro
>> Starter Kit. The Starter Kit includes all the necessary tools,
>> runtime code and documentation you need to develop royalty and
>> license fee free embedded applications running on Altera's Nios II
>> core.
>
> Alas, we have Cyclone V developer kits and intent to deploy on
> Cyclone V.
>
> I have a vague memory of reading or hearing that Altera paid for the
> Nios port with the aim of selling more chips.

Yep.

I was peripherally involved with the initial port of eCos to the
NIOS2.  At least partially in response to our project's requirements,
Altera contracted with somebody to do the basic port to the NIOS2
architecture and write a couple eCos drivers for some peripherals
(opencores Ethernet, 16650 UART, ???).  The result was a huge mess
that was "integrated with" (more like duct-taped onto the side of)
eclipse and Quartus.  In theory, it was all point-and-grunt and
required no actual knowledge of the hardware or experience with eCos
or embedded software. [Because those are the types of people you want
doing embedded software development, right?]

IIRC, there were perl scripts that ran Java apps in order to generated
bash scripts that generated Tcl config files [I probably have the
order of those things wrong, but I vividly remember it involved Perl,
bash, Java, and Tcl]. Just to add to the fun, eclipse and Quartus both
crashed frequently and unpredictably.

It sort-of worked if you were lucky, the phase of the moon was right,
and as long as all you wanted to do was build the demo program for the
eval board using one particular set of versions of eclipse, Cygwin,
windows, and Quartus that were all installed exactly right.  However,
as soon as we tried to do anything at all custom, the whole thing
collapsed into a useless, smoking heap.

After trying for several months (mostly in vain) to work with this
system, we decided it just wasn't viable.  So, after many weeks of
work. I was able to rip off the duct tape and discard eclipse and
Quartus.  Using (I think) a .pof file, one or two command-line
utilities from a Quartus installation, and a home-made bash program, I
was able to extract relevent hardware info (e.g. clock speed and
addresses of memory and peripherals) from the .pof file and was then
able to configure and build eCos in a reliably and repatable manner
using normal command line tools.  Unfortunately, those Quartus
utilities were written in Java, so you still had to have a JRE
installed, but at least you didn't need Quartus and eclipse.

After that, life got several orders of magnitude easier.

After all that effort, the NIOS2 design proved dissappointing.  The
SDRAM controller didn't seem to have enough bandwidth to support
full-duplex 100M Ethernet, throughput was a lot lower than expected
[the 66MHz NIOS2 was no faster than the 44MHz ARM7 it was to replace),
and the pricing was higher than expected.  In the end, we finally
abandoned the NIOS2 and went with an off-the-shelf Cortex-M3 part
instead.  It was a two-chip solution instead of a single-chip
solution, but it was 3X as fast for about 1/3 the price.

AFAIK, that port of eCos for the NIOS2 was never put into the public
eCos source tree, and remained proprietary to Altera (who seem to have
licensed it to eCosCentric -- or perhaps that was part of the original
deal).  I don't know if the eCosCentric port still requires eclipse
and Quartus the way the original port did.

There appears to be at least one other port:

  https://github.com/joeynelson/nios2ecos

Which I think is related to the old Zylin port.  I don't how/if it's
related to the original port or to what eCosCentric currently sells.

Don't know if that helped or not -- but it made me feel better. :)

> So it would make sense that the actual fine print of that deal didn't
> limit it to those older generation chips.
>
> Anybody know for sure?
>
> Alternately, if that fine print says what it says and is immutable..
>
> We could take the open source ecos and rewrite the approximately 800
> lines of i386 assembler into Nios.
>
> Or perhaps we could create a CPU agnostic version out of signals and
> libc getcontext / swapcontext.

--
Grant Edwards               grant.b.edwards        Yow! If Robert Di Niro
                                  at               assassinates Walter Slezak,
                              gmail.com            will Jodie Foster marry
                                                   Bonzo??


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Cyclone V, Nios II, Ecos, hal-synth on Nios - Repost with clean subject line.

Edgar Grimberg-2
> There appears to be at least one other port:
>
>   https://github.com/joeynelson/nios2ecos
>
> Which I think is related to the old Zylin port.  I don't how/if it's
> related to the original port or to what eCosCentric currently sells.
>
> Don't know if that helped or not -- but it made me feel better. :)
>

This is a blast from the past!
The link indeed points to the old Zylin port. This is based on the
work of Graham Henderson, and then adopted and improved by Zylin. At
the time, it didn't make it to the official eCos tree because, if I
remember correctly, we couldn't get in touch with Graham to ask for
all the required paperwork.
Zylin used this port for at least one commercial product.

Best regards,
Edgar

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss