Menu

#20 (1.6.0) Problems with little endian model - Nios2

open
nobody
5
2006-04-20
2006-04-20
No

I'm using a x86/linux machine.
I'm trying to execute the programs of acstone benchmark.

Initially I used Altera's compiler and assembler.
The elf files generated by Altera's assembler are
little endian. When I try to execute the program in a
interpreted simulator I get the following output:

SystemC 2.1.v1 --- Apr 7 2006 16:29:02
Copyright (c) 1996-2005 by all Contributors
ALL RIGHTS RESERVED
ArchC: Reading ELF application file: 000.main.nios2

ArchC: -------------------- Starting Simulation
--------------------

Warning: (W562) sc_initialize is deprecated: use
sc_start(0) instead
In file: sc_simcontext.cpp:1199

Warning: (W540) sc_cycle is deprecated: use
sc_start(...) instead
In file: sc_simcontext.cpp:1213
ArchC Error: Unidentified instruction.
PC = 0
ArchC: -------------------- Simulation Finished
--------------------

Warning: (W540) sc_cycle is deprecated: use
sc_start(...) instead
In file: sc_simcontext.cpp:1213

ArchC: Simulation statistics
Times: 0.00 user, 0.00 system, 0.03 real
Number of instructions executed: 0
Simulation speed: (too fast to be precise)

When I use the assembler generated by ArchC i get this
output:

SystemC 2.1.v1 --- Apr 3 2006 19:21:55
Copyright (c) 1996-2005 by all Contributors
ALL RIGHTS RESERVED
ArchC: -------------------- Starting Simulation
--------------------

Warning: (W562) sc_initialize is deprecated: use
sc_start(0) instead
In file: sc_simcontext.cpp:1199
ArchC: Address out of bounds (pc=0x0).
ArchC: -------------------- Simulation Finished
--------------------

ArchC: Simulation statistics
Times: 0.01 user, 0.00 system, 0.00 real
Number of instructions executed: 0
Simulation speed: (too fast to be precise)

I checked this binary file and it's a big endian, but
the model is little endian. Why the assembler generates
a big endian file?

So I tryed to set the model to big endian e it worked
for that files generated by ArchC assembler, but it
should work also as little endian.

Guilherme Melo

Discussion

  • Guilherme Melo

    Guilherme Melo - 2006-04-20
    • summary: Problems with little endian model - Nios2 --> (1.6.0) Problems with little endian model - Nios2
     
  • Alexandro

    Alexandro - 2006-04-21

    Logged In: YES
    user_id=1489337

    Indeed... the assembler on version 1.6.0 of the ArchC
    package had some issues to generate little endian objects
    files. Those were fixed on the 2.x series.
    Are you planning to migrate to the 2.x series?

    -Alexandro.

     
  • Guilherme Melo

    Guilherme Melo - 2006-04-25

    Logged In: YES
    user_id=1506481

    Well, I was not planning to migrate to 2.x now.
    I don't know how much effort I would need to migrate
    and I don't have much time to finish this model.
    Meanwhile I will use the model as big endian.

    Guilherme

     

Log in to post a comment.