Skip to content

Instantly share code, notes, and snippets.


Carlos Eduardo carlosedp

View GitHub Profile
carlosedp / minio-template.yaml
Created Jul 28, 2022 OpenShift template
View minio-template.yaml
# To create a new Minio instance, you can use the following command:
# oc new-project minio
# oc new-app --namespace=minio -f minio-template.yaml -p MINIO_ROOT_USER=root -p MINIO_ROOT_PASSWORD=mysecret -p APPLICATION_DOMAIN=minio.$(oc get ingresses.config/cluster -o jsonpath={.spec.domain}) -p PV_SIZE=20Gi
apiVersion: v1
kind: Template
app: minio
template: minio
carlosedp / _mill
Last active Jul 19, 2022
Scala mill build tool Zsh completion script
View _mill
#compdef mill
# Install this file somewhere in your $FPATH (Zsh completion path)
# shellcheck disable=SC2207
# To enable debug, export in the shell the BASH_COMP_DEBUG_FILE variable to a file.
# Eg. BASH_COMP_DEBUG_FILE="/tmp/mill_debug.txt"
carlosedp /
Created Feb 15, 2022 — forked from rikka0w0/
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content:
carlosedp / Dockerfile
Last active Feb 17, 2022
Project X-Ray Edalize Backend and Launcher for Docker Containers
View Dockerfile
ARG PART = xc7k325tffg676-1
# Set this to the part you want to build for
# pass it thru the command line
# e.g. --build-arg PART=xc7k325tffg676-1
FROM python:3.5 as builder
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y sudo ca-certificates git build-essential wget cmake xz-utils python3-yaml libboost-all-dev qt5-default libqt5opengl5-dev libeigen3-dev --no-install-recommends
carlosedp /
Last active Apr 28, 2022
Symbiflow - Edalize workflow for Quicklogic FPGAs
  • FuseSoc/Edalize container workflow - Solved thru
    • 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
  • 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 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 /
Created Jan 17, 2022
Edalize Launcher script for Docker Contariner Wrapper
import os
import shutil
import subprocess
import sys
import logging
import shlex
logger = logging.getLogger(__name__)
symbiflow_init = 'bash -lec {}'
carlosedp /
Created Dec 22, 2021
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 2048
View gist:c654082ac7b78ea320c6113e048648b6
carlosedp / gtkwave.tcl
Last active Oct 7, 2021
GTKWave TCL script to colorize and group signals for Chisel projects
View gtkwave.tcl
# 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
View Blinky.vcd
$timescale 1ns $end