Stephen Smith's Blog

Musings on Machine Learning…

Archive for April 2024

LinuxFest Northwest 2024

with 2 comments

Introduction

LinuxFest Northwest is an annual gathering of open source enthusiasts held in Bellingham halfway between the major cities of Vancouver, BC and Seattle, Washington. Sadly, the last proper event was held in 2019, then during COVID they tried running a virtual event with limited success and then when COVID ended they were going to startup again, but there was a major structural calamity at the  Bellingham Technical College campus which caused it to close and LinuxFest to be canceled. Finally, this year, 2024, enough of the college is back open that the organizers were able to start the conference again. The main big building on the campus was still closed, but LinuxFest was able to spread across three of the smaller buildings to operate. It poured with rain for the entire conference which made people get quite wet when crossing between buildings.

This year I attended the conference both as an attendee and a speaker. 

Most of the presentations were recorded and are now available on LFNW’s YouTube channel.

RISC-V

There was a lot of interest in RISC-V, people are interested in getting hold of RISC-V development boards to play with. My session on RISC-V filled the room, so the monitors had to close the door when the fire department capacity was reached.

Judging from the questions, many in the audience have been playing with RISC-V already and getting quite far into it. Also nice to meet my readers as several people said they already have my RISC-V book.

Later, I chatted with the folks from Rocky Linux, who had a booth in the expo hall. They were given ten Starfive Visionfive 2s which they are going to use to set up a build farm to build native RISC-V versions of Rocky Linux. This is pretty cool, but they would really like beefier hardware, in that it will be quite slow to build everything from GCC, Linux, all the utilities and bundled programs to completion. But still nice to see more Linux distributions providing native RISC-V builds.

MiSTer

MiSTer was started as an Amiga/Atari ST hardware emulator using an Intel FPGA. Since then, the project has added hundreds of computer and gaming console hardware cores. Last time I blogged on my Tang Nano 25K and mentioned using it to emulate a SuperNES system. This is actually a port of just one MiSTer core over to the Gowin FPGA platform. There was a two hour talk/lab on MiSTer at the show presented by Scott Dowdle which showed real MiSTer hardware and he had three systems setup to play with.

It’s really amazing all the different computers that can be modeled on the FPGA along with all the classic software that can be run.

To run MiSTer properly, you need a Terasic DE10-Nano Kit along with a RAM add-in module. This board includes an ARM CPU along with an Intel Cyclone® V SE FPGA (110K LEs).

Ham Radio and Open Source

I attended Steve Stroh’s presentation on the parallels between the open source computer community and the amateur radio community. It was a good overview of all the things happening in amateur radio and how so much new radio technology is being developed by hobbyists in an open collaborative sharing manner.

Other Stuff

There were a lot of sessions and often multiple sessions I wanted to see were on at the same time. Now that I’m back home, I can spend some time watching the sessions I missed.

I did catch NextCloud’s session on AI, on how they are trying to do everything OpenAI and Microsoft are doing, but all running locally. Plus how to promote open source AI models so you know what you are running and have some control over it.

I attended Lomash Kumar’s presentation on IoT security. It is interesting on the extra security requirements on IoT due to the amount of communications and discovery between devices.

I attended Mumbling Hugo’s presentation on Linux gaming distributions. Hugo is actually quite a good speaker and not a mumbler. I think my main takeaway is that gaming distributions don’t add much and you may as well use a main line distribution.

Besides the sessions, there was the trade expo where quite a few vendors were present. The people manning the tables weren’t just sales people and were quite technical and interesting to talk to.

Thanks to System76 for sponsoring the hotdog bbq on Saturday. Always appreciate a free lunch, even if it means eating it in the pouring rain.

Summary

All in all, LinuxFest Northwest was well worth attending. I had a great time and learned a lot. Now I’m enthusiastic to attend SeaGL, the Seattle GNU/Linux conference coming up Nov. 8 and 9.

Written by smist08

April 30, 2024 at 1:26 pm

Posted in linux

Tagged with , , , ,

Meet the Sipeed Tang Primer 25K FPGA

with 2 comments

Introduction

Last year, I got interested in FPGAs and purchased a Digilent Basys3, which was lots of fun to play with, I even got a minimal RISC-V processor programmed. The Basys3 is their lower end board and doesn’t have any RAM, limiting what you can do, since it has to use logic elements such as flip-flops to fulfill this purpose. To go further, I saw I could get the Sipeed Tang Primer 25K, inexpensively, containing many more logic elements along with RAM. This board is based on the Gowin 25K Arora FPGA and as such means learning the Gowin development tools rather than the familiar AMD Xilinx Vivado tools. This blog post is a review and some of my experiences using this board, including going down the rabbit hole of FPGA retro gaming.

Initial Setup

I received the Tang Primer 25K FPGA gamer bundle, which included a pair of Playstation compatible controllers that attach to a PMOD to connect to the board. However, this isn’t complete, you still require TFcard, HDMI and RAM PMODs which I needed to order separately. Would have been nice if the gaming bundle included everything required. Note that you need to use the Sipeed PMODs as others such as those from Digilent often are wired up differently. Ordering the collection, gives you a few other things to play with such as LED displays and pushbuttons.

The AMD Vivado development tools are really well documented with lots of tutorials and examples. Sipeed provides a wiki for their products and Gowin provides quite a bit of documentation, but the quality isn’t there and many of the instructions are incorrect. For instance, Sipeed says to use their special copy of the programmer to download programs to the FPGA rather than the Gowin one. However the special one didn’t work for me and I found the latest Gowin one was the correct one to use. It was nice that I could just download what I needed without requiring any interactions with Gowin, no export restrictions, since these are all Chinese companies.

FPGA Retro-Gaming

I previously looked at retro-gaming on the Raspberry Pi where people have written emulators for all sorts of processors and gaming systems. Now there is a new project MiSTer FPGA which emulates the hardware of various gaming consoles for FPGAs. I used the snestang fork which emulates the super-nintendo on various Sipeed Gowin based boards.

I didn’t have much luck initially, since I couldn’t load any games from the SDCard, but with some help from the developer, they made some changes to allow a bit more tolerance in accepting different cards. With that, I could load games, but had trouble starting them. Turns out you need to hit the start button first, hitting random buttons seems to disable the controller to the game.

Anyway, with that I could play games. The Verilog code that implements the Super Nintendo system implements a 65C816 cpu which is a 16-bit version of the 6502. This CPU was also used in Apple’s short-lived IIgs. Besides this CPU, it implements a RISC-V CPU that is used to provide the menu for system options and to choose the game to load, which it then loads from the SDCard. This gives you a basic RISC-V CPU with minimal firmware, HDMI support, SDCard support, controller support along with a menuing system.

This isn’t a bad starting point for playing with RISC-V hardware definitions. It gives you plenty of devices to play with, plus a debugging framework where you can print back to the host computer through the usb port, which can be read by putty.

Summary

The Tang Primer 25K is quite a powerful and capable FPGA at a reasonable price. You really need to get the pack of all the Sipeed PMODs so you have some devices to play with. I found it takes some patience to work with the Gowin tools and for me, with the 25K being fairly new, a lot of the documentation hasn’t kept up. You really rely on the samples to see how devices are connected, so you know how to map them in your program.

I think the FPGA approach to recreating vintage video game hardware is really cool. I just hope this doesn’t get stomped on by companies like Nintendo, who have a history of stepping on people’s fun.

Written by smist08

April 1, 2024 at 6:45 pm

Posted in fpga, RiscV

Tagged with , , , , ,