Comments (5)
Thanks for pointing this out! I see three issues in what you've shared, all things fixed in the dev branch that haven't made it to the master.
return ((m_sreg | QSPIF_WIP_FLAG)!=0)
should be using&
instead of|
. The dev branch has this fix. I can port it to master.- The
c++
compiler has been complaining about extended alignment. I'm not sure of a "good" fix other than to add the-faligned-new
to CFLAGS. Again, the dev branch has this fix and I can port it to master without much hassle. - The prototype for zip_save_context was updated in the compiler to use
void *
rather thanint *
. That's why the compiler isn't finding the definition ofzip_save_context()
. I can fix that pretty easily as well.
The reason dev hasn't been ported to master is simply because ... there's been so many changes. One in particular breaks a lot of interfaces, and I want to make certain the ZipCPU documentation is up to date on that change before I push it. (The one that breaks everything is the ZipCPU's debug interface. That's gone from a two register interface to a 64-register interface. The result is a lot faster to debug over a serial port--it just needs to be documented properly.) Other upgrades include a profiling port, the ability to use buses wider than 32-bits, AXI support, a DMA rewrite, a bit of a shuffling of bit allocations in the debugging interface, and ... more. But I digress.
Dan
from zbasic.
These issues should be fixed now in ccc0a4b1. I have tested and verified that the design works using Verilator 4.2.
Dan
from zbasic.
Thank you very much, now i can build it without any errors using branch ccc0a4b1.
But still some minor warnings are present as mentioned below but otherwise it is OK for now
$ make
tar --transform s,^,`date +%Y%m%d`-zbasic/, -chjf `date +%Y%m%d`-zbasic.tjz `find sw -name "*.cpp"` `find sw -name "*.c"` `find sw -name "*.h"` `find sw -name "*.sh"` `find sw -name "*.py"` `find sw -name "*.pl"` `find sw -name "*.png"` `find sw -name Makefile` `find rtl -name "*.v"` `find rtl -name Makefile` `find sim -name Makefile` `find sim -name "*.cpp"` `find sim -name "*.h"` `find sim -name "*.c"` `find . -name "*.txt"` `find . -name "*.html"` `find . -name "*.xdc"` `find auto-data -name "*.txt"` README.md
verilator -Wall -Wno-TIMESCALEMOD --MMD -O3 --trace -Mdir ./obj_dir -y cpu -y wbubus -y sdspi -y rtc -y wbuart -cc main.v
%Error: Unknown warning specified: -Wno-TIMESCALEMOD
make[1]: *** [Makefile:77: obj_dir/Vmain.h] Error 1
make: *** [Makefile:140: verilated] Error 2
shashi@Shashi:~/zbasic$ cd rtl/
shashi@Shashi:~/zbasic/rtl$ ls
Makefile builddate.v main.v memdev.v rtc skidbuffer.v wbgpio.v wbuart wbxbar.v
addrdecode.v cpu make.inc qflexpress.v sdspi toplevel.v wbscope wbubus
shashi@Shashi:~/zbasic/rtl$ vim Makefile
shashi@Shashi:~/zbasic/rtl$ make
verilator -Wall -Wno-lint --MMD -O3 --trace -Mdir ./obj_dir -y cpu -y wbubus -y sdspi -y rtc -y wbuart -cc main.v
make --no-print-directory -C obj_dir -f Vmain.mk
/usr/bin/perl /usr/share/verilator/bin/verilator_includer -DVL_INCLUDE_OPT=include Vmain.cpp > Vmain__ALLcls.cpp
g++ -I. -MMD -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -DVM_COVERAGE=0 -DVM_SC=0 -DVM_TRACE=1 -faligned-new -fcf-protection=none -Wno-bool-operation -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow -c -o Vmain__ALLcls.o Vmain__ALLcls.cpp
/usr/bin/perl /usr/share/verilator/bin/verilator_includer -DVL_INCLUDE_OPT=include Vmain__Dpi.cpp Vmain__Trace.cpp Vmain__Syms.cpp Vmain__Trace__Slow.cpp > Vmain__ALLsup.cpp
g++ -I. -MMD -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -DVM_COVERAGE=0 -DVM_SC=0 -DVM_TRACE=1 -faligned-new -fcf-protection=none -Wno-bool-operation -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow -c -o Vmain__ALLsup.o Vmain__ALLsup.cpp
ar -cr Vmain__ALL.a Vmain__ALLcls.o Vmain__ALLsup.o
ranlib Vmain__ALL.a
Building cpudefs.h
Building design.h
shashi@Shashi:~/zbasic/rtl$ cd ..
shashi@Shashi:~/zbasic$ make
tar --transform s,^,`date +%Y%m%d`-zbasic/, -chjf `date +%Y%m%d`-zbasic.tjz `find sw -name "*.cpp"` `find sw -name "*.c"` `find sw -name "*.h"` `find sw -name "*.sh"` `find sw -name "*.py"` `find sw -name "*.pl"` `find sw -name "*.png"` `find sw -name Makefile` `find rtl -name "*.v"` `find rtl -name Makefile` `find sim -name Makefile` `find sim -name "*.cpp"` `find sim -name "*.h"` `find sim -name "*.c"` `find . -name "*.txt"` `find . -name "*.html"` `find . -name "*.xdc"` `find auto-data -name "*.txt"` README.md
make[1]: Nothing to be done for 'all'.
Generating tags
Building dependency file
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c main_tb.cpp -o obj-pc/main_tb.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c automaster_tb.cpp -o obj-pc/automaster_tb.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c flashsim.cpp -o obj-pc/flashsim.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c sdspisim.cpp -o obj-pc/sdspisim.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c dbluartsim.cpp -o obj-pc/dbluartsim.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c zipelf.cpp -o obj-pc/zipelf.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c byteswap.cpp -o obj-pc/byteswap.o
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c /usr/share/verilator/include/verilated.cpp -o obj-pc/verilated.o
/usr/share/verilator/include/verilated.cpp: In function ‘void VL_READMEM_N(bool, int, QData, int, const string&, void*, QData, QData)’:
/usr/share/verilator/include/verilated.cpp:1835:15: warning: comparison of integer expressions of different signedness: ‘QData’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
1835 | if (start < array_lsb) start = array_lsb;
| ~~~~~~^~~~~~~~~~~
/usr/share/verilator/include/verilated.cpp: In function ‘void VL_WRITEMEM_N(bool, int, QData, int, const string&, const void*, QData, QData)’:
/usr/share/verilator/include/verilated.cpp:1886:15: warning: comparison of integer expressions of different signedness: ‘QData’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
1886 | if (start < array_lsb) start = array_lsb;
| ~~~~~~^~~~~~~~~~~
g++ -Og -g -Wall -faligned-new -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -c /usr/share/verilator/include/verilated_vcd_c.cpp -o obj-pc/verilated_vcd_c.o
g++ -I../../sw/host -I../../rtl -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -I../../rtl/obj_dir -DNEW_VERILATOR obj-pc/main_tb.o obj-pc/automaster_tb.o obj-pc/flashsim.o obj-pc/sdspisim.o obj-pc/dbluartsim.o obj-pc/zipelf.o obj-pc/byteswap.o obj-pc/verilated.o obj-pc/verilated_vcd_c.o ../../rtl/obj_dir/Vmain__ALL.a ../../rtl/obj_dir/Vmain__ALL.a -lelf -o main_tb
make --no-print-directory -C sw/host
Building dependency file(s)
g++ -g -Wall -I. -I../../rtl -MM wbregs.cpp netuart.cpp flashdrvr.cpp ttybus.cpp llcomms.cpp regdefs.cpp byteswap.cpp zipload.cpp zipstate.cpp zipdbg.cpp > obj-pc/xdepends.txt
g++ -g -Wall -I. -I../../rtl -c wbregs.cpp -o obj-pc/wbregs.o
g++ -g -Wall -I. -I../../rtl -c ttybus.cpp -o obj-pc/ttybus.o
g++ -g -Wall -I. -I../../rtl -c llcomms.cpp -o obj-pc/llcomms.o
g++ -g -Wall -I. -I../../rtl -c regdefs.cpp -o obj-pc/regdefs.o
g++ -g -Wall -I. -I../../rtl -c byteswap.cpp -o obj-pc/byteswap.o
g++ -g -Wall -I. -I../../rtl obj-pc/wbregs.o obj-pc/ttybus.o obj-pc/llcomms.o obj-pc/regdefs.o obj-pc/byteswap.o -o wbregs
g++ -g -Wall -I. -I../../rtl -c netuart.cpp -o obj-pc/netuart.o
g++ -g -Wall -I. -I../../rtl obj-pc/netuart.o -o netuart
g++ -g -Wall -I. -I../../rtl -c zipload.cpp -o obj-pc/zipload.o
g++ -g -Wall -I. -I../../rtl -c flashdrvr.cpp -o obj-pc/flashdrvr.o
g++ -g -Wall -I. -I../../rtl -c zipelf.cpp -o obj-pc/zipelf.o
g++ -g obj-pc/zipload.o obj-pc/flashdrvr.o obj-pc/ttybus.o obj-pc/llcomms.o obj-pc/regdefs.o obj-pc/byteswap.o obj-pc/zipelf.o -lelf -o zipload
g++ -g -Wall -I. -I../../rtl -c zipstate.cpp -o obj-pc/zipstate.o
g++ -g -Wall -I. -I../../rtl obj-pc/zipstate.o obj-pc/ttybus.o obj-pc/llcomms.o obj-pc/regdefs.o obj-pc/byteswap.o -o zipstate
g++ -g -Wall -I. -I../../rtl -c zipdbg.cpp -o obj-pc/zipdbg.o
g++ -g -Wall -I. -I../../rtl -c zopcodes.cpp -o obj-pc/zopcodes.o
zopcodes.cpp: In function ‘void zipi_to_halfstring(uint32_t, ZIPI, char*, const ZOPCODE*)’:
zopcodes.cpp:539:30: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
539 | sprintf(line, "%-11s", line);
| ^
zopcodes.cpp:540:38: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
540 | sprintf(line, "%s0x%08x", line, ref);
| ^
zopcodes.cpp:541:46: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
541 | sprintf(line, "%s,%s", line, zip_regstr[dv]);
| ^
zopcodes.cpp:576:33: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
576 | } sprintf(line, "%-11s", line); // Pad it to 11 chars
| ^
g++ -g -Wall -I. -I../../rtl -c twoc.cpp -o obj-pc/twoc.o
g++ -g obj-pc/zipdbg.o obj-pc/ttybus.o obj-pc/llcomms.o obj-pc/regdefs.o obj-pc/byteswap.o obj-pc/zopcodes.o obj-pc/twoc.o -lcurses -o zipdbg
Building dependency file(s)
zip-gcc -O3 -I. -I../../rtl -c udiv.c -o obj-zip/udiv.o
zip-gcc -O3 -I. -I../../rtl -c umod.c -o obj-zip/umod.o
zip-gcc -O3 -I. -I../../rtl -c syscalls.c -o obj-zip/syscalls.o
zip-gcc -O3 -I. -I../../rtl -ffreestanding -c crt0.c -o obj-zip/crt0.o
zip-ar -cru libzbasic.a obj-zip/udiv.o obj-zip/umod.o obj-zip/syscalls.o obj-zip/crt0.o
Building dependency file(s)
zip-gcc -O3 -c hello.c -o obj-zip/hello.o
zip-gcc -O3 -I../zlib -I../../rtl -T board.ld -L../zlib obj-zip/hello.o -lc -lzbasic -lgcc -o hello
zip-gcc -O3 -I../zlib -I../../rtl -c sdtest.c -o obj-zip/sdtest.o
zip-gcc -O3 -I../zlib -I../../rtl -T board.ld -L../zlib obj-zip/sdtest.o -lc -lzbasic -lgcc -o sdtest
zip-gcc -O3 -I../zlib -I../../rtl -c -Wa,-cis -fno-builtin cputest.c -o obj-zip/cputestcis.o
zip-gcc -O3 -I../zlib -I../../rtl -T board.ld -L../zlib obj-zip/cputestcis.o -lc -lzbasic -lgcc -o cputest
zip-gcc -O3 -I../zlib -I../../rtl -c gpiotoggle.c -o obj-zip/gpiotoggle.o
zip-gcc -O3 -I../zlib -I../../rtl -T board.ld -L../zlib obj-zip/gpiotoggle.o -lc -lzbasic -lgcc -o gpiotoggle
zip-gcc -O3 -I../zlib -I../../rtl -c -fno-builtin contest.c -o obj-zip/contest.o
zip-gcc -O3 -I../zlib -I../../rtl -c txfns.c -o obj-zip/txfns.o
zip-gcc -O3 -I../zlib -I../../rtl -T board.ld -L../zlib obj-zip/contest.o obj-zip/txfns.o -lc -lzbasic -lgcc -o contest
from zbasic.
I think I just responded to almost all of these while responding to this issue, with the exception of the -Wno-TIMESCALEMOD
issue.
The issue there is that none of my Verilog files have (or require) a timescale statement in them. Verilog doesn't use assignment delays, so this isn't an issue. At one point, however, Verilator decided to make a warning of this fact, deciding that all Verilog files should have a timescale statement. The -Wno-TIMESCALEMOD
flag turns off this warning so that ZBasic can build lint clean. That said, it appears as though your Verilator version is old enough that it doesn't know about this new feature or the flag to turn it off. Therefore, you can safely remove it from the Makefile line containing it.
Dan
from zbasic.
Thank you very much Dan
from zbasic.
Related Issues (10)
- Makefile:82: recipe for target 'obj_dir/Vmain.h' failed HOT 4
- make error zbasic HOT 1
- Need -lgcc for tttt build HOT 3
- make fails when building zbasic HOT 7
- ZBasic requires the dev branch of AutoFPGA HOT 1
- thanks for help HOT 1
- Verilog Syntax Errors When Synthesizing ZBasic in Quartus HOT 6
- zbasic make error HOT 20
- Verilator error while running make in rtl directory HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zbasic.