Skip to content

Latest commit

 

History

History
162 lines (142 loc) · 10.4 KB

0061-2023-04-16.md

File metadata and controls

162 lines (142 loc) · 10.4 KB

16 Apr 2023

Previous journal: Next journal:
0060-2022-11-23.md 0062-2023-04-17.md

Things to do

Recent stuff

  • I've been studying Zero to ASIC Course.
    • My base design: solo_squash - simple VGA game resembling 1-player Pong.
    • Wrapped in Caravel: solo-squash-caravel - i.e. for Google Skywater Open MPW program.
    • Registered with Efabless. Waiting on Google-sponsored MPW9 to open. I want to do a much bigger/better design for this though. Ideally a real-time ray-caster (e.g. Wolf3D-style renderer).
  • Working on getting back into 2D ray-casting:
    • Goal is to make a hardware-based Wolf3D-style renderer.
    • I'm figuring out algorithms in C++ first: raybox-app
    • Then I'll try the equivalent in Verilog: raybox

Other things to learn

Tiny Tapeout 3 submission

  • I want to adapt solo_squash to work with Tiny Tapeout 3.
  • This will be an HDL-based submission.
  • Things to work out:
    • What's the size that the submission must be? 150x170um?
    • Should I add any extra features to the design if we have spare room?
    • What's the maximum clock speed, and max speed of IOs?
    • Is there a clock already provided, or is it one of the inputs?
    • Given we have 8 inputs, and 8 outputs, what should we use these for?
      • Inputs:
        1. Up
        2. Down
        3. Reset?
        4. Clock??
        5. Optional: New game
        6. Optional: Pause
        7. Unused
        8. Unused
      • Outputs:
        1. HSYNC
        2. VSYNC
        3. R
        4. G
        5. B
        6. Optional: Speaker
        7. Debug reset out?
        8. Debug GPIO ready out?
    • Can we replace the firmware for this chip?
  • tinytapeout-03 is where all designs are being aggregated into a main caravel project.
  • With only 1 week to submit, I may not make it to TT03 because:
    • Max. clock speed seems to be about 12.5kHz at this point. Maybe more, but not likely to improve until TT04.
    • Hence, I can't do anything at VGA clock speeds.
    • Any other designs that are useful/interesting at this low speed? What about BFCPU or some other CPU design?
  • Watch this video on working with HDLs for TT03.
  • Template project for HDL appears to be: tt03-verilog-demo
  • Good info on testing that might apply more generally.

FPGA Ray Caster notes

Fixing mouse wheel in Ubuntu 20 Desktop VM

Ubuntu 20.04 LTS Desktop VM, in VirtualBox, on a Windows host.

It's a common problem in VirtualBox, with a Linux guest using a GNOME (?) desktop environment, that mousewheel events get discarded while the pointer is moving. There are lots of proposed solutions to this, but below is what worked for me.

This borrows info from here and here, mostly, and with a little modification.

  1. Powered off the VM, and go into VM settings.
  2. General → Advanced: Disable Drag'n'Drop
  3. System → Pointing Device: PS/2 Mouse
  4. Power on, then sudo apt install imwheel
  5. Create ~/.imwheelrc:
    "^.*$"
        None, Up, Button4, 2
        None, Down, Button5, 2
        Shift_L,   Up,   Shift_L|Button4, 2
        Shift_L,   Down, Shift_L|Button5, 2
        Control_L, Up,   Control_L|Button4
        Control_L, Down, Control_L|Button5
    
  6. Run imwheel -b "4 5" -- it should background itself.
    • Verify that mousewheel works, now, while moving the pointer in VSCode and Firefox.
  7. To make this permanent, make an autostart desktop entry:
    1. cd ~
      mkdir -p .config/autostart
    2. Create .config/autostart/imwheel.desktop:
      # This fixes the mousewheel while the pointer is moving.
      # See: https://github.com/algofoogle/journal/blob/master/0061-2023-04-16.md#fixing-mouse-wheel-in-ubuntu-20-desktop-vm
      [Desktop Entry]
      Type=Application
      Name=imwheel
      # The given -b option restricts this to the wheel and avoids breaking the side buttons.
      Exec=imwheel -b "4 5"
      StartupNotify=false
      Terminal=false
    3. Reboot.
  8. Run ps -fA | fgrep imwheel to prove that imwheel is running.