Notes

Public notes, made in hope they are useful to someone.

Inventory of programmable hardware tooling

Libraries, utilities, etc. https://registry.bazel.build/modules/rules_verilator https://github.com/lromor/fpga-assembler https://registry.bazel.build/modules/yosys …

Feb 1, 2026

fshlib: shell library

Github repo: https://github.com/filmil/fshlib fshlib fshlib is a simple shell library for logging. It provides a set of functions to log messages with different severity …

Jan 3, 2026

note to self: do not remove .bazelversion

note to self: do not remove .bazelversion from projects The other day, I was pondering whether to keep setting particular bazel version in projects. I even removed some, to see …

Dec 20, 2025

rules_shar: bazel rules for creating self-extracting archives (shars)

Details at: https://github.com/filmil/rules_shar This repository provides Bazel rules for creating self-extracting archives (“shar"s) out of shell binaries. See …

Nov 22, 2025

Hermetic, Ephemeral, Reproducible Builds: Take Three (3)

Bazel rules to support a debian rootfs Find the project page at: https://github.com/filmil/bazel_debian_rootfs The idea of this repository is to provide a hermetic, ephemeral …

Oct 29, 2025

Hermetic, Ephemeral, Reproducible Builds: Take Three (2)

This is another piece of news in my quest for hermetic, ephemeral, and reproducible builds (“HER”). If you read my articles in the past months or so, you may have noticed that I am …

Oct 15, 2025

Bazel knowledge sources

This is a collection of links to interesting articles and knowledge sources about the Bazel build system that I found. I’m motivated to do this after spending considerable …

Oct 7, 2025

Hermetic, Ephemeral, Reproducible Builds: Take Three (1)

This is another piece of news in my quest for hermetic, ephemeral, and reproducible builds (“HER”). If you read my articles in the past months or so, you may have noticed that I am …

Oct 6, 2025

Getting ready for the brave new Bazel Modules world

Update 2025-10-19: I made a searchable index of modules available from my registry at https://www.hdlfactory.com/bazel-registry. As Bazel 9.0 promises to disable the old …

Sep 29, 2025

lit2md: a literate program converter from code to Markdown

lit2md: a literate program converter from code to Markdown See at: https://github.com/filmil/lit2md lit2md is a simplistic literate programming (LP) converter. It takes a source …

Sep 21, 2025

Writing XDC Clock Constraints for Vivado

Writing XDC Clock Constraints for Vivado This guide explains how to properly constrain a digital design with multiple clocks in an XDC (Xilinx Design Constraints) file, …

Sep 1, 2025

Decentralized Downloads for Bazel: Introducing bazel_rules_bt

Decentralized Downloads for Bazel: Introducing bazel_rules_bt Find the project page at https://github.com/filmil/bazel_rules_bt In the world of reproducible builds and efficient …

Aug 1, 2025

Mastering Resolved Signals in VHDL: A Comprehensive Guide for Digital Design

I asked Gemini to teach me about the VHDL resolved signals. What you read below is the result. Mastering Resolved Signals in VHDL: A Comprehensive Guide for Digital Design 1. …

Jul 14, 2025

How to shoot yourself in the foot with inout signals

How to shoot yourself in the foot with inout signals They say that no good deed goes unpunished. Here’s an example of a footgun in VHDL which stems from in my view an eminently …

Jul 7, 2025

VHDL IEEE Libraries and Numeric Type Conversion: A Definitive Reference

I asked Gemini to teach me the VHDL type conversions. What you read below is the result. An annoying generated podcast will be available for a while. VHDL IEEE Libraries and …

Jun 29, 2025

Packaging AMD Xilinx Vivado ML Standard edition 2025.1 in a Docker container

I updated the repository https://github.com/filmil/vivado-docker/ with the changes required to package Vivado 2025.1. As of this writing, version 2025.1 is the last published …

Jun 19, 2025

rules_nixpkgs use

rules_nixpkgs use This is a run-down of tips and tricks for the use of rules_nixpkgs, a rule set for bringing in nix packages for use in bazel. I got involved with the use of …

Apr 11, 2025

Bazel rules for “build-in-docker” (or “bid”)

Cross-posted from the original at https://github.com/filmil/bazel-rules-bid What is “build-in-docker” (bid)? Bid allows you to create a build rule that runs a single …

Feb 11, 2025

Typeset your own ebooks easily with bazel-ebook

Other formats: Original content is at: https://github.com/filmil/bazel-ebook The rendered HTML edition at: https://hdlfactory.com/bazel_ebook_html/ Introduction This repository …

Feb 4, 2025

Using glbl.v module in a Verilog simulation in Vivado

A quick note about correct use of glbl.v in a Verilog simulation in Vivado. This note is way less confusing than any notes you may find elsewhere on the Internet. glbl.v is a small …

Nov 16, 2024

Robust, well-tested Value Change Dump (VCD) Parser

From: https://github.com/filmil/go-vcd-parser Value Change Dump (VCD) File parser This is a parser for the Value Change Dump files, a.k.a VCD file format. The file format is …

Oct 26, 2024

GNOME tips and tricks

Reusing the general approach from this post gives a way for setting Shift_L+Shift_R as layout change: $ gsettings set org.gnome.desktop.wm.keybindings switch-input-source …

Oct 22, 2024

How to use $readmemh correctly

What? $readmemh is a Verilog directive that allows you to initialize an array. It works differently in simulation compared to synthesis. In simulation, this directive behaves as a …

Oct 7, 2024

From zero to RISC-V in hardware, in 6 minutes

From zero to RISC-V in hardware, in 6 minutes Program your FPGA with a one-liner command. It’s a kind of magic. This is a project in sustainable FPGA development that I …

Oct 5, 2024

nix requires ranlib

Be forewarned: HER builds with nix require a functional ranlib This is something seldom known, and a very sharp corner to cut yourself on. But you really want to know if you are …

Sep 14, 2024

bazel rules for GHDL

bazel rules for GHDL I present to you https://github.com/filmil/bazel_rules_ghdl: a set of bazel rules for converting VHDL into Verilog. This for example allows running VHDL code …

Sep 3, 2024

bazel rules for a riscv64 bare metal rust compiler

bazel rules for a riscv64 bare metal rust compiler This article assumes that you have bazel installed via the bazelisk method. This is the latest example in my repository at: …

Aug 31, 2024

bazel installation via the bazelisk method

bazel installation via the bazelisk method Here is how I install bazel. I use this installation method on all of my machines. I do not think it is practical to go about this any …

Aug 24, 2024

bazel rules for a riscv64 bare metal GCC compiler

bazel rules for a riscv64 bare metal GCC compiler The repository https://github.com/filmil/bazel_rules_gcc_riscv64_baremetal contains bazel rules that can be used for a hermetic …

Aug 17, 2024

lazygit tips and tricks

lazygit tips and tricks These are some tips and tricks for lazygit that I keep forgetting how to do. Split a commit into multiple commits Based on the discussion here. Open …

Aug 12, 2024

Remote programming of an AMD (fka Xilinx) Artix-7 device

Summary Here is how you can set up a hardware server (hw_server) in AMD Vivado 2023.2, in such a way that you can move your workbench to a virtual machine in your cloud of choice - …

Jul 8, 2024

PSA: Google Nest Router can serve as an Access Point

Google Nest Router (2nd Generation) can serve as an access point I accidentally bought the Google Nest 2nd Generation Router when I needed an Access Point. It turns out that the …

May 25, 2024

Hermetic, ephemeral, reproducible builds (‘her’)

Summary This short note defines the notions of hermetic, ephemeral and reproducible software build, as used in my writing. I call this “her” for short. Hermetic A build …

May 1, 2024

Why do I bother with bazel?

Summary I bother with bazel. Here is why. Background Bazel is a build system. Originally created at Google for internal purposes, then eventually open sourced. Since then, it has …

Apr 27, 2024

Nix+Bazel = ❤️

If you are in a hurry, fast forward to https://github.com/filmil/bazel_local_nix Summary You, too, can have a fully hermetic, reproducible, and ephemeral bazel build. Intro While …

Apr 20, 2024

docker tips and tricks

Docker tips and tricks Save an image to an archive docker save imagename | gzip > myimage.tar.gz Load image to an archive docker load < myimage.tar.gz

Feb 15, 2024

bazel does not like FIFOs

Bazel does not like FIFOs Perhaps obvious in retrospect, but it is not possible for a bazel build artifact to generate a named pipe in the filesystem. The after-step checks will …

Feb 5, 2024

Unix domain sockets in go

After a lengthy search I found the below article that explains the use of Unix domain sockets in go: …

Jan 6, 2024

Running docker containers in Synology NAS

If this advice helped you, let me know. How to run docker containers under Synology NAS, easily and with custom settings Prompted by a recent need to run a local Jupyter instance …

Jan 1, 2024

TIM-011 video playlist

TIM-011 video playlist TIM-011 was an 8-bit teaching computer that was ostensibly developed by IMP in what is now Serbia. Here is a public collection of videos related to the …

Dec 25, 2023

TIM-011 gets a unit test library

TIM-011 was an 8-bit teaching computer that was ostensibly developed by IMP in what is now Serbia. It is hard to develop for any machine without a way to test quickly whether your …

Dec 24, 2023

bazoekt: easy code indexing and search for your Bazel projects

https://github.com/filmil/bazoekt Since I can’t remember anything these days, I often find myself sifting through my code looking for specific keywords. Sometimes grep isn’t quite …

Dec 17, 2023

bazel: excavating an unknown file from a foreign_cc rule

Excavating an unknown file from a foreign_cc rule I discovered this trick recently, while trying (and mostly failing) to build a library. I discovered that it is possible to …

Dec 14, 2023

TIM-011 gets a C runtime library

TIM-011 gets a C runtime library TIM-011 was an 8-bit teaching computer that was ostensibly developed by IMP in what is now Serbia. Now that …

Dec 13, 2023

TIM-011 computer - how we did things back then

I was a bit hard pressed to find all the proper work attribution. Please let me know if you have data to contribute. TIM-011 TIM-011 was an 8-bit teaching computer that was …

Dec 3, 2023

Packaging AMD Xilinx Vivado ML Standard edition in a Docker container

A while back I wanted to make a hermetic environment for repeatably running Docker tooling. The results are here: https://github.com/filmil/vivado-docker/ At this time, it’s …

Nov 20, 2023

Neovim tips and tricks

From VimScript into Lua This is my cheat sheet for migrating VimScript into Lua. Things I often forget. There are places to learn about Lua use in Neovim . But, for some reason, I …

Sep 18, 2023

git tips and tricks

Often needed little bits of git knowledge that I tend to forget. Check out the contents of a GitHub PR From: https://devopscube.com/checkout-git-pull-request/ git fetch origin …

Aug 5, 2023

bazel tips and tricks

Often needed little bits of bazel knowledge that I tend to forget. Module extensions Reminder about module extensions. # Also instead of `http.bzl`, `git.bzl` etc. http_file = …

Jul 30, 2023

Build a python web app in bazel

Here is an example python Flask app built with Bazel. See README.md for instructions. Running the app will start a local dev server for Flask and you should be able to direct your …

Jul 25, 2023

Tesla ownership experiences so far

We recently became Tesla owners, as our old car unexpectedly gave out. We were expecting to get at least 1 more year out of it. But it was not meant to be. Now that we’re …

Jun 30, 2023

Including arbitrary files into cc_library rule in bazel

Update 2023-08-17: This is now a feature in bazel, see https://github.com/bazelbuild/bazel/issues/18766 for details. It is available starting bazel version 6.3.0. Use …

Jun 23, 2023

How to use the make rule from rules_foreign_cc repository for bazel

Summary The bazel build system has rules available to build C or C++ code from external repositories that use other more “conventional” build tools. By this I mean the …

Jun 13, 2023