<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Riscv on Ampsand</title>
		<link>https://dean.sellers.id.au/tags/riscv/</link>
		<description>Recent content in Riscv on Ampsand</description>
		<generator>Hugo</generator>
		<language>en-AU</language>
		
		
		
			<copyright>Dean Sellers</copyright>
		
		
			<lastBuildDate>Thu, 29 Oct 2026 12:04:08 +1100</lastBuildDate>
		
			<atom:link href="https://dean.sellers.id.au/tags/riscv/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>RISC-V soft core 14: Measuring the board</title>
				<link>https://dean.sellers.id.au/2026/10/27/riscv-14-measuring-the-board/</link>
				<pubDate>Tue, 27 Oct 2026 14:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/27/riscv-14-measuring-the-board/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Measuring the board&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 14 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/23/riscv-13-the-board-arrives/&#34;&gt;The board arrives&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Part 13 ended with a list of things only the board can tell me. This part is the list I could get to: a scope on three signals, and a lot of bytes down the serial port. This might be the first part with no surprises, or a bunch of &lt;em&gt;that&amp;rsquo;s what I thought&lt;/em&gt; bits.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll say up front what is &lt;em&gt;not&lt;/em&gt; here. I haven&amp;rsquo;t shown that the core meets 25 MHz on every path, and I haven&amp;rsquo;t looked at button bounce or the 7-segment flicker. Those are still to do, and maybe I will. This isn&amp;rsquo;t going to production, and with the signals I scoped and the serial soaks behind me I am fairly confident that what is supposed to happen is happening. As we know though &amp;hellip; there are always edges.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 13: The board arrives</title>
				<link>https://dean.sellers.id.au/2026/10/23/riscv-13-the-board-arrives/</link>
				<pubDate>Fri, 23 Oct 2026 14:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/23/riscv-13-the-board-arrives/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;The board arrives&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 13 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-12-larson-again/&#34;&gt;The scanner, third time&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Twelve parts, and not one of them ran on a physical board. &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-11-where-it-breaks/&#34;&gt;It has been said outright&lt;/a&gt;. The design had been built, placed, timing-checked and simulated three different ways, and never switched on. This part is the switching on. It did not go the way the simulators said it would, and the answer my friend was both software and hardware, perhaps the &lt;em&gt;greyware&lt;/em&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 12: The scanner, third time</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-12-larson-again/</link>
				<pubDate>Mon, 19 Oct 2026 01:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-12-larson-again/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;The scanner, third time&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 12 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-11-where-it-breaks/&#34;&gt;Where it breaks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Larson scanner has been the series&amp;rsquo; test program from the start, and this is its third appearance.&lt;/p&gt;&#xA;&lt;p&gt;In &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-01-a-cpu-you-can-watch/&#34;&gt;part 1&lt;/a&gt; it was the blinkenlights: eight LEDs, one bit shifted along in assembly, and the only thing worth looking at was the CPU going FETCH, EXECUTE, FETCH. In &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-06-time-and-interrupts/&#34;&gt;parts 6&lt;/a&gt; and &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-08-sleeping/&#34;&gt;8&lt;/a&gt; it climbed the timing ladder: a delay loop, a polled deadline, then a timer interrupt with the CPU asleep in &lt;code&gt;wfi&lt;/code&gt; between steps. The CPU stopped being the busy part.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 11: Where it breaks</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-11-where-it-breaks/</link>
				<pubDate>Mon, 19 Oct 2026 00:45:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-11-where-it-breaks/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Where it breaks&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 11 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-10-what-does-a-multiply-cost/&#34;&gt;What does a multiply cost?&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The point of this project was never only to build a CPU. It was to build one, make it run real code, and &lt;strong&gt;find out where it breaks&lt;/strong&gt;. This post is that list. Some of the edges are bugs I found, and each of those has a story about how. Some are limits of the design, and they say what to build next. And one of them is bigger than all the others, and I will start there.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 10: What does a multiply cost?</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-10-what-does-a-multiply-cost/</link>
				<pubDate>Mon, 19 Oct 2026 00:40:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-10-what-does-a-multiply-cost/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;What does a multiply cost?&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 10 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-09-first-c/&#34;&gt;First C on the core&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The first C program had a line in it that looks harmless: &lt;code&gt;a * b&lt;/code&gt;. On a modern laptop that is one instruction and a few clock cycles. On this core there is no instruction for it. The core is RV32E with &lt;strong&gt;no M extension&lt;/strong&gt;, so no &lt;code&gt;mul&lt;/code&gt;, no &lt;code&gt;div&lt;/code&gt; and no &lt;code&gt;rem&lt;/code&gt;. The compiler turns each &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;%&lt;/code&gt; into a call to a library routine, a loop of shifts and adds that runs as ordinary code.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 9: First C on the core</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-09-first-c/</link>
				<pubDate>Mon, 19 Oct 2026 00:35:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-09-first-c/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;First C on the core&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 9 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-08-sleeping/&#34;&gt;Sleeping, and measuring it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Back in &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-00-why-not-mano/&#34;&gt;part 0&lt;/a&gt; I said the reason for choosing RISC-V over a machine of my own design was that the compiler already exists. It was a promise I had not yet kept. Everything the core had run so far was assembly I wrote or generated for the tests.&lt;/p&gt;&#xA;&lt;p&gt;This post is the first time a compiler&amp;rsquo;s output ran on it. It is also where the thing I built stops being a toy and starts being something you could write programs for.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 8: Sleeping, and measuring it</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-08-sleeping/</link>
				<pubDate>Mon, 19 Oct 2026 00:30:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-08-sleeping/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Sleeping, and measuring it&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 8 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-07-one-clock/&#34;&gt;One clock&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;What should a processor do when it has nothing to do? The honest answer from the timing ladder in part 6 was: &lt;em&gt;burn every clock&lt;/em&gt;. The final rung of that ladder sat in a loop of &lt;code&gt;wfi&lt;/code&gt; and a jump back, and &lt;code&gt;wfi&lt;/code&gt; was a no-op, so the CPU spun at full speed waiting for a timer that was not due.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 7: One clock</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-07-one-clock/</link>
				<pubDate>Mon, 19 Oct 2026 00:20:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-07-one-clock/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;One clock, and why slow mode cannot do real time&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 7 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-06-time-and-interrupts/&#34;&gt;Time and interrupts&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;For most of this project the core had two clocks. There was the board&amp;rsquo;s fast oscillator, which ran the UART, the display and the debouncers, and there was the &lt;em&gt;CPU clock&lt;/em&gt;, which the front panel made by dividing the fast one and which it could stop, start and single step.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 6: Time and interrupts</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-06-time-and-interrupts/</link>
				<pubDate>Mon, 19 Oct 2026 00:15:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-06-time-and-interrupts/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Time and interrupts: a timer, some buttons, and the press that got lost&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 6 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-05-when-it-goes-wrong/&#34;&gt;When it goes wrong on purpose&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;A trap is the program&amp;rsquo;s own fault. An &lt;strong&gt;interrupt&lt;/strong&gt; is the outside world getting the processor&amp;rsquo;s attention, and the outside world does not wait for a convenient moment. It is the same mechanism with a different cause: the core stops what it is doing, remembers where it was, runs a handler, and goes back.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 5: When it goes wrong on purpose</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-05-when-it-goes-wrong/</link>
				<pubDate>Mon, 19 Oct 2026 00:10:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-05-when-it-goes-wrong/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;When it goes wrong on purpose: traps&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 5 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/19/riscv-04-talking-to-the-world/&#34;&gt;Talking to the world&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Up to now, if the core was handed an instruction it did not understand, it treated it as a &lt;code&gt;nop&lt;/code&gt; and carried on. That is the worst possible answer. A program that goes wrong should &lt;em&gt;stop and say so&lt;/em&gt;, and the rest of the machine should be able to decide what to do about it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 4: Talking to the world</title>
				<link>https://dean.sellers.id.au/2026/10/19/riscv-04-talking-to-the-world/</link>
				<pubDate>Mon, 19 Oct 2026 00:05:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/19/riscv-04-talking-to-the-world/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Talking to the world: loads, stores and a boot menu&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 4 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-03-von-neumann-by-choice/&#34;&gt;Harvard by accident, von Neumann by choice&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So far the core can add, branch, load, store and light some LEDs. It cannot tell me anything. For that it needs a way to talk, and RISC-V gives you a surprisingly short answer about how: it has &lt;strong&gt;no input and output instructions at all&lt;/strong&gt;. There is no &lt;code&gt;IN&lt;/code&gt; and no &lt;code&gt;OUT&lt;/code&gt;, as on an x86. The way you reach a device is the way you reach memory, with a load or a store to a particular address.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 3: Harvard by accident, von Neumann by choice</title>
				<link>https://dean.sellers.id.au/2026/10/18/riscv-03-von-neumann-by-choice/</link>
				<pubDate>Sun, 18 Oct 2026 19:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/18/riscv-03-von-neumann-by-choice/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Harvard by accident, von Neumann by choice, and a store that runs the old word once&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 3 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-02-tests-that-can-fail/&#34;&gt;Tests that can fail&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I was reading the memory map when I asked a question that sounds too simple to matter: &lt;em&gt;so the map contains no ROM?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;It did not. The map described the data side of the core, a block of RAM and a UART. The program lived somewhere else entirely, in a ROM on its own bus, addressed by the program counter. Loads and stores could not reach it. Instruction address 0 was a different place from data address 0.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 2: Tests that can fail</title>
				<link>https://dean.sellers.id.au/2026/10/18/riscv-02-tests-that-can-fail/</link>
				<pubDate>Sun, 18 Oct 2026 18:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/18/riscv-02-tests-that-can-fail/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Tests that can fail, and a RAM that was never there&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 2 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-01-a-cpu-you-can-watch/&#34;&gt;A CPU you can watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;A light that sweeps along a row of LEDs is a nice demo and a poor proof. It tells me that a handful of instructions work in one order. It says nothing about all the others, or about the edges of the ones I used. If this core is going to run real code I need to be able to trust it, and I need to know &lt;em&gt;how much&lt;/em&gt; I can trust it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 1: A CPU you can watch</title>
				<link>https://dean.sellers.id.au/2026/10/18/riscv-01-a-cpu-you-can-watch/</link>
				<pubDate>Sun, 18 Oct 2026 16:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/18/riscv-01-a-cpu-you-can-watch/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;A CPU you can watch, and a double beat that was not a pipeline&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 1 of the RISC-V soft core series. Previously: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-00-why-not-mano/&#34;&gt;Firmware&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Last time I said I wanted a processor I could watch think. This time we get one, from a blank page to a light that sweeps back and forth along a row of LEDs. The code below is from the first commit of the project. It has grown a lot since, but the shape is the same.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RISC-V soft core 0: Firmware</title>
				<link>https://dean.sellers.id.au/2026/10/18/riscv-00-why-not-mano/</link>
				<pubDate>Sun, 18 Oct 2026 14:00:00 +1100</pubDate>
				<guid>https://dean.sellers.id.au/2026/10/18/riscv-00-why-not-mano/</guid>
				<description>&lt;p class=&#34;post-subtitle&#34;&gt;Firmware, &amp;ldquo;You keep using that word. I do not think it means what you think it means&amp;rdquo;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Part 0 of a series on building a RISC-V processor from scratch on an FPGA. Next: &lt;a href=&#34;https://dean.sellers.id.au/2026/10/18/riscv-01-a-cpu-you-can-watch/&#34;&gt;a CPU you can watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;My job title has the word &lt;em&gt;firmware&lt;/em&gt; in it, and so do most of the job ads I see that look like mine. If you read those ads, what they want is C and C++ on a microcontroller or a small microprocessor: bring up the board, write the drivers, talk to the peripherals, make it not fall over in the field. Additionally some RTOS, embedded Linux and build system expertise.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
