How to recreate nexys4_ddr_fpga_standalone.bit?
by Jonathan Neuschäfer
Hello,
I have a Nexys 4 DDR board, and I'm currently trying to run lowRISC on
it. The precompiled bitstream works fine, and I get a busybox shell on
/dev/ttyUSB1 of the host computer, but when I compile the bitstream
myself, I don't see anything on the UART lines.
I'm using Vivado and the Xilinx SDK 2015.4 and commit c79a4b86170e of
the lowrisc-chip repo, along with matching git submodules.
What's the correct way to build nexys4ddr_fpga_standalone.bit? Does
"make bitstream" build the debug or standalone bitstream?
Greetings,
Jonathan Neuschäfer
6 years, 10 months
Address bit width
by Francesco Viggiano
Hello guys,
Do you support 64 bit addresses in order to have a total memory space
larger then 4 Gb? I see there is "pALen" variable in Configs.scala, if I
change that value to 64 the compilation get broken. Do I need to set other
parameters to accomplish that purpose?
Bests,
Francesco
--
| Francesco Viggiano, Columbia University, Staff associate researcher at
Computer Science Building |
| Phone: +1 646-9829-535, Skype ID: francesco.vgg |
| Department of Computer Science 1214 Amsterdam Avenue |
| Columbia University Mail Code 0401 | New York, NY 10027-7003 |
6 years, 10 months
(no subject)
by Reinoud Zandijk
<lowrisc-dev(a)lists.lowrisc.org>
Subject: Re: [lowrisc-dev] Re: [sw-dev] Is a de facto standard memory map
helpful or harmful?
In-Reply-To: <9848809.MoFIielbi3@wuerfel>
User-Agent: Mutt/1.6.1 (2016-04-27)
On Wed, Jul 13, 2016 at 03:38:06PM +0200, Arnd Bergmann wrote:
> On Wednesday, July 13, 2016 1:48:51 PM CEST Alex Bradbury wrote:
...
> The main problem for operating systems is to have the kernel run at
> a nonconstant physical address. On ARM Linux, we work around this by
> patching every call to phys_to_virt() and virt_to_phys() at early
> boot time as soon as we have detected the start of RAM.
On NetBSD, the kernel runs in virtual space so the bootstrap in pyhsical space
is mainly consisting of creating a pagetable that has the detected RAM chunks
in it mapping it to a contigous virtual space and switch to it.
Its Linux that's odd in that it runs the kernel in pyhsical space ;)
With regards,
Reinoud
6 years, 10 months
[Gsoc] seL4 TEE - weekly update
by rahul mahadev
Hi,
The previous week I worked on porting an AES implementation that will work
as the internal crypto api for the Trusted application(
http://imgur.com/PAGwCtI). I also worked on the Rich-OS interface , which
needs to little bit more work to be 100% complete.
I have the following tasks remaining.
-> Rich-OS should be able to load client apps
-> Run this on actual hardware (Hikey board)
-> Implement secure storage
-> Try it out on RISC-V port of seL4
Thank you,
Rahul S Mahadev
6 years, 10 months
Errors regarding run bare metal exmaples
by Weizhong Huang
Hello all!
Thank you gary for your advise.
I have used gcc 4.8.5 to recompile the RISC-V tools
and I tried "make hello" in kc705 folder
There is no error in the progress.
I still have one more confusion. When I do "elf2hex 16 4096 rv64ui-p-add >
rv64ui-p-add.hex"
---------------------------------------------------------------------------
~/newlowRISC/DIR/lowrisc-chip/vsim$ elf2hex 16 4096 rv64ui-p-add > rv64ui-p-
add.hex
elf2hex: ../fesvr/elfloader.cc:19: std::map<std::__cxx11::basic_string<char>,
long unsigned int> load_elf(const char*, memif_t*): Assertion `fd != -1'
failed.
---------------------------------------------------------------------------
Not quite sure what does it mean.
The other thing is about UART
I was able to connect to ttyUSB2 port by
-------------------------------------------------------------------------
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ microcom -p /dev/ttyUSB2 -s
115200
connected to /dev/ttyUSB2
Escape character: Ctrl-\
Type the escape character followed by c to get to the menu or q to quit
-------------------------------------------------------------------------
However, the tutorial states that "After downloading the bitstream, the UART
interface should print: Hello World!"
WHat do I need to do in order to download the bitstream to UART?
Please advise. I apologize for the silly questions.
Thank you
Weizhong
6 years, 11 months
Re: Errors regarding run bare metal exmaples
by Weizhong Huang
Hello all,
Wei, Stefan. Thank you so much for your suggestions!
According to your previous suggestions, I updated my Vivado version from
2015.3 to 2015.4.
~/newlowRISC/DIR/lowrisc-chip/vsim$ which vivado
/opt/Xilinx/Vivado/2015.4/bin/vivado
And I did "make cleanall" in the kc705 folder and "make bitstream" again in
Kc705. I apologize for the long details in advance.
Then I tried "make hello" to run bare metal hello examples.
------------------------------------------------------------------------
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ make hello
cd examples && make
make[1]: Entering directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/syscalls.c -o
../driver/syscalls.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/spi.c -o
../driver/spi.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/uart.c -o
../driver/uart.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/memory.c -o
../driver/memory.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/elf.c -o
../driver/elf.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/diskio.c -o
../driver/diskio.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/ff.c -o
../driver/ff.o
riscv64-unknown-elf-gcc -static -Wa,-march=RVIMAFD -std=gnu99 -g -ffast-math
-fno-common -fno-builtin-printf -I../driver -c ../driver/crt.S -o crt.o
riscv64-unknown-elf-gcc -T ../driver/test.ld -static -Wa,-march=RVIMAFD -
std=gnu99 -g -ffast-math -fno-common -fno-builtin-printf -I../driver -o
boot.riscv boot.c ../driver/syscalls.o ../driver/spi.o ../driver/uart.o
../driver/memory.o ../driver/elf.o ../driver/diskio.o ../driver/ff.o crt.o -
nostdlib -nostartfiles -ffast-math -lc -lgcc
elf2hex 16 4096 boot.riscv > boot.hex
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.21' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
Makefile:75: recipe for target 'boot.hex' failed
make[1]: *** [boot.hex] Error 1
make[1]: Leaving directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
Makefile:170: recipe for target 'hello' failed
make: *** [hello] Error 2
--------------------------------------------------------------------------
I assume there is gcc version problem which causes "glibcxx 3.4.21" not
found.
Before I did anything to the gcc version, gcc 5.3.1 is the default version
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------------------------------------------------------------------
I installed the gcc 4.8.5 as Stefan instructed. Then 4.8.5 is my default
version
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ gcc --version
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------------------------------------------------------------------
I tried "make hello" again in kc705
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ make hello
cd examples && make
make[1]: Entering directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
riscv64-unknown-elf-gcc -T ../driver/test.ld -static -Wa,-march=RVIMAFD -
std=gnu99 -g -ffast-math -fno-common -fno-builtin-printf -I../driver -o
dram.riscv dram.c ../driver/syscalls.o ../driver/spi.o ../driver/uart.o
../driver/memory.o ../driver/elf.o ../driver/diskio.o ../driver/ff.o crt.o -
nostdlib -nostartfiles -ffast-math -lc -lgcc
elf2hex 16 4096 dram.riscv > dram.hex
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.21' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
Makefile:75: recipe for target 'dram.hex' failed
make[1]: *** [dram.hex] Error 1
make[1]: Leaving directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
Makefile:170: recipe for target 'hello' failed
make: *** [hello] Error 2
----------------------------------------------------------------------------
And I did "elf2hex 16 4096 rv64ui-p-add > rv64ui-p-add.hex" in vsim folder as
part of RTL simulation.
:~/newlowRISC/DIR/lowrisc-chip/vsim$ elf2hex 16 4096 rv64ui-p-add > rv64ui-p-
add.hex
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
elf2hex: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version
`GLIBCXX_3.4.21' not found (required by //home/hplp/newlowRISC/DIR/lowrisc-
chip/riscv/lib/libfesvr.so)
-----------------------------------------------------------------------------
Please advise. I appreciate all your help.
Weizhong
6 years, 11 months
Linux booting help
by Francesco Viggiano
Hi all,
I'm trying to boot Linux on my own system architecture. As for now, I can
successfully run the SD card test example provided with lowRisc project.
I'd like more information on how to boot Linux, specifically:
1) My 1Gb DDR3 starts from address 0x0. I have a way to directly put a
program in Main memory. So I don't need the first stage bootloader, but I
can directly load the revised bbl in DDR. I have just modified the DDR,
uart and spi addresses on both bbl/ and driver/ folders. Is this the right
way to proceed?
2) On my SD card I have put the pre-compiled linux image following this
guide: www.lowrisc.org/docs/untether-v0.2/fpga-demo/#boot. So on my SD card
there are vmlinux and root.bin files.
3) When I run the bbl, It reaches the SD card, but it states: "fail to open
file vmlinux"
My questions are:
1) Do I need to compile my own linux image (if so, what do I have to
change?), or I can easily run yours?
2) Is the FPU in the rocket core mandatory in order to run Linux?
3) Why does it fail to load the vmlinux file?
Thank you for your time and support,
Francesco Viggiano
--
Francesco
6 years, 11 months
Weekly Report of Porting musl to RISC-V Project #5
by Masanori Ogino
Hello,
Thanks to the folks, I passed the mid-term evaluation. Now it is about
time to publish the fifth progress report on porting musl on RISC-V.
Last week, the toolchain itself has been built for RISC-V and running
on Spike, and libc-test [1] can be executed with it now. I posted the
result of tests on [2]. The REPORT.txt file contains all error
messages of failed tests, both run-time ones and compile-time ones.
Some failures are expected since musl on x86_64 also does the same
ones (e.g. errors in src/api/fcntl.c), but there are some unexpected
errors too. I guess that the "warning: <the name of a header> is
shorter than expected" warning indicates bugs in arch-dependent part
of I/O functions or system calls (or kernel?) and it causes syntax
errors in the same compilation unit.
Moreover, some tests triggers a "signal 11" error (segmentation fault)
in libc. I added some logs to [2]. They are bugs in the port,
obviously. I am working on them.
The good news is, anyway, some results are *better than x86_64*,
especially in math functions :-)
(probably the cause is the difference in the floating-point precision,
though. it is usual in float tests...)
It takes long, long time to get but finally I have a (seems-to-be)
working test suite for the port. I will continue to debug and fix the
port using the result. Stay tuned!
[1]: http://nsz.repo.hu/git/?p=libc-test
[2]: https://gist.github.com/omasanori/ee828369aea844ac7fdfdc8362953299
--
Masanori Ogino
6 years, 11 months
Errors regarding run bare metal exmaples
by Weizhong Huang
Hello, all
I have exactly followed the tutorial on the website and got to "Compile and
Run bare metal examples" in FPGA demo. I believe that I have successfully
generated a workable bitstream. There are errors regarding make file pop up
if I do "make hello". I also did make bit-update, it still did not work.
Thank you for all your help.
~/newlowRISC/DIR/lowrisc-chip/fpga/board/kc705$ make hello
cd examples && make
make[1]: Entering directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705/examples'
cp examples/hello.hex src/boot.mem && make bit-update
make[1]: Entering directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705'
vivado -mode batch -source ../../common/script/search_ramb.tcl -tclargs
lowrisc-chip-imp > search-ramb.log
python ../../common/script/bmm_gen.py search-ramb.log src/boot.bmm 128 65536
data2mem -bm src/boot.mem -bd src/boot.mem -bt lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.bit -o b lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.new.bit
/opt/Xilinx/SDK/2015.3/bin/loader: line 164: 22333 Segmentation fault
(core dumped) "$RDI_PROG" "$@"
Makefile:159: recipe for target 'lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.new.bit' failed
make[1]: *** [lowrisc-chip-imp/lowrisc-chip-imp.runs/impl_1/chip_top.new.bit]
Error 139
make[1]: Leaving directory '/home/hplp/newlowRISC/DIR/lowrisc-
chip/fpga/board/kc705'
Makefile:170: recipe for target 'hello' failed
make: *** [hello] Error 2
make bit-update
data2mem -bm src/boot.mem -bd src/boot.mem -bt lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.bit -o b lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.new.bit
/opt/Xilinx/SDK/2015.3/bin/loader: line 164: 23606 Segmentation fault
(core dumped) "$RDI_PROG" "$@"
Makefile:159: recipe for target 'lowrisc-chip-imp/lowrisc-chip-
imp.runs/impl_1/chip_top.new.bit' failed
make: *** [lowrisc-chip-imp/lowrisc-chip-imp.runs/impl_1/chip_top.new.bit]
Error 139
Sincerely,
Weizhong
6 years, 11 months