Skip to content

Instantly share code, notes, and snippets.

@MasWag
MasWag / psudo-code.tex
Created October 26, 2015 04:00
sample of psudo code in latex
\documentclass{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\begin{document}
\begin{algorithm}
\caption{Calculate $y = x^n$}
\label{alg1}
\begin{algorithmic}
\REQUIRE $n \geq 0 \vee x \neq 0$
\ENSURE $y = x^n$
@MasWag
MasWag / setblightness
Created November 6, 2015 04:24
script to change blightness with fixed ratio
#!/bin/bash
# -*- sh -*-
xbacklight = $(echo $(xbacklight) $1 $2 | bc)
@MasWag
MasWag / .bashrc
Last active November 17, 2015 06:31
.bashrc of patchouli
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export EDITOR=emacsclient

今週の進捗とか

Zeptmeter

  • 生きた
  • DRAM controllerの動作確認の用意を進めた
  • SDRAM testerを作った
  • がtesterの動作確認がC++でもまだ
@MasWag
MasWag / PKGBUILD
Created November 27, 2015 03:47
PKGBUILD of open usp tukubai
pkgname=open-usp-tukubai
pkgver=2014061402
pkgrel=1
pkgdesc="An open source version of shell commands usp Tukubai."
arch=('any')
url="https://uec.usp-lab.com/TUKUBAI/CGI/TUKUBAI.CGI"
license=('MIT')
depends=('python')
source=("https://uec.usp-lab.com/TUKUBAI/DOWNLOAD/open-usp-tukubai-2014061402.tar.bz2")
pkgdir=/usr/
#!/bin/bash
if [[ "$1" = "" ]]; then
echo "usage : bash $0 [assembly-name]"
else
IFS=$'\n'
BAK="$1~"
PC=0
mv "$1" $BAK
for l in $(cat $BAK); do
@MasWag
MasWag / emit.awk
Last active November 28, 2015 00:22
#!/usr/bin/awk -f
BEGIN {
PC="0";
}
!/\.text|\.data|\.globl|\.long|:|^[\ \t]*#/{
$0 = $0" # "PC;
PC++;
};
{print};
28,29c28,29
< DATDIR?= ${TUKDIR}/devel
< MANDIR= ${DATDIR}/man
---
> DATDIR?= ${TUKDIR}
> MANDIR= ${LOCALBASE}/share/man
30,31c30,31
< HTMDIR= ${DATDIR}/html
< PDFDIR= ${DATDIR}/pdf
---

今週の進捗とか

Zeptmeter

  • SDRAM-testerを作った
    • dummy moduleではtesterが動いた
  • zept refreshが正しく動いているかどうかを確認できるテストなのだろうか
  • refreshがないと一周の時間すらデータが保たない?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[auto]
\node [circle,fill=red] (pl) {pipeline};
\node [above right=of pl,rectangle,fill=cyan] (ic) {icache};
\node [below right=of pl,rectangle,fill=cyan] (dc) {dcache};
\node [rectangle,fill=cyan,minimum height=5cm] at (5,0) (ab) {Arbie};
\node at (7,3) (ub) {};