--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/2cd212e0-33d5-40bc-960f-00be29b750e4%40riscv.org.
For more options, visit https://groups.google.com/a/riscv.org/d/optout.
It would be interresting to add the performance (DMIPS/Mhz + cycle per instruction kind) of the SoC which target a small area, as (probably) reducing the area to those extends is about trading performances ?
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/d89ec698-9676-4a33-8688-1882c2ea197e%40riscv.org.
There is/was a lot of social movment around the area focused implementation, but not so much around the performance one XD
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/1c31ffbb-a4e4-4f6f-bf14-4131dcd1ca67%40riscv.org.
Hoo, for the divider trick, i already knew about it, but for me, it feel like cheating, as it
realy exploit a weakness of the dhrystone benchmark. So i could implement it, it would save 33 cycles for each dhrystone iteration which would increase the DMIPS by 7.7%, but if i do it, it would be explicitly in the readme + the dhystone score with and without.For the multiplication, the only gain in my case would be to have the result bypassed 2 stage in advance, which would only save 4 cycles per dhrystone iteration.So, another trick is that normaly with the riscv gcc you can set the GP register close to the global variable used by the dhrystone benchmark. I don't know why, this optimisation isn't enabled in the GCC packet with the zephyr SDK. But you can map your data memory at the offset zero to have something similar. It five few % boost.
About the software infrastructure, yes for me it was also a big time investment, hopefully i had already the RISC-V design working before the contest started, just improved some things in it.
The time frame of the contest was way to short for people that had nothing in hand before it started :(
Right, it's not technicaly cheating i agree, but it feel like ^.^"strlen and strcmp" => which open the door to custom instruction to make it faster, but is it allowed ? And is it even fair to change the default implementation of strlen and strcmp ?
Nom nom nom https://github.com/SpinalHDL/VexRiscv#add-a-custom-instruction-to-the-cpu-via-the-plugin-systemSooooo many holes XD
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/d3c5fbb0-cfbe-45f9-8232-b880a9831577%40riscv.org.
Common sense on using Dhrystones as a benchmark for small CPU cores from the original sources is to make as little as possible changes (you may change the malloc lines, the call to the time function, you can print more information like DMISP/MHz), but no changes are allowed inside the timed loop!Cannot use function inline and cant use -flto or append the two files into one and compile the final file.Generically speaking, you may supply your own start.S or crt.S plus some library code. For some CPU targets, I only compile bintutils and GCC for 1st stage (I do not compile newlib), so I have to supply functions like strlen.c, strcmp.c and strcpy, and sometimes the arithmetic functions for multiplication and division.
Charles, you make a good point with custom instructions, but I don't know if GCC version 6.1.0 (Zephyr version) has support for them (I know that at some point it existed the opcodes custom0, costum1... in binutils, but meanwhile I believe that they were removed)BR,Nelson
The time frame of the contest was way to short for people that had nothing in hand before it started :(
I was pretty close estimating that Eric beats me by factor 2...
Preliminary data of course, will change a bit still.
On Fri, Nov 16, 2018 at 8:50 AM Charles Papon <charles....@gmail.com> wrote:The time frame of the contest was way to short for people that had nothing in hand before it started :(I had nothing in hand before it started, although I did hack up an Intel 8089 assembler (yes, 8089) that I wrote in Python a few years ago, to repurpose it for use in developing my core.
In the time available, I didn't think I could develop a credible high-performance core, which is why I chose to work on the area-focused category, where I believed I had some worthwhile implementation ideas. I'm still not certain that I can complete it on time, but I'm optimistic.
If I were one of the contest judges, and had any discretionary style penalty points to award, I'd give as many as possible to my entry!Eric
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/CAFrGgTTgx%2BFakLo2%3D5dYGprPLWEXMfSV6Tq8Z9xh%2BowkydryGw%40mail.gmail.com.
Antti, you need to use the gcc provided by Zphyr OS, which only runs in linux. It is in the rules. I am on my mobile phone, cant provide link right now.I lost a lot of time trying to compile Zephyr SDK for windows, using msys2, which is not possible, or at least really really hard.. so I'd get window binary...BR,Nelson
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/9483745e-e384-4bcd-afbf-71b47af78fc3%40riscv.org.
You dont need to compile it. Binary files are provided. You just need to install them.Br,Nelson
pushd .
mkdir zephyr-sdk && cd zephyr-sdk
wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.3/zephyr-sdk-0.9.3-setup.run
sudo sh zephyr-sdk-0.9.3-setup.run
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
popd
This is for default dir instalation (/opt/zephyr-sdk ). For the location where are the binaries, libs,... check https://github.com/SpinalHDL/riscvSoftcoreContest/blob/master/software/dhrystone/up5kPerf/makefile, there are hints there. Nelson |
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/4c8a625c-1276-4b08-abb4-511689dede97%40riscv.org.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/96f1a6ac-eef2-4407-854f-4e80dea1303f%40riscv.org.
Hoo, for the divider trick, i already knew about it, but for me, it feel like cheating, as it realy exploit a weakness of the dhrystone benchmark. So i could implement it, it would save 33 cycles for each dhrystone iteration which would increase the DMIPS by 7.7%, but if i do it, it would be explicitly in the readme + the dhystone score with and without.For the multiplication, the only gain in my case would be to have the result bypassed 2 stage in advance, which would only save 4 cycles per dhrystone iteration.
On Nov 19, 2018, at 01:10 , Nelson Ribeiro <ngrr.r...@gmail.com> wrote:One of the reasons that I quit'ed the contest was because I lost about 15 hours (one week real time ) to try to get Zephyr GCC working for Windows 7, realizing that binaries for Linux were provided, which means that much of work to be done must be done in Linux. And I realized this by the end of October.
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/CAPvktdU2vJazk5c_z4x__ZAhhEv4RR93XbvC-nKL-RCphQKxzg%40mail.gmail.com.
Thanks Antti,
I didn't intend to criticize your page; I just thought you were using a different version and I listed
my differences for completeness.
> 2) the rules to no mention Zephyr SDK (I have checked it many times, last time 2 minutes ago) - if the organizers and judges enforce the actual use of "zephyr SDK GCC" then it means that all those participants who made a commitment to submit an entry when they applied for free board working on Windows PC are s*****, as Zephyr SDK enforces Linux use. If this happens that means the organizers are organizing a Windows ws Linux war with the contest.
Allow me to address this one. I was puzzled that I had a different interpretation so I reread the rules again:
"For the “highest-performance implementation” categories, the performance of the entries will be measured using the Dhrystone benchmark compiled with the -O3 -fno-inline option.
...
Minimum Requirements
... The design must be a complete FPGA implementation targeting at least one of the two platforms and run the provided Zephyr RTOS application. The Zephyr 1.13 release should be used and can only be modified in a way that does not touch the OS core. Any modifications to the standard RISC-V GCC provided by Zephyr are strictly forbidden."
I read the "The Zephyr 1.13 release should be used ... Any modifications to the standard RISC-V GCC provided by Zephyr are strictly forbidden." paragraph as applying to the compilation of Dhrystone. If that's a misinterpretation, that's a great relief.
Thanks,
Tommy
No, don't worry, everything is more or less fine.For RV32I entries, the __divdi3 stuff is added by the compiler when you use a 64 bits software division, which only appear in my dhrystone benchmark because i added some code to print the DMIPS/Mhz.
You can workaround this issue with the following code : https://github.com/SpinalHDL/riscvSoftcoreContest/blob/f4f5b5b5de7c2862912612d6af8086d2075fb357/software/dhrystone/up5kArea/src/stdlib.c#L97
Then to use the zephyr SDK RISC-V GCC in RV32I mode, you need to add the -march=RV32I flag for the compilation. To compile the zephyr app them self you can do as following : https://github.com/SpinalHDL/zephyr/blob/486f68fa4f843307eac6bb7d429a4c4023e566b5/arch/riscv32/soc/riscv-privilege/vexriscv/Kconfig.defconfig.vexriscv_contest_up5karea#L7
I hope that will help :)
cool, hm so the RV32IM requirement comes only from printing DMIPS/MHz ?
hm I was also forced to enable some 64 bit Long Long, that would then also trigger the issue? I spend several days fighting this already
One of the reasons that I quit'ed the contest was because I lost about 15 hours (one week real time ) to try to get Zephyr GCC working for Windows 7, realizing that binaries for Linux were provided, which means that much of work to be done must be done in Linux. And I realized this by the end of October.Which meant that I had to start using Bash scripts and Makefile's, which I am not that proficient, and lost another 10-15 hours or so doing that (another week). Currently I am having personal problems, and so I don't have free time anymore to work for the contest, and I know I made bad decisions in terms of time management, but it was due mainly because of lack of information about Zephyr SDK GCC...Nelson
Just download and install zephyr-sdk-0.9.5-setup.runI have a script that does this automatically (change 0.9.3 for 0.9.5):
pushd . mkdir zephyr-sdk && cd zephyr-sdk wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.3/zephyr-sdk-0.9.3-setup.run sudo sh zephyr-sdk-0.9.3-setup.run export ZEPHYR_TOOLCHAIN_VARIANT=zephyr export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk popd
This is for default dir instalation (/opt/zephyr-sdk ).
For the location where are the binaries, libs,... check https://github.com/SpinalHDL/riscvSoftcoreContest/blob/master/software/dhrystone/up5kPerf/makefile, there are hints there.
Nelson
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/b3a67e93-c466-42ef-ba90-0c6b225eb75f%40riscv.org.
Well, when I wrote that script and realized that Zephyr SDK GCC had to be used, we were at the end of October and official release was then Zephyr SDK 0.9.3, which seems to me to be the official release by the time Zephyr 1.13 was released. Check the releases dates. Sorry, I do not have more information. Besides this forum, I don't talk to anyone else about the contest...Nelson
--
You received this message because you are subscribed to the Google Groups "RISC-V Soft CPU Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to softcpu-discu...@riscv.org.
To post to this group, send email to softcpu...@riscv.org.
Visit this group at https://groups.google.com/a/riscv.org/group/softcpu-discuss/.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/softcpu-discuss/60cf3e46-6462-4212-8447-34b045628d1f%40riscv.org.
Hi,a teaser:I was pretty close estimating that Eric beats me by factor 2...Preliminary data of course, will change a bit still.brAntti
For the recode, my design called serv now boots on an FPGA. It's still lacking interrupts and a bootloader so I have only managed to run a single-threaded zephyr hello world so far. I don't have a up5k board to test with, so I'm trying out on a TinyFPGA BX (hx8k FPGA). As there is only 16KB onchip memory I don't think the larger applications will work with that even if I managed to finish the interrupt support. With that said it currently clocks in at 1066 LC and 18 4k RAM//Olof