tool

Status of current HDL generator

Recently, I’m trying out different HDL generator languages and tools, because Chisel is used heavily inside SiFive, and they have developed amount of IPs including very complicated CPUs, and a very well maintained community (mainly students from Berkeley) Many other IP companies are using their type of HDL generator to generate RTL Such as ARM and Cadence. ARM’s CPU is delivered as a very well parameterized Verilog file along with a set of scripts that can take your configuration file can generate RTL/testbench/IPXACT/… accordingly in less than a minute.

shortcut.py: A Command Line Script to Provide Macro

Typical usage go to some directory use short alias > pwd /home/jw > go prj0 cd /work/projects/design/master-branch/ > pwd /work/projects/design/master-branch/ run a serial of commands use short alias > run vnc ssh -L 5901:remote-internal-server-name:5901 jw@remote-gateway-ip vncviewer remote-internal-server-name Search available alias Here . dot is used to replace * star because zsh will try to expand * by default. > go prj0 > go p. prj0 > run vnc Auto-correction shortcut.py uses difflib.

Static Site Generator

Trying to find the perfect static site generator. Used to use Pelican, because it’s written in Python. Also tried with Jekyll, the most popular candidate, because it’s used by Github. Their common problems are Not intuitive enough. Seems like something programmer created for programmer. There are very restricted requirements of directory structure of the content. And they doesn’t fit my understanding/requirement. Now I’m trying Hugo, which is written in Go, and it’s really fast.

GCP (Google Cloud Platform)

Price of GCP Persistance Disk Can be used to put all the data/eda/os on it. Price (per month) Price (per GB per month) SSD 50GB $8.50 $0.17 SSD 1TB $174.08 $0.17 HDD 50GB $2.00 $0.04 HDD 200GB $8.00 $0.04 HDD 1TB $39.76 $0.04 Snapshot 50GB $1.30 $0.026 Always on instance (24x7) Can be used as working machine (support VNC) and NFS server

Docker for EDA

Dockerfile FROMubuntu:16.04COPY ./boot.sh /tmpCOPY ./hello.sh /tmpRUN /bin/bash /tmp/boot.shRUN /bin/bash /tmp/hello.shboot.sh apt-get update; apt-get install -y make autoconf g++ flex bison wget cd /tmp wget https://www.veripool.org/ftp/verilator-4.004.tgz tar xf verilator*.tgz cd verilator* ./configure make # this step will take sometime make install hello.sh cd /tmp/verilator* cd ./example/tracing_c make # it will print out some log, and after finish it will generate a directory in the same directory named "logs" who needs to be saved after container exit Docker how-to notes create a docker image from Dockerfile docker build -t "$(name):$(tag)" .

WSL (Windows Subsystem Linux) Tips

To start gnome-terminal on WSL (Windows Subsystem for Linux) After upgrade to Windows 10 Creators Update, reinstall WSL will have Ubuntu 16.04.2 LTS on Windows. To reinstall WSL you should do: > lxrun /uninstall /full > lxrun /install Then you will see > lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial Some X11 apps like xclocks works fine with Xming, but “gnome-terminal” still have some problem.

Install Python Offline

In general, things like Anaconda Server are designed to make this sort of workflow easier. Some suggested workarounds: Reproduce your install on another machine with internet (save conda list –export to a file and conda install –file). Then use conda update on that machine to generate and download the packages. One tip that could be helpful is if you take several conda packages and tar them up into a flat tarball you can use conda to install that tarball and it will install all the packages.

Python and Freemind: ElementTree

我曾经自己用Python写过一个小工具来parse Freemind文件(XML格式)然后生成RestructureText和Latex格式。这个小工具的目的是为了实践我的“源文件唯一”的理念。因为我的简历(包括既往项目总结)需要保存为两种不同格式,一个为了放在个人网站上所以是HTML,另一个当然是PDF格式。 今天瞎琢磨的时候发现,其实Python对于XML文件格式支持的极好。The ElementTree XML API这个模块将XML parse成一个Tree。 Each element has a number of properties associated with it: a tag which is a string identifying what kind of data this element represents (the element type, in other words). a number of attributes, stored in a Python dictionary. a text string. an optional tail string. a number of child elements, stored in a Python sequence Python的Markdown也能够utilize这个ElementTree模块。它能够将Markdown文件Parse成eTree(也能够在之前和之后加上其他的process,以callback的形式存在)。