Hi and welcome👋.

I’m Phong.

On this blog, I write about topics related to my work.Why writing? Because writing helps me think - there is no better tool for organizing a long line of thought.

C++ - Chapter 1: Introduction

1. Introduction C++ was developed as an extension to C. It adds man few features to the C language, and tis perhaps best through of as a superset of C. Step 1: Define the problem that you would like to solve I want to write a program that will … Step 2: Determine how you are going to solve the problem Determine how we are going to solve the problem you came up with in step 1. ...

May 24, 2026 · 8 min · Phong Nguyen

C++ - Chapter 2: Fundamentals

C++ Basic Concepts Data is any information processed or stored by a computer. A Value is a specific piece of data (e.g. 42, 'A', 3.14). An Object is a region of storage (memory) with a type and a value. A Variable is a named object used to store data. Initialization is the process of giving an initial value to an object or variable. Literals: fixed values like 42, 3.14, ‘A’, “Hello”, true, nullptr. Operators: symbols that act on values (+ - * / %, == != < >, && || !, = += -=, etc.). An Expression is a combination of operators, constants and variables that evaluate to a value. A function is a reusable block of code that performs a specific task. 1. Initialization C++ provides several ways to initialize objects. Each form has different semantics and use cases. ...

May 24, 2026 · 10 min · Phong Nguyen

System C TLM 2.0

Transaction-Level Modeling 2.0 (TLM-2.0) is a modeling methodology defined in IEEE 1666-2023. Instead of communicating through individual signals at every clock cycle, modules exchange complete transactions (read/write requests) using C++ function calls. This raises the abstraction level, dramatically increasing simulation speed and enabling early software development before RTL is available. 1. Introduce TLM-2.0 replaces pin-level signal connections with high-level function calls carrying a tlm_generic_payload transaction object. An initiator (e.g., a CPU model) calls transport functions on a target (e.g., a memory) through typed sockets and a bus/router. ...

March 29, 2026 · 10 min · Phong Nguyen

System C

1. Introduce SystemC is a C++ class library, that provides a mechanism for managing complex systems involving large numbers of components. SystemC is capable of modeling hardware and software together at multiple level of abstraction (Algorithm / Functional level, Transaction-Level Modeling, Register Transfer Level) Modeling is the process of creating a simplified version of a real system. Simulation is the process of executing the model over time to see how it behaves. ...

March 23, 2026 · 21 min · Phong Nguyen

CMake Guide

1. Introduction It’s a meta-build system generator. How it works: We write high-level instructions in a CMakeLists.txt file (platform-agnostic).Then CMake generates build system files for the platform we choose: On Linux/Unix: generates Makefile (for make) or build.ninja (for ninja). On Windows: generates Visual Studio solutions (.sln). On macOS: can generate Xcode projects. CMake Generators: CMake support multiple build systems output a.k.a generators. Which generator is used can be controlled via CMAKE_GENERATOR or cmake -G option ...

August 21, 2025 · 14 min · Phong Nguyen

Cpp

See plus plus :) . Refer Introduce Fundamentals String 11. Scope, duration, and linkage summary A variable’s duration determines when it is created and destroyed. Variables with automatic duration: are created at the point of definition, and destroyed when the block they are part of is exited. This includes: - Local variables - Function parameters Variables with static duration: are created when the program begins and destroyed when the program ends. This includes: - Global variables - Static local variables Variables with dynamic duration: are created and destroyed by programmer request. This includes: - Dynamically allocated variables ...

February 9, 2025 · 85 min · Phong Nguyen

Makefile Guide

Introduction It’s a build tool (specifically, make is a build automation utility). How it works: Reads a file called Makefile that describes rules for how to build source files into targets (executables, libraries, etc.). GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program’s source files. Make get its knowledge of how to build your program from a file called the makefile, which lists each of the non-source files and how to compute it from the other files. When you write a program, you should write a makefile for it, so that it is possible to use Make to build and install the program. ...

August 9, 2024 · 11 min · Phong Nguyen

Git Notes

Git Cheat Sheet <commit> can be any Git reference that points to a commit Local git config: .git/config (See all possible config options man git-config) Global git config: ~/.gitconfig Git ignore file : .gitignore Local ignore rules (not committed): .git/info/exclude # Start a new repo $ git init # clone an existing repo $ git clone <url> # Add untracked file or unstaged changes $ git add <file> # Add all untracked files and unstaged changes $ git add . ### Choose which parts of a file to stage $ git add -p # Delete file $ git rm <file> # Tell Git to forget about a file without deleting it $ git rm --cached <file> # Unstage one file git reset <file> # Unstage everything git reset # Check what you added git status # Make a commit (and open text editor to write message) git commit # Make a commit git commit -m 'message' # Commit all unstaged changes git commit -am 'message' # Make an empty commit for specific purpose git commit --allow-empty -m 'message' # Switch branches $ git switch <name> $ git checkout <name> # Create a new branch from the current branch $ git switch -c <new-branch> $ git checkout -b <new-branch> # Create a new branch from another local branch $ git switch -c <new-branch> <base-branch> # prefer $ git checkout -b <new-branch> <base-branch> # Create a new branch from a remote branch $ git switch -c <new-branch> origin/<remote-branch> # prefer $ git checkout -b <new-branch> origin/<remote-branch> # List branches $ git branch $ git branch -r # remote branches # Delete a branch $ git branch -d <name> $ git branch -D <name> # Force # Diff all staged and unstaged changes $ git diff HEAD # Diff just staged changes $ git diff --staged # Diff just unstaged changes $ git diff # Save to file $ git diff >> file # Compare two refs and list changed files git diff --name-only <branch> <commit> > files.txt # Show diff between a commit and its parent git show <commit> # Diff two commits git diff <commit> <commit> # Diff one file since a commit git diff <commit> <file> # Show a summary of a diff git diff <commit> --stat git show <commit> --stat # Discard unstaged changes in one file git restore <file> git checkout -- <file> # Discard all changes (staged and unstaged) in one file git restore --staged --worktree <file> git checkout HEAD -- <file> # Delete all staged and unstaged changes git reset --hard # Force Delete untracked files/director git clean -fd # 'Stash' all staged and unstaged changes git stash # "Undo" the most recent commit git reset HEAD^ # Squash the last 5 commits into one git rebase -i HEAD~6 # Open the log history git reflog git reflog BRANCHNAME # Move current branch back to <commit> git reset --hard <commit> # Recreate the branch using hash git checkout -b <new-branch> <commit> # Change a commit message / add a file git commit --amend # Show commit history git log main # Show compact commit history git log --oneline main # Show commit history as a branch graph git log --graph main # Show a compact graph of all branches git log --oneline --graph --all --decorate # Show every commit that modified a file git log <file> # Show every commit that modified a file, including before it was renamed git log --follow <file> # Find every commit that added or removed some text git log -G "<text>" # Show who last changed each line of a file git blame <file> # Cherry pick to copy one commit onto the current branch git cherry-pick <commit> # Replace the current version of a file with the version from another commit git restore --source <commit> <file> # Add a Remote git remote add <name> <url> # Push the main branch to the remote origin git push origin main # Push the current branch to its remote "tracking branch" git push # Push a branch that you've never pushed before git push -u origin <name> # Force push git push --force-with-lease # the remote has not changed git push --force # Create a tag $ git tag <tag> $ git tag -a <tag> -m "<des>" # Push tags $ git push origin <tag> $ git push --tags # Fetch changes git fetch origin main # Fetch changes and then rebase your current branch git pull --rebase # Set a config option git config user.name <user_name> git config user.email <user_email> # Set option globally git config --global ... # Mark a repository as safe (useful with Docker, WSL, shared folders, etc.) $ git config --global --add safe.directory <path> # Initialize and update submodules git submodule update --init # Run a single Git command without SSL certificate verification git -c http.sslVerify=false <git-command> # Set upstream branch git branch --set-upstream-to=origin/<branch_name> # Copy a file from another branch without switching branches git checkout <branch> -- <file> Useful VSCode Extensions Git Graph Git History Useful Eclipse Plugins EGit TBD

May 30, 2026 · 4 min · Phong Nguyen

C/C++ Tools

1. Doxygen Code documentation can be achieved with the Doxygen framework which is one of the most standard one for many languages. 1.1. Getting Started Install: $ sudo apt install doxygen Create a config and update: $ mkdir docs && cd docs $ doxygen -g Doxyfile $ vi Doxyfile Running doxygen: $ cd docs && doxygen <config-file> & htlm/index.htlm Install the VSCode Extension: Doxygen Documentation Generator 1.2. Doxygen with CMake Create a Doxygen file template for CMake: ...

March 30, 2026 · 4 min · Phong Nguyen

CI/CD Guide

1. Introduce 2. Docker: Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production. ...

March 12, 2026 · 3 min · Phong Nguyen