Public notes, made in hope they are useful to someone.
A link page of interesting libraries and utilities I found.
fshlib is a simple shell library for logging. It provides a set of functions to log messages with different severity levels.
.bazelversion
The other day, I was pondering whether to keep setting particular bazel version in projects. I even removed some, to see what would become of it.
This repository provides Bazel rules for creating self-extracting archives (“shar"s) out of shell binaries.
The idea of this repository is to provide a hermetic, ephemeral and reproducible repository of prebuilt binaries, which can then be brought into bazel builds to remove the dependence on local binary installations.
This is another piece of news in my quest for hermetic, ephemeral, and reproducible builds (“HER”).
This is a collection of links to interesting articles and knowledge sources about the Bazel build system that I found.
This is another piece of news in my quest for hermetic, ephemeral, and reproducible builds (“HER”).
Update 2025-10-19: I made a searchable index of modules available from my registry at https://www.hdlfactory.com/bazel-registry.
lit2md is a simplistic literate programming (LP) converter.
This guide explains how to properly constrain a digital design with multiple clocks in an XDC (Xilinx Design Constraints) file, specifically for use in Vivado batch mode. We’ll cover primary clocks, generated clocks, and the relationships between them.
bazel_rules_bt
In the world of reproducible builds and efficient dependency management, Bazel stands out as a powerful tool. However, fetching large or uncommon dependencies can sometimes be a bottleneck. Enter bazel_rules_bt, a set of Bazel rules that uses the BitTorrent protocol to bring decentralized file downloading capabilities directly into your build system.
I asked Gemini to teach me about the VHDL resolved signals. What you read below is the result.
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 reasonable desire to keep the entity interface definitions compact.
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.
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 version. I hope that the updated version will remove some of the bugs I discovered in the previous version I dockerized, which was 2023.2.
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.
Cross-posted from the original at https://github.com/filmil/bazel-rules-bid
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.
Reusing the general approach from this post gives a way for setting Shift_L+Shift_R as layout change:
$readmemh is a Verilog directive that allows you to initialize an array.
Program your FPGA with a one-liner command. It’s a kind of magic.
ranlib
This is something seldom known, and a very sharp corner to cut yourself on. But you really want to know if you are using nix.
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.
bazel rules for a riscv64 bare metal rust compiler
This article assumes that you have bazel installed 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 other way. It is implied in all of my writings about bazel.
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 bare metal GCC cross-compiler for a 64-bit RISC-V machine, running in M-mode.
lazygit tips and tricks
These are some tips and tricks for lazygit that I keep forgetting how to do.
Here is how you can set up a hardware server (hw_server) in AMD Vivado 2023.2.
I accidentally bought the Google Nest 2nd Generation Router when I needed an Access Point.
This short note defines the notions of hermetic, ephemeral and reproducible software build, as used in my writing.
If you are in a hurry, fast forward to https://github.com/filmil/bazel_local_nix
docker tips and tricks
Perhaps obvious in retrospect, but it is not possible for a bazel build artifact to generate a named pipe in the filesystem.
After a lengthy search I found the below article that explains the use of Unix domain sockets in go:
foreign_cc rule
I discovered this trick recently, while trying (and mostly failing) to build a library.
I was a bit hard pressed to find all the proper work attribution. Please let me know if you have data to contribute.
A while back I wanted to make a hermetic environment for repeatably running Docker tooling.
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 could not find side-by-side examples of VimScript vs Lua for quick migration. So I decided to start my own.
bazel tips and tricks
Often needed little bits of bazel knowledge that I tend to forget.
python web app in bazel
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.
cc_library rule in bazel
Adapted from the bazel-discuss mailing list.
make rule from rules_foreign_cc repository for bazel
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 usual suspects: GNU autotools, GNU make and cmake.