Forum Discussion

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

nios ii registers HELP !!!!!!!

hello everybody

please i'm facing a problem with the programming model of the nios ii , well i'm using assembly language to develop a program to control a huge process , which requires many calculations and data processing

the problem is that the available registers are not enough and instructions cannot be executed directly from memory .........please can u help me wih ideas to be able to use those registers efficienlty

any help is welcome

thank u very much

4 Replies

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

    Why don't you compile the key pieces of your algorithms in C, with varying levels of optimization? At the very least, it will give you some decent starting points.

    Cheers,

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

    thank u slacker for ur answer ...the problem is that i'm not used to C programming language thus my use of assembly language ...i really don't know how to solve this problem!!

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

    Save values you aren't using in memory!

    If you arrange for all data memory (including any io registers) to have addresses below 0x8000 they can be accessed using offsets from r0.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thank u dsl for ur answer. well by using the offset below 0x8000 i'm gonna save our register that i've used as a memory pointer , the problem is that i've to perform many calculations additions subtractions and mainly comparaisons and the only two instructions that use memory offset are Load /store so....