On Mon, 2012-04-23 at 12:16 +0100, Julius Baxter wrote:
> On Mon, Apr 23, 2012 at 11:54 AM, hcy.1990 <[email protected]> wrote:
> > Hi Julius,
> >
> > I followed the instruction from the web to build the toolchains and
> > orpsoc.pdf. Each of the make checks for each of the tools are okay. I could
> > run regression test "make rtl-test" but I can not do make "vlt-tests".
> > Here are the errors:
> >
> > make[2]: Entering directory `/home/hcy/orpsocv2/sim/vlt'
> > g++ -I. -MMD -I/home/hcy/verilator/include
> > -I/home/hcy/verilator/include/vltstd -DVL_PRINTF=printf -DVM_TRACE=1
> > -DVM_COVERAGE=0 -fprofile-use -Wcoverage-mismatch -O3
> > -I/home/hcy/orpsocv2/sim/run/../../bench/sysc/include
> > -I/home/hcy/systemC/systemc-2.2.0/include -c -o OrpsocAccess.o
> > OrpsocAccess.cpp
> > OrpsocAccess.cpp:43:54: error: Vorpsoc_top_ram_wb__A20_D20_M800000_MB17.h:
> > No such file or directory
> > OrpsocAccess.cpp:45:40: error: Vorpsoc_top_ram_wb_b3__pi3.h: No such file or
> > directory
> > OrpsocAccess.cpp: In constructor ‘OrpsocAccess::OrpsocAccess(Vorpsoc_top*)’:
> > OrpsocAccess.cpp:64: error: invalid use of incomplete type ‘struct
> > Vorpsoc_top_ram_wb__M800000_MB17’
> > Vorpsoc_top_orpsoc_top.h:13: error: forward declaration of ‘struct
> > Vorpsoc_top_ram_wb__M800000_MB17’
> > OrpsocAccess.cpp: In member function ‘uint32_t
> > OrpsocAccess::get_mem32(uint32_t)’:
> > OrpsocAccess.cpp:187: error: invalid use of incomplete type ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.h:44: error: forward declaration of ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.cpp: In member function ‘uint8_t
> > OrpsocAccess::get_mem8(uint32_t)’:
> > OrpsocAccess.cpp:206: error: invalid use of incomplete type ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.h:44: error: forward declaration of ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.cpp: In member function ‘void OrpsocAccess::set_mem32(uint32_t,
> > uint32_t)’:
> > OrpsocAccess.cpp:235: error: invalid use of incomplete type ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.h:44: error: forward declaration of ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.cpp: In member function ‘void OrpsocAccess::do_ram_readmemh()’:
> > OrpsocAccess.cpp:243: error: invalid use of incomplete type ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > OrpsocAccess.h:44: error: forward declaration of ‘struct
> > Vorpsoc_top_ram_wb_b3__pi3’
> > make[2]: *** [OrpsocAccess.o] Error 1
> > make[2]: Leaving directory `/home/hcy/orpsocv2/sim/vlt'
> >
> > Or1200MonitorSC.cpp:(.text+0x5c49): undefined reference to
> > `OrpsocAccess::setGpr(unsigned int, unsigned int)'
> > Or1200MonitorSC.cpp:(.text+0x5d08): undefined reference to
> > `OrpsocAccess::getGpr(unsigned int)'
> > Or1200MonitorSC.cpp:(.text+0x5dac): undefined reference to
> > `OrpsocAccess::getGpr(unsigned int)'
> > Or1200MonitorSC.cpp:(.text+0x5dfa): undefined reference to
> > `OrpsocAccess::getGpr(unsigned int)'
> > Or1200MonitorSC.cpp:(.text+0x5e12): undefined reference to
> > `OrpsocAccess::getGpr(unsigned int)'
> > Or1200MonitorSC.cpp:(.text+0x5e3d): undefined reference to
> > `OrpsocAccess::getGpr(unsigned int)'
> > collect2: ld returned 1 exit status
> > make[1]: *** [/home/hcy/orpsocv2/sim/run/../../sim/vlt/Vorpsoc_top] Error 1
> > make[1]: Leaving directory `/home/hcy/orpsocv2/sim/run'
> >
> > So I go to the /sim/vlt directory to find files.And I found some files's
> > names very similar to the missing ones.They are
> > "Vorpsoc_top_ram_wb_b3__M800000_MB17.h" and
> > "Vorpsoc_top_ram_wb__M800000_MB17.h".The terminal shows as follows:
> >
> > make[2]: 正在进入目录 `/home/hcy/orpsocv2/sim/vlt'
> > /usr/bin/perl /home/hcy/verilator/bin/verilator_includer Vorpsoc_top.cpp
> > Vorpsoc_top_orpsoc_top.cpp Vorpsoc_top_ram_wb__M800000_MB17.cpp
> > Vorpsoc_top_or1200_top.cpp Vorpsoc_top_ram_wb_b3__M800000_MB17.cpp
> > Vorpsoc_top_or1200_cpu.cpp Vorpsoc_top_or1200_except.cpp
> > Vorpsoc_top_or1200_ctrl.cpp Vorpsoc_top_or1200_rf.cpp
> > Vorpsoc_top_or1200_sprs.cpp Vorpsoc_top_or1200_dpram.cpp >
> > Vorpsoc_top__ALLcls.cpp
> >
> > I feel desperately confused and I coudn't find the reason.Please give a
> > hand.
> >
>
> Hi
>
> Yes, this is a problem I have with Verilator where it will change the
> name of some generated files sometimes.
>
> You just need to update the names of the files in the appropriate
> locations. The references to these generated files and their classes
> will be at each of the reported errors you pasted above. So just go
> through them and replace them appropriately. That usually works for
> me.
Hi Julius et al,
I think we should switch to using DPI to access the models. There was a
discussion on this recently on the Verilator forum, and I added some
tests and updated the Verilator user guide to check this all works
cleanly.
http://www.veripool.org/boards/3/topics/show/752-Verilator-Command-line-specification-of-public-access-to-variables
I think this would fix the problem of name changes once and for all.
There is the added benefit that this is more efficient (less breaking up
of the C code).
HTH,
Jeremy
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: [email protected]
Web: www.embecosm.com
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc