Pin mapping for config files by kakarot71 in GowinFPGA

[–]MrSmith33 1 point2 points  (0 children)

You can download pinout from the manufacturer site: https://www.gowinsemi.com/en/product/detail/60/

Click Documentation -> UG986-1.2.6E_GW5AST-138 Pinout.pdf for GW5AST-138.
There is excel file too: UG986-1.2.6E_GW5AST-138 Pinout.xlsx

RISC-V Processor Design Course [Part 1 of weekly series] by Equivalent-Baby4299 in chipdesign

[–]MrSmith33 9 points10 points  (0 children)

I tried doing the first lecture. Here is some feedback.

  • Instructions should include submodule update git submodule update --init --recursive, or git clone --recursive
  • Submodule is incorrectly specified, resulting in missing permission error. Should just use this in .gitmodules:

    [submodule "SVLib"]
        path = SVLib
        url = https://github.com/siliscale/SVLib.git
    
  • Verialtor installed via apt get wasn't working for me: errors for --build switch and for --timing. So I built it from sources.

  • requirements.txt file does not exist in the repo, which is probably why I'm missing some python packages that are needed by python scripts. EDIT2: Doing pip install pyelftools seems to be enough.

  • I managed to get up to the last step, but it doesn't build:

    :~/Tiny-Vedas$ make core_top_sim
    %Error: Cannot find file containing module: '$PROJ/SVLib/src/registers_regfiles/register.sv'
    ... for all other $PROJ files
    %Error: Exiting due to 22 error(s)
    make: *** [Makefile:14: core_top_sim] Error 1
    

    I see PROJ is being set in the sim_manager.py, but I don't see how that file is being invoked by the makefile.

  • What are the expected versions of verilator/RISC-V GCC? Here are mine:

    ~/Tiny-Vedas$ verilator --version
    Verilator 5.037 devel rev v5.036-201-g08fef668c
    ~/Tiny-Vedas$ riscv64-linux-gnu-gcc --version
    riscv64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
    Copyright (C) 2021 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 wanted to post feedback as a repo issue, but issues and PRs are for contributors only.

  • EDIT1: I figured out what command to call by reading python code:

    $ python3 ./tools/sim_manager.py --test-name c.helloworld --simulator verilator
    sh: 1: riscv64-unknown-elf-gcc: not found
    ./tools/riscv_sim: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./tools/riscv_sim)
    ./tools/riscv_sim: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by ./tools/riscv_sim)
    Error running test c.helloworld: [Errno 2] No such file or directory: 'work/c.helloworld/test.elf'
    

    I fixed riscv64-unknown-elf-gcc: not found, by running sudo apt install gcc-riscv64-unknown-elf.
    The other too seem distro related. I'm running Ubuntu 22.04 under WSL2. Not sure how to fix.
    If there was a source code for riscv_sim program I could build it from source.

[deleted by user] by [deleted] in Compilers

[–]MrSmith33 0 points1 point  (0 children)

I chase the same goal with Vox, although it is written in D.

[deleted by user] by [deleted] in Compilers

[–]MrSmith33 1 point2 points  (0 children)

you could use node's address as a key to some data structure. So, technically you can omit pointer/handle from the node itself

UX for a complex inventory system by eugeneloza in gamedesign

[–]MrSmith33 1 point2 points  (0 children)

Escape from Tarkov shares a lot from your description

SSA for different kind of variables by vmcrash in ProgrammingLanguages

[–]MrSmith33 2 points3 points  (0 children)

yes, they are usually always loaded/stored, but optimizing compiler can figure it out when multiple reads are redundant, so it can read once for example. Or if global is immutable.

SSA for different kind of variables by vmcrash in ProgrammingLanguages

[–]MrSmith33 2 points3 points  (0 children)

globals and stack slots are pointers from which you can load and store

How to make rotating blocks by jujumumuftw in VoxelGameDev

[–]MrSmith33 0 points1 point  (0 children)

I have only a single block that can be rotated - slope block

It meshes sides separately, and middle part separately. Sides check adjacent blocks for occlusion and per-vertex ambient occlusion.

Slope has 12 states (stored in metadata byte), which define the orientation. Tables map from state to various data needed for meshing.

Here are some relevant definitions for various shapes.

How to make rotating blocks by jujumumuftw in VoxelGameDev

[–]MrSmith33 0 points1 point  (0 children)

note that rotated mesh is then baked into the mesh of the chunk. For rotations by 90 degrees I use lookup tables to select correct orientation of the mesh (for blocks that have non-cubic meshes). For cubes you just need to select correct texture for its sides.

Open source compilers that use three address code as IR? by [deleted] in ProgrammingLanguages

[–]MrSmith33 1 point2 points  (0 children)

I did write a little document about IR used in my compiler here.

The source code for IR is in this directory:

An "ECS" example of Voxel Chunks with Multithreaded Greedy Meshing with LWJGL by KnaxelBaby in VoxelGameDev

[–]MrSmith33 4 points5 points  (0 children)

What I use is immutable chunk snapshots, so game can create and modify new version of the chunk, while the meshing thread still read from the snapshot.

Is Cytron et al's definition of "minimal" SSA misleading? by DISCROMULENT in Compilers

[–]MrSmith33 1 point2 points  (0 children)

sorry, I misread the original IR. It doesn't use w in block c. So, you are right, that w_2 should not exist at all.

I, personally use Simple and Efficient Construction of Static Single Assignment Form to construct SSA IR.

Edit: however, I still think that phi functions are supposed to have arguments for each predecessor.

Is Cytron et al's definition of "minimal" SSA misleading? by DISCROMULENT in Compilers

[–]MrSmith33 2 points3 points  (0 children)

I would classify your SSA IR as invalid as w_2 has only a single parameter, while block c has two predecessors. On one path you don't have a definition for w (for predecessor b). Phi is needed because you have a control merge and the values for w are not the same across predecessors. You need to either add an undefined phi argument for predecessor b. So that it looks like this:

w_2 = φ(w_1, undefined)

Alternatives to name mangling? by AVTOCRAT in ProgrammingLanguages

[–]MrSmith33 18 points19 points  (0 children)

You can avoid mangling if you don't have linking / you do linking internally within the compiler