Hack DUT
Sunday, April 28, 2024
C Programming
Thursday, February 8, 2024
SVN Quick Reference
this is a short summary for my reference based on the great official tutorial at:
Basic Work Cycle (red-bean.com)
Check out a working copy from a repository
Update Your Working Copy
Make Your Changes
Changing the Repository Without a Working Copy
Review Your Changes
Fix Your Mistakes
Resolve Any Conflicts
Commit Your Changes
Examining History
%svn diff --summarize -r42:41 #just pirnt the filenames that has changes between 2 commits
Checkout a Specific Version of files
Sometimes You Just Need to Clean Up
Saturday, January 13, 2024
PCIe Study Notes
Chapter 1: Background
Nice References
PCI
PCI-X
Chapter 2: PCIe Architecture Overview
Transaction Layer
Data Link Lyaer
Physical Layer
Electriclal Part
Chapter 3: Configuration Overview
Enumeration
PCIe Devices: 32 devices per bus; PCIe point-to-point link means that device will always be Device 0. Deach Device must implement Function 0.
PCIe Functions: Functions do not need to be implemented sequenctially. SW must check every one of the 8 functions to decide which are present.
Errors should not normally be reported during enumeration.(the enumeration sw could fail since it's typically writtent o execute before the OS or other error handling SW is available.
Device not present: SW get Vendor ID of FFFFh, reserved for "device not present"
#TODO: enumeration started after 100ms+link training after reset, how to do it in DV simulation?
#TODO: what will enum sw do if there is no EP attached to a pci-pci bridge? #multi-root system: what if rc assign start bus number 64 to rc, but later find that the total buses are more then 265-64? is this an error? It is important to remember that each port on a switch is aBridge, and thus has its own configuration space with a Type 1 Header. In reality, each port (each P2P Bridge) has its own Type 1 Header and performs the same two checks on TLPs when they are seen by that port.
#TODO: enumeration started after 100ms+link training after reset, how to do it in DV simulation?
#TODO: what will enum sw do if there is no EP attached to a pci-pci bridge?
Chapter 4: Address Space & Transaction Routing
Confugration
TLP Routing
Sunday, December 31, 2023
how to build a cpu
Adder
oscillator
Sunday, November 5, 2023
QEMU/KVM virtual machines on linux
I'm running Debian linux 12 on macbook pro.
I find the official Debian Wiki is as always very useful:
and also this Youtube video tutorial for beginners:
QEMU/KVM for absolute beginners by Veronica Explains
install needed packages
%sudo apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system
%sudo apt install virtinst #if you want to create guest os on command line instead of gui
Creating a new guest:
virt-install --virt-type kvm --name bullseye-amd64 \ --location http://deb.debian.org/debian/dists/bullseye/main/installer-amd64/ \ --os-variant debian11 \ --disk size=20 --memory 4000 \ --graphics none \ --console pty,target_type=serial \ --extra-args "console=ttyS0"
Connect to a VM through command line
Friday, October 27, 2023
Instaling Debian Linux on Old Macbook Pro
My laptop is an macbook pro retina late 2013.
#bootable usb stick for ubuntu
https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview
#install linux on macbook 2012
https://robmcbryde.com/reviving-2012-macbook-pro/
#Official guide to Install Debian on MacBook
https://wiki.debian.org/MacBook#Debian_installation
Some issues i encountered is recorded below:
Before Installation
#repartition Mac disk to make room for Linux is
https://www.makeuseof.com/tag/install-linux-macbook-pro/
During Installation
#no issues
After installation
#ssh
#linux continue work when lid is closed
/etc/systemd/logind.conf and make sure
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
#wifi issue, the debian official wiki has a solution
#in particular, my wifi nic is BCM4360, have to use the wl vendor driver
Final words
Saturday, August 19, 2023
TCP/IP Study Notes
TCP/IP segmentation and fragmentation:
reference link: 【计算机网络】区分tcp分段和ip分片 - JoyoHub
C Programming
Header Files and Includes https://cplusplus.com/forum/articles/10627/ https://stackoverflow.com/questions/2762568/c-c-include-header-file-or...
-
refer to the following links, I am just adding some corrections to the original post: https://coderwall.com/p/fy7stg/vim-and-systemverilog...
-
How do form Variable names by using defines in system verilog : https://stackoverflow.com/questions/20759707/how-do-form-variable-names...
-
This article is to list down the most used constructions of UVM to my personal understanding. UVM simulator steps VCS(Synopsys) IUS(Ca...