Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Is custom intructions (CI) supported ? how ?

Good Morning everybody http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif

I tried working with custom instructions under the Nios IDE ..

but how to use them under uClinux ..??

will the nios gcc be changed .. ??

What will be the name of the new instruction ?? same as in IDE ?

I&#39;m totally lost when trying to figure out the solution http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif

=================

another quick question please::

can any1 gimme a quick guide to using DMA under uCLinux ?

Many many thanks in advance http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

Yours,

Tarek

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Tarek,

    I just added the bitswap custom instruction to a nios II system. Then I opened the IDE and compiled a hello_world program targeted to this system in order to generate the system.h file.

    I copied the system.h file over to the linux environment where I do my uClinux software development, and wrote a little C program that uses the bitswap CI (just like the program in the CI user guide, but with additional printf statements to show the value before and after the bitswap). When I compiled I used the elf2flt flag, like hippo shows in his hello world document on the wiki, rebuilt the kernel and zImage, and it works perfectly.

    -jason