OpenCores
no use no use 1/1 no use no use
setting sim.cfg on the latest version of or1ksim
by Mob on Aug 23, 2010
Mob
Posts: 7
Joined: Jun 30, 2010
Last seen: Aug 17, 2011
Hi all,

when I set the new feature -m as an argument on the latest version of or1ksim like or32-elf-sim -m 8M hello, the application runs successfully. But the execution will be failed if I set the standard configuration file sim.cfg like or32-elf-sim -f sim.cfg hello to be able to turn on the GDB tool. The execution will be hanged at the of the following output listed below.

why did the application run by first case without bootloader successfully and failed by the second?


or32-elf-sim -f sim.cfg hello
Insn MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Data MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Warning: ./sim.cfg: Unrecognized parameter: 1 at line 913; ignored.
Warning: ./sim.cfg: No argument to parameter file at line 915; ignored.
Warning: ./sim.cfg: Unrecognized parameter: section at line 945; ignored.
Warning: ./sim.cfg: Unrecognized parameter: memory_order at line 946; ignored.
Warning: ./sim.cfg: Unrecognized parameter: calling_convention at line 947; ignored.
Warning: ./sim.cfg: Unrecognized parameter: enable_bursts at line 948; ignored.
Warning: ./sim.cfg: Unrecognized parameter: no_multicycle at line 949; ignored.
Warning: ./sim.cfg: Unrecognized parameter: timings_fn at line 950; ignored.
Or1ksim 2010-08-03
Building automata... done, num uncovered: 0/213.
Parsing operands data... done.
Warning: PS2 keyboard unable to open RX file stream.
Cannot open Ethernet RX file "eth0.rx"
Resetting memory controller.
Resetting PIC.
loadcode: filename hello startaddr=00000000 virtphy_transl=00000000
Not COFF file format
ELF type: 0x0002
ELF machine: 0x005c
ELF version: 0x00000001
ELF sec = 23
Section: .vectors, vaddr: 0x00000000, paddr: 0x0 offset: 0x00002000, size: 0x00002000
Section: .init, vaddr: 0x00002000, paddr: 0x2000 offset: 0x00004000, size: 0x0000002c
Section: .text, vaddr: 0x0000202c, paddr: 0x202c offset: 0x0000402c, size: 0x0000d674
Section: .fini, vaddr: 0x0000f6a0, paddr: 0xf6a0 offset: 0x000116a0, size: 0x00000028
Section: .rodata, vaddr: 0x0000f6c8, paddr: 0xf6c8 offset: 0x000116c8, size: 0x000008d4
Section: .ctors, vaddr: 0x00011f9c, paddr: 0x11f9c offset: 0x00011f9c, size: 0x00000008
Section: .dtors, vaddr: 0x00011fa4, paddr: 0x11fa4 offset: 0x00011fa4, size: 0x00000008
Section: .data, vaddr: 0x00011fac, paddr: 0x11fac offset: 0x00011fac, size: 0x00000888

Best regards,

Mohb


RE: setting sim.cfg on the latest version of or1ksim
by julius on Aug 23, 2010
julius
Posts: 323
Joined: Jul 1, 2008
Last seen: Feb 8, 2012
Warning: ./sim.cfg: Unrecognized parameter: 1 at line 913; ignored.
Warning: ./sim.cfg: No argument to parameter file at line 915; ignored.
Warning: ./sim.cfg: Unrecognized parameter: section at line 945; ignored.
Warning: ./sim.cfg: Unrecognized parameter: memory_order at line 946; ignored.
Warning: ./sim.cfg: Unrecognized parameter: calling_convention at line 947; ignored.
Warning: ./sim.cfg: Unrecognized parameter: enable_bursts at line 948; ignored.
Warning: ./sim.cfg: Unrecognized parameter: no_multicycle at line 949; ignored.
Warning: ./sim.cfg: Unrecognized parameter: timings_fn at line 950; ignored.

It looks like the memory section isn't getting set up right. Did you alter the sim.cfg file?

You probably want a memory section looking like (for a 32MB memory):

section memory
pattern = 0x00
type = unknown /* Fastest */
name = "RAM"
ce = 1
mc = 0
baseaddr = 0x00000000
size = 0x02000000
delayr = 1
delayw = 1
end


Those warnings don't look like they're related to memory sections, actually. How old is that sim.cfg file? And again, what changes did you make?

RE: setting sim.cfg on the latest version of or1ksim
by jeremybennett on Aug 23, 2010
jeremybennett
Posts: 689
Joined: May 29, 2008
Last seen: Feb 9, 2012

Hi Mohb,

Like Julius says, looks like you have an error in your config file. Could you post lines 900-950 here, so we can see what the error was.

ATB

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: setting sim.cfg on the latest version of or1ksim
by Mob on Aug 24, 2010
Mob
Posts: 7
Joined: Jun 30, 2010
Last seen: Aug 17, 2011
Hi Jeremy and Julius,

I attached the configuration file I use. This file is downloaded from svn. Actually, I did not change anything in it.


Best regards,

Mohb
sim.cfg (21 kb)
RE: setting sim.cfg on the latest version of or1ksim
by jeremybennett on Aug 24, 2010
jeremybennett
Posts: 689
Joined: May 29, 2008
Last seen: Feb 9, 2012

Hi Mohb

Oops. You've found several bugs! I seem to have introduced some problems into the code reading configuration files. Plus the sim.cfg in SVN is out of date.

  1. For "section debug", the two parameters "gdb_enabled" and "server_port" are now obsolete. They are for the old proprietary JTAG interface, which is dropped. They are parsed, even though the debug section is disabled. Replace them with "rsp_enabled" and "rsp_port".

  2. "section ata" is completely broken, and I don't know why. For now set the first line to be "enabled =0" and comment out all the rest.

  3. The line numbers reported in the config error messages are wrong.

  4. Even if you fix all this, the program hangs. The problem is the memory controller appears to be broken. Find "section mc" and change its first line to "enabled = 0".

I've filed all this in the bug tracker (Bug 1821, Bug 1822, Bug 1823 and Bug 1824 respectively).

Hopefully this is enough to get you going. We need a better parser for the config files, and we need some meaningful tests in the testsuite.

HTH

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

no use no use 1/1 no use no use
© copyright 1999-2012 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.