Code Monkey home page Code Monkey logo

Comments (8)

tcal-x avatar tcal-x commented on June 26, 2024

@limingxuan-pku thank you for the report. I will try to reproduce the issue. It could be that the integration of Symbiflow tools with CFU Playground has broken somehow.

from cfu-playground.

tcal-x avatar tcal-x commented on June 26, 2024

@limingxuan-pku , I have some updates.

Using the project proj/proj_template_v, which has a very small CFU, and compiling with USE_SYMBIFLOW=1, I saw unreliable behavior on my board. It would display the main menu, but usually when I selected some subtask, it would hang. This seems to indicate a marginal timing path. NOTE that this behavior can be different even we have the same board and part --- since it can come down to manufacturing variations whether a particular bitstream work work on your board or my board.

I did a further experiment; I made the CFU even simpler, just a bitwise-XOR as follows in cfu.v:

   //
   // select output -- note that we're not fully decoding the 3 function_id bits
   //
-  assign rsp_payload_outputs_0 = cmd_payload_function_id[0] ? 
-                                           cmd_payload_inputs_1 :
-                                           cmd_payload_inputs_0 ;
+  assign rsp_payload_outputs_0 = cmd_payload_inputs_1 ^ cmd_payload_inputs_0 ;

After I made this change, it worked reliably for me. Note that the software isn't even using CFU instructions in this project. I suspect that this change in the design led the tools to randomly end up with a better place/route solution.

The main challenge is this, the lack of feedback from the tools whether they think they have met timing.

Another experiment we could do is reducing the clock rate to a bit lower than the currently used 75MHz. However, we can't lower it too much, or else the DDR memory will start malfunctioning (it has a minimum clock rate requirement).

from cfu-playground.

tcal-x avatar tcal-x commented on June 26, 2024

The unmodified proj/proj_template_v, which did not work reliably at first, did work reliably for me when I lowered the sys clock to 70MHz:

make clean
make USE_SYMBIFLOW=1 EXTRA_LITEX_ARGS="--sys-clk-freq=70000000"  prog
make USE_SYMBIFLOW=1 EXTRA_LITEX_ARGS="--sys-clk-freq=70000000"  load

from cfu-playground.

Siris-Limx avatar Siris-Limx commented on June 26, 2024

@tcal-x Thanks for your tests. I've tried your suggestions but it doesn't work for me.
However, I notice some information shown on my terminal when I try to run make prog.

python3 -m litex.soc.software.crcfbigen bios.bin --little
python3 -m litex.soc.software.memusage bios.elf /home/limx/CFU-Playground/soc/build/digilent_arty.proj_template/software/bios/../include/generated/regions.ld riscv64-linux-gnu

ROM usage: 27.40KiB     (21.41%)
RAM usage: 0.00KiB      (0.00%)

The RAM usage here is a little bit weird.

With all the environment and running parameter the same (use symbiflow, sys_clk=75MHz, arty a7 35t board, project under proj/proj_template) except that the OS changed from VM Ubuntu 20.04 to VM Ubuntu 18.04, I load everything on my board reliably. Here is the information shown on my terminal in VM Ubuntu 18.04 compared with the information before:

python3 -m litex.soc.software.crcfbigen bios.bin --little
python3 -m litex.soc.software.memusage bios.elf /home/limx/CFU-Playground/soc/build/digilent_arty.proj_template_v/software/bios/../include/generated/regions.ld riscv32-unknown-elf

ROM usage: 27.24KiB     (21.28%)
RAM usage: 1.61KiB      (20600.00%)

from cfu-playground.

tcal-x avatar tcal-x commented on June 26, 2024

Thanks @limingxuan-pku I will try with 20.04 when time allows. Thanks again for the clarifying details.

from cfu-playground.

tcal-x avatar tcal-x commented on June 26, 2024

On a new 20.04LTS VM on Google Cloud, using all tools from the Conda packages that I get from running make install-sf and make enter-sf, I see

python3 -m litex.soc.software.crcfbigen bios.bin --little
python3 -m litex.soc.software.memusage bios.elf /home/tcal/google/CFU-Playground/soc/build/digilent_arty.proj_template_v/software/bios/../include/generated/regions.ld riscv32-unknown-elf

ROM usage: 27.13KiB     (21.20%)
RAM usage: 1.61KiB      (20.12%)

from cfu-playground.

tcal-x avatar tcal-x commented on June 26, 2024

On my personal laptop, 18.04LTS, I get:

python3 -m litex.soc.software.crcfbigen bios.bin --little
python3 -m litex.soc.software.memusage bios.elf /media/tim/GIT/clean/CFU-Playground/soc/build/digilent_arty.proj_template_v/software/bios/../include/generated/regions.ld riscv64-unknown-elf

ROM usage: 27.15KiB     (21.21%)
RAM usage: 1.61KiB      (20.12%)

so almost the same.

from cfu-playground.

Siris-Limx avatar Siris-Limx commented on June 26, 2024

@tcal-x Thanks for your tests! So the problem is most likely due to my VM environment. I'll rebuild my VM to see if it works.

from cfu-playground.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.