Skip to content

Instantly share code, notes, and snippets.

@esynr3z
esynr3z / .gitconfig
Last active January 8, 2021 09:01
My Git aliases
[alias]
a = add
b = branch
s = status --short
c = commit -m
d = diff
co = checkout
dc = diff --cached
dw = diff --word-diff
ds = diff --stat
@esynr3z
esynr3z / eeschema
Last active September 25, 2018 19:29
My KiCad settings
Place this section to /home/${USERNAME}/.config/kicad/eeschema
Color4DWireEx=rgb(120, 170, 214)
Color4DBusEx=rgb(167, 210, 168)
Color4DConnEx=rgb(120, 170, 214)
Color4DLLabelEx=rgb(120, 170, 214)
Color4DHLabelEx=rgb(132, 132, 0)
Color4DGLabelEx=rgb(213, 213, 213)
Color4DPinNumEx=rgb(213, 213, 213)
Color4DPinNameEx=rgb(213, 213, 213)
@esynr3z
esynr3z / .clang-format
Created August 10, 2018 16:47
Clang-format settings
BasedOnStyle: WebKit
AlignAfterOpenBracket: true
AlignOperands: true
AlignTrailingComments: true
BreakBeforeBinaryOperators: None
@esynr3z
esynr3z / e73-tbm-01_sch.md
Last active May 25, 2021 11:14
Test board E73-TBM-01

Can't find EBYTE test board E73-TBM-01 V1.0 schematic, so figured out connections by myself:

NRF52832 E73-2G4M04S1B Connected to
P0.05 21 CH340G CTS
P0.06 22 CH340G RX
P0.07 23 CH340G RTS
P0.08 24 CH340G TX
P0.13 29 SW2 (act. low)
P0.14 30 SW1 (act. low)
@esynr3z
esynr3z / stm32f0x_rtc_calib.py
Last active February 5, 2024 13:50
STM32 RTC calibration calculator
#!/usr/bin/env python3
'''
Script to calculate STM32F0x RTC calibration values based on a measured time variation.
All references to STM32 RM0091: 25.4.12 RTC smooth digital calibration
'''
from datetime import datetime
# set rtc ideal freq
@esynr3z
esynr3z / quartus_prime_lite_19.1_fedora29.md
Last active April 29, 2023 09:01
How to install Quartus Prime Lite 19.1 and ModelSim 10.5b on Fedora 29

Quartus Prime Lite 19.1 on Fedora 29 - installation guide

  1. Install Quartus and ModelSim - get the Combined Files tar archive from here

  2. Add Quartus bin dir to PATH, e.g. /space/eda/intelFPGA_lite/19.1/quartus/bin

  3. Add ModelSim bin dir to PATH, e.g. /space/eda/intelFPGA_lite/19.1/modelsim_ase/linuxaloem

  4. Install 32-bit ncurses for ModelSim

@esynr3z
esynr3z / jupyter_playground_setup.sh
Last active February 12, 2020 13:29
Script to setup Jupyter playground in virtual environment
#!/bin/bash
# Create virtual environment
virtualenv .venv
# Install Jupyter Notebook
.venv/bin/pip install jupyter notebook tornado\<6
# Install scientific packages
.venv/bin/pip install numpy scipy matplotlib
@esynr3z
esynr3z / run_tb.do
Last active April 18, 2024 00:54
Tcl script to run Modelsim simulation. Use "vsim -do run_tb.do" to start.
# Simply change the project settings in this section
# for each new project. There should be no need to
# modify the rest of the script.
set tb_name tb_top
set library_file_list [list \
work [list \
../../src/rtl/top.v \
../../src/tb/$tb_name.v] \
@esynr3z
esynr3z / !readme.md
Last active December 18, 2020 05:25
PEP8 Git Commit Hook

PEP8 Git Commit Hook

Based on pep8-git-hook.

Every staged Python file will be checked.

Installation:

  • Install the pycodestyle (formally called pep8) program: $ pip install pycodestyle
  • Save pre-commit as your_project/.git/hooks/pre-commit
@esynr3z
esynr3z / !readme.md
Last active March 1, 2021 14:12
Obfuscate Verilog/SystemVerilog code

Basics

Use Verible Code Obfuscator for obfuscation.

Obfuscate foo.v and save dictionary with all replacements:

verible-verilog-obfuscate --save_map obf.map < foo.v > foo_obf.v