Skip to content

Instantly share code, notes, and snippets.

View motchy869's full-sized avatar
🤔

motchy motchy869

🤔
View GitHub Profile
@motchy869
motchy869 / my_favorite_bashrc_for_PetaLinux.sh
Last active May 16, 2024 13:21
My favorite .bashrc for PetaLinux
# ~/.bashrc: executed by bash(1) for non-login shells.
export PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ \[\]'
umask 022
HISTCONTROL=ignoreboth
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval `dircolors`
@motchy869
motchy869 / _my_yosys_trial.md
Last active March 8, 2024 12:23
yosys_trial

my yosys trial

yosys を試したときのファイル一式。

1. Installing yosys

yosys の Release から最新版を DL し、make, sudo make install する。 make-j<n> オプションが使えるが、<n> を省略すると RAM の限界を超えるスレッド数でコンパイルが走り、失敗する(kill される)ので注意。

2. Read SystemVerilog code

@motchy869
motchy869 / KaTeX_macros.md
Last active June 1, 2024 06:02
My KaTeX macros
$\global\def\realNumbers{\mathbb{R}}$
$\global\def\complexNumbers{\mathbb{C}}$
$\global\def\parens#1{\left(#1\right)}$
$\global\def\bracks#1{\left[#1\right]}$
$\global\def\braces#1{\left\{#1\right\}}$
$\global\def\abs#1{\left|#1\right|}$
$\global\def\tr#1{\mathrm{tr}\parens{#1}}$
$\global\def\transpose#1{{#1}^\top}$
$\global\def\conj#1{\overline{#1}}$
@motchy869
motchy869 / Vitis_IDE_preferences.epf
Created May 10, 2023 14:14
Vitis IDE preference
#Wed May 10 23:13:47 JST 2023
\!/=
/instance/org.eclipse.cdt.ui/class_member_ascending_visibility_order=false
/instance/org.eclipse.cdt.ui/content_assist_proposals_timeout=5000
/instance/org.eclipse.cdt.ui/formatter_profile=org.eclipse.cdt.ui.default.kandr_profile
/instance/org.eclipse.cdt.ui/hoverModifierMasks=org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.debug.internal.ui.editors.DebugTextHover;0;org.eclipse.cdt.ui.ProblemHover;0;org.eclipse.cdt.ui.CDocHover;0;org.eclipse.cdt.ui.CMacroExpansionHover;0;org.eclipse.cdt.ui.CSourceHover;131072;org.eclipse.cdt.ui.AnnotationHover;0;
/instance/org.eclipse.cdt.ui/hoverModifiers=org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.debug.internal.ui.editors.DebugTextHover;\!0;org.eclipse.cdt.ui.ProblemHover;\!0;org.eclipse.cdt.ui.CDocHover;\!0;org.eclipse.cdt.ui.CMacroExpansionHover;\!0;org.eclipse.cdt.ui.CSourceHover;Shift;org.eclipse.cdt.ui.AnnotationHover;\!0;
/instance/org.eclipse.cdt.ui/includeStyle.external=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<styl
@motchy869
motchy869 / Tricks_in_SymbolicNumericalIntegration_package.ipynb
Last active April 20, 2023 15:42
Tricks in SymbolicNumericalIntegration package
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@motchy869
motchy869 / approxDeriv.m
Created October 31, 2022 03:00
Approximate derivative operator in transfer function (tf) object
function sys_out = approxDeriv(sys_in, c)
% approxDeriv Replace `s` in tf object with `s/(c*s+1)` where `0 < c < 1`.
% Applying this operation, a non-proper transfer function can be
% approximated by a proper one.
%
% sys_out = approxDeriv(sys_in, c)
%
% ## Inputs
%
% sys_in: original tf object
@motchy869
motchy869 / LDL-decomposition_rank-one_update.ipynb
Created August 29, 2022 09:26
rank-one update for Cholesky decomposition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@motchy869
motchy869 / Cholesky-decomposition_rank-one_update.ipynb
Created August 26, 2022 03:48
rank-one update for Cholesky decomposition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@motchy869
motchy869 / codespaces_bashrc.sh
Created June 21, 2022 01:47
my `.bashrc` for GitHub codespaces
# Set timezone.
export TZ=Asia/Tokyo
# auto completion from history
# up-allow key
bind '"\e[A": history-search-backward'
# down-allow key
bind '"\e[B": history-search-forward'
@motchy869
motchy869 / save_simple_struct_as_HDF5.ipynb
Created June 18, 2022 15:24
Save simple struct into HDF5 file, and load from, automatically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.