1/1

|
Problem with or1ksim_init function and generic section in config file
by ClockworkRed on Feb 17, 2012 |
ClockworkRed
Posts: 19 Joined: May 6, 2011 Last seen: Oct 26, 2016 |
||
|
Hello,
I am trying to set up the TLM example of embecosm.com with the or1ksim-0.5.0. I am right now looking onto the logger example since it is the most simple one. I have the problem with the generic section in the configuration file. It gives the following error: Warning: ./SW/sim_new.cfg: Unrecognized parameter: section at line 468; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: name at line 472; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: byte_enabled at line 473; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: hw_enabled at line 474; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: word_enabled at line 475; ignored. I added the following code to the standard sim.cfg in the or1ksim distribution: section generic enabled = 1 baseaddr = 0x90000000 size = 0x8 name = "External UART" byte_enabled = 1 hw_enabled = 1 word_enabled = 1 end It seems I have forgotten something, but I cannot figure out what it is. If anybody has an idea, I would be very happy about it. Below is the detailed description of what I did. As a note, I receive the same error if I call or32-elf-sim. Best Regards, Daniel DETAILS: I changed the Or1ksimSC::Or1ksimSC class in the logger example because the or1ksim_init function was changed: Or1ksimSC::Or1ksimSC (sc_core::sc_module_name name, char *configFile, char *imageFile) : //const char *configFile, //const char *imageFile) : sc_module (name), dataBus ("data_initiator" ) { //char* argv1="or1ksim"; //not required char* argv[2]; //argv[0] = argv1; argv[1] = configFile; argv[2] = imageFile; int argc=3; or1ksim_init (argc,argv, this, staticReadUpcall, staticWriteUpcall); //or1ksim_init (configFile, imageFile, this, staticReadUpcall, // staticWriteUpcall); SC_THREAD (run); // Thread to run the ISS } // Or1ksimSC() ... The example then compiles fine. I am using my own Makefile: g++ -Wall -Wno-deprecated -Wno-unused -Wno-parentheses -DSC_INCLUDE_DYNAMIC_PROCESSES -I/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/include -L/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/lib-linux64 -lstdc++ -lm -lsystemc -lpthread -I/usr/local/research/projects/SystemDesign/tools/systemc/TLM-2009-07-15/include/tlm -I/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/include -L/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/lib -lsim -c loggerMainSC.cpp g++ -Wall -Wno-deprecated -Wno-unused -Wno-parentheses -I/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/include -L/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/lib-linux64 -lstdc++ -lm -lsystemc -lpthread -I/usr/local/research/projects/SystemDesign/tools/systemc/TLM-2009-07-15/include/tlm -I/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/include -DSC_INCLUDE_DYNAMIC_PROCESSES -c LoggerSC.cpp g++ -Wall -Wno-deprecated -Wno-unused -Wno-parentheses -DSC_INCLUDE_DYNAMIC_PROCESSES -I/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/include -L/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/lib-linux64 -lstdc++ -lm -lsystemc -lpthread -I/usr/local/research/projects/SystemDesign/tools/systemc/TLM-2009-07-15/include/tlm -I/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/include -L/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/lib -lsim -c Or1ksimSC.cpp g++ -Wall -Wno-deprecated -Wno-unused -Wno-parentheses -DSC_INCLUDE_DYNAMIC_PROCESSES -o loggerMainSC LoggerSC.o Or1ksimSC.o loggerMainSC.o -L/usr/local/research/projects/SystemDesign/tools/systemc/systemc-2.2.0/lib-linux64 -lstdc++ -lm -lsystemc -lpthread -L/usr/local/research/projects/SystemDesign/tools/openrisc/or1ksim/lib -lsim This creates my executible loggerMainSC. When I run the executible with ./loggerMainSC --file=SW/sim_new.cfg SW/logger-test I get the following output: SystemC 2.2.0 --- Feb 8 2012 16:27:13 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED Seeding random generator with value 0xb898bc02 Warning: Unknown Ethernet type: file assumed. Warning: ./SW/sim_new.cfg: Unrecognized parameter: section at line 468; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: name at line 472; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: byte_enabled at line 473; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: hw_enabled at line 474; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: word_enabled at line 475; ignored. Or1ksim 2011-08-15 Building automata... done, num uncovered: 0/213. Parsing operands data... done. Resetting PIC. loadcode: filename SW/logger-test startaddr=00000000 virtphy_transl=00000000 Not COFF file format ELF type: 0x0002 ELF machine: 0x005c ELF version: 0x00000001 ELF sec = 26 Section: .vectors, vaddr: 0x00000000, paddr: 0x0 offset: 0x00002000, size: 0x00002000 Section: .init, vaddr: 0x00002000, paddr: 0x2000 offset: 0x00004000, size: 0x00000028 Section: .text, vaddr: 0x00002028, paddr: 0x2028 offset: 0x00004028, size: 0x000024e0 Section: .fini, vaddr: 0x00004508, paddr: 0x4508 offset: 0x00006508, size: 0x0000001c Section: .rodata, vaddr: 0x00004524, paddr: 0x4524 offset: 0x00006524, size: 0x000000be Section: .eh_frame, vaddr: 0x000045e4, paddr: 0x45e4 offset: 0x000065e4, size: 0x00000004 Section: .ctors, vaddr: 0x000065e8, paddr: 0x65e8 offset: 0x000065e8, size: 0x00000008 Section: .dtors, vaddr: 0x000065f0, paddr: 0x65f0 offset: 0x000065f0, size: 0x00000008 Section: .jcr, vaddr: 0x000065f8, paddr: 0x65f8 offset: 0x000065f8, size: 0x00000004 Section: .data, vaddr: 0x000065fc, paddr: 0x65fc offset: 0x000065fc, size: 0x000009b8 Writing byte 0xa5 to address 0x090000000 exit(9224) @reset : cycles 0, insn #0 @exit : cycles 3301, insn #2067 diff : cycles 3301, insn #2067 I actually get the simulator output that the byte was written but I do not get the logger response that it was received. I think the problem is that the generic section was not read correctly as indicated by the errors. My sim_new.cfg is attached below.
sim_new.cfg (11 kb)
|
|||
|
RE: Problem with or1ksim_init function and generic section in config file
by jeremybennett on Feb 20, 2012 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hello,
I am trying to set up the TLM example of embecosm.com with the or1ksim-0.5.0. I am right now looking onto the logger example since it is the most simple one. I have the problem with the generic section in the configuration file. It gives the following error: Warning: ./SW/sim_new.cfg: Unrecognized parameter: section at line 468; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: name at line 472; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: byte_enabled at line 473; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: hw_enabled at line 474; ignored. Warning: ./SW/sim_new.cfg: Unrecognized parameter: word_enabled at line 475; ignored. I added the following code to the standard sim.cfg in the or1ksim distribution: section generic enabled = 1 baseaddr = 0x90000000 size = 0x8 name = "External UART" byte_enabled = 1 hw_enabled = 1 word_enabled = 1 end It seems I have forgotten something, but I cannot figure out what it is. If anybody has an idea, I would be very happy about it. Below is the detailed description of what I did. As a note, I receive the same error if I call or32-elf-sim. Hi Daniel, I think this might not be your problem. I haven't looked at Or1ksim recently, but I seem to recall there is a problem with parsing "section ata". Could you try commenting out the whole "section ata" part and see if that fixes the problem. You could also try using the latest version of Or1ksim from SVN, to see if that clears up any problems. I did some work cleaning up the parsing of config files, but it is still quite a mess. In particular, the reported line numbers are not always quite accurate. A counting bug I never quite tracked down. Let us know how you get on. Jeremy
--
sim_new.cfg (11 kb)
|
|||
|
RE: Problem with or1ksim_init function and generic section in config file
by ClockworkRed on Feb 20, 2012 |
ClockworkRed
Posts: 19 Joined: May 6, 2011 Last seen: Oct 26, 2016 |
||
|
Thank you very much, Jeremy.
Commenting out the ata section did the trick. Daniel Now I get the correct output: ./loggerMainSC --file=SW/sim_new.cfg SW/logger-test SystemC 2.2.0 --- Feb 8 2012 16:27:13 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED Seeding random generator with value 0xa1014ceb Warning: Unknown Ethernet type: file assumed. Or1ksim 2011-08-15 Building automata... done, num uncovered: 0/213. Parsing operands data... done. Resetting PIC. loadcode: filename SW/logger-test startaddr=00000000 virtphy_transl=00000000 Not COFF file format ELF type: 0x0002 ELF machine: 0x005c ELF version: 0x00000001 ELF sec = 26 Section: .vectors, vaddr: 0x00000000, paddr: 0x0 offset: 0x00002000, size: 0x00002000 Section: .init, vaddr: 0x00002000, paddr: 0x2000 offset: 0x00004000, size: 0x00000028 Section: .text, vaddr: 0x00002028, paddr: 0x2028 offset: 0x00004028, size: 0x000024e0 Section: .fini, vaddr: 0x00004508, paddr: 0x4508 offset: 0x00006508, size: 0x0000001c Section: .rodata, vaddr: 0x00004524, paddr: 0x4524 offset: 0x00006524, size: 0x000000be Section: .eh_frame, vaddr: 0x000045e4, paddr: 0x45e4 offset: 0x000065e4, size: 0x00000004 Section: .ctors, vaddr: 0x000065e8, paddr: 0x65e8 offset: 0x000065e8, size: 0x00000008 Section: .dtors, vaddr: 0x000065f0, paddr: 0x65f0 offset: 0x000065f0, size: 0x00000008 Section: .jcr, vaddr: 0x000065f8, paddr: 0x65f8 offset: 0x000065f8, size: 0x00000004 Section: .data, vaddr: 0x000065fc, paddr: 0x65fc offset: 0x000065fc, size: 0x000009b8 Writing byte 0xa5 to address 0x090000000 Logging Command: Write Address: 0x90000000 Byte enables: 0x000000ff Data: 0x000000a5 Writing half word 0xbeef to address 0x090000002 Logging Command: Write Address: 0x90000000 Byte enables: 0xffff0000 Data: 0xefbe0001 Writing full word 0xdeadbeef to address 0x090000004 Logging Command: Write Address: 0x90000004 Byte enables: 0xffffffff Data: 0xefbeadde Logging Command: Read Address: 0x90000000 Byte enables: 0x000000ff Read byte 0x0FF from address 0x090000000 Logging Command: Read Address: 0x90000000 Byte enables: 0xffff0000 Read half word 0x030E0 from address 0x090000002 Logging Command: Read Address: 0x90000004 Byte enables: 0xffffffff Read full word 0x0E0FF7F00 from address 0x090000004 exit(0) @reset : cycles 0, insn #0 @exit : cycles 14795, insn #9580 diff : cycles 14795, insn #9580 |
|||
|
RE: Problem with or1ksim_init function and generic section in config file
by jeremybennett on Feb 20, 2012 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi Daniel, Good news. I wish all problems were as easy to solve :) Jeremy |
|||
1/1

