Skip to content

Instantly share code, notes, and snippets.

View carlosedp's full-sized avatar

Carlos Eduardo carlosedp

View GitHub Profile
@carlosedp
carlosedp / readme.md
Last active April 28, 2022 21:49
Symbiflow - Edalize workflow for Quicklogic FPGAs
  • FuseSoc/Edalize container workflow - Solved thru https://gist.github.com/carlosedp/ac36e9052bfa23f84b2f42f1a05ee1bd
    • How to identify in the Edalize launcher script which container family to use (Eg. Symbiflow for xc7 or eos) since it only receives the command being called (symbiflow_synth, symbiflow_pack, etc...)? Maybe pass some environment variable?
    • The variable should match the naming from https://hdl.github.io/containers/
  • Symbiflow containers are only initialized thru profile.d so it requires running the commands thry bash unlike Trellis/Icestorm which the tools are already in the path.
    • Use a container Initialization before each tool (bash -lec). Would be easier if image already had path initialized since we need subprocess.call in shell mode which is insecure due to wrap command in commas.
    • Ref. hdl/containers#49
  • EOS scripts symbiflow_write_bitheader / symbiflow_write_bitstream are still using env vars so won't work
@carlosedp
carlosedp / el_docker.sh
Created January 17, 2022 21:20
Edalize Launcher script for Docker Contariner Wrapper
#!/usr/bin/python3
import os
import shutil
import subprocess
import sys
import logging
import shlex
logger = logging.getLogger(__name__)
symbiflow_init = 'bash -lec {}'
@carlosedp
carlosedp / readme.md
Created December 22, 2021 20:54
Generate certificates

Generate certificates and keys with SAN

# Generate rootCA key and certificate
openssl genrsa -out rootCA.key 4096
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt

# Generate certificate key
openssl genrsa -out mydomain.com.key 2048
https://edotor.net/?engine=dot#digraph%20%22Toplevel%22%20%7B%0Alabel%3D%22Toplevel%22%3B%0Arankdir%3D%22LR%22%3B%0Aremincross%3Dtrue%3B%0An1%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_in1_MULT18X18D_A0_P0%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An2%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_out_MULT18X18D_P0_P18_CCU2C_A0_COUT%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An3%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_out_MULT18X18D_P0_P18_CCU2C_A0_5_COUT%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An4%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_in1_MULT18X18D_A0_1_P18%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An5%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_out_CCU2C_S0_B0%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An6%20%5B%20shape%3Ddiamond%2C%20label%3D%22io_in1_MULT18X18D_A0_1_P32%22%2C%20color%3D%22black%22%2C%20fontcolor%3D%22black%22%20%5D%3B%0An7%20%5B%20shape%3Ddiamond%2C%20label%3D%2
@carlosedp
carlosedp / gtkwave.tcl
Last active November 9, 2024 19:56
GTKWave TCL script to colorize and group signals for Chisel projects
#
# GTKWave Grouping and colorizing script
#
# Load the trace with `gtkwave -S gtkwave.tcl yourtrace.vcd`
#
# Customize the inserted traces in the TOPlevel section below
# and at the bottom in the add_signals function calls
#
# Customize this section as needed
@carlosedp
carlosedp / Blinky.vcd
Created August 12, 2021 20:12
Blinky VCD
$date
2021-06-29T19:15+0000
$end
$version
0.2
$end
$comment
$end
$timescale 1ns $end
@carlosedp
carlosedp / Dockerfile.symbiflow
Last active April 17, 2023 06:56
Symbiflow Docker image
FROM continuumio/miniconda
ENV INSTALL_DIR="/opt/symbiflow"
ENV FPGA_FAM=xc7
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y ca-certificates git build-essential wget cmake xz-utils --no-install-recommends
@carlosedp
carlosedp / runme.py
Last active June 12, 2024 18:47
FuseSoc launcher wrapper for containerized commands
#!/usr/bin/python3
import os
import shutil
import subprocess
import sys
import logging
import shlex
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("EdalizeLauncher")
@carlosedp
carlosedp / build_toolchain.sh
Last active November 19, 2020 15:31
PS3 SPU Toolchain Build
#!/usr/bin/env bash
set -euxo pipefail
CURRPATH=$(pwd)
DEST_PATH=${HOME}/x-toolchain/spu
BINUTILS_VER=2.33.1
GCC_VER=9.3.0
NEWLIB_VER=2.5.0.20170519
@carlosedp
carlosedp / Boot-esxi-rk3399.md
Last active October 14, 2020 20:28
RK3399 ESXi Tests

RK3399 ESXi Tests

Some tests trying to boot ESXi for ARM on RK3399 board (RockPro64).

Followed the build process for the RK3399 UEFI on a Debian Linux host

Make sure the shell is bash. Doesn't work on zsh (learned the hard way).

apt-get install -y build-essential acpica-tools nasm uuid-dev gcc-aarch64-linux-gnu parted dosfstools