Flux's Avatar

Flux

@willflux

Only hardware makes it possible! FPGA, RISC-V, 68K, OS, graphics, demos, permacomputing http://projectf.io | http://systemtalk.org

311
Followers
145
Following
299
Posts
17.11.2024
Joined
Posts Following

Latest posts by Flux @willflux

Do not mention tabs

05.03.2026 18:11 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
A coconut sapling growing on a tropical beach.

A coconut sapling growing on a tropical beach.

If you enjoy my work on 🏝️ Isle.Computer, FPGAs, and RISC-V, consider sponsoring me: projectf.io/sponsor/

You get early access to source code and blog posts, and I send you a newsletter every month or so. Plus, you help me bring these open-source projects to life. ☺️

05.03.2026 16:27 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Number guessing game. The user is asked to guess a number between 1-100 and is told at each step if their guess is too low or too high. Isle.Computer running in a Vertilator/SDL simulation window.

Number guessing game. The user is asked to guess a number between 1-100 and is told at each step if their guess is too low or too high. Isle.Computer running in a Vertilator/SDL simulation window.

I've added more software to 🏝️ Isle.Computer; all handwritten in bare-metal #riscv asm.The number guessing game exercises a surprising number of low-level features. Source code (on temp branch): github.com/projf/isle/t...

04.03.2026 15:29 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
RISC-V Assembler: Multiply Divide Integer multiply and divide instructions form the optional M extension. Making multiplication and division optional keeps the base instruction set simple and reduces the size of the smallest RISC-V co...

Chapter 6 features the FemtoRV "electron" RISC-V CPU. This CPU can multiply and divide all by itself! That comes in handy when converting integers to and from strings, amongst other things.

I've also got a whole blog post on the #riscv mul and div instructions: projectf.io/posts/riscv-...

02.03.2026 22:46 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

"Sorry, I think you mean 'portentous', often confused by those with poor taste."

02.03.2026 22:21 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Verilator/SDL simulation running Isle hardware and software. The screen contents read:

Hello, this is Isle.Computer demoing Unicode read line in RISC-V assembler.
Open source Verilog hardware and bare metal RISC-V assembler. :)
We have block elements in the character ROM.

Verilator/SDL simulation running Isle hardware and software. The screen contents read: Hello, this is Isle.Computer demoing Unicode read line in RISC-V assembler. Open source Verilog hardware and bare metal RISC-V assembler. :) We have block elements in the character ROM.

Over the weekend I worked on 🏝️Isle.Computer designs for chapter 6. I've now added the designs to a branch and you can already run the sim on your PC (Linux/Mac/Windows): github.com/projf/isle/t...

Please have a quick play and let me know how you get on. πŸ›

02.03.2026 22:19 πŸ‘ 8 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Or if wolves, goats, and cabbages are more your thing: en.wikipedia.org/wiki/File:Wo...

01.03.2026 17:23 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
An animation of the wolf, goat and cabbage problem crossing a river

An animation of the wolf, goat and cabbage problem crossing a river

Sometimes Wikipedia gives you more than you dared hope (animated PNG). en.wikipedia.org/wiki/River_c...

01.03.2026 17:20 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
# rand_pseudo - return a pseudorandom number using lfsr
#   a0: start of range (unsigned)
#   a1: end of range (unsigned)
#   return: pseudorandom number
#
rand_pseudo:
    li t6, SYS_DEV

    # check range is positive: ensure a1 β‰₯ a0
    bleu a0, a1, 0f  # skip if already in correct order
    mv t0, a0
    mv a0, a1
    mv a1, t0
0:
    # determine range: a2 = a1 - a0 + 1
    sub  a2, a1, a0
    addi a2, a2, 1
    beqz a2, 2f  # branch if full range (a2 wraps to 0)

    # rejection threshold to remove bias
    neg t1, a2  # 2^32 - range
    remu t1, t1, a2  # threshold = 2^32 % range
1:
    # sample lfsr and check threshold
    lw t2, LFSR_32(t6)
    bltu t2, t1, 1b  # reject if bias value (try again)

    # create random number in range
    remu t2, t2, a2  # divide by range
    add  a0, t2, a0  # add start of range
    ret
2:
    # sample raw lfsr output for full range
    lw a0, LFSR_32(t6)
    ret

# rand_pseudo - return a pseudorandom number using lfsr # a0: start of range (unsigned) # a1: end of range (unsigned) # return: pseudorandom number # rand_pseudo: li t6, SYS_DEV # check range is positive: ensure a1 β‰₯ a0 bleu a0, a1, 0f # skip if already in correct order mv t0, a0 mv a0, a1 mv a1, t0 0: # determine range: a2 = a1 - a0 + 1 sub a2, a1, a0 addi a2, a2, 1 beqz a2, 2f # branch if full range (a2 wraps to 0) # rejection threshold to remove bias neg t1, a2 # 2^32 - range remu t1, t1, a2 # threshold = 2^32 % range 1: # sample lfsr and check threshold lw t2, LFSR_32(t6) bltu t2, t1, 1b # reject if bias value (try again) # create random number in range remu t2, t2, a2 # divide by range add a0, t2, a0 # add start of range ret 2: # sample raw lfsr output for full range lw a0, LFSR_32(t6) ret

Linear-feedback shift registers (LFSR) are a classic way to generate pseudorandom numbers. I've written a #riscv asm function to return a random number using my lfsr hardware. This is part of the next instalment of 🏝️ Isle.Computer.

25.02.2026 14:08 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I’ve been thinking about software on simple systems. How much it depends on trigonometry and randomness to give it life.

23.02.2026 21:27 πŸ‘ 1 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

# sunshine on a rainy day
# makes my soul, makes my soul
# drip, drip, drip away

21.02.2026 17:43 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

I found the old 35mm slide for the cover for Neuromancer and had it scanned in for your pleasure. Enjoy!

16.02.2026 04:37 πŸ‘ 2443 πŸ” 555 πŸ’¬ 42 πŸ“Œ 26
Sign in window of shop reads:
!!!STOP!!!
GIVING CATS
!!!TREATS!!!
DONT PUT
HAND
THROUGH
LETTERBOX

Sign in window of shop reads: !!!STOP!!! GIVING CATS !!!TREATS!!! DONT PUT HAND THROUGH LETTERBOX

This Hastings shop wants you to STOP! πŸ™€ Though I'm now thinking of @gossjam.bsky.social.

16.02.2026 17:42 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Using as - Assembler Directives

I searched for "gnu assembler directives" (without quotes) and the top match on DuckDuckGo and Google is: ftp.gnu.org/old-gnu/Manu...

Looks promising apart from the fact it's from 1994! Back when my computer was an Amiga 1200 and Linux 1.0 was released.

Current docs: sourceware.org/binutils/doc...

15.02.2026 23:11 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
An image showing Scotland with Aberdeen Airport marked and a sunny spell symbol

An image showing Scotland with Aberdeen Airport marked and a sunny spell symbol

After 21 days without sunshine, Aberdeen recorded its first sunshine since 21st January this afternoon 😎

12.02.2026 17:18 πŸ‘ 85 πŸ” 16 πŸ’¬ 1 πŸ“Œ 5

It is rendered in hardware. The current design only has 128 8x16 glyphs in rom. I'm still working on how I handle the full GNU Unifont with a mix of full (16x16) and half-width (8x16) glyphs. I will share my findings.

12.02.2026 15:10 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Isle.Computer running on ULX3S dev board connected to computer monitor over HDMI. The text on the monitor reads:
Isle.Computer
Hello, hardware friends.
Demos look better on a dev board :)
Thanks to my sponsors.

Isle.Computer running on ULX3S dev board connected to computer monitor over HDMI. The text on the monitor reads: Isle.Computer Hello, hardware friends. Demos look better on a dev board :) Thanks to my sponsors.

And a quick lunchtime shot of 🏝️ Isle.Computer running on #ULX3S.

Simulation may be practical for software dev, but it feels so much better seeing it running on real hardware. This is #riscv asm decoding UTF-8 sent over UART to Isle hardware running on #fpga. Verilog and asm written by hand. 😊

12.02.2026 13:19 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Verilator/SDL simulation window on macOS reads:
Isle.Computer
Hello, this is a 115200 baud test on Isle Computer.
We also have delete and carriage return.
Next up there's buffered input with a fifo...

Verilator/SDL simulation window on macOS reads: Isle.Computer Hello, this is a 115200 baud test on Isle Computer. We also have delete and carriage return. Next up there's buffered input with a fifo...

I'm beavering away on practical input and output with UTF-8 on Isle.Computer. Text is a wonderful thing in its own right and also decidedly handy for debugging. The designs for the next chapter aren't too far away. #FPGA

11.02.2026 20:41 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

You might be thinking, but Flux, if this is Unicode, why aren't you showing some cool Katakana, a little Hangul, or an emoji?

Alas, there's more to do, including full-width characters for text mode and larger storage to hold GNU Unifont (we currently only have basic Latin and block elements).

05.02.2026 17:12 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Verilator/SDL simulation running on macOS. The window displays the following text in orange on a dark background "β–šβ–š Hello, World! UTF-8 UART β–šβ–š".

Verilator/SDL simulation running on macOS. The window displays the following text in orange on a dark background "β–šβ–š Hello, World! UTF-8 UART β–šβ–š".

Unicode UART goodness for 🏝️ Isle #FPGA Computer.

SDL key presses to UART via C++, sent to Isle hardware running under Verilator. The Isle #riscv asm software decodes the UTF-8 for display, including β–š (U+259A).

We get Unicode user input in Verilator using same mechanism as physical dev boards. ☺️

05.02.2026 16:43 πŸ‘ 4 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

I'm trying trailing underscore style, though I am seeing this form of message quite a bit. πŸ˜…

error: use of undeclared identifier 'data_idx'; did you mean 'data_idx_'?

05.02.2026 12:17 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

It's easy to make someone's day.

When someone shares something beautiful or cool they've made, don't just favourite, take 30 seconds to write a comment. ✍️

Trite? Yes. But we still need reminding.

05.02.2026 10:48 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 1

Well that’s one way to lose these walking blues. Diamonds on the soles of our shoes.

05.02.2026 00:26 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Google C++ Style Guide

What do C++ devs think of Google's convention of naming class data members with a trailing underscore? google.github.io/styleguide/c...

uint32_t cnt_ = 0;

This looks odd to me, but it's been a while since I've done much C++. Verilator simulation is giving me cause to get back into it a bit.

04.02.2026 11:11 πŸ‘ 3 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0
ULX3S PCB connected to computer monitor showing β€œHello, World! This is an Isle FPGA Computer UART test.”

ULX3S PCB connected to computer monitor showing β€œHello, World! This is an Isle FPGA Computer UART test.”

Work on 🏝️ Isle #FPGA computer input chapter continues. Here I’m testing UART with #ULX3S dev board.

03.02.2026 15:49 πŸ‘ 12 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0
Preview
FOSDEM 2026 - How Secure Are Commercial RISC-V CPUs?

β€œWhile the RISC-V specification provides strong security primitives… implementations consistently choose insecure defaults… The decisions vendors make today… will be baked into billions of chips we cannot patch.” #riscv #fosdem

fosdem.org/2026/schedul...

03.02.2026 10:59 πŸ‘ 4 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

β€œWhile the tradition remains popular in the 21st century, studies have found no consistent association between a groundhog seeing its shadow and the subsequent arrival time of spring-like weather.” β€” Wikipedia

03.02.2026 10:31 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Saying a Makefile link command out loud is strange: "dash R dollar caret, dash O dollar snail..." 🐌

I guess that's an AT not a snail, but after the carrot (caret) I unconsciously chose to say snail.

02.02.2026 13:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Generative AI and Wikipedia editing: What we learned in 2025 Like many organizations, Wiki Education has grappled with generative AI, its impacts, opportunities, and threats, for several years. As an organization that runs large-scale programs to bring new e…

A thoughtful and informative article from Wiki Education on LLM use in #Wikipedia: wikiedu.org/blog/2026/01...

β€œOur fundamental conclusion about generative AI is: Wikipedia editors should never copy and paste the output from generative AI chatbots like ChatGPT into Wikipedia articles.”

30.01.2026 21:41 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

I realised I never posted a video of the advanced asm animation introduced in this chapter.

30.01.2026 16:04 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0