<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Home on HDL Factory Home</title>
		<link>https://www.hdlfactory.com/</link>
		<description>Recent content in Home on HDL Factory Home</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 10 Oct 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://www.hdlfactory.com/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Doom on a RISC-V core written in TxHDL</title>
				<link>https://www.hdlfactory.com/post/2026/10/08/doom-on-a-txhdl-risc-v-core/</link>
				<pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/08/doom-on-a-txhdl-risc-v-core/</guid>
				<description>&lt;p&gt;Doom now runs on Vreteno, the RISC-V core written in &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;TxHDL&lt;/a&gt;, on&#xA;an Artix-7 FPGA board. The game draws into a framebuffer in DDR3 memory,&#xA;the board shows it on HDMI, and the keys come over the serial line. This&#xA;post shows what runs, how fast, and how the way TxHDL designs are built&#xA;lets changes like this one go from a plan to the board quickly.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;  &lt;img src=&#34;https://www.hdlfactory.com/txhdl/doom-e1m1-host.png&#34; alt=&#34;The first level of&#xA;    Freedoom: a grey room with a pistol in the foreground and the status&#xA;    bar at the bottom&#34; style=&#34;width:100%;max-width:640px&#34;&gt;&#xA;  &lt;figcaption&gt;&#xA;    Figure 1: Freedoom&#39;s first level, rendered by the same Doom source&#xA;    as the board&#39;s, built for the host. The board draws the same frames&#xA;    into its DDR3 framebuffer.&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;what-runs-on-the-board&#34;&gt;What runs on the board&lt;/h2&gt;&#xA;&lt;p&gt;The board is an Alinx AX7A200B with a Xilinx Artix-7 XC7A200T. The&#xA;design on it is the TxHDL flagship system:&lt;/p&gt;</description>
			</item>
			<item>
				<title>openxc7 or Vivado: Build Times and Results Measured</title>
				<link>https://www.hdlfactory.com/post/2026/10/08/openxc7-vs-vivado-build-times/</link>
				<pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/08/openxc7-vs-vivado-build-times/</guid>
				<description>&lt;p&gt;I built the same three designs with the open toolchain and with Vivado,&#xA;through the same Bazel rules, and timed every build from cold and warm&#xA;caches. Small designs build two to three times faster with the open tools.&#xA;Sixteen RISC-V cores build faster with Vivado, and Vivado&amp;rsquo;s circuits use&#xA;about half the logic. Setting up the measurements turned up five problems,&#xA;three of them in my own rules.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-was-compared&#34;&gt;What was compared&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/bazel_rules_openxc7&#34;&gt;&lt;code&gt;rules_openxc7&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;https://github.com/filmil/bazel_rules_vivado&#34;&gt;&lt;code&gt;rules_vivado&lt;/code&gt;&lt;/a&gt; share one target&#xA;interface: &lt;code&gt;vivado_project&lt;/code&gt;, &lt;code&gt;vivado_synthesis&lt;/code&gt; and&#xA;&lt;code&gt;vivado_place_and_route&lt;/code&gt;. The first runs Yosys, nextpnr-xilinx and Project&#xA;X-Ray. The second runs Vivado 2025.2, which Bazel installs from the&#xA;installer archive on first use.&#xA;Switching a design between them changes one &lt;code&gt;load&lt;/code&gt; line.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Razboj: a minimal GPU in TxHDL</title>
				<link>https://www.hdlfactory.com/post/2026/10/06/razboj-a-minimal-gpu-in-txhdl/</link>
				<pubDate>Tue, 06 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/06/razboj-a-minimal-gpu-in-txhdl/</guid>
				<description>&lt;p&gt;Razboj is a minimal graphics rasteriser implemented in approximately one&#xA;hundred lines of &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;TxHDL&lt;/a&gt;.&#xA;It reads a display list from memory and writes rendered pixels into a&#xA;framebuffer over an AXI bus.&#xA;TxHDL lowers the design to synthesizable Verilog and VHDL, and the build&#xA;verifies both netlists against the software simulation trace.&#xA;This post describes the rasteriser architecture and hardware design tradeoffs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-it-draws&#34;&gt;What it draws&lt;/h2&gt;&#xA;&lt;p&gt;The reference demonstration scene measures 64 by 64 pixels (4,096 pixels&#xA;total).&#xA;The scene consists of eight display list entries: a background clear, three&#xA;rectangles, and four triangles.&#xA;The rasteriser renders the entire scene in approximately 13,000 clock cycles.&#xA;A verification harness reads the completed framebuffer from memory and saves&#xA;the output image.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux boots to a shell on Vreteno</title>
				<link>https://www.hdlfactory.com/post/2026/10/05/linux-boots-on-vreteno/</link>
				<pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/05/linux-boots-on-vreteno/</guid>
				<description>&lt;p&gt;Mainline Linux now boots to a shell on &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/29/vreteno-a-risc-v-core-in-txhdl/&#34;&gt;Vreteno&lt;/a&gt;, the RISC-V core&#xA;written in &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;TxHDL&lt;/a&gt;.&#xA;It runs on the Alinx AX7A200B board, an Artix-7 FPGA with 1 GiB of DDR3&#xA;memory, at 100 MHz.&#xA;The kernel runs in supervisor mode with virtual memory turned on.&#xA;OpenSBI runs in machine mode below it, and a BusyBox shell runs in user mode&#xA;above it.&#xA;This post describes what the core needed for that, how the boot was brought&#xA;up, and what is still missing.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Thanklessly Maintaining Open Source Software: the book</title>
				<link>https://www.hdlfactory.com/post/2026/10/04/thanklessly-maintaining-open-source-software/</link>
				<pubDate>Sun, 04 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/04/thanklessly-maintaining-open-source-software/</guid>
				<description>&lt;p&gt;&lt;em&gt;Thanklessly Maintaining Open Source Software&lt;/em&gt; started as a fake O&amp;rsquo;Reilly&#xA;book cover, and it is now an actual book on Amazon.&#xA;It has 95 pages, a year in the life of one unlucky maintainer, and a price&#xA;of exactly one hexadecimal dollar.&#xA;This post explains what is in it, and why you might want it anyway.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.amazon.com/Thanklessly-Maintaining-Open-Source-Software-ebook/dp/B0FD9KZPC2&#34;&gt;&lt;img src=&#34;https://www.hdlfactory.com/tmoss-cover.jpg&#34; alt=&#34;The cover of Thanklessly Maintaining Open Source Software&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  &lt;a href=&#34;https://www.amazon.com/Thanklessly-Maintaining-Open-Source-Software-ebook/dp/B0FD9KZPC2&#34;&#xA;     style=&#34;display:inline-block;padding:0.6em 1.1em;background:#1f3a5f;color:#fff;&#xA;            text-decoration:none;border-radius:6px;font-weight:bold;&#34;&gt;&#xA;    Buy it on Amazon &amp;rarr;&#xA;  &lt;/a&gt;&#xA;&lt;/p&gt;</description>
			</item>
			<item>
				<title>rules_openxc7: Open-Source 7-Series FPGA Toolchains in Bazel</title>
				<link>https://www.hdlfactory.com/post/2026/10/01/rules-openxc7-fpga-toolchain-in-bazel/</link>
				<pubDate>Thu, 01 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/10/01/rules-openxc7-fpga-toolchain-in-bazel/</guid>
				<description>&lt;p&gt;&lt;code&gt;rules_openxc7&lt;/code&gt; brings open-source FPGA synthesis and place-and-route for&#xA;AMD 7-series chips into Bazel.&#xA;It drives Yosys, nextpnr-xilinx, Project X-Ray, and openFPGALoader through&#xA;the same target interface as &lt;code&gt;rules_vivado&lt;/code&gt;.&#xA;This post covers the toolchain architecture, how the rules translate Xilinx&#xA;constraints, reproducible bitstreams, and how to swap between Vivado and&#xA;open tooling in one line.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-open-tooling-in-bazel&#34;&gt;Why open tooling in Bazel&lt;/h2&gt;&#xA;&lt;p&gt;Building for FPGAs usually means one of two extremes.&#xA;You either install a 100-gigabyte proprietary vendor suite, or you maintain&#xA;fragile shell scripts around open-source tools.&#xA;&lt;code&gt;rules_openxc7&lt;/code&gt; avoids both problems.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Vreteno: a RISC-V core written in TxHDL</title>
				<link>https://www.hdlfactory.com/post/2026/09/29/vreteno-a-risc-v-core-in-txhdl/</link>
				<pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/29/vreteno-a-risc-v-core-in-txhdl/</guid>
				<description>&lt;p&gt;Vreteno is a 32-bit RISC-V processor core designed in &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;TxHDL&lt;/a&gt;.&#xA;TxHDL is a hardware description language implemented as a native Rust library.&#xA;The core implements the RV32IMC instruction set architecture: the base integer&#xA;set, standard multiply/divide extensions, and compressed instructions.&#xA;It supports traps, hardware interrupts, and system memory access via an AXI bus.&#xA;Lockstep verification checks core state against a reference model on every&#xA;cycle, while gate-level netlists match cycle-accurate Rust simulations.&#xA;This article details the core microarchitecture, verification strategy, and&#xA;FPGA implementation.&lt;/p&gt;</description>
			</item>
			<item>
				<title>wdbcvt: Bundling Waveform Test Corpora and Daily Nightly Releases</title>
				<link>https://www.hdlfactory.com/post/2026/09/29/wdbcvt-waveform-test-corpora-and-release-artifacts/</link>
				<pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/29/wdbcvt-waveform-test-corpora-and-release-artifacts/</guid>
				<description>&lt;p&gt;wdbcvt now publishes two new release archives with every build: a&#xA;documentation bundle and a waveform corpus.&#xA;The waveform archive packages the test suite&amp;rsquo;s &lt;code&gt;.wdb&lt;/code&gt; files, ground-truth&#xA;&lt;code&gt;.fst&lt;/code&gt; conversions, and HDL source files together.&#xA;Nightly builds now run daily, check the repository forge for new commits, and&#xA;publish all build artifacts to Forgejo and GitHub.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-a-standalone-waveform-corpus-matters&#34;&gt;Why a standalone waveform corpus matters&lt;/h2&gt;&#xA;&lt;p&gt;Tool developers who study Vivado&amp;rsquo;s &lt;code&gt;.wdb&lt;/code&gt; format need test cases.&#xA;Vivado is a multi-gigabyte software package.&#xA;Running simulations requires licenses and tool setups that many open-source&#xA;developers do not maintain.&#xA;The &lt;code&gt;wdbcvt&lt;/code&gt; repository already contains dozens of simulated test cases across&#xA;VHDL, Verilog, and SystemVerilog.&#xA;Previously, these test cases stayed inside the repository tree alongside&#xA;intermediate simulation files.&#xA;Developers of external tools had to clone the full repository or run Vivado&#xA;locally to obtain sample waveforms.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fuchsia Internals, Vol. II: The Build System and Toolchains</title>
				<link>https://www.hdlfactory.com/post/2026/09/25/fuchsia-internals-vol-2-build-system-and-toolchains/</link>
				<pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/25/fuchsia-internals-vol-2-build-system-and-toolchains/</guid>
				<description>&lt;p&gt;Volume II of the &lt;a href=&#34;https://hdlfactory.com/post/2026/07/25/fuchsia-internals-a-new-report-series/&#34;&gt;Fuchsia Internals series&lt;/a&gt; examines the build system&#xA;architecture and toolchain infrastructure.&#xA;The primary complexity in Fuchsia builds stems from the multi-toolchain model.&#xA;Under this design, the build system compiles a single source target across&#xA;multiple toolchain contexts, producing distinct binary artifacts for each&#xA;execution environment.&#xA;A link to the full report appears below.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note on these reports:&lt;/strong&gt; These reports were compiled automatically.&#xA;Verify specific implementation details against upstream source code before&#xA;relying on them.&lt;/p&gt;</description>
			</item>
			<item>
				<title>grlib: Gaisler&#39;s GRLIB and the NOEL-V Core as a Bazel Module</title>
				<link>https://www.hdlfactory.com/post/2026/09/24/grlib-noelv-ip-in-bazel/</link>
				<pubDate>Thu, 24 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/24/grlib-noelv-ip-in-bazel/</guid>
				<description>&lt;p&gt;The &lt;code&gt;grlib&lt;/code&gt; Bazel module packages &lt;a href=&#34;https://www.gaisler.com/grlib-ip-library&#34;&gt;GRLIB&lt;/a&gt;, Gaisler&amp;rsquo;s (Frontgrade&amp;rsquo;s) GPL&#xA;VHDL IP library, so that the &lt;a href=&#34;https://www.gaisler.com/products/noel-v&#34;&gt;NOEL-V&lt;/a&gt; RV64 RISC-V core and the AMBA&#xA;infrastructure around it can be consumed as ordinary &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;Bazel&lt;/a&gt;&#xA;dependencies. It is the module that puts the CPU into Cocoapuffs, the SoC&#xA;that &lt;a href=&#34;https://hdlfactory.com/post/2026/07/19/cocoapuffs-booting-fuchsias-zircon-kernel-on-a-risc-v-core-in-artix-7-fpga/&#34;&gt;boots Fuchsia&amp;rsquo;s Zircon kernel on an Artix-7 FPGA&lt;/a&gt;. It is also&#xA;the module where I learned the most about what it costs to move a large,&#xA;make-era VHDL codebase into a modern build system, which is what this post&#xA;is mostly about. It follows &lt;a href=&#34;https://hdlfactory.com/post/2026/09/03/rules-vivado-fpga-synthesis-in-bazel/&#34;&gt;rules_vivado&lt;/a&gt; in my series on the modules&#xA;behind &lt;a href=&#34;https://github.com/filmil/cocoapuffs-fpga&#34;&gt;&lt;code&gt;cocoapuffs-fpga&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>An icosahedron on HDMI, drawn by a TxHDL core</title>
				<link>https://www.hdlfactory.com/post/2026/09/20/an-icosahedron-on-hdmi-drawn-by-a-txhdl-core/</link>
				<pubDate>Sun, 20 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/20/an-icosahedron-on-hdmi-drawn-by-a-txhdl-core/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;tl;dr: A RISC-V core written in &lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;TxHDL&lt;/a&gt; draws a turning&#xA;icosahedron on a monitor, with the TxHDL logo in the corner. Watch&#xA;it at &lt;a href=&#34;https://youtu.be/YbHtntvvydk&#34;&gt;https://youtu.be/YbHtntvvydk&lt;/a&gt;. The whole thing, core, memory,&#xA;video, Ethernet and a serial loader, is one bitstream in the&#xA;board&amp;rsquo;s flash, and the program that draws is 560 lines of Rust that&#xA;go down the serial port in about a second. Read on for how it is put&#xA;together.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;iframe style=&#34;width: 100%; aspect-ratio: 16 / 9; height: auto;&#34;&#xA;src=&#34;https://www.youtube.com/embed/YbHtntvvydk&#34;&#xA;title=&#34;An icosahedron drawn by a TxHDL core&#34; frameborder=&#34;0&#34;&#xA;allow=&#34;accelerometer; clipboard-write; encrypted-media; gyroscope;&#xA;picture-in-picture; web-share&#34; allowfullscreen&gt;&lt;/iframe&gt;&#xA;&lt;h2 id=&#34;what-you-are-looking-at&#34;&gt;What you are looking at&lt;/h2&gt;&#xA;&lt;p&gt;The board is an Alinx AX7A200B, with an Artix-7 200T on it. The core&#xA;is &lt;a href=&#34;https://github.com/filmil/txhdl/tree/main/cpu/vreteno&#34;&gt;Vreteno&lt;/a&gt;, an RV32IMC that I wrote in TxHDL together with&#xA;&lt;a href=&#34;https://hdlfactory.com/txhdl/go/dj.html&#34;&gt;Dragiša Janković&lt;/a&gt;. If you have not seen TxHDL before: you write&#xA;the hardware as a Rust program, and the Verilog, the simulation and&#xA;the checks all fall out of a Rust library and a few macros. I wrote&#xA;&lt;a href=&#34;https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/&#34;&gt;a whole post about it&lt;/a&gt; if you want the long version.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Automated Tests on Simulation Output, with SQLite</title>
				<link>https://www.hdlfactory.com/post/2026/09/12/sqlite-simulation-tests/</link>
				<pubDate>Sat, 12 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/12/sqlite-simulation-tests/</guid>
				<description>&lt;p&gt;This article demonstrates converting a &lt;a href=&#34;https://en.wikipedia.org/wiki/Value_change_dump&#34;&gt;VCD&lt;/a&gt; dump into an indexed&#xA;&lt;a href=&#34;https://sqlite.org&#34;&gt;SQLite&lt;/a&gt; database using &lt;a href=&#34;https://github.com/filmil/go-vcd-parser&#34;&gt;&lt;code&gt;go-vcd-parser&lt;/code&gt;&lt;/a&gt;, then using a query language&#xA;to answer questions about the signals.&#xA;A logic simulator answers questions about a digital design.&#xA;Typically, it answers them in a graphical waveform viewer, requiring an engineer&#xA;to inspect transitions on a screen.&#xA;Automating these checks in continuous integration requires translating waveform&#xA;traces into machine-readable data.&lt;/p&gt;&#xA;&lt;p&gt;Inside SQLite, engineers write Go tests to assert timing properties,&#xA;such as validating that reset deasserts at 10 ns or verifying a 200 MHz clock.&#xA;These checks execute automatically and fail the build whenever an assertion&#xA;violates.&lt;/p&gt;</description>
			</item>
			<item>
				<title>TxHDL: a hardware description language is just a Rust async runtime</title>
				<link>https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/</link>
				<pubDate>Sat, 12 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/12/txhdl-a-hardware-description-language-that-is-a-rust-library/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://hdlfactory.com/txhdl/go/repo.html&#34;&gt;TxHDL&lt;/a&gt; is an open-source hardware description language embedded&#xA;directly in Rust as an async runtime library, developed by&#xA;&lt;a href=&#34;https://hdlfactory.com/txhdl/go/dj.html&#34;&gt;Dragiša Janković&lt;/a&gt; and Filip Filmar (me).&#xA;Instead of inventing a custom compiler and type checker, TxHDL expresses digital&#xA;circuits using standard Rust types, structs, and asynchronous functions.&#xA;From a single Rust source file, the library provides software simulation,&#xA;Verilog and VHDL code generation, and multi-tool verification.&#xA;To demonstrate hardware fidelity, the project includes Vreteno, a 32-bit RISC-V&#xA;CPU core written in TxHDL and running on an Artix-7 FPGA at 100 MHz.&#xA;Since then, the same library has been used to write a minimal GPU, an AXI bus,&#xA;a network on chip, an Ethernet MAC and an HDMI output, each with its own&#xA;document.&#xA;Each of these designs will get a post of its own here later.&lt;/p&gt;</description>
			</item>
			<item>
				<title>wdbcvt: reading Vivado&#39;s undocumented .wdb waveform files</title>
				<link>https://www.hdlfactory.com/post/2026/09/04/wdbcvt-reading-vivado-wdb/</link>
				<pubDate>Fri, 04 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/04/wdbcvt-reading-vivado-wdb/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://git.hdlfactory.com/HDL/wdbcvt&#34;&gt;wdbcvt&lt;/a&gt; is an open-source converter that reads Vivado&amp;rsquo;s &lt;code&gt;.wdb&lt;/code&gt; waveform&#xA;files and converts them to the open-source FST format.&#xA;Vivado&amp;rsquo;s &lt;code&gt;xsim&lt;/code&gt; simulator writes simulation waveforms to a proprietary binary&#xA;format that external tools cannot open.&#xA;wdbcvt parses these &lt;code&gt;.wdb&lt;/code&gt; files and produces standard FST waveforms that open&#xA;directly in &lt;a href=&#34;https://gtkwave.sourceforge.net/&#34;&gt;GTKWave&lt;/a&gt; and &lt;a href=&#34;https://surfer-project.org/&#34;&gt;Surfer&lt;/a&gt;.&#xA;The tool converts real simulations, including a dual-core RISC-V SoC with&#xA;5,696 signals and 18,875,466 value changes in 71 seconds.&#xA;Below are downloads, usage instructions, and sample waveform images.&lt;/p&gt;</description>
			</item>
			<item>
				<title>rules_vivado: FPGA Synthesis and Place-and-Route in Bazel</title>
				<link>https://www.hdlfactory.com/post/2026/09/03/rules-vivado-fpga-synthesis-in-bazel/</link>
				<pubDate>Thu, 03 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/09/03/rules-vivado-fpga-synthesis-in-bazel/</guid>
				<description>&lt;p&gt;&lt;code&gt;rules_vivado&lt;/code&gt; drives the AMD/Xilinx &lt;a href=&#34;https://www.amd.com/en/products/software/adaptive-socs-and-fpgas/vivado.html&#34;&gt;Vivado&lt;/a&gt; FPGA toolchain from&#xA;&lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;Bazel&lt;/a&gt;: compile, simulate, synthesize, place-and-route, generate a&#xA;bitstream, and program the device, all as ordinary build actions instead of&#xA;clicks in a GUI or a pile of ad-hoc TCL. This post kicks off a series on the&#xA;Bazel modules behind &lt;a href=&#34;https://github.com/filmil/cocoapuffs-fpga&#34;&gt;&lt;code&gt;cocoapuffs-fpga&lt;/code&gt;&lt;/a&gt;, the SoC repo from the&#xA;&lt;a href=&#34;https://hdlfactory.com/post/2026/07/19/cocoapuffs-booting-fuchsias-zircon-kernel-on-a-risc-v-core-in-artix-7-fpga/&#34;&gt;Zircon-on-FPGA bring-up&lt;/a&gt;. I have covered some modules before&#xA;(&lt;a href=&#34;https://hdlfactory.com/post/2024/09/03/bazel-rules-for-ghdl/&#34;&gt;rules_ghdl&lt;/a&gt;, &lt;a href=&#34;https://hdlfactory.com/post/2025/11/22/rules_shar-bazel-rules-for-creating-self-extracting-archives-shars/&#34;&gt;rules_shar&lt;/a&gt;, &lt;a href=&#34;https://hdlfactory.com/post/2026/01/03/fshlib-shell-library/&#34;&gt;fshlib&lt;/a&gt;, &lt;a href=&#34;https://hdlfactory.com/post/2025/02/04/typeset-your-own-ebooks-easily-with-bazel-ebook/&#34;&gt;bazel-ebook&lt;/a&gt;,&#xA;and &lt;a href=&#34;https://hdlfactory.com/post/2025/02/11/bazel-rules-for-build-in-docker-or-bid/&#34;&gt;build-in-docker&lt;/a&gt;); the coming posts cover the rest: this one, then&#xA;grlib, rules_fusesoc, rules_vunit, rules_dtc, vhdl_ls_gen, OpenSBI, and&#xA;rules_osvvm.&lt;/p&gt;</description>
			</item>
			<item>
				<title>My homelab is fully ephemeral</title>
				<link>https://www.hdlfactory.com/post/2026/08/30/fully-ephemeral-homelab/</link>
				<pubDate>Sun, 30 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/08/30/fully-ephemeral-homelab/</guid>
				<description>&lt;p&gt;In my homelab, no individual server is treated as irreplaceable.&#xA;Every machine across the laboratory (build nodes, developer workstations, and&#xA;continuous integration runners) is fully ephemeral: it can be terminated at any&#xA;moment, by choice or provider eviction, and reconstituted from scratch in&#xA;minutes.&#xA;The only state that persists is committed source code in git and backups&#xA;distributed across three isolated storage domains.&#xA;This article outlines the architecture of this environment and the operational&#xA;tenets behind it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fuchsia Internals, Vol. I: The Graphics and Display Pipeline</title>
				<link>https://www.hdlfactory.com/post/2026/08/25/fuchsia-internals-vol-1-graphics-and-display/</link>
				<pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/08/25/fuchsia-internals-vol-1-graphics-and-display/</guid>
				<description>&lt;p&gt;Volume I of the &lt;a href=&#34;https://hdlfactory.com/post/2026/07/25/fuchsia-internals-a-new-report-series/&#34;&gt;Fuchsia Internals report series&lt;/a&gt; examines the graphics&#xA;and display pipeline.&#xA;Graphics serves as a comprehensive system application that exercises core kernel&#xA;primitives simultaneously.&#xA;Rather than using an in-kernel DRM/KMS subsystem, Fuchsia divides display&#xA;responsibilities among cooperating user-space services.&#xA;These services communicate across &lt;a href=&#34;https://fuchsia.dev/fuchsia-src/concepts/fidl/overview&#34;&gt;FIDL&lt;/a&gt; &lt;a href=&#34;https://fuchsia.dev/fuchsia-src/reference/kernel_objects/channel&#34;&gt;channels&lt;/a&gt; using&#xA;zero-copy shared &lt;a href=&#34;https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_object&#34;&gt;VMOs&lt;/a&gt;.&#xA;A link to the full report appears below.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note on these reports:&lt;/strong&gt; These reports were compiled automatically.&#xA;Verify specific implementation details against upstream source code before&#xA;relying on them.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bazel all the way down: how I build programmable hardware</title>
				<link>https://www.hdlfactory.com/post/2026/08/17/bazel-all-the-way-down-how-i-build-programmable-hardware/</link>
				<pubDate>Mon, 17 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/08/17/bazel-all-the-way-down-how-i-build-programmable-hardware/</guid>
				<description>&lt;p&gt;This is a description of how I build programmable hardware.&#xA;Everything that goes into &lt;a href=&#34;https://hdlfactory.com/post/2026/07/19/cocoapuffs-booting-fuchsias-zircon-kernel-on-a-risc-v-core-in-artix-7-fpga/&#34;&gt;Cocoapuffs&lt;/a&gt; (my RISC-V system-on-chip on an&#xA;Artix-7 FPGA), including the RTL, firmware, simulations, synthesis, bitstream,&#xA;and board programming, comes out of a single &lt;code&gt;bazel build&lt;/code&gt; on a machine that has&#xA;nothing installed on it but &lt;a href=&#34;https://bazel.build&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt;.&#xA;The build is &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral, and reproducible&lt;/a&gt;, and it behaves&#xA;identically whether it runs on my laptop, on a virtual machine in the cloud, or&#xA;in continuous integration.&#xA;Below is why I do it this way, what the approach looks like, and which Bazel&#xA;rules do the heavy lifting.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fuchsia Internals: A New Report Series for Hardware Engineers</title>
				<link>https://www.hdlfactory.com/post/2026/07/25/fuchsia-internals-a-new-report-series/</link>
				<pubDate>Sat, 25 Jul 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/07/25/fuchsia-internals-a-new-report-series/</guid>
				<description>&lt;p&gt;I have written a series of technical reports on the internals of &lt;a href=&#34;https://fuchsia.dev/&#34;&gt;Fuchsia&lt;/a&gt;,&#xA;Google&amp;rsquo;s &lt;a href=&#34;https://fuchsia.dev/fuchsia-src/concepts/components/v2/capabilities&#34;&gt;capability&lt;/a&gt;-based microkernel operating system.&#xA;The material addresses electrical, register-transfer level (RTL), and FPGA&#xA;engineers rather than kernel developers.&#xA;This article introduces the publication series, which covers the reports&#xA;progressively.&#xA;The complete collection spans fourteen reference volumes.&#xA;The &lt;a href=&#34;https://hdlfactory.com/fuchsia-reports/fuchsia_internals.html&#34;&gt;overview document&lt;/a&gt; is linked at the end of this article, and each&#xA;subsequent post will provide the full text and download link for an individual&#xA;volume.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The FPGA Hardware Interview: A Topic Guide with Questions and Exercises</title>
				<link>https://www.hdlfactory.com/post/2026/07/23/fpga-hardware-interview-guide/</link>
				<pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/07/23/fpga-hardware-interview-guide/</guid>
				<description>&lt;p&gt;Technical interviews for FPGA and digital design engineering positions draw&#xA;from established digital design principles.&#xA;Candidates often encounter difficulty communicating solutions under strict time&#xA;constraints.&#xA;To assist engineers preparing for technical interviews, this guide provides&#xA;a structured 29-page review titled &amp;ldquo;The FPGA Hardware Interview.&amp;rdquo;&#xA;The document pairs topic reviews with realistic interview questions, model&#xA;responses, and dual-language coding exercises in both VHDL and SystemVerilog.&#xA;A link to the full document appears below.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Booting Fuchsia&#39;s Zircon on a homebrew RISC-V SoC, on an Artix-7 FPGA</title>
				<link>https://www.hdlfactory.com/post/2026/07/19/cocoapuffs-booting-fuchsias-zircon-kernel-on-a-risc-v-core-in-artix-7-fpga/</link>
				<pubDate>Sun, 19 Jul 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/07/19/cocoapuffs-booting-fuchsias-zircon-kernel-on-a-risc-v-core-in-artix-7-fpga/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://fuchsia.dev&#34;&gt;Fuchsia&lt;/a&gt;&amp;rsquo;s &lt;a href=&#34;https://fuchsia.dev/fuchsia-src/concepts/kernel&#34;&gt;Zircon&lt;/a&gt; kernel now boots on Cocoapuffs, my homebrew&#xA;RISC-V system-on-chip on an AMD Artix-7 FPGA.&#xA;As far as I know, this is the first Fuchsia boot on programmable hardware.&#xA;Below you will find the boot video and the full chain, from a &lt;a href=&#34;https://github.com/olofk/serv&#34;&gt;SERV&lt;/a&gt;&#xA;serial loader through OpenSBI to userspace.&#xA;All of the code, from RTL to the boot chain, lives in&#xA;&lt;a href=&#34;https://github.com/filmil/cocoapuffs-fpga&#34;&gt;filmil/cocoapuffs-fpga&lt;/a&gt;.&#xA;The rest of this post chronicles the five bugs that stood in the way.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Announcing bazel_local_nix 0.1.0</title>
				<link>https://www.hdlfactory.com/post/2026/05/28/announcing-bazel_local_nix-0.1.0/</link>
				<pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/05/28/announcing-bazel_local_nix-0.1.0/</guid>
				<description>&lt;p&gt;I&amp;rsquo;m excited to announce the release of &lt;strong&gt;bazel_local_nix 0.1.0&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;bazel_local_nix&lt;/code&gt; provides Bazel rules that make Nix packages available inside a Bazel workspace &lt;strong&gt;without a host-level Nix installation and without &lt;code&gt;nix-portable&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;whats-new&#34;&gt;What&amp;rsquo;s New?&lt;/h3&gt;&#xA;&lt;p&gt;Earlier versions of this project relied on shimming Bazel through a &lt;code&gt;nix-portable&lt;/code&gt; &lt;code&gt;nix-shell&lt;/code&gt; wrapper. That approach has been completely removed and replaced by a more robust rule set.&lt;/p&gt;&#xA;&lt;p&gt;The new rules bootstrap an ephemeral Nix from the official binary release, run it unprivileged inside a &lt;code&gt;bwrap&lt;/code&gt; (bubblewrap) user namespace against a persistent store, and expose the results as ordinary Bazel artifacts.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Respin: upspin revival</title>
				<link>https://www.hdlfactory.com/post/2026/04/19/respin-upspin-revival/</link>
				<pubDate>Sun, 19 Apr 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/04/19/respin-upspin-revival/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;tl;dr: I revived the &lt;a href=&#34;https://upspin.io&#34;&gt;upspin&lt;/a&gt; project source code. See it at&#xA;&lt;a href=&#34;https://github.com/filmil/upspin&#34;&gt;https://github.com/filmil/upspin&lt;/a&gt;, and &lt;a href=&#34;https://github.com/filmil/upspin-gdrive&#34;&gt;https://github.com/filmil/upspin-gdrive&lt;/a&gt;.&#xA;Since April, it has also gained post-quantum encryption, streaming of&#xA;large files, a writable keyserver, and a lot of automated checking.&#xA;Read on to learn what that actually means.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;Updated on 2026-10-10. The first version of this article described the&#xA;revival as of April 2026. This version adds what changed since, in&#xA;&lt;a href=&#34;#what-happened-since&#34;&gt;What happened since&lt;/a&gt; and&#xA;&lt;a href=&#34;#how-it-is-checked-now&#34;&gt;How it is checked now&lt;/a&gt;, and updates the list of&#xA;what is still missing.&lt;/em&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Synod: Paxos agent</title>
				<link>https://www.hdlfactory.com/post/2026/04/18/synod-paxos-agent/</link>
				<pubDate>Sat, 18 Apr 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/04/18/synod-paxos-agent/</guid>
				<description>&lt;p&gt;Synod is a distributed Paxos coordination agent implemented in Go. It manages a highly available, synchronized Key-Value store across a network of peers using the Paxos consensus algorithm. It allows multiple dynamically joining network nodes to agree on a shared state, ensuring fault tolerance and consistency across the cell. Find it at: &lt;a href=&#34;https://github.com/filmil/synod&#34;&gt;https://github.com/filmil/synod&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/synod/actions/workflows/build-test.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/synod/actions/workflows/build-test.yml/badge.svg&#34; alt=&#34;Build and Test&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/synod/actions/workflows/release.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/synod/actions/workflows/release.yml/badge.svg&#34; alt=&#34;Release Agent&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;quickstart&#34;&gt;Quickstart&lt;/h2&gt;&#xA;&lt;p&gt;This quickstart shows how to download the repository and quickly start 3 synod&#xA;agents which talk to each other and are already set up to work properly. It&#xA;establishes state directories for each agent following the XDG base directory&#xA;specification.&lt;/p&gt;</description>
			</item>
			<item>
				<title>mkill: a memory watchcat</title>
				<link>https://www.hdlfactory.com/post/2026/04/11/mkill-a-memory-watchcat/</link>
				<pubDate>Sat, 11 Apr 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/04/11/mkill-a-memory-watchcat/</guid>
				<description>&lt;p&gt;&lt;code&gt;mkill&lt;/code&gt; is a Go program that continuously monitors memory usage of the programs&#xA;owned by the current user. It kills the program with the sharpest rise in&#xA;memory utilization when the overall system memory occupancy goes beyond the&#xA;user-configured kill threshold. &lt;a href=&#34;https://github.com/filmil/mkill/releases&#34;&gt;Download a binary release&lt;/a&gt;, or see the source code &lt;a href=&#34;https://github.com/filmil/mkill&#34;&gt;on Github&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/mkill/actions/workflows/build-test.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/mkill/actions/workflows/build-test.yml/badge.svg&#34; alt=&#34;Build and Test&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/mkill/actions/workflows/release.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/mkill/actions/workflows/release.yml/badge.svg&#34; alt=&#34;Release&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://github.com/filmil/mkill/blob/main/demo.gif?raw=true&#34; alt=&#34;mkill demo&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;I created &lt;code&gt;mkill&lt;/code&gt; because I am handling some programs which tend to run&#xA;away with memory use, in a setup which can not be easily sandboxed. It prevents killing a random process, which then usually ends up&#xA;killing my remote session on a GCP virtual machine, messing up the ongoing&#xA;user workloads. Hence, a monitor program. TUI because I often use text-only&#xA;sessions.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Inventory of programmable hardware tooling</title>
				<link>https://www.hdlfactory.com/post/2026/02/01/inventory-of-programmable-hardware-tooling/</link>
				<pubDate>Sun, 01 Feb 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/02/01/inventory-of-programmable-hardware-tooling/</guid>
				<description>&lt;p&gt;A link page of interesting libraries and utilities I found.&lt;/p&gt;&#xA;&lt;h2 id=&#34;libraries-utilities-etc&#34;&gt;Libraries, utilities, etc.&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://registry.bazel.build/modules/rules_verilator&#34;&gt;https://registry.bazel.build/modules/rules_verilator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/lromor/fpga-assembler&#34;&gt;https://github.com/lromor/fpga-assembler&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://registry.bazel.build/modules/yosys&#34;&gt;https://registry.bazel.build/modules/yosys&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/oxidecomputer/quartz&#34;&gt;https://github.com/oxidecomputer/quartz&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/corundum/corundum&#34;&gt;https://github.com/corundum/corundum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.gaisler.com/grlib-ip-library&#34;&gt;https://www.gaisler.com/grlib-ip-library&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://surfer-project.org/&#34;&gt;https://surfer-project.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://gitlab.arm.com/bazel/rules_patchelf&#34;&gt;https://gitlab.arm.com/bazel/rules_patchelf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;my-stuff&#34;&gt;My stuff&lt;/h2&gt;&#xA;&lt;p&gt;All available at: &lt;a href=&#34;https://hdlfactory.com/bazel-registry/&#34;&gt;https://hdlfactory.com/bazel-registry/&lt;/a&gt; if you are willing to use &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;bazel&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_rules_nvc&#34;&gt;https://github.com/filmil/bazel_rules_nvc&lt;/a&gt;, builds NVC from source, &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;fully hermetic&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_rules_ghdl&#34;&gt;https://github.com/filmil/bazel_rules_ghdl&lt;/a&gt;, uses prebuilt GHDL, fully hermetic.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_rules_vivado&#34;&gt;https://github.com/filmil/bazel_rules_vivado&lt;/a&gt;, uses a prebuilt dockerized Vivado&lt;/li&gt;&#xA;&lt;li&gt;Fusesoc / edalize: &lt;a href=&#34;https://github.com/filmil/bazel_rules_fusesoc_2&#34;&gt;https://github.com/filmil/bazel_rules_fusesoc_2&lt;/a&gt;, builds a hermetic fusesoc/edalize distribution from Python source.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_nvc_osvvm&#34;&gt;https://github.com/filmil/bazel_nvc_osvvm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_rules_vunit&#34;&gt;https://github.com/filmil/bazel_rules_vunit&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/filmil/bazel_nvc_vivado&#34;&gt;https://github.com/filmil/bazel_nvc_vivado&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTgwMjA4NzExOCwyMDY1NjM1MzAwLDI2MT&#xA;g3ODM5LC05OTA4NDcxMjcsMzg1NTUyNzQ2LC05ODQxMTQ2MDgs&#xA;LTE1NzA1MDk1NDldfQ==&#xA;--&gt;</description>
			</item>
			<item>
				<title>fshlib: shell library</title>
				<link>https://www.hdlfactory.com/post/2026/01/03/fshlib-shell-library/</link>
				<pubDate>Sat, 03 Jan 2026 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2026/01/03/fshlib-shell-library/</guid>
				<description>&lt;h1 id=&#34;fshlib&#34;&gt;fshlib&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;fshlib&lt;/code&gt; is a simple shell library for logging. It provides a set of functions to log messages with different severity levels.&lt;/p&gt;&#xA;&lt;p&gt;Github repo: &lt;a href=&#34;https://github.com/filmil/fshlib&#34;&gt;https://github.com/filmil/fshlib&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/fshlib/actions/workflows/test.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/fshlib/actions/workflows/test.yml/badge.svg&#34; alt=&#34;Test&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/fshlib/actions/workflows/publish-bcr.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/fshlib/actions/workflows/publish-bcr.yml/badge.svg&#34; alt=&#34;Publish BCR&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/fshlib/actions/workflows/publish.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/fshlib/actions/workflows/publish.yml/badge.svg&#34; alt=&#34;Publish&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/fshlib/actions/workflows/tag-and-release.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/fshlib/actions/workflows/tag-and-release.yml/badge.svg&#34; alt=&#34;Tag and Release&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;To use the library, source the &lt;code&gt;log.bash&lt;/code&gt; file in your script:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;path/to/log.bash&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then you can use the logging functions:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::info &lt;span class=&#34;s2&#34;&gt;&amp;#34;This is an info message&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::warn &lt;span class=&#34;s2&#34;&gt;&amp;#34;This is a warning message&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::error &lt;span class=&#34;s2&#34;&gt;&amp;#34;This is an error message&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;functions&#34;&gt;Functions&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;log::info&lt;/code&gt;: Logs an informational message.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;log::warn&lt;/code&gt;: Logs a warning message.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;log::error&lt;/code&gt;: Logs an error message.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;log::debug&lt;/code&gt;: Logs a debug message. This message is only shown if the &lt;code&gt;DEBUG&lt;/code&gt; environment variable is set to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;log&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;log::prefix&lt;/code&gt;: Prefixes each line of the input with a given string.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;path/to/log.bash&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::info &lt;span class=&#34;s2&#34;&gt;&amp;#34;Starting the script&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::warn &lt;span class=&#34;s2&#34;&gt;&amp;#34;Something might be wrong&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;log::error &lt;span class=&#34;s2&#34;&gt;&amp;#34;Something went wrong&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;some output&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; log::prefix &lt;span class=&#34;s2&#34;&gt;&amp;#34;[my-prefix] &amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTE4OTM5NTE2LC0xNTIwNjEzNzY0XX0=&#xA;--&gt;</description>
			</item>
			<item>
				<title>note to self: do not remove `.bazelversion`</title>
				<link>https://www.hdlfactory.com/post/2025/12/20/note-to-self-do-not-remove-.bazelversion/</link>
				<pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/12/20/note-to-self-do-not-remove-.bazelversion/</guid>
				<description>&lt;h2 id=&#34;note-to-self-do-not-remove-bazelversion-from-projects&#34;&gt;note to self: do not remove &lt;code&gt;.bazelversion&lt;/code&gt; from projects&lt;/h2&gt;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&lt;p&gt;Since I use the &lt;a href=&#34;https://www.hdlfactory.com/post/2024/08/24/bazel-installation-via-the-bazelisk-method/&#34;&gt;bazelisk installation method&lt;/a&gt;, I get automatic bazel updates when a new version is released.&lt;/p&gt;&#xA;&lt;p&gt;It turns out that this remains a bad idea. An auto-update to bazel 8.5.0 caused some of my CI workflows to fail, likely because bazel 8.5.0 requires some updates to tools versions as well.&lt;/p&gt;</description>
			</item>
			<item>
				<title>rules_shar: bazel rules for creating self-extracting archives (shars)</title>
				<link>https://www.hdlfactory.com/post/2025/11/22/rules_shar-bazel-rules-for-creating-self-extracting-archives-shars/</link>
				<pubDate>Sat, 22 Nov 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/11/22/rules_shar-bazel-rules-for-creating-self-extracting-archives-shars/</guid>
				<description>&lt;p&gt;This repository provides Bazel rules for creating self-extracting archives (&amp;ldquo;shar&amp;quot;s) out of shell binaries.&lt;/p&gt;&#xA;&lt;p&gt;See section &amp;ldquo;what is this&amp;rdquo; below for details.&lt;/p&gt;&#xA;&lt;p&gt;Details at: &lt;a href=&#34;https://github.com/filmil/rules_shar&#34;&gt;https://github.com/filmil/rules_shar&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/rules_shar/actions/workflows/test.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/rules_shar/actions/workflows/test.yml/badge.svg&#34; alt=&#34;Test&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/rules_shar/actions/workflows/publish-bcr.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/rules_shar/actions/workflows/publish-bcr.yml/badge.svg&#34; alt=&#34;Publish BCR&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/rules_shar/actions/workflows/tag-and-release.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/rules_shar/actions/workflows/tag-and-release.yml/badge.svg&#34; alt=&#34;Tag and Release&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;To use the rules, add the following to your &lt;code&gt;MODULE.bazel&lt;/code&gt; file:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bzl&#34; data-lang=&#34;bzl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;bazel_dep&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;rules_shar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;version&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;0.0.0&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# Select your version, of course.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, in your &lt;code&gt;BUILD.bazel&lt;/code&gt; file, you can use the &lt;code&gt;shar_binary&lt;/code&gt; rule to create&#xA;a self-extracting archive, as a drop-in replacement for the rule &lt;code&gt;sh_binary&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Hermetic, Ephemeral, Reproducible Builds: Take Three (3)</title>
				<link>https://www.hdlfactory.com/post/2025/10/29/hermetic-ephemeral-reproducible-builds-take-three-3/</link>
				<pubDate>Wed, 29 Oct 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/10/29/hermetic-ephemeral-reproducible-builds-take-three-3/</guid>
				<description>&lt;h1 id=&#34;bazel-rules-to-support-a-debian-rootfs&#34;&gt;Bazel rules to support a debian rootfs&lt;/h1&gt;&#xA;&lt;p&gt;The idea of this repository is to provide a &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral and reproducible&lt;/a&gt; repository of prebuilt binaries, which can then be brought into bazel builds to remove the dependence on local binary installations.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Find the project page at: &lt;a href=&#34;https://github.com/filmil/bazel_debian_rootfs&#34;&gt;https://github.com/filmil/bazel_debian_rootfs&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/test.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/test.yml/badge.svg&#34; alt=&#34;Test status&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/publish-bcr.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/publish-bcr.yml/badge.svg&#34; alt=&#34;Publish BCR status&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/publish.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/publish.yml/badge.svg&#34; alt=&#34;Publish status&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/tag-and-release.yml&#34;&gt;&lt;img src=&#34;https://github.com/filmil/bazel_debian_rootfs/actions/workflows/tag-and-release.yml/badge.svg&#34; alt=&#34;Tag and Release status&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is otherwise a difficult task. Making a hermetic bazel build involves&#xA;painstakingly bringing in each needed binary one at a time. Often, this means&#xA;descending into the rats nest of dependencies and having to bring them all in.&#xA;One can convince themselves that this approach is then equivalent to rebuilding&#xA;an entire software repository from scratch. Something that we should avoid&#xA;doing if we can help it.  And something that presents a significant barrier to&#xA;entry for bazel builds, and one that is best avoided if possible.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Hermetic, Ephemeral, Reproducible Builds: Take Three (2)</title>
				<link>https://www.hdlfactory.com/post/2025/10/15/hermetic-ephemeral-reproducible-builds-take-three-2/</link>
				<pubDate>Wed, 15 Oct 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/10/15/hermetic-ephemeral-reproducible-builds-take-three-2/</guid>
				<description>&lt;p&gt;This is another piece of news in my quest for &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral, and reproducible&lt;/a&gt; builds (“HER”).&lt;/p&gt;&#xA;&lt;p&gt;If you read &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;my articles&lt;/a&gt; in the past months or so, you may have noticed that I am looking for good ways of creating completely hermetic, ephemeral, reproducible, but also &lt;em&gt;practical&lt;/em&gt; builds.&lt;/p&gt;&#xA;&lt;h3 id=&#34;issues-to-solve&#34;&gt;Issues to solve&lt;/h3&gt;&#xA;&lt;p&gt;The following is a list of issues with my previous HER build approaches:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;I do not want to manage a software repository.&lt;/strong&gt; I think that instead I should be able to reuse an already worked out solution wholesale. Ideally, bringing an existing software repository would be the way to go. The “N+B” approach did this, but even ephemeral nix installation ended up being somewhat invasive, as it required a special installation step which could fail in hard to track down ways.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bazel knowledge sources</title>
				<link>https://www.hdlfactory.com/post/2025/10/07/bazel-knowledge-sources/</link>
				<pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/10/07/bazel-knowledge-sources/</guid>
				<description>&lt;p&gt;This is a collection of links to interesting articles and knowledge sources about the &lt;a href=&#34;https://bazel.build&#34;&gt;Bazel build system&lt;/a&gt; that I found.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m motivated to do this after spending considerable time developing a &lt;a href=&#34;https://github.com/lukasoyen/bazel_linux_packages/tree/main&#34;&gt;thing that already existed&lt;/a&gt;. Just because I was not following the &amp;ldquo;right&amp;rdquo; communities I basically wasted a lot of effort reinventing a wheel. Useful wheel, but reinventing nevertheless.&lt;/p&gt;&#xA;&lt;p&gt;I plan to update the sources once in a while, as I discover things.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Hermetic, Ephemeral, Reproducible Builds: Take Three (1)</title>
				<link>https://www.hdlfactory.com/post/2025/10/06/hermetic-ephemeral-reproducible-builds-take-three-1/</link>
				<pubDate>Mon, 06 Oct 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/10/06/hermetic-ephemeral-reproducible-builds-take-three-1/</guid>
				<description>&lt;p&gt;This is another piece of news in my quest for &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral, and reproducible&lt;/a&gt; builds (“HER”).&lt;/p&gt;&#xA;&lt;p&gt;If you read &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;my articles&lt;/a&gt; in the past months or so, you may have noticed that I am looking for good ways of creating completely hermetic, ephemeral, reproducible, but also &lt;em&gt;practical&lt;/em&gt; builds.&lt;/p&gt;&#xA;&lt;p&gt;In the past, I offered two approaches to HER builds that I believe take a stab at providing HER properties, while also remaining practical to everyday build engineers. I’ll discuss them below, as well as a proposal for improving them.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Getting ready for the brave new Bazel Modules world</title>
				<link>https://www.hdlfactory.com/post/2025/09/29/getting-ready-for-the-brave-new-bazel-modules-world/</link>
				<pubDate>Mon, 29 Sep 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/09/29/getting-ready-for-the-brave-new-bazel-modules-world/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update 2025-10-19&lt;/strong&gt;: I made a searchable index of modules available from my registry at &lt;a href=&#34;https://www.hdlfactory.com/bazel-registry&#34;&gt;https://www.hdlfactory.com/bazel-registry&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;As Bazel 9.0 promises to disable the old dependency management approaches based on &lt;code&gt;WORKSPACE&lt;/code&gt; by the end of 2025, I figured we should better start preparing. This is my preparation central.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://bazel.build/external/module&#34;&gt;Bazel modules&lt;/a&gt; promise to usher the era of trivial bazel dependency management. However, getting from here to there seems to be a journey fraught with peril. &lt;a href=&#34;https://bazel.build/external/migration&#34;&gt;Migration guides&lt;/a&gt; are few and far between. And it&amp;rsquo;s never about the &lt;a href=&#34;https://blog.engflow.com/2024/06/27/migrating-to-bazel-modules-aka-bzlmod---the-easy-parts/&#34;&gt;easy stuff&lt;/a&gt; what makes it fraught, it&amp;rsquo;s always the side quests and corner cases that create issues. Keep your &lt;a href=&#34;https://www.hdlfactory.com/post/2025/10/07/bazel-knowledge-sources/&#34;&gt;knowledge base&lt;/a&gt; handy.&lt;/p&gt;</description>
			</item>
			<item>
				<title>lit2md: a literate program converter from code to Markdown</title>
				<link>https://www.hdlfactory.com/post/2025/09/21/lit2md-a-literate-program-converter-from-code-to-markdown/</link>
				<pubDate>Sun, 21 Sep 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/09/21/lit2md-a-literate-program-converter-from-code-to-markdown/</guid>
				<description>&lt;h1 id=&#34;lit2md-a-literate-program-converter-from-code-to-markdown&#34;&gt;lit2md: a literate program converter from code to Markdown&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;lit2md&lt;/code&gt; is a simplistic &lt;a href=&#34;https://en.wikipedia.org/wiki/Literate_programming&#34;&gt;literate programming (LP)&lt;/a&gt; converter.&lt;/p&gt;&#xA;&lt;p&gt;See at: &lt;a href=&#34;https://github.com/filmil/lit2md&#34;&gt;https://github.com/filmil/lit2md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It takes&#xA;a source code file annotated with special &amp;ldquo;literate&amp;rdquo; programming comments, and&#xA;outputs a markdown file in which the literate programming comments are&#xA;converted into markdown text, and code is converted into code blocks.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;p&gt;For example, consider the simplistic &lt;code&gt;hello.cc&lt;/code&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//] # An example Hello World program.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//] Don&amp;#39;t forget headers!&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#include&lt;/span&gt; &lt;span class=&#34;cpf&#34;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//] And now, the rest of the code here:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#x9;&#x9;&lt;span class=&#34;n&#34;&gt;std&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;Hello world&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;std&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;endl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#x9;&#x9;&lt;span class=&#34;n&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Running:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Writing XDC Clock Constraints for Vivado</title>
				<link>https://www.hdlfactory.com/post/2025/09/01/writing-xdc-clock-constraints-for-vivado/</link>
				<pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/09/01/writing-xdc-clock-constraints-for-vivado/</guid>
				<description>&lt;h1 id=&#34;writing-xdc-clock-constraints-for-vivado&#34;&gt;Writing XDC Clock Constraints for Vivado&lt;/h1&gt;&#xA;&lt;p&gt;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&amp;rsquo;ll cover primary clocks, generated clocks, and the relationships between them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-foundation-primary-clocks&#34;&gt;The Foundation: Primary Clocks&lt;/h2&gt;&#xA;&lt;p&gt;A primary clock is a clock that enters the FPGA from an external source. It&amp;rsquo;s the root of a clock tree. You must define all primary clocks first.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Decentralized Downloads for Bazel: Introducing `bazel_rules_bt`</title>
				<link>https://www.hdlfactory.com/post/2025/08/01/decentralized-downloads-for-bazel-introducing-bazel_rules_bt/</link>
				<pubDate>Fri, 01 Aug 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/08/01/decentralized-downloads-for-bazel-introducing-bazel_rules_bt/</guid>
				<description>&lt;h1 id=&#34;decentralized-downloads-for-bazel-introducing-bazel_rules_bt&#34;&gt;Decentralized Downloads for Bazel: Introducing &lt;code&gt;bazel_rules_bt&lt;/code&gt;&lt;/h1&gt;&#xA;&lt;p&gt;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 &lt;code&gt;bazel_rules_bt&lt;/code&gt;, a set of Bazel rules that uses the BitTorrent protocol to bring decentralized file downloading capabilities directly into your build system.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Find the project page at &lt;a href=&#34;https://github.com/filmil/bazel_rules_bt&#34;&gt;https://github.com/filmil/bazel_rules_bt&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;the-power-of-peer-to-peer-for-builds&#34;&gt;The Power of Peer-to-Peer for Builds&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;bazel_rules_bt&lt;/code&gt; addresses a common challenge: efficiently acquiring external files and archives that might be hosted on less reliable servers, or when you want to take advantage of peer-to-peer distribution for speed and resilience. By integrating the BitTorrent protocol, this extension offers a robust and potentially faster alternative to traditional HTTP/S downloads, especially for widely available public data or large files.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mastering Resolved Signals in VHDL: A Comprehensive Guide for Digital Design</title>
				<link>https://www.hdlfactory.com/post/2025/07/14/mastering-resolved-signals-in-vhdl-a-comprehensive-guide-for-digital-design/</link>
				<pubDate>Mon, 14 Jul 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/07/14/mastering-resolved-signals-in-vhdl-a-comprehensive-guide-for-digital-design/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;I asked Gemini to teach me about the VHDL resolved signals. What you read below is the result.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;mastering-resolved-signals-in-vhdl-a-comprehensive-guide-for-digital-design&#34;&gt;&lt;strong&gt;Mastering Resolved Signals in VHDL: A Comprehensive Guide for Digital Design&lt;/strong&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;1-introduction-to-signals-in-vhdl&#34;&gt;&lt;strong&gt;1. Introduction to Signals in VHDL&lt;/strong&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;the-fundamental-role-of-signals-in-hardware-description&#34;&gt;&lt;strong&gt;The Fundamental Role of Signals in Hardware Description&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In VHDL, signals serve as the foundational elements for representing physical wires and interconnections within a digital circuit. They are paramount in describing hardware behavior because, unlike variables, signals inherently possess a time dimension. This means that their values are not updated instantaneously but rather after a specified delay, which can be a default delta delay (an infinitesimal simulation time step) or an explicitly defined inertial or transport delay.&lt;sup&gt;1&lt;/sup&gt; This characteristic is vital for accurately modeling the concurrent and time-dependent nature of real-world hardware operations.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to shoot yourself in the foot with inout signals</title>
				<link>https://www.hdlfactory.com/post/2025/07/07/how-to-shoot-yourself-in-the-foot-with-inout-signals/</link>
				<pubDate>Mon, 07 Jul 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/07/07/how-to-shoot-yourself-in-the-foot-with-inout-signals/</guid>
				<description>&lt;h1 id=&#34;how-to-shoot-yourself-in-the-foot-with-inout-signals&#34;&gt;How to shoot yourself in the foot with inout signals&lt;/h1&gt;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&lt;p&gt;When defining entities in VHDL, I try to keep the entity definition compact and keep the rate of mistakes low by grouping individual signals into records, so that they could be manipulated as a unit. For example you would have a package definition that defines a record like so (library use declarations omitted for brevity):&lt;/p&gt;</description>
			</item>
			<item>
				<title>VHDL IEEE Libraries and Numeric Type Conversion: A Definitive Reference</title>
				<link>https://www.hdlfactory.com/post/2025/06/29/vhdl-ieee-libraries-and-numeric-type-conversion-a-definitive-reference/</link>
				<pubDate>Sun, 29 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/06/29/vhdl-ieee-libraries-and-numeric-type-conversion-a-definitive-reference/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;I asked Gemini to teach me the VHDL type conversions. What you read below is the result. An &lt;a href=&#34;https://drive.google.com/file/d/1ESJBKob2HyRmAsTgsAjpZOaTJpJ3D0TS/view?usp=drive_link&#34;&gt;annoying generated podcast&lt;/a&gt; will be available for a while.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;vhdl-ieee-libraries-and-numeric-type-conversions-a-definitive-reference&#34;&gt;&lt;strong&gt;VHDL IEEE Libraries and Numeric Type Conversions: A Definitive Reference&lt;/strong&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The VHSIC Hardware Description Language (VHDL) is a formal, strongly-typed language engineered for use in all phases of the creation of electronic systems, including development, verification, synthesis, and testing.&lt;sup&gt;1&lt;/sup&gt; Its dual nature, being both human-readable and machine-readable, underpins its role in communicating, maintaining, and procuring hardware designs.&lt;sup&gt;3&lt;/sup&gt; The core language, while powerful, is intentionally minimal. Its true utility in modern digital design is unlocked through a suite of standardized packages governed by the Institute of Electrical and Electronics Engineers (IEEE). These libraries extend VHDL&amp;rsquo;s capabilities, providing the essential types and functions needed to model complex hardware phenomena accurately and efficiently.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Packaging AMD Xilinx Vivado ML Standard edition 2025.1 in a Docker container</title>
				<link>https://www.hdlfactory.com/post/2025/06/19/packaging-amd-xilinx-vivado-ml-standard-edition-2025.1-in-a-docker-container/</link>
				<pubDate>Thu, 19 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/06/19/packaging-amd-xilinx-vivado-ml-standard-edition-2025.1-in-a-docker-container/</guid>
				<description>&lt;p&gt;I updated the repository &lt;a href=&#34;https://github.com/filmil/vivado-docker/&#34;&gt;https://github.com/filmil/vivado-docker/&lt;/a&gt; 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 &lt;a href=&#34;https://hdlfactory.com/post/2023/11/20/packaging-amd-xilinx-vivado-ml-standard-edition-in-a-docker-container/&#34;&gt;previous version I dockerized, which was 2023.2&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I use the container built from this repository as the basis for my &lt;a href=&#34;https://hdlfactory.com/tags/vivado/&#34;&gt;vivado tooling for bazel&lt;/a&gt;. While this was the primary reason for making this dockerization recipe, the result is also usable as a stand-alone and ephemeral installation of Vivado.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`rules_nixpkgs` use</title>
				<link>https://www.hdlfactory.com/post/2025/04/11/rules_nixpkgs-use/</link>
				<pubDate>Fri, 11 Apr 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/04/11/rules_nixpkgs-use/</guid>
				<description>&lt;h1 id=&#34;rules_nixpkgs-use&#34;&gt;&lt;code&gt;rules_nixpkgs&lt;/code&gt; use&lt;/h1&gt;&#xA;&lt;p&gt;This is a run-down of tips and tricks for the use of &lt;a href=&#34;https://github.com/bazelbuild/rules_pkg&#34;&gt;&lt;code&gt;rules_nixpkgs&lt;/code&gt;&lt;/a&gt;, a rule set for bringing in nix packages for use in &lt;a href=&#34;https://bazel.build&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I got involved with the use of &lt;a href=&#34;https://github.com/tweag/rules_nixpkgs&#34;&gt;&lt;code&gt;rules_nixpkgs&lt;/code&gt;&lt;/a&gt; as a result of my work on &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral and reproducible&lt;/a&gt; builds. My additions to the process are in the repository &lt;a href=&#34;https://github.com/filmil/bazel_local_nix&#34;&gt;&lt;code&gt;bazel_local_nix&lt;/code&gt;&lt;/a&gt;, which allows an ephemeral &lt;a href=&#34;https://nixos.org&#34;&gt;nix&lt;/a&gt; installation, only in service of the current bazel compilation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;per-project-bazelrc-settings&#34;&gt;Per-project &lt;code&gt;.bazelrc&lt;/code&gt; settings&lt;/h2&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s the &lt;code&gt;.bazelrc&lt;/code&gt; file I place in the root directory of my projects:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bazel rules for &#34;build-in-docker&#34; (or &#34;bid&#34;)</title>
				<link>https://www.hdlfactory.com/post/2025/02/11/bazel-rules-for-build-in-docker-or-bid/</link>
				<pubDate>Tue, 11 Feb 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/02/11/bazel-rules-for-build-in-docker-or-bid/</guid>
				<description>&lt;p&gt;Bid allows you to create a build rule that runs a &lt;em&gt;single&lt;/em&gt; bazel build action inside a Docker container. And if you can run a single action, you can run more if you so choose. This helps you if you must use software which is hard to bazelize, such as typically some EDA packages.&lt;/p&gt;&#xA;&lt;p&gt;The limitation is, you must have a way to invoke &lt;code&gt;docker run&lt;/code&gt;. I can afford to do that, but depending on your setup you might not. Not everyone is happy to run arbitrary binaries through a daemon that runs as root by default (it seems that rootless docker, or podman, are not compatible with use in bazel, so that avenue seems closed for the foreseeable future).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Typeset your own ebooks easily with `bazel-ebook`</title>
				<link>https://www.hdlfactory.com/post/2025/02/04/typeset-your-own-ebooks-easily-with-bazel-ebook/</link>
				<pubDate>Tue, 04 Feb 2025 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2025/02/04/typeset-your-own-ebooks-easily-with-bazel-ebook/</guid>
				<description>&lt;p&gt;Other formats:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Original content is at: &lt;a href=&#34;https://github.com/filmil/bazel-ebook&#34;&gt;https://github.com/filmil/bazel-ebook&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The rendered HTML edition at: &lt;a href=&#34;https://hdlfactory.com/bazel_ebook_html/&#34;&gt;https://hdlfactory.com/bazel_ebook_html/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;introduction-build-status&#34;&gt;Introduction &lt;img src=&#34;https://github.com/filmil/bazel-ebook/workflows/Build/badge.svg&#34; alt=&#34;Build Status&#34;&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This repository is a set of &lt;a href=&#34;https://bazel.io&#34;&gt;bazel&lt;/a&gt; build rules that allow you to write&#xA;a moderately complex book in the Markdown text format, and produce EPUB and&#xA;Kindle&amp;rsquo;s MOBI formats from them.  You can also produce a PDF format book, which&#xA;allows you to preview the results slightly more convenient than by reading the&#xA;resulting books.&lt;/p&gt;&#xA;&lt;p&gt;The documentation is available in the following formats:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Using `glbl.v` module in a Verilog simulation in Vivado</title>
				<link>https://www.hdlfactory.com/post/2024/11/16/using-glbl.v-module-in-a-verilog-simulation-in-vivado/</link>
				<pubDate>Sat, 16 Nov 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/11/16/using-glbl.v-module-in-a-verilog-simulation-in-vivado/</guid>
				<description>&lt;p&gt;A quick note about correct use of &lt;code&gt;glbl.v&lt;/code&gt; in a Verilog simulation in Vivado. This note is way less confusing than any &lt;a href=&#34;https://adaptivesupport.amd.com/s/article/6537?language=en_US&#34;&gt;notes&lt;/a&gt; you may find elsewhere on the Internet.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;glbl.v&lt;/code&gt; is a small collection of “global” signals that are being referred to in Vivado’s simulation sources for primitive elements in AMD (fka Xilinx) devices, such as &lt;code&gt;OSERDES2&lt;/code&gt; and others. This file gets included automatically in simulation setups if you use the Vivado GUI.&lt;/p&gt;</description>
			</item>
			<item>
				<title>go-vcd-parser: a tested VCD parser and toolkit in Go</title>
				<link>https://www.hdlfactory.com/post/2024/10/26/go-vcd-parser-a-tested-vcd-parser-and-toolkit-in-go/</link>
				<pubDate>Sat, 26 Oct 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/10/26/go-vcd-parser-a-tested-vcd-parser-and-toolkit-in-go/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/go-vcd-parser&#34;&gt;go-vcd-parser&lt;/a&gt; reads Value Change Dump (VCD) files, the waveform&#xA;format that simulators such as Verilator, Icarus Verilog and &lt;a href=&#34;https://www.nickg.me.uk/nvc/&#34;&gt;nvc&lt;/a&gt;&#xA;write. The format is defined in &lt;a href=&#34;https://ieeexplore.ieee.org/document/10458102&#34;&gt;IEEE 1800&lt;/a&gt;. The parser handles the&#xA;4-value format and the pragmatic extensions that real simulators produce.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-another-vcd-parser&#34;&gt;Why another VCD parser&lt;/h2&gt;&#xA;&lt;p&gt;Most open source VCD parsers are written in Python, Perl or C++, and most&#xA;ship with few tests or none. Some throw an exception on the first&#xA;realistic file. go-vcd-parser is written in Go, compiles to a static&#xA;binary, and a test suite guards its behavior: unit tests for individual&#xA;VCD stanzas, unit tests for odd snippets found in the wild, and&#xA;integration tests over complete files sampled from actual simulator runs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>GNOME tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2024/10/22/gnome-tips-and-tricks/</link>
				<pubDate>Tue, 22 Oct 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/10/22/gnome-tips-and-tricks/</guid>
				<description>&lt;p&gt;Reusing the general approach from &lt;a href=&#34;https://www.guyrutenberg.com/2021/11/14/use-alt-shift-for-keyboard-layout-switching-in-gnome-40/#google_vignette&#34;&gt;this post&lt;/a&gt; gives a way for setting &lt;code&gt;Shift_L+Shift_R&lt;/code&gt; as layout change:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source &amp;#34;[&amp;#39;&amp;lt;Shift&amp;gt;Shift_L&amp;#39;]&amp;#34;&#xA;$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward &amp;#34;[&amp;#39;&amp;lt;Shift&amp;gt;Shift_R&amp;#39;]&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This can not be done from the GNOME settings UI. It also works only accidentally, since it is not possible to be very intentional about left and right Shift modifier in the shortcut key definitions. Whew.&lt;/p&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbMTcxMzQyNzgzMF19&#xA;--&gt;</description>
			</item>
			<item>
				<title>How to use $readmemh correctly</title>
				<link>https://www.hdlfactory.com/post/2024/10/07/how-to-use-readmemh-correctly/</link>
				<pubDate>Mon, 07 Oct 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/10/07/how-to-use-readmemh-correctly/</guid>
				<description>&lt;h1 id=&#34;what&#34;&gt;What?&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;$readmemh&lt;/code&gt; is a Verilog directive that allows you to initialize an array.&lt;/p&gt;&#xA;&lt;p&gt;It works &lt;em&gt;differently&lt;/em&gt; in simulation compared to synthesis. In simulation, this directive behaves as a &amp;ldquo;read file into array&amp;rdquo;. In synthesis, this directive behaves as a repository of &lt;em&gt;initial values&lt;/em&gt; for, say, block RAM.&lt;/p&gt;&#xA;&lt;p&gt;While the purpose of the directive is documented every which way, the correct usage of the directive is woefully under-explained.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-to-use-it-correctly&#34;&gt;How to use it correctly&lt;/h1&gt;&#xA;&lt;p&gt;If you have a file in a directory say:&lt;/p&gt;</description>
			</item>
			<item>
				<title>From zero to RISC-V in hardware, in 6 minutes</title>
				<link>https://www.hdlfactory.com/post/2024/10/05/from-zero-to-risc-v-in-hardware-in-6-minutes/</link>
				<pubDate>Sat, 05 Oct 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/10/05/from-zero-to-risc-v-in-hardware-in-6-minutes/</guid>
				<description>&lt;h1 id=&#34;from-zero-to-risc-v-in-hardware-in-6-minutes&#34;&gt;From zero to RISC-V in hardware, in 6 minutes&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Program your FPGA with a one-liner command. It&amp;rsquo;s a kind of magic.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a project in sustainable FPGA development that I have been working on. It ties together several smaller projects that I developed in a perpetual quest for &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic, ephemeral, and reproducible builds&lt;/a&gt;. As far as I know, you can not find any setup like this anywhere else. It is a long and non-eventual video, but hardware people should be able to recognize the appeal.&lt;/p&gt;</description>
			</item>
			<item>
				<title>nix requires `ranlib`</title>
				<link>https://www.hdlfactory.com/post/2024/09/14/nix-requires-ranlib/</link>
				<pubDate>Sat, 14 Sep 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/09/14/nix-requires-ranlib/</guid>
				<description>&lt;h1 id=&#34;be-forewarned-her-builds-with-nix-require-a-functional-ranlib&#34;&gt;Be forewarned: &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;HER&lt;/a&gt; builds with nix require a functional &lt;code&gt;ranlib&lt;/code&gt;&lt;/h1&gt;&#xA;&lt;p&gt;This is something seldom known, and a very sharp corner to cut yourself on. But you really want to know if you are using &lt;a href=&#34;https://nixos.org/&#34;&gt;&lt;code&gt;nix&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I lost an entire day trying to figure out mysterious “symbol not found” errors while trying to link a hermetic instance of the &lt;a href=&#34;https://www.nickg.me.uk/nvc/&#34;&gt;nvc VHDL&lt;/a&gt; compiler under &lt;a href=&#34;https://hdlfactory.com/post/2024/04/27/why-do-i-bother-with-bazel/&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt; with &lt;a href=&#34;https://hdlfactory.com/post/2023/06/13/how-to-use-the-make-rule-from-rules_foreign_cc-repository-for-bazel/&#34;&gt;&lt;code&gt;rules_foreign_cc&lt;/code&gt;&lt;/a&gt;, in a &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;HER&lt;/a&gt; build, when using &lt;a href=&#34;https://gcc.gnu.org/wiki/LinkTimeOptimization&#34;&gt;link-time optimizations&lt;/a&gt; (“LTO”), which is the norm these days.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`bazel` rules for GHDL</title>
				<link>https://www.hdlfactory.com/post/2024/09/03/bazel-rules-for-ghdl/</link>
				<pubDate>Tue, 03 Sep 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/09/03/bazel-rules-for-ghdl/</guid>
				<description>&lt;h1 id=&#34;bazel-rules-for-ghdl&#34;&gt;&lt;code&gt;bazel&lt;/code&gt; rules for GHDL&lt;/h1&gt;&#xA;&lt;p&gt;I present to you &lt;a href=&#34;https://github.com/filmil/bazel_rules_ghdl&#34;&gt;https://github.com/filmil/bazel_rules_ghdl&lt;/a&gt;: a set of &lt;code&gt;bazel&lt;/code&gt; rules for converting VHDL into Verilog.&lt;/p&gt;&#xA;&lt;p&gt;This for example allows running VHDL code in a Verilator simulation. Commercial tools usually do not care what HDL the modules are written in. But usually commercial tools are the final mile in open source HDL development.&lt;/p&gt;&#xA;&lt;p&gt;Before you get there, you want the ability to run reasonably detailed simulations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what&#34;&gt;What?&lt;/h2&gt;&#xA;&lt;p&gt;This repository contains a &lt;a href=&#34;https://bazel.build/&#34;&gt;bazel&lt;/a&gt; rule set for running &lt;a href=&#34;https://github.com/ghdl/ghdl&#34;&gt;ghdl&lt;/a&gt;, the VHDL simulator and synthesizer, specifically to convert VHDL designs into Verilog.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`bazel` rules for a riscv64 bare metal rust compiler</title>
				<link>https://www.hdlfactory.com/post/2024/08/31/bazel-rules-for-a-riscv64-bare-metal-rust-compiler/</link>
				<pubDate>Sat, 31 Aug 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/08/31/bazel-rules-for-a-riscv64-bare-metal-rust-compiler/</guid>
				<description>&lt;h1 id=&#34;bazel-rules-for-a-riscv64-bare-metal-rust-compiler&#34;&gt;&lt;code&gt;bazel&lt;/code&gt; rules for a riscv64 bare metal rust compiler&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This article assumes that you have &lt;code&gt;bazel&lt;/code&gt; installed via the &lt;a href=&#34;https://bazel.build/install/bazelisk&#34;&gt;&lt;code&gt;bazelisk&lt;/code&gt; method&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is the latest example in my repository at: &lt;a href=&#34;https://github.com/filmil/bazel-experiments&#34;&gt;https://github.com/filmil/bazel-experiments&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The subdirectory &lt;a href=&#34;https://github.com/filmil/bazel-experiments/tree/main/riscv64-rust-baremetal&#34;&gt;https://github.com/filmil/bazel-experiments/tree/main/riscv64-rust-baremetal&lt;/a&gt; shows how to build a bare-metal binary for 64-bit RISC-V, using &lt;code&gt;bazel&lt;/code&gt; and a &lt;a href=&#34;https://hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/&#34;&gt;hermetic&lt;/a&gt; Rust compiler.&lt;/p&gt;&#xA;&lt;p&gt;It leans onto the set of &lt;code&gt;bazel&lt;/code&gt; &lt;a href=&#34;https://hdlfactory.com/post/2024/08/17/bazel-rules-for-a-riscv64-bare-metal-gcc-compiler/&#34;&gt;bare metal rules for 64-bit RISC-V&lt;/a&gt;, since the Rust compiler uses GNU &lt;code&gt;ld&lt;/code&gt; for its linker. Unfortnately, the know-how for building the toolchain has been lost to time it seems. I might need to find a way to rebuild this from scratch, possibly using the instructions from &lt;a href=&#34;https://wiki.osdev.org/GCC_Cross-Compiler&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://github.com/nbdd0121/muntjac-soc/blob/trunk/docs/tutorial.md#environment-setup&#34;&gt;here&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>`bazel` installation via the `bazelisk` method</title>
				<link>https://www.hdlfactory.com/post/2024/08/24/bazel-installation-via-the-bazelisk-method/</link>
				<pubDate>Sat, 24 Aug 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/08/24/bazel-installation-via-the-bazelisk-method/</guid>
				<description>&lt;h1 id=&#34;bazel-installation-via-the-bazelisk-method&#34;&gt;&lt;code&gt;bazel&lt;/code&gt; installation via the &lt;code&gt;bazelisk&lt;/code&gt; method&lt;/h1&gt;&#xA;&lt;p&gt;Here is how I install &lt;a href=&#34;https://bazel.build/&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt;. 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 &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;my writings about bazel&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;&#xA;&lt;p&gt;Sadly, &lt;code&gt;bazel&lt;/code&gt; versions are wildly incompatible between major version releases. This means that as you encounter projects using newer and newer &lt;code&gt;bazel&lt;/code&gt; versions, you may encounter random compatibility issues.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`bazel` rules for a riscv64 bare metal GCC compiler</title>
				<link>https://www.hdlfactory.com/post/2024/08/17/bazel-rules-for-a-riscv64-bare-metal-gcc-compiler/</link>
				<pubDate>Sat, 17 Aug 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/08/17/bazel-rules-for-a-riscv64-bare-metal-gcc-compiler/</guid>
				<description>&lt;h1 id=&#34;bazel-rules-for-a-riscv64-bare-metal-gcc-compiler&#34;&gt;&lt;code&gt;bazel&lt;/code&gt; rules for a riscv64 bare metal GCC compiler&lt;/h1&gt;&#xA;&lt;p&gt;The repository &lt;a href=&#34;https://github.com/filmil/bazel_rules_gcc_riscv64_baremetal&#34;&gt;https://github.com/filmil/bazel_rules_gcc_riscv64_baremetal&lt;/a&gt; contains &lt;code&gt;bazel&lt;/code&gt; rules that can be used for a hermetic bare metal GCC cross-compiler for a 64-bit RISC-V machine, running in &lt;a href=&#34;https://danielmangum.com/posts/risc-v-bytes-privilege-levels/&#34;&gt;M-mode&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It is based on the toolchain for the &lt;a href=&#34;https://github.com/lowRISC/muntjac&#34;&gt;muntjac processor&lt;/a&gt;. Based on the lowRISC toolchains repo at: &lt;a href=&#34;https://github.com/lowRISC/lowrisc-toolchains&#34;&gt;https://github.com/lowRISC/lowrisc-toolchains&lt;/a&gt;, and some custom patches.&lt;/p&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbNTI0NDQ3NTc0XX0=&#xA;--&gt;</description>
			</item>
			<item>
				<title>`lazygit` tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2024/08/12/lazygit-tips-and-tricks/</link>
				<pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/08/12/lazygit-tips-and-tricks/</guid>
				<description>&lt;h1 id=&#34;lazygit-tips-and-tricks&#34;&gt;&lt;code&gt;lazygit&lt;/code&gt; tips and tricks&lt;/h1&gt;&#xA;&lt;p&gt;These are some tips and tricks for &lt;a href=&#34;https://github.com/jesseduffield/lazygit&#34;&gt;&lt;code&gt;lazygit&lt;/code&gt;&lt;/a&gt; that I keep forgetting how to do.&lt;/p&gt;&#xA;&lt;h2 id=&#34;split-a-commit-into-multiple-commits&#34;&gt;Split a commit into multiple commits&lt;/h2&gt;&#xA;&lt;p&gt;Based on the discussion &lt;a href=&#34;https://github.com/jesseduffield/lazygit/discussions/2840#discussioncomment-6581308&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Open &lt;code&gt;lazygit&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;4&lt;/code&gt; to move to the commits panel&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Enter&lt;/code&gt; key to select a commit to split&lt;/li&gt;&#xA;&lt;li&gt;Use regular commands to stage and unstage parts you need.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Ctrl-P n&lt;/code&gt; to select &amp;ldquo;move to new commit&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;Write the commit message. &lt;code&gt;Ctrl-O&lt;/code&gt; does not seem to work, so I usually put an arbitrary but memorable blurb, and reword the commit later.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The new commit will be put as a child of the one you just split.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Remote programming of an AMD (fka Xilinx) Artix-7 device</title>
				<link>https://www.hdlfactory.com/post/2024/07/08/remote-programming-of-an-amd-fka-xilinx-artix-7-device/</link>
				<pubDate>Mon, 08 Jul 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/07/08/remote-programming-of-an-amd-fka-xilinx-artix-7-device/</guid>
				<description>&lt;h1 id=&#34;summary&#34;&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;Here is how you can set up a hardware server (&lt;code&gt;hw_server&lt;/code&gt;) in AMD Vivado 2023.2.&lt;/p&gt;&#xA;&lt;p&gt;Once you do this, that you can move your workbench to a virtual machine in your cloud of choice - mine is GCP - but program a device which is attached to a machine that&amp;rsquo;s close to you.&lt;/p&gt;&#xA;&lt;p&gt;The FPGA device in question is an AMD Artix-7 A200T. I suspect any other device supported by Vivado will work too. This is a much more advanced setup than what is described on the &lt;a href=&#34;https://support.xilinx.com/s/question/0D52E00006hpZbmSAE/how-to-program-a-fpga-from-vivado-which-is-installed-on-a-remote-server?language=en_US&#34;&gt;AMD help site&lt;/a&gt;. That setup assumes a local server, a local hardware attachment point, and it does no authentication. In contrast, this setup uses &lt;code&gt;ssh&lt;/code&gt; tunneling to set up a secure connection between the workbench machine and the programming host, so that it can be used between any two machines on the Internet so long as they can see each other via a TCP connection.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PSA: Google Nest Router can serve as an Access Point</title>
				<link>https://www.hdlfactory.com/post/2024/05/25/psa-google-nest-router-can-serve-as-an-access-point/</link>
				<pubDate>Sat, 25 May 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/05/25/psa-google-nest-router-can-serve-as-an-access-point/</guid>
				<description>&lt;h1 id=&#34;google-nest-router-2nd-generation-can-serve-as-an-access-point&#34;&gt;Google Nest Router (2nd Generation) can serve as an access point&lt;/h1&gt;&#xA;&lt;p&gt;I accidentally bought the Google Nest 2nd Generation Router when I needed an Access Point.&lt;/p&gt;&#xA;&lt;p&gt;It turns out that the Router can act as an Access Point and join a mesh network that already has an active Router. Just select &amp;ldquo;Access Point&amp;rdquo; when setting it up instead of &amp;ldquo;Router&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;This is very useful in multiple ways:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you accidentally buy the wrong device;&lt;/li&gt;&#xA;&lt;li&gt;If you don&amp;rsquo;t want the microphone that&amp;rsquo;s built into the Access Point.&lt;/li&gt;&#xA;&lt;li&gt;If you want the ability to plug into an Ethernet point on the Access Point. (Since actual Access Points don&amp;rsquo;t have an Ethernet port, and the Router has two).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTE2ODczMzk4MzddfQ==&#xA;--&gt;</description>
			</item>
			<item>
				<title>Hermetic, ephemeral, reproducible builds (&#39;her&#39;)</title>
				<link>https://www.hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/</link>
				<pubDate>Wed, 01 May 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/05/01/hermetic-ephemeral-reproducible-builds-her/</guid>
				<description>&lt;h1 id=&#34;summary&#34;&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;This short note defines the notions of hermetic, ephemeral and reproducible &lt;a href=&#34;https://en.wikipedia.org/wiki/Software_build&#34;&gt;software build&lt;/a&gt;, as &lt;a href=&#34;https://hdlfactory.com/post/2024/04/20/nix-bazel-%EF%B8%8F/&#34;&gt;used in my writing&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I call this &amp;ldquo;her&amp;rdquo; for short.&lt;/p&gt;&#xA;&lt;h1 id=&#34;hermetic&#34;&gt;Hermetic&lt;/h1&gt;&#xA;&lt;p&gt;A build is said to be &lt;strong&gt;hermetic&lt;/strong&gt;, if each build step only has access to the set of input artifacts that are minimally required for the build to succeed.&lt;/p&gt;&#xA;&lt;p&gt;Hermeticity is useful to ensure build correctness &amp;ndash; as it allows us to confirm that each build dependency step is well captured, and that none are omitted.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Why do I bother with `bazel`?</title>
				<link>https://www.hdlfactory.com/post/2024/04/27/why-do-i-bother-with-bazel/</link>
				<pubDate>Sat, 27 Apr 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/04/27/why-do-i-bother-with-bazel/</guid>
				<description>&lt;h1 id=&#34;summary&#34;&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;I &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;bother&lt;/a&gt; with &lt;a href=&#34;https://bazel.build&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Here is why.&lt;/p&gt;&#xA;&lt;h1 id=&#34;background&#34;&gt;Background&lt;/h1&gt;&#xA;&lt;p&gt;Bazel is a build system. Originally created at Google for internal purposes, then eventually open sourced. Since then, it has not been universally accepted. You can find discussions where &lt;a href=&#34;https://www.reddit.com/r/cpp/comments/eppqhj/cmake_vs_meson_vs_bazel/?rdt=34932&#34;&gt;bazel is being put down in favor of other build systems&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Yet, I have been using bazel in a lot of my recent projects, and have been quite pleased with the results. I intend to explain here why this works for me. I do not intend to compare to anything else, if that is what you are after, you will need to look for that elsewhere.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Nix&#43;Bazel = ❤️</title>
				<link>https://www.hdlfactory.com/post/2024/04/20/nix-bazel-%EF%B8%8F/</link>
				<pubDate>Sat, 20 Apr 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/04/20/nix-bazel-%EF%B8%8F/</guid>
				<description>&lt;p&gt;You, too, can have a fully &lt;a href=&#34;https://bazel.build/basics/hermeticity&#34;&gt;hermetic&lt;/a&gt;, &lt;a href=&#34;https://reproducible-builds.org/&#34;&gt;reproducible&lt;/a&gt;, and &lt;a href=&#34;https://www.bunnyshell.com/blog/what-are-ephemeral-environment/&#34;&gt;ephemeral&lt;/a&gt; bazel build.&lt;/p&gt;&#xA;&lt;p&gt;If you are in a hurry, fast forward to &lt;a href=&#34;https://github.com/filmil/bazel_local_nix&#34;&gt;https://github.com/filmil/bazel_local_nix&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;intro&#34;&gt;Intro&lt;/h1&gt;&#xA;&lt;p&gt;While looking for non-invasive and reproducible ways to create my dev environment, I considered &lt;a href=&#34;https://bazel.build/&#34;&gt;bazel&lt;/a&gt;. I &lt;a href=&#34;https://hdlfactory.com/tags/bazel/&#34;&gt;wrote up&lt;/a&gt; some of the results of this search.&lt;/p&gt;&#xA;&lt;p&gt;I like bazel because not only will it build my project reproducibly, but will also set up the development environment for doing so beforehand. It means that I only need to have &lt;code&gt;bazel&lt;/code&gt; installed on the local machine, and clone the repository I need, and I have all that is required to build and test the cloned code. This is in big contrast to the more “conventional” approaches to building, where you are left to work out how to pick and install the correct versions of the dependencies your code needs to build.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`docker` tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2024/02/15/docker-tips-and-tricks/</link>
				<pubDate>Thu, 15 Feb 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/02/15/docker-tips-and-tricks/</guid>
				<description>&lt;h1 id=&#34;docker-tips-and-tricks&#34;&gt;Docker tips and tricks&lt;/h1&gt;&#xA;&lt;h2 id=&#34;save-an-image-to-an-archive&#34;&gt;Save an image to an archive&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker save imagename | gzip &amp;gt; myimage.tar.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;load-image-to-an-archive&#34;&gt;Load image to an archive&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker load &amp;lt; myimage.tar.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbMTQzNTgxMTgyMF19&#xA;--&gt;</description>
			</item>
			<item>
				<title>bazel does not like FIFOs</title>
				<link>https://www.hdlfactory.com/post/2024/02/05/bazel-does-not-like-fifos/</link>
				<pubDate>Mon, 05 Feb 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/02/05/bazel-does-not-like-fifos/</guid>
				<description>&lt;h1 id=&#34;bazel-does-not-like-fifos&#34;&gt;Bazel does not like FIFOs&lt;/h1&gt;&#xA;&lt;p&gt;Perhaps obvious in retrospect, but it is not possible for a bazel build artifact to generate a named pipe in the filesystem.&lt;/p&gt;&#xA;&lt;p&gt;The after-step checks will object if an output directory contains at least one.&lt;/p&gt;&#xA;&lt;p&gt;I am not sure if this is accidental or not, but it kind of makes sense, since FIFOs are not hermetic, just as network connections are not hermetic.&lt;/p&gt;&#xA;&lt;p&gt;You can see the error message that one of my build rules hit when attempting to create a FIFO.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Unix domain sockets in go</title>
				<link>https://www.hdlfactory.com/post/2024/01/06/unix-domain-sockets-in-go/</link>
				<pubDate>Sat, 06 Jan 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/01/06/unix-domain-sockets-in-go/</guid>
				<description>&lt;p&gt;After a lengthy search I found the below article that explains the use of Unix domain sockets in go:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://johnrefior.com/gobits/read/go-introduction-to-unix-socket-communication&#34;&gt;https://johnrefior.com/gobits/read/go-introduction-to-unix-socket-communication&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbMTAwODUyMTE1XX0=&#xA;--&gt;</description>
			</item>
			<item>
				<title>Running docker containers in Synology NAS</title>
				<link>https://www.hdlfactory.com/post/2024/01/01/running-docker-containers-in-synology-nas/</link>
				<pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2024/01/01/running-docker-containers-in-synology-nas/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;If this advice helped you, &lt;a href=&#34;f@filmar.us&#34;&gt;let me know&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;how-to-run-docker-containers-under-synology-nas-easily-and-with-custom-settings&#34;&gt;How to run docker containers under Synology NAS, &lt;em&gt;easily&lt;/em&gt; and with custom settings&lt;/h1&gt;&#xA;&lt;p&gt;Prompted by a recent need to run a local Jupyter instance using the &lt;a href=&#34;https://jupyter-docker-stacks.readthedocs.io/en/latest/&#34;&gt;Jupyter Docker Stacks&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The easiest way to run docker containers under Synology NAS is to use the Container Manager, which is available through Synology&amp;rsquo;s Package Center right from the user interface.&lt;/p&gt;&#xA;&lt;p&gt;The Container Manager allows you to run custom containers and set &lt;em&gt;some&lt;/em&gt;, but not all, options. I found &lt;a href=&#34;https://www.google.com/search?q=jupyter+synology+nas+set+UID&#34;&gt;various attempts&lt;/a&gt; at this, but none are simple, and some are quite elaborate, such as installing &lt;a href=&#34;https://www.portainer.io/&#34;&gt;Portainer&lt;/a&gt;, which is a whole other and separate can of worms. Not to mention that it&amp;rsquo;s also vying for the not that much memory of your NAS.&lt;/p&gt;</description>
			</item>
			<item>
				<title>TIM-011 video playlist</title>
				<link>https://www.hdlfactory.com/post/2023/12/25/tim-011-video-playlist/</link>
				<pubDate>Mon, 25 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/25/tim-011-video-playlist/</guid>
				<description>&lt;h1 id=&#34;tim-011-video-playlist&#34;&gt;TIM-011 video playlist&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hdlfactory.com/post/2023/12/03/tim-011-computer-how-we-did-things-back-then/&#34;&gt;TIM-011&lt;/a&gt; was an 8-bit teaching computer that was ostensibly developed by &lt;a href=&#34;https://www.pupin.rs/en/home/&#34;&gt;IMP&lt;/a&gt; in what is now &lt;a href=&#34;https://en.wikipedia.org/wiki/Serbia&#34;&gt;Serbia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Here is a public collection of videos related to the TIM-011 computer.  Most of the videos, and especially the more impressive ones, are by other people. Please see individual videos for authorship information.&lt;/p&gt;&#xA;&lt;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube.com/embed/videoseries?si=mrgVJIZO0FOVauSv&amp;amp;list=PLEorccNy3CC5K18rl4JsxUYYIQ0WjywWF&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen&gt;&lt;/iframe&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTEwMDg3NDgyMDBdfQ==&#xA;--&gt;</description>
			</item>
			<item>
				<title>TIM-011 gets a unit test library</title>
				<link>https://www.hdlfactory.com/post/2023/12/24/tim-011-gets-a-unit-test-library/</link>
				<pubDate>Sun, 24 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/24/tim-011-gets-a-unit-test-library/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hdlfactory.com/post/2023/12/03/tim-011-computer-how-we-did-things-back-then/&#34;&gt;TIM-011&lt;/a&gt; was an 8-bit teaching computer that was ostensibly developed by &lt;a href=&#34;https://www.pupin.rs/en/home/&#34;&gt;IMP&lt;/a&gt; in what is now &lt;a href=&#34;https://en.wikipedia.org/wiki/Serbia&#34;&gt;Serbia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It is hard to develop for any machine without a way to test quickly whether your work results in something usable. Since it takes quite a while to spin up a TIM-011 emulator and run things on it, it was not going to be practical to wait for all the slow machinery to get spun up.&lt;/p&gt;</description>
			</item>
			<item>
				<title>bazoekt: easy code indexing and search for your Bazel projects</title>
				<link>https://www.hdlfactory.com/post/2023/12/17/bazoekt-easy-code-indexing-and-search-for-your-bazel-projects/</link>
				<pubDate>Sun, 17 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/17/bazoekt-easy-code-indexing-and-search-for-your-bazel-projects/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update 2026-04-17&lt;/strong&gt;: Bazoekt has been modernized and revived. Sourcegraph has taken over maintenance of &lt;code&gt;zoekt&lt;/code&gt;, but what they actually did was disable the old repo and dismantle the &lt;code&gt;zoekt&lt;/code&gt; infrastructure, so it couldn&amp;rsquo;t be compiled. I took over the old version of &lt;code&gt;zoekt&lt;/code&gt;, spruced it up so that it builds again, and put it up at &lt;a href=&#34;https://github.com/filmil/zoekt&#34;&gt;https://github.com/filmil/zoekt&lt;/a&gt;. Then revived &lt;code&gt;bazoekt&lt;/code&gt; on top of that, see it at: &lt;a href=&#34;https://github.com/filmil/bazoekt&#34;&gt;https://github.com/filmil/bazoekt&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;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 enough, and something more is needed.&lt;/p&gt;</description>
			</item>
			<item>
				<title>bazel: excavating an unknown file from a `foreign_cc` rule</title>
				<link>https://www.hdlfactory.com/post/2023/12/14/bazel-excavating-an-unknown-file-from-a-foreign_cc-rule/</link>
				<pubDate>Thu, 14 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/14/bazel-excavating-an-unknown-file-from-a-foreign_cc-rule/</guid>
				<description>&lt;h1 id=&#34;excavating-an-unknown-file-from-a-foreign_cc-rule&#34;&gt;Excavating an unknown file from a &lt;code&gt;foreign_cc&lt;/code&gt; rule&lt;/h1&gt;&#xA;&lt;p&gt;I discovered this trick recently, while trying (and mostly failing) to build a library.&lt;/p&gt;&#xA;&lt;p&gt;I discovered that it is possible to excavate an arbitrary file from the resulting directory by using the &lt;code&gt;gen_dir&lt;/code&gt; file group, then copying out the needed file using &lt;code&gt;genrule&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Entire &lt;code&gt;BUILD.bazel&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;load(&amp;#34;@rules_foreign_cc//foreign_cc:defs.bzl&amp;#34;, &amp;#34;make&amp;#34;)&#xA;filegroup(&#xA;    name = &amp;#34;all_files&amp;#34;,&#xA;    srcs = glob([&amp;#34;**&amp;#34;]),&#xA;)&#xA;make(&#xA;  name = &amp;#34;lib&amp;#34;,&#xA;  targets = [&#xA;&#x9;&#x9;&amp;#34; -C $BUILD_TMPDIR&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; BIN_DIR=$$INSTALLDIR$$/lib&amp;#34; +&#xA;        &amp;#34; ROOT=$BUILD_TMPDIR&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; EXT_BUILD_ROOT=$EXT_BUILD_ROOT&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; CC=$EXT_BUILD_ROOT/$SDCC&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; AS=$EXT_BUILD_ROOT/$SDAS&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; AR=$EXT_BUILD_ROOT/$SDAR&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; CPP=$EXT_BUILD_ROOT/$SDCPP&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; LD=$EXT_BUILD_ROOT/$SDLD&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; ISET=-mz180&amp;#34; +&#xA;&#x9;&#x9;&amp;#34; all&amp;#34;,&#xA;  ],&#xA;  env = {&#xA;    &amp;#34;CFLAGS&amp;#34;: &amp;#34;&amp;#34;,&#xA;    &amp;#34;CXXFLAGS&amp;#34;: &amp;#34;&amp;#34;,&#xA;    &amp;#34;AR_FLAGS&amp;#34;: &amp;#34;&amp;#34;,&#xA;    &amp;#34;ARFLAGS&amp;#34;: &amp;#34;&amp;#34;,&#xA;    &amp;#34;LDFLAGS&amp;#34;: &amp;#34;&amp;#34;,&#xA;&#x9;&amp;#34;SDCC&amp;#34;: &amp;#34;$(location @sdcc-linux//:sdcc)&amp;#34;,&#xA;&#x9;&amp;#34;SDAS&amp;#34;: &amp;#34;$(location @sdcc-linux//:sdas)&amp;#34;,&#xA;&#x9;&amp;#34;SDAR&amp;#34;: &amp;#34;$(location @sdcc-linux//:sdar)&amp;#34;,&#xA;&#x9;&amp;#34;SDCPP&amp;#34;: &amp;#34;$(location @sdcc-linux//:sdcpp)&amp;#34;,&#xA;&#x9;&amp;#34;SDLD&amp;#34;: &amp;#34;$(location @sdcc-linux//:sdld)&amp;#34;,&#xA;  },&#xA;  install_prefix = &amp;#34;_install&amp;#34;,&#xA;  lib_source = &amp;#34;:all_files&amp;#34;,&#xA;  out_static_libs = [ &#xA;&#x9;&#x9;  &amp;#34;libcpm3-z80.lib&amp;#34;,&#xA;&#x9;&#x9;  &amp;#34;libsdcc-z80.lib&amp;#34;,&#xA;  ],&#xA;  visibility = [&amp;#34;//visibility:public&amp;#34;],&#xA;  build_data = [&#xA;&#x9;&#x9;&amp;#34;@sdcc-linux//:sdar&amp;#34;,&#xA;&#x9;&#x9;&amp;#34;@sdcc-linux//:sdas&amp;#34;,&#xA;&#x9;&#x9;&amp;#34;@sdcc-linux//:sdcc&amp;#34;,&#xA;&#x9;&#x9;&amp;#34;@sdcc-linux//:sdcpp&amp;#34;,&#xA;&#x9;&#x9;&amp;#34;@sdcc-linux//:sdld&amp;#34;,&#xA;  ]&#xA;)&#xA;&#xA;# Excavates the entire resulting directory.&#xA;filegroup(&#xA;&#x9;name = &amp;#34;_crt0_priv&amp;#34;,&#xA;&#x9;srcs = [&amp;#34;:lib&amp;#34; ],&#xA;&#x9;# This is the main point. Then the genrule below&#xA;&#x9;output_group = &amp;#34;gen_dir&amp;#34;,&#xA;)&#xA;&#xA;# Excavate a single file by copying it out of the `gen_dir`:&#xA;genrule(&#xA;&#x9;name = &amp;#34;libcpm3&amp;#34;,&#xA;&#x9;srcs = [&amp;#34;:_crt0_priv&amp;#34; ],&#xA;&#x9;outs = [&amp;#34;libcpm3-z80.lib&amp;#34;],&#xA;&#x9;cmd = &amp;#34;cp $&amp;lt;/lib/libcpm3-z80.lib $@&amp;#34;,&#xA;&#x9;visibility = [&amp;#34;//visibility:public&amp;#34;],&#xA;)&#xA;&#xA;genrule(&#xA;&#x9;name = &amp;#34;libsdcc&amp;#34;,&#xA;&#x9;srcs = [&amp;#34;:_crt0_priv&amp;#34; ],&#xA;&#x9;outs = [&amp;#34;libsdcc-z80.lib&amp;#34;],&#xA;&#x9;cmd = &amp;#34;cp $&amp;lt;/lib/libsdcc-z80.lib $@&amp;#34;,&#xA;&#x9;visibility = [&amp;#34;//visibility:public&amp;#34;],&#xA;)&#xA;&#xA;genrule(&#xA;&#x9;&#x9;name = &amp;#34;crt0&amp;#34;,&#xA;&#x9;&#x9;srcs = [ &amp;#34;:_crt0_priv&amp;#34;],&#xA;&#x9;&#x9;outs = [ &amp;#34;crt0cpm3-z80.rel&amp;#34;],&#xA;&#x9;&#x9;cmd = &amp;#34;cp $&amp;lt;/lib/crt0cpm3-z80.rel $@&amp;#34;,&#xA;&#x9;&#x9;visibility = [&amp;#34;//visibility:public&amp;#34;],&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbMjkwODUzODg2LDE0Mzg0MDE5MzZdfQ==&#xA;--&gt;</description>
			</item>
			<item>
				<title>TIM-011 gets a C runtime library</title>
				<link>https://www.hdlfactory.com/post/2023/12/13/tim-011-gets-a-c-runtime-library/</link>
				<pubDate>Wed, 13 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/13/tim-011-gets-a-c-runtime-library/</guid>
				<description>&lt;h1 id=&#34;tim-011-gets-a-c-runtime-library&#34;&gt;TIM-011 gets a C runtime library&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hdlfactory.com/post/2023/12/03/tim-011-computer-how-we-did-things-back-then/&#34;&gt;TIM-011&lt;/a&gt; was an 8-bit teaching computer that was ostensibly developed by &lt;a href=&#34;https://www.pupin.rs/en/home/&#34;&gt;IMP&lt;/a&gt; in what is now &lt;a href=&#34;https://en.wikipedia.org/wiki/Serbia&#34;&gt;Serbia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Now that &lt;a href=&#34;https://github.com/filmil/tim011-tools/issues/3&#34;&gt;https://github.com/filmil/tim011-tools/issues/3&lt;/a&gt; has been fixed, the TIM-011 tools compile and run with a real C runtime library, thanks to the &lt;a href=&#34;https://github.com/retro-vault/libcpm3-z80&#34;&gt;libcpm-z80&lt;/a&gt; library.&lt;/p&gt;&#xA;&lt;p&gt;It wasn&amp;rsquo;t easy to get it to compile with bazel, but after plenty of trial and error I managed to pinpoint the correct incantation. I also ended up with a &lt;a href=&#34;https://github.com/retro-vault/libcpm3-z80/pull/5&#34;&gt;pull request&lt;/a&gt; to &lt;code&gt;libcpm-z80&lt;/code&gt; which contains the generalizations needed to get it to compile under bazel.&lt;/p&gt;</description>
			</item>
			<item>
				<title>TIM-011 computer - how we did things back then</title>
				<link>https://www.hdlfactory.com/post/2023/12/03/tim-011-computer-how-we-did-things-back-then/</link>
				<pubDate>Sun, 03 Dec 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/12/03/tim-011-computer-how-we-did-things-back-then/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;I was a bit hard pressed to find all the proper work attribution. Please &lt;a href=&#34;mailto:f@hdlfactory.com&#34;&gt;let me know&lt;/a&gt; if you have data to contribute.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;tim-011&#34;&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/TIM-011&#34;&gt;TIM-011&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;TIM-011 was an 8-bit teaching computer that was ostensibly developed by &lt;a href=&#34;https://www.pupin.rs/en/home/&#34;&gt;IMP&lt;/a&gt; in what is now &lt;a href=&#34;https://en.wikipedia.org/wiki/Serbia&#34;&gt;Serbia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It was one of the machines that kick-started my career as a software engineer. For better or worse.&lt;/p&gt;&#xA;&lt;p&gt;There are precious few resource links for TIM-011, a machine that I personally hold in high regard because of its sentimental value to me. Which is why I set out to collect the resources about TIM-011 and try to preserve them as much as possible. I understand that about 50% of the software that was made available to the original TIM-011 was preserved. The rest was lost to time. It is still theoretically possible to port CP/M software to TIM-011 again (grease and elbows, people!), but the original software is lost.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Packaging AMD Xilinx Vivado ML Standard edition in a Docker container</title>
				<link>https://www.hdlfactory.com/post/2023/11/20/packaging-amd-xilinx-vivado-ml-standard-edition-in-a-docker-container/</link>
				<pubDate>Mon, 20 Nov 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/11/20/packaging-amd-xilinx-vivado-ml-standard-edition-in-a-docker-container/</guid>
				<description>&lt;p&gt;A while back I wanted to make a hermetic environment for repeatably running Docker tooling.&lt;/p&gt;&#xA;&lt;p&gt;The results are here:  &lt;a href=&#34;https://github.com/filmil/vivado-docker/&#34;&gt;https://github.com/filmil/vivado-docker/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;At this time, it&amp;rsquo;s only able to run the GUI version of the tool. I intend to make it run specific tools when they are needed.&lt;/p&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTEwNzE0NDczNjIsMTI2Mjg5NzA2OF19&#xA;--&gt;</description>
			</item>
			<item>
				<title>Neovim tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2023/09/18/neovim-tips-and-tricks/</link>
				<pubDate>Mon, 18 Sep 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/09/18/neovim-tips-and-tricks/</guid>
				<description>&lt;h1 id=&#34;from-vimscript-into-lua&#34;&gt;From VimScript into Lua&lt;/h1&gt;&#xA;&lt;p&gt;This is my cheat sheet for migrating VimScript into Lua. Things I often forget. There are places to learn about &lt;a href=&#34;https://neovim.io/doc/user/lua-guide.html#lua-guide&#34;&gt;Lua use in Neovim&lt;/a&gt; . 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.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: left&#34;&gt;VimScript&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: left&#34;&gt;Lua&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;:nmap abc :something&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;vim.keymap.add({&#39;n&#39;}, &#39;abc&#39;, &#39;:something)&lt;/code&gt;, &lt;code&gt;noremap&lt;/code&gt; will be with more in the first &lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;let g:session_autosave = &#39;yes&#39;&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;vim.g.session_autosave = &#39;yes&#39;&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;autocmd BufWrite *py :call DeleteTrailingWs()&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;vim.api.nvim_create_autocmd({&#39;BufWrite&#39;}, {pattern={&#39;*.py&#39;}, command = &amp;quot;:call DeleteTrailingWs()&amp;quot;})&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;let splitbelow = 1&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;vim.opt.splitbelow = true&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;(any vimscript commands)&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;vim.api.nvim_exec2([[ (any vimscript commands) ]])&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;&amp;quot; comment&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;-- comment&lt;/code&gt; (oh, well)&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;replacing-tabs-with-spaces&#34;&gt;Replacing tabs with spaces&lt;/h2&gt;&#xA;&lt;p&gt;I keep forgetting this: how to set tabstop at 4, and use spaces not tabs to space.&lt;/p&gt;</description>
			</item>
			<item>
				<title>`git` tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2023/08/05/git-tips-and-tricks/</link>
				<pubDate>Sat, 05 Aug 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/08/05/git-tips-and-tricks/</guid>
				<description>&lt;p&gt;Often needed little bits of &lt;code&gt;git&lt;/code&gt; knowledge that I tend to forget.&lt;/p&gt;&#xA;&lt;h1 id=&#34;check-out-the-contents-of-a-github-pr&#34;&gt;Check out the contents of a GitHub PR&lt;/h1&gt;&#xA;&lt;p&gt;From:  &lt;a href=&#34;https://devopscube.com/checkout-git-pull-request/&#34;&gt;https://devopscube.com/checkout-git-pull-request/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git fetch origin pull/15/head:test-branch&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will fetch the PR number 15 from GitHub, and have it available in the local branch &lt;code&gt;test-branch&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbLTEzOTkwNDQ0MThdfQ==&#xA;--&gt;</description>
			</item>
			<item>
				<title>`bazel` tips and tricks</title>
				<link>https://www.hdlfactory.com/post/2023/07/30/bazel-tips-and-tricks/</link>
				<pubDate>Sun, 30 Jul 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/07/30/bazel-tips-and-tricks/</guid>
				<description>&lt;p&gt;Often needed little bits of &lt;a href=&#34;https://bazel.build&#34;&gt;&lt;code&gt;bazel&lt;/code&gt;&lt;/a&gt; knowledge that I tend to forget.&lt;/p&gt;&#xA;&lt;h1 id=&#34;module-extensions&#34;&gt;Module extensions&lt;/h1&gt;&#xA;&lt;p&gt;Reminder about module extensions.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Also instead of `http.bzl`, `git.bzl` etc.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;http_file&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;use_repo_rule&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;@bazel_tools//tools/build_defs/repo:http.bzl&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http_file&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;http_file&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;data_file&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;url&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://example.com/file&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;sha256&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;print-errors-inline&#34;&gt;Print errors inline&lt;/h1&gt;&#xA;&lt;p&gt;By default bazel prints the path to error logs. In development it is often more useful to see the error printed right away.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bazel &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt; --test_output&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;errors //...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can add:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;test --test_output=errors&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;into your &lt;code&gt;$HOME/.bazelrc&lt;/code&gt; as well.&lt;/p&gt;&#xA;&lt;h1 id=&#34;print-only-errors&#34;&gt;Print only errors&lt;/h1&gt;&#xA;&lt;p&gt;By default bazel prints the status of passing tests. This causes bazel to print details about failing tests only.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Build a `python` web app in `bazel`</title>
				<link>https://www.hdlfactory.com/post/2023/07/25/build-a-python-web-app-in-bazel/</link>
				<pubDate>Tue, 25 Jul 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/07/25/build-a-python-web-app-in-bazel/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://github.com/filmil/bazel-experiments/tree/main/python&#34;&gt;Here&lt;/a&gt; is an example python Flask app built with Bazel.  See &lt;a href=&#34;https://github.com/filmil/bazel-experiments/blob/main/python/README.md&#34;&gt;README.md&lt;/a&gt; for instructions.&lt;/p&gt;&#xA;&lt;p&gt;Running the app will start a local dev server for Flask and you should be able to direct your browser at it and see the result.  Based on various bits and pieces from the internet on how to do this correctly.&lt;/p&gt;&#xA;&lt;p&gt;It uses a &lt;em&gt;hermetic&lt;/em&gt; python interpreter, which a great improvement for reproducibility over using the local python interpreter.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Tesla ownership experiences so far</title>
				<link>https://www.hdlfactory.com/post/2023/06/30/tesla-ownership-experiences-so-far/</link>
				<pubDate>Fri, 30 Jun 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/06/30/tesla-ownership-experiences-so-far/</guid>
				<description>&lt;p&gt;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.&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;re obnoxious Tesla owners, it is only fair that I bother you with some &lt;a href=&#34;https://docs.google.com/document/d/e/2PACX-1vSyn3y4vXLPAmsXwgWLAFO0pnYaXqrmqAItlXWJDOdp3k_HGxDEHf3Hr54cPbHcFG9jwJL2Ff3imEbG/pub&#34;&gt;Electric vehicle ownership experience&lt;/a&gt; writeup, for what we figured out so far.&lt;/p&gt;&#xA;&lt;!--stackedit_data:&#xA;eyJoaXN0b3J5IjpbMTU1NDY0NDY0Ml19&#xA;--&gt;</description>
			</item>
			<item>
				<title>Including arbitrary files into `cc_library` rule in `bazel`</title>
				<link>https://www.hdlfactory.com/post/2023/06/23/including-arbitrary-files-into-cc_library-rule-in-bazel/</link>
				<pubDate>Fri, 23 Jun 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/06/23/including-arbitrary-files-into-cc_library-rule-in-bazel/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update 2023-08-17&lt;/strong&gt;: This is now a feature in bazel, see &lt;a href=&#34;https://github.com/bazelbuild/bazel/issues/18766&#34;&gt;https://github.com/bazelbuild/bazel/issues/18766&lt;/a&gt; for details.&#xA;It is available starting bazel version 6.3.0. Use &lt;code&gt;additional_compiler_input&lt;/code&gt; parameter to &lt;code&gt;cc_library&lt;/code&gt; and&#xA;other C++ rules to provide arbitrary files.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Adapted from the &lt;a href=&#34;https://groups.google.com/g/bazel-discuss/c/XE57LP4keoc&#34;&gt;&lt;code&gt;bazel-discuss&lt;/code&gt; mailing list&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I have a cc_library.&lt;/p&gt;&#xA;&lt;p&gt;I want to set &amp;ldquo;-fsanitize-ignorelist&amp;rdquo; to point to a file in my repo.&lt;/p&gt;&#xA;&lt;p&gt;E.g., I have:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;foo.cc&#xA;BUILD.bazel&#xA;ignorelist.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and in BUILD.bazel:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cc_library(&#xA;  name = &amp;#34;foo&amp;#34;,&#xA;  copts = [&amp;#34;-fsanitize-ignorelist=&amp;#34; &amp;lt;TODO what goes here?&amp;gt;],&#xA;  srcs = [&amp;#34;foo.cpp&amp;#34;],&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I&amp;rsquo;ve tried setting ignorelist.txt as a data dependency, and then referring to it with&#xA;$(location), but that doesn&amp;rsquo;t work. I get:&#xA;clang: error: no such file or directory: &amp;lsquo;bazel-out/k8-fastbuild/ignorelist.txt&amp;rsquo;&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to use the `make` rule from `rules_foreign_cc` repository for `bazel`</title>
				<link>https://www.hdlfactory.com/post/2023/06/13/how-to-use-the-make-rule-from-rules_foreign_cc-repository-for-bazel/</link>
				<pubDate>Tue, 13 Jun 2023 00:00:00 +0000</pubDate>
				<guid>https://www.hdlfactory.com/post/2023/06/13/how-to-use-the-make-rule-from-rules_foreign_cc-repository-for-bazel/</guid>
				<description>&lt;h1 id=&#34;summary&#34;&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://bazel.build&#34;&gt;bazel&lt;/a&gt; build system has rules available to build C or C++ code from external repositories that use other more &amp;ldquo;conventional&amp;rdquo; build tools. By this I mean the usual suspects: &lt;a href=&#34;https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html&#34;&gt;GNU autotools&lt;/a&gt;, &lt;a href=&#34;https://www.gnu.org/software/make/&#34;&gt;GNU make&lt;/a&gt; and &lt;a href=&#34;https://cmake.org/&#34;&gt;cmake&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This rules repository is called &lt;a href=&#34;https://github.com/bazelbuild/rules_foreign_cc&#34;&gt;rules_foreign_cc&lt;/a&gt;. While it is somewhat &lt;a href=&#34;https://bazelbuild.github.io/rules_foreign_cc/&#34;&gt;documented&lt;/a&gt;, and even has &lt;a href=&#34;https://github.com/bazelbuild/rules_foreign_cc/tree/main/examples&#34;&gt;examples&lt;/a&gt;, both leave a lot to be desired.&lt;/p&gt;&#xA;&lt;p&gt;I think it would be really helpful to have at least some sort of a guide for &lt;em&gt;how&lt;/em&gt; exactly they work, so that we can use them more effectively. Such a guide, however, does not seem to exist. At least, I was not able to find one.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
