Skip to content

Instantly share code, notes, and snippets.

@the6p4c
the6p4c / top.v
Created October 1, 2019 13:08
a dodgy uart, without the r
`default_nettype none
module top(input CLK, output PIN_24);
wire tx_buf_empty;
reg tx_data_ready;
reg [7:0] tx_data;
uart_tx #(
.BAUD_DIVISOR(16000000 / 115200)
) uart_tx_inst (
import sys
def main():
input_file = sys.argv[1]
output_file = sys.argv[2]
with open(input_file, 'rb') as f_in, open(output_file, 'wb') as f_out:
decompressed_length = int.from_bytes(f_in.read(4), 'little')
bytes_written = 0
@the6p4c
the6p4c / cursed.c
Created August 27, 2020 02:23
hey! don't do this!
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/io.h>
#include <sys/mman.h>
#include "elf.h"
from enum import Enum
from nmigen import *
from nmigen.asserts import *
from nmigen.sim import pysim
class Opcodes(Enum):
NOPO = 0x0
LD = 0x1
LDC = 0x2
AND = 0x3
@the6p4c
the6p4c / README.md
Last active April 16, 2024 02:46
Install instructions for customised Vivado AUR package

You don't actually have to download the entire (now over 100 GiB) unified installer.

The self-extracting web installer (~300 MiB) can create a customised bundle identical to the unified installer - thus only downloading the components you require. Here's what I did to install Vivado and support for Artix 7 only, so no guarantees that this works in general. Keep in mind that version numbers and dates may have changed.

  1. Download the “AMD Unified Installer for FPGAs & Adaptive SoCs 2023.2: Linux Self Extracting Web Installer”
    • This is a binary with a name like FPGAs_AdaptiveSoCs_Unified_2023.2_1013_2256_Lin64.bin
  2. Create the archive
    1. Run the installer (chmod +x the binary and launch it from a shell)
      • Flags to the installer binary must be provider after -- so as to not pass them to the makeself wrapper
  • Passing the --xdebug flag to the installer