Skip to content

Tutorial

Litex

fjullien migen_litex_tutorials <-- Best Litex tutorial

officail litx wiki.

Litex MIPI CSI

ICEStorm Install icestorm_install.md

getting-started-with-litex

Chisel FPGA開発日記

https://msyksphinz.hatenablog.com/

https://www.hatena.ne.jp/

https://hatenablog.com/

Agile Hardware Design Video 2024

Chip Alliance

Chip Alliance

Amaranth

Amaranth HDL Document

Verilog

https://verilogguide.readthedocs.io/en/latest/

https://www.chipverify.com/

The Art of FPGA Design - element14 Community

The Art of FPGA Design - element14 Community

Digital Signal Processing, from Algorithm to FPGA Bitstream - element14 Community

Digital Signal Processing, from Algorithm to FPGA Bitstream

Linux and Programming

Linux Thread

Linuxとpthreadsによる マルチスレッドプログラミング入門|サポート|秀和システム Book Link

Linux Kernel Module Programming Guide

https://sysprog21.github.io/lkmpg/

Tutorial 1 https://linux-kernel-labs.github.io/refs/heads/master/#

SSH Turnnel

ssh -f -N -L 127.0.0.1:8888:127.0.0.1:8888 -i pemKey  user@ipaddress
For Jupyter notebook

PICO

PICO PIO Programming

PICO PIO Programming Youtube Video

PICO PIO Programming Youtube Video Github Code

Web Reference :

PICO PIO url

A Practical Look at PIO on the Raspberry Pi Pico URL

Introduction to the PIO (Programmable Input Output) of the RP2040

programmable-io-programming @ circuitcellar URL

RP2040 PICO DMA

RP2040 PICO DMA

RP2040 PICO DAC DMA

RP2040 LVGL

http://bbs.eeworld.com.cn/thread-1227666-1-1.html

RT-Thread and LVGL

Python

PySerial

PySerial Example Code pyserial_sample.md

Python FTDI for SPI

Python FTDI for SPI

from pyftdi.ftdi import Ftdi
Ftdi.show_devices()
from pyftdi.spi import SpiController

spi.configure('ftdi://ftdi:2232h:1:7b/1')
slave = spi.get_port(cs=1, freq=10E6, mode=2)
write_buf = b'\x01\x02\x03'
read_buf = slave.exchange(write_buf, duplex=True)

Virtual Enviroment

python3 -m venv virtkv
source ./virtkv/bin/activate

Pyenv

Other Solution https://python-poetry.org/

Micropython

Pyboard Sleep and Wakeup

lowpower.py

import pyb, stm
from pyb import Pin

    # wakeup callback
    wakeup = False
    def cb(exti):
        nonlocal wakeup
        wakeup = True

    # configure switch to generate interrupt on press
    sw = pyb.Switch()
    sw.callback(lambda:cb(0))

    # function to flash an LED
    def flash(led):
        led.on()
        pyb.delay(100)
        led.off()

    while True:
        # standby (need to exit by pressing RST, or wait 15s)
        if stm.mem32[stm.RTC + stm.RTC_BKP1R] == 0:
            flash(led1)
            stm.mem32[stm.RTC + stm.RTC_BKP1R] = 1
            rtc.wakeup(15000, cb)
            pyb.standby()
        else:
            stm.mem32[stm.RTC + stm.RTC_BKP1R] = 0

        # stop
        flash(led2)
        led_off()
        pyb.stop()
        led_on()

        # idle
        flash(led3)
        wakeup = False
        while not wakeup:
            pyb.wfi()

        # run
        flash(led4)
        wakeup = False
        while not wakeup:
            pass

Micropython pyBoard DAC use DMA

import math
from array import array
from pyb import DAC

# create a buffer containing a sine-wave, using half-word samples
buf = array('H', 2048 + int(2047 * math.sin(2 * math.pi * i / 128)) for i in range(128))

# output the sine-wave at 400Hz
dac = DAC(1, bits=12)
dac.write_timed(buf, 400 * len(buf), mode=DAC.CIRCULAR)

Micropython Debounce

import pyb

def wait_pin_change(pin):
    # wait for pin to change value
    # it needs to be stable for a continuous 20ms
    cur_value = pin.value()
    active = 0
    while active < 20:
        if pin.value() != cur_value:
            active += 1
        else:
            active = 0
        pyb.delay(1)

pin_x1 = pyb.Pin('X1', pyb.Pin.IN, pyb.Pin.PULL_DOWN)
while True:
    wait_pin_change(pin_x1)
    pyb.LED(4).toggle()

Micropython json

import ujson
parsed = ujson.loads("""{"name":"John"}""")
print(parsed)

Micropython USB UART Passthrough

import pyb
import select

def pass_through(usb, uart):
    usb.setinterrupt(-1)
    while True:
        select.select([usb, uart], [], [])
        if usb.any():
            uart.write(usb.read(256))
        if uart.any():
            usb.write(uart.read(256))

pass_through(pyb.USB_VCP(), pyb.UART(1, 9600, timeout=0))

Chromebook

Install Desktop GUI in chromebook chromebookDesktop.md

DSP

Wavelet

Wavelet_101

Neuro Science

Neuroscience exploration Video

Topological Data Analysis (TDA)

VSCode

VSCode and Docker