Deploy Github Pages at Vercel

Accessing GitHub pages from China is pretty slow. Vercel has much better user experience although Vercel’s servers are located in oversea countries, same as GitHub servers. So many of bloggers in China migrate their static Blog site onto Vercel. To do the migration it’s quite simple. All you have to do are merely 3 steps.

  1. With your GitHub account create an account at https://vercel.com. It seems like you just sign-in Vercel with your GitHub account. By doing this your GitHub pages will be able to accessed from Vercel.
  2. Create a new project on your Vercel dashboard. The guide will take you to import your GitHub existing projects. Just select one and click “Import” button.
  3. Set your project name and click “Deploy” button. Keep all default settings. Now simply wait to see magical things happen.

By now the deployment process is done. If it succeeds colorful flowers will be scattered on your screen. If it fails you need to check the deployment status and building logs.

If your have your own domain name, you can also add your domain to point your site address.

Expand Tab in Emacs-Verilog Auto Code

When you use Emacs-verilog to generate code automatically, tabs are inserted instead of whitespace by default. For myself I prefer not to have tabs in my Verilog code at all, even for line indent or signal alignment. Then how to achieve this in Emacs auto code?

Simply add two lines in your verilog-mode.el as below. Yeah, it’s done and enjoy!

1
2
(setq-default tab-width 8)
(setq-default indent-tabs-mode nil)

Check out everything about Emacs-verilog at https://veripool.org/verilog-mode/.

Understanding AMBA Architechture and Protocols

The Advanced Micro controller Bus Architecture (AMBA) bus protocols is a set of interconnect specifications from ARM that standardizes on chip communication mechanisms between various functional blocks (or IP) for building high performance SOC designs. These designs typically have one or more micro controllers or microprocessors along with several other components — internal memory or external memory bridge, DSP, DMA, accelerators and various other peripherals like USB, UART, PCIE, I2C etc — all integrated on a single chip. The primary motivation of AMBA protocols is to have a standard and efficient way to interconnecting these blocks with re-use across multiple designs.

Read More

AMBA APB Revisions

APB2 APB3 APB4 Signal Direction
PADDR[31:0] PADDR[31:0] PADDR[31:0] MoSi
PRPOT[2:0] MoSi
PSEL PSEL PSEL MoSi
PENABLE PENABLE PENABLE MoSi
PWRITE PWRITE PWRITE MoSi
PWDATA[31:0] PWDATA[31:0] PWDATA[31:0] MoSi
PSTRB[3:0] MoSi
PREADY PREADY SoMi
PRDATA[31:0] PRDATA[31:0] PRDATA[31:0] SoMi
PSLVERR PSLVERR SoMi

Add a New Disk in Linux With Parted

The parted disk utility can be used for disk partition larger than 2TB.

1
2
3
4
5
6
7
8
9
10
11
% sudo lsblk
% sudo parted /dev/sdb mklabel gpt
% sudo parted /dev/sdb mkpart primary 0 100%
% sudo mkfs.xfs /dev/sdb1
% sudo mkdir /tools
% sudo mount /dev/sdb1 /tools
% sudo lsblk
% sudo df -hT
% sudo blkid
% sudo echo "UUID=0f559a31-08b5-47aa-9a60-d9a6594941ad /tools xfs defaults 0 0" >> /etc/fstab
% sudo reboot

Add a New Disk in Linux With Fdisk

The fdisk disk utility can only be used for disk partition no larger than 2TB.

1
2
3
4
5
6
7
8
9
10
11
12
% sudo lsblk
% sudo fdisk -l
% sudo fdisk /dev/sdb
% sudo lsblk
% sudo partprobe
% sudo mkfs.xfs /dev/sdb1
% sudo mkdir /tools
% sudo mount /dev/sdb1 /tools
% sudo df -hT
% sudo blkid
% sudo echo "UUID=0f559a31-08b5-47aa-9a60-d9a6594941ad /tools xfs defaults 0 0" >> /etc/fstab
% sudo reboot