[{"content":"Claude Code is Anthropic\u0026rsquo;s agentic coding assistant that runs directly in your terminal. It understands your codebase, edits files, runs git commands, debugs, writes docs — all through natural language.\nThis guide covers every installation method on Ubuntu, from beginner-friendly to advanced.\n1. Prerequisites Before you start, make sure your system meets these requirements:\nRequirement Minimum Ubuntu 20.04 or newer RAM 4 GB+ Processor x64 or ARM64 Network Internet connection required Shell Bash or Zsh Node.js 18.0+ (npm method only) Also ensure you\u0026rsquo;re in an Anthropic-supported country.\n2. Installation Methods Method 1: Native Installer (Recommended) This is the official one-liner. It auto-updates in the background so you\u0026rsquo;re always on the latest version.\ncurl -fsSL https://claude.ai/install.sh | bash After the script finishes, you\u0026rsquo;re done. Start Claude Code:\nclaude Tip: Want to check what the script does before running? Pipe it to less:\ncurl -fsSL https://claude.ai/install.sh | less\nMethod 2: npm (Universal) If you already have Node.js set up, npm is the most portable option. This method also works on macOS and WSL.\n# Install Node.js 18+ first if needed # curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - # sudo apt install -y nodejs # Install Claude Code globally npm install -g @anthropic-ai/claude-code # Verify installation claude --version To upgrade later:\nnpm install -g @anthropic-ai/claude-code@latest ⚠️ Don\u0026rsquo;t use npm update -g — it respects the semver range from the original install and may not pull the latest release.\nMethod 3: APT (Debian/Ubuntu Package Manager) If you prefer system-level package management, add Anthropic\u0026rsquo;s official APT repository:\n# Add Anthropic\u0026#39;s GPG key and repository curl -fsSL https://apt.anthropic.com/apt.anthropic.com.gpg.key | \\ sudo gpg --dearmor -o /usr/share/keyrings/anthropic.gpg echo \u0026#34;deb [signed-by=/usr/share/keyrings/anthropic.gpg] https://apt.anthropic.com stable main\u0026#34; | \\ sudo tee /etc/apt/sources.list.d/anthropic.list # Install sudo apt update sudo apt install claude-code Method 4: Homebrew If you use Homebrew on Linux:\nbrew install --cask claude-code Homebrew offers two tracks:\nclaude-code — stable channel (~1 week behind, skips major regressions) claude-code@latest — latest releases as soon as they ship 3. Authentication On first run, Claude Code will ask you to authenticate. You have two options:\nOAuth Login (Recommended) claude The CLI will print a one-time code and open a browser. Follow the prompt to link your Anthropic account. After that, subsequent launches are instant.\nAPI Key If you prefer an API key, set the environment variable:\nexport ANTHROPIC_API_KEY=\u0026#34;sk-ant-...\u0026#34; # Or persist it in your shell config echo \u0026#39;export ANTHROPIC_API_KEY=\u0026#34;sk-ant-...\u0026#34;\u0026#39; \u0026gt;\u0026gt; ~/.bashrc Then launch:\nclaude --dangerously-skip-permissions 4. First Run Navigate to your project directory and start:\ncd ~/my-project claude Claude Code will scan your codebase and you can start chatting. Try something like:\n\u0026gt; \u0026gt; \u0026gt; S A F u d i m d n m d a J r S a i D n z o d e c f t c i h o x i m s m a e n p n y r t o s u j n e t h c o a t n ' s d s r l c e s / d t u r t p u i r c l o t s m u . i r j s e s e r e j e c t i o n s 5. Upgrade \u0026amp; Update Method Update Command Native Automatic (background updates) npm npm install -g @anthropic-ai/claude-code@latest APT sudo apt update \u0026amp;\u0026amp; sudo apt upgrade Homebrew brew upgrade claude-code 6. Uninstall Method Uninstall Command Native sudo rm -f /usr/local/bin/claude ~/.local/bin/claude npm npm uninstall -g @anthropic-ai/claude-code APT sudo apt remove claude-code Homebrew brew uninstall claude-code 7. Troubleshooting \u0026ldquo;claude: command not found\u0026rdquo; Native install: Check if ~/.local/bin is in your PATH: echo $PATH. If not, add export PATH=\u0026quot;$HOME/.local/bin:$PATH\u0026quot; to ~/.bashrc. npm: Run npm list -g --depth=0 to verify the package is installed globally. Authentication fails Make sure you\u0026rsquo;re in a supported country. Try claude logout then claude to re-authenticate. Search not working Claude Code bundles ripgrep, but if search fails, install it: sudo apt install ripgrep. General debugging claude doctor This runs a diagnostic suite covering installation, authentication, networking, and tool availability.\nSummary Method Best For Auto-Update Native Most users, simplicity ✅ npm Node.js developers, flexibility ❌ APT System-level management ❌ Homebrew Homebrew users ❌ For most Ubuntu users, the native installer is the way to go — one command, no dependencies to manage, and always up to date. Pick the method that fits your workflow and start coding.\n","permalink":"https://chenshuaiming.com/posts/install-claude-code-ubuntu/","summary":"\u003cp\u003eClaude Code is Anthropic\u0026rsquo;s agentic coding assistant that runs directly in your terminal. It understands your codebase, edits files, runs git commands, debugs, writes docs — all through natural language.\u003c/p\u003e\n\u003cp\u003eThis guide covers every installation method on Ubuntu, from beginner-friendly to advanced.\u003c/p\u003e","title":"How to Install Claude Code on Ubuntu"},{"content":"OpenClaw is a personal AI assistant framework that bridges your chats across platforms (WhatsApp, Telegram, Discord, Web, etc.). Beyond the web dashboard, its real power lives in the terminal.\nThis guide covers the CLI commands you\u0026rsquo;ll actually use day-to-day.\n1. Setup \u0026amp; Health Check Before anything else, make sure your Gateway is alive:\n# Check service status openclaw gateway status # Quick health probe openclaw health # Diagnose and auto-repair issues openclaw doctor # Tail logs openclaw logs If the Gateway isn\u0026rsquo;t running yet:\nopenclaw gateway start # Start as daemon openclaw gateway run # Foreground (for debugging) openclaw gateway restart # Restart openclaw gateway stop # Stop 2. Opening a Chat Session Interactive TUI (Terminal UI) # Basic — connects to Gateway using default \u0026#34;main\u0026#34; session openclaw chat # Local embedded mode (no Gateway, needs API keys in env) openclaw chat --local # Specify a custom session key openclaw chat --session mychat # Set thinking level on open openclaw chat --thinking high # Auto-send a message on launch openclaw chat --message \u0026#34;帮我分析一下这个项目\u0026#34; One-shot Agent Turn (no TUI) # Send a message and get the reply in terminal openclaw agent --message \u0026#34;Summarize recent logs\u0026#34; # Target a specific agent openclaw agent --agent ops --message \u0026#34;Check system status\u0026#34; # Send to a phone number (starts a new session) openclaw agent --to +15555550123 --message \u0026#34;Hello\u0026#34; # Deliver reply back to chat channel openclaw agent --deliver --message \u0026#34;Report generated\u0026#34; 3. Choosing \u0026amp; Switching Models Check current default openclaw config get agents.defaults.model # Output: { \u0026#34;primary\u0026#34;: \u0026#34;deepseek/deepseek-v4-pro\u0026#34; } Set a new default openclaw config set agents.defaults.model \u0026#34;anthropic/claude-sonnet-4-20250514\u0026#34; Override per run openclaw agent --model openai/gpt-4o --message \u0026#34;...\u0026#34; openclaw agent --model deepseek/deepseek-v4-pro --thinking high --message \u0026#34;...\u0026#34; Interactive model setup openclaw configure --section model 4. Browsing Session History # List all sessions openclaw sessions # Latest 50 sessions openclaw sessions --limit 50 # Only sessions active in the last 2 hours openclaw sessions --active 120 # Filter by agent openclaw sessions --agent work # All agents combined openclaw sessions --all-agents # Machine-readable openclaw sessions --json 5. Managing Devices When you log in from a new device (phone, tablet, another laptop), a pairing request appears. You approve it from an already-authorized device.\n# List pending and paired devices openclaw devices list # Approve a pending pairing request (use the request ID) openclaw devices approve \u0026lt;request-id\u0026gt; # Reject a request openclaw devices reject \u0026lt;request-id\u0026gt; # Revoke a device openclaw devices revoke \u0026lt;device-id\u0026gt; 6. Managing Agents An \u0026ldquo;agent\u0026rdquo; is an isolated persona with its own workspace, model, and routing.\n# List all agents openclaw agents list # Add a new agent openclaw agents add # View routing bindings openclaw agents bindings # Delete an agent openclaw agents delete \u0026lt;agent-id\u0026gt; 7. Managing Channels Connect OpenClaw to messaging platforms:\nopenclaw channels Supported channels include: Telegram, WhatsApp, Discord, Signal, Slack, iMessage, Matrix, LINE, WeChat (QQ Bot), Microsoft Teams, and many more.\n8. Configuration Quick Reference # Get a config value openclaw config get gateway.port # Set a config value openclaw config set gateway.port 19001 # Remove a config value openclaw config unset some.key # Validate current config openclaw config validate # Print config file path openclaw config file # Interactive guided setup openclaw configure 9. Background Jobs (Cron) Schedule recurring or one-shot agent tasks:\nopenclaw cron list # List scheduled jobs openclaw cron add # Create a new job openclaw cron run \u0026lt;id\u0026gt; # Trigger a job immediately openclaw cron remove \u0026lt;id\u0026gt; # Delete a job 10. Backup openclaw backup Creates a local backup archive of your OpenClaw state.\nReal-world Workflow Example A typical troubleshooting session might look like this:\n# 1. Check if everything is healthy openclaw health # 2. See recent sessions openclaw sessions --active 60 # 3. Approve your phone login openclaw devices list openclaw devices approve \u0026lt;id\u0026gt; # 4. Open a chat with a specific model openclaw chat --model deepseek/deepseek-v4-pro --thinking high # 5. Later, check logs if something went wrong openclaw logs That covers the core CLI surface. For deep dives into any command, run openclaw \u0026lt;command\u0026gt; --help or check the official docs.\n","permalink":"https://chenshuaiming.com/posts/openclaw-cli-guide/","summary":"\u003cp\u003eOpenClaw is a personal AI assistant framework that bridges your chats across platforms (WhatsApp, Telegram, Discord, Web, etc.). Beyond the web dashboard, its real power lives in the terminal.\u003c/p\u003e\n\u003cp\u003eThis guide covers the CLI commands you\u0026rsquo;ll actually use day-to-day.\u003c/p\u003e","title":"OpenClaw CLI Guide: Everyday Terminal Commands"},{"content":"In digital IC verification, arrays are everywhere — register models, TLM port lists, expected data queues in scoreboards, coverage bin definitions… pretty much every verification component depends on arrays.\nSystemVerilog offers far richer array types and methods than traditional Verilog. Use them well and your productivity skyrockets. Use them poorly and performance tanks.\nThis guide covers every array type from the ground up.\n1. Array Type Overview SystemVerilog provides four main array categories:\nType Declaration Size Best For Fixed-Size [n] Compile-time fixed Fixed-width signals, register banks Dynamic [] + new[n] Runtime variable Unknown-count transactions, config tables Associative [*] or [type] Key-indexed Sparse storage, address maps Queue [$] Grows/shrinks on demand Scoreboards, FIFOs, ordered data streams 2. Packed vs Unpacked — The First Fork Before diving into arrays, internalize one core concept: packed vs unpacked.\nPacked Arrays // Width on the left side of name → packed, physically contiguous bit [7:0] byte_vec; // Single-dimension packed: an 8-bit vector bit [3:0][7:0] word_vec; // 2-D packed: 4 bytes, 32 bits total Essence: A contiguous chunk of bits, always treated as a whole Operations: Can participate in arithmetic/logic ops as a unit; bit-slicing supported Storage: Contiguous in memory, zero overhead Unpacked Arrays // Width on the right side → unpacked, each element is independent bit byte_mem [0:7]; // 8 unpacked elements, each 1 bit int data_buf [256]; // 256 unpacked ints Essence: A collection of independent elements Operations: Must operate element-by-element, no bulk arithmetic Storage: Elements may not be contiguous in memory ⚠️ Common Gotcha bit [7:0] a; // packed: one 8-bit variable bit b [7:0]; // unpacked: eight 1-bit variables a = 8\u0026#39;hFF; // ✅ Legal b = 8\u0026#39;hFF; // ❌ Compilation error! Can\u0026#39;t bulk-assign unpacked bit [7:0] c [0:3]; // Hybrid: 4 unpacked elements, each 8-bit packed Rule of thumb: Prefer packed when possible — better simulation performance. But beyond 64 bits, synthesis results may degrade.\n3. Fixed-Size Arrays The most basic array type. All dimensions are known at compile time.\nDeclaration // 1-D fixed int arr1 [0:7]; // 8 elements, indices 0~7 int arr2 [8]; // Equivalent to [0:7] int arr3 [6:1]; // 6 elements, indices 6,5,4,3,2,1 // Multi-dimensional int matrix [0:3][0:7]; // 4×8 two-dimensional int cube [0:1][0:3][0:7]; // 2×4×8 three-dimensional Initialization int arr [0:3] = \u0026#39;{0, 1, 2, 3}; // List init int arr2[0:3] = \u0026#39;{default: -1}; // All to -1 int arr3[0:3] = \u0026#39;{0:10, 1:20, default: 0}; // Specific + defaults int matrix[0:2][0:1] = \u0026#39;{ \u0026#39;{0,1}, \u0026#39;{2,3}, \u0026#39;{4,5} }; // Multi-dim Iteration // C-style for (discouraged) for (int i = 0; i \u0026lt; $size(arr); i++) $display(\u0026#34;arr[%0d] = %0d\u0026#34;, i, arr[i]); // foreach (recommended ✅) foreach (arr[i]) $display(\u0026#34;arr[%0d] = %0d\u0026#34;, i, arr[i]); // Multi-dimensional foreach foreach (matrix[i, j]) $display(\u0026#34;matrix[%0d][%0d] = %0d\u0026#34;, i, j, matrix[i][j]); Why foreach? No manual boundary calculation, works regardless of dimension ordering, cleaner code.\nSystem Functions Quick Reference Function Meaning Example $size(arr) Size of first dimension $size(arr) → 8 $size(arr, 2) Size of specific dimension $size(matrix, 2) → 8 $dimensions(arr) Number of dimensions 2 $left(arr) / $right(arr) Left/right bounds $left(arr[6:1]) → 6 $low(arr) / $high(arr) Min/max index $low(arr[6:1]) → 1 4. Dynamic Arrays Size determined at runtime. Allocated via the new[] constructor.\nCore Operations int dyn[]; // Declaration: empty, size 0 dyn = new[10]; // Allocate 10 elements (default 0) dyn = new[20](dyn); // Expand to 20, preserving old data ✅ dyn = new[5]; // Shrink to 5, old data lost ⚠️ dyn = \u0026#39;{1, 2, 3, 4, 5}; // Direct assignment (auto-reallocates) dyn.delete(); // Clear, size → 0 $display(\u0026#34;size = %0d\u0026#34;, dyn.size()); // Get current size Useful Trick: array ↔ queue int dyn[]; dyn = new[5]; foreach (dyn[i]) dyn[i] = i * 10; // Dynamic array → queue int q[$] = dyn; // Direct assignment ✅ // Queue → dynamic array dyn = new[q.size()]; dyn = {\u0026gt;\u0026gt;{q}}; // Streaming operator ⚠️ Common Pitfalls // ❌ Error: accessing without allocation int dyn[]; dyn[0] = 5; // Runtime fatal error! // ❌ Error: resize loses data int dyn[] = \u0026#39;{1,2,3,4,5}; dyn = new[10]; // First 5 elements lost! New elements are all 0 // ✅ Correct: expand and preserve dyn = new[10](dyn); Golden rule: Always check dyn.size() before accessing, or ensure new[] has been called.\n5. Queues Queues are SystemVerilog\u0026rsquo;s most flexible data structure — similar to C++ std::deque.\nDeclaration \u0026amp; Initialization int q1[$]; // Unbounded queue int q2[$:255]; // Bounded queue, max 256 elements string names[$] = \u0026#39;{\u0026#34;alice\u0026#34;, \u0026#34;bob\u0026#34;, \u0026#34;charlie\u0026#34;}; Insertion \u0026amp; Deletion int q[$] = \u0026#39;{10, 20, 30}; // Tail operations q.push_back(40); // {10,20,30,40} q.push_back(50); // {10,20,30,40,50} q.pop_back(); // {10,20,30,40} // Head operations q.push_front(0); // {0,10,20,30,40} q.pop_front(); // {10,20,30,40} // Arbitrary position q.insert(2, 25); // {10,20,25,30,40} insert at index 2 q.delete(1); // {10,25,30,40} delete index 1 q.delete(); // Clear entire queue Classic Verification Pattern: Scoreboard class scoreboard; transaction exp_q[$]; // Expected queue function void add_expected(transaction tr); exp_q.push_back(tr); endfunction function void check_actual(transaction tr); if (exp_q.size() == 0) begin `uvm_error(\u0026#34;SB\u0026#34;, \u0026#34;unexpected transaction!\u0026#34;) end else begin transaction exp = exp_q.pop_front(); if (!exp.compare(tr)) `uvm_error(\u0026#34;SB\u0026#34;, \u0026#34;mismatch!\u0026#34;) end endfunction endclass // Sliding window: keep last N samples int sample_window[$:15]; // Max 16 elements function void add_sample(int val); if (sample_window.size() == 16) sample_window.pop_front(); sample_window.push_back(val); endfunction 6. Associative Arrays Indexed by keys rather than sequential integers. Ideal for sparse data.\nDeclaration int aa_wild [*]; // Wildcard index (any integral type) int aa_int [int]; // int key int aa_str [string]; // string key int aa_cls [some_class]; // class handle key (rare) bit [63:0] aa_addr [bit [63:0]]; // Large-width key: address maps Basic Operations int aa [string]; aa[\u0026#34;foo\u0026#34;] = 10; aa[\u0026#34;bar\u0026#34;] = 20; aa[\u0026#34;baz\u0026#34;] = 30; $display(\u0026#34;aa[bar] = %0d\u0026#34;, aa[\u0026#34;bar\u0026#34;]); // 20 // Check key existence if (aa.exists(\u0026#34;foo\u0026#34;)) $display(\u0026#34;foo exists\u0026#34;); // Deletion aa.delete(\u0026#34;bar\u0026#34;); // Delete single entry aa.delete(); // Delete all // Traversal string key; if (aa.first(key)) begin do $display(\u0026#34;aa[%s] = %0d\u0026#34;, key, aa[key]); while (aa.next(key)); end // Size $display(\u0026#34;size = %0d\u0026#34;, aa.num()); Typical Use Case: Register Address Map class reg_model; uvm_reg reg_map [bit [31:0]]; function void build(); // 200 registers in a 4GB address space // Associative array stores only what exists reg_map[32\u0026#39;h4000_1000] = reg_ctrl; reg_map[32\u0026#39;h4000_1004] = reg_status; reg_map[32\u0026#39;h4000_2000] = reg_data; endfunction function uvm_reg get_reg(bit [31:0] addr); if (reg_map.exists(addr)) return reg_map[addr]; else begin `uvm_error(\u0026#34;REG\u0026#34;, $sformatf(\u0026#34;No register at addr 0x%h\u0026#34;, addr)) return null; end endfunction endclass ⚠️ Watch Out exists() on a missing key does not create an entry Direct read on a missing key does create an entry with default value [*] index keys must be integral (not class objects) Associative arrays don\u0026rsquo;t support foreach — use first()/next() 7. Array Methods Reference SystemVerilog provides a powerful set of methods for unpacked arrays (fixed, dynamic, queues).\n7.1 Reduction Methods Apply an accumulation operation across all elements, returning a single value.\nint arr[] = \u0026#39;{1, 2, 3, 4, 5}; arr.sum(); // 15 Sum arr.product(); // 120 Product arr.and(); // Bitwise AND arr.or(); // Bitwise OR arr.xor(); // Bitwise XOR 7.2 Locator Methods — the find Family int arr[] = \u0026#39;{1, 3, 5, 7, 2, 4, 6, 8}; // find → queue of all matching elements // find_first → queue of first matching element (single) // find_last → queue of last matching element // find_index → queue of matching element indices // find_first_index→ first matching index // find_last_index → last matching index int q[$]; q = arr.find(x) with (x \u0026gt; 4); // {5, 7, 6, 8} q = arr.find_first(x) with (x \u0026gt; 4); // {5} q = arr.find_index(x) with (x \u0026gt; 4); // {2, 3, 5, 7} q = arr.find_first_index(x) with (x \u0026gt; 4);// {2} 7.3 Advanced with Clauses // \u0026#39;item\u0026#39; is the default iterator variable — you can rename it q = arr.find(item) with (item \u0026gt; 5 \u0026amp;\u0026amp; item \u0026lt; 8); // {7, 6} // Multi-condition with objects class packet; int addr; bit is_write; endclass packet pkt_q[$]; // Find addresses of all write transactions int addr_q[$]; addr_q = pkt_q.find(p) with (p.is_write); foreach (addr_q[i]) addr_q[i] = addr_q[i].addr; 7.4 Sorting Methods int arr[] = \u0026#39;{5, 2, 8, 1, 3}; arr.reverse(); // {3, 1, 8, 2, 5} In-place reverse arr.sort(); // {1, 2, 3, 5, 8} Ascending arr.rsort(); // {8, 5, 3, 2, 1} Descending arr.shuffle(); // Random shuffle // Custom sort with \u0026#39;with\u0026#39; clause class packet; int id; int priority; endclass packet pkt_q[$]; pkt_q.sort(p) with (p.priority); // Ascending by priority pkt_q.rsort(p) with (p.priority); // Descending by priority 7.5 Other Useful Methods int arr[] = \u0026#39;{1, 2, 3, 4, 5}; arr.min(); // 1 Minimum arr.max(); // 5 Maximum arr.unique(); // Deduplicate, returns queue arr.unique_index(); // Indices of unique elements int idx = arr.min(item) with (item % 2); // Min even number: 2 8. foreach Loop Advanced Usage Multi-dimensional Traversal int arr[3][4]; // 3 rows × 4 columns // ✅ Recommended: foreach foreach (arr[i, j]) arr[i][j] = i * 4 + j; // ❌ Discouraged: nested for for (int i = 0; i \u0026lt; 3; i++) for (int j = 0; j \u0026lt; 4; j++) arr[i][j] = i * 4 + j; foreach with Queues \u0026amp; Dynamic Arrays int dyn[] = \u0026#39;{10, 20, 30, 40}; int q[$] = dyn; // All three are legal foreach (dyn[i]) $display(dyn[i]); foreach (q[i]) $display(q[i]); // ⚠️ Warning: Don\u0026#39;t resize during iteration! Behavior is undefined. // ❌ foreach (q[i]) q.push_back(i); // Don\u0026#39;t do this 9. Synthesis vs Simulation — Key Differences As a verification engineer, most of your code runs in simulation. But if it needs synthesis, know these limits:\nFeature Simulation Synthesis Fixed-size packed array ✅ ✅ Fixed-size unpacked array ✅ ✅ (limited) Dynamic array ✅ ❌ Not synthesizable Associative array ✅ ❌ Not synthesizable Queue ✅ ❌ Not synthesizable foreach ✅ ✅ (SV 2017+) find/sort methods ✅ ❌ Not synthesizable $size / $dimensions ✅ ✅ Simulation advice: Use dynamic arrays and queues freely — performance is fine, expressiveness is great.\nSynthesis advice: Stick to fixed-size packed/unpacked arrays; be cautious with 2+ dimensions.\n10. Quiz Time — Common Interview Traps Trap 1: new[] Without Argument int arr[] = \u0026#39;{1, 2, 3, 4, 5}; arr = new[10]; // arr becomes {0,0,0,0,0,0,0,0,0,0} — data lost! arr = new[10](arr); // ✅ Expand and preserve Trap 2: Reading a Missing Associative Array Key int aa[string]; $display(\u0026#34;aa[key] = %0d\u0026#34;, aa[\u0026#34;nonexistent\u0026#34;]); // Prints 0, AND creates the entry! // aa.num() is now 1, not 0! Trap 3: find Returns a Queue int arr[] = \u0026#39;{1, 2, 3, 4, 5}; int result = arr.find_first(x) with (x \u0026gt; 3); // ❌ Type mismatch! int result_q[$] = arr.find_first(x) with (x \u0026gt; 3); // ✅ Use a queue int result = result_q[0]; // ✅ Then extract Trap 4: Packed Array Dimension Order bit [3:0][7:0] a; // 4 bytes, each 8 bits // a[3] = most significant byte, a[0] = least significant byte a = 32\u0026#39;hDEAD_BEEF; $display(\u0026#34;a[3] = %h\u0026#34;, a[3]); // DE $display(\u0026#34;a[0] = %h\u0026#34;, a[0]); // EF $display(\u0026#34;a[3][7] = %b\u0026#34;, a[3][7]); // 1 (MSB of DE) 11. Summary Need Pick Fixed-count signals/DUT ports Fixed-size unpacked Concatenate into a bus Fixed-size packed Size unknown until runtime Dynamic array FIFO / Scoreboard ordering Queue [$] Sparse address mapping Associative array Stats / search / sort Array methods (find, sort) Array iteration foreach (always first choice) SystemVerilog\u0026rsquo;s array system is well-designed and thorough. Master the right type for each scenario and your verification code will be cleaner by an order of magnitude. Don\u0026rsquo;t simulate C-style double for loops where you don\u0026rsquo;t need to — SV gives you better tools. Use them.\nIf you found this helpful, follow me on Bilibili for more digital IC verification content.\n","permalink":"https://chenshuaiming.com/posts/systemverilog-array-guide/","summary":"\u003cp\u003eIn digital IC verification, arrays are everywhere — register models, TLM port lists, expected data queues in scoreboards, coverage bin definitions… pretty much every verification component depends on arrays.\u003c/p\u003e\n\u003cp\u003eSystemVerilog offers far richer array types and methods than traditional Verilog. Use them well and your productivity skyrockets. Use them poorly and performance tanks.\u003c/p\u003e\n\u003cp\u003eThis guide covers every array type from the ground up.\u003c/p\u003e","title":"SystemVerilog Array Syntax: The Complete Guide"},{"content":"This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.\nHeadings The following HTML \u0026lt;h1\u0026gt;—\u0026lt;h6\u0026gt; elements represent six levels of section headings. \u0026lt;h1\u0026gt; is the highest section level while \u0026lt;h6\u0026gt; is the lowest.\nH1 H2 H3 H4 H5 H6 Paragraph Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.\nItatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.\nBlockquotes The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations.\nBlockquote without attribution Tiam, ad mint andaepu dandae nostion secatur sequo quae. Note that you can use Markdown syntax within a blockquote.\nBlockquote with attribution Don\u0026rsquo;t communicate by sharing memory, share memory by communicating.\n— Rob Pike1\nTables Tables aren\u0026rsquo;t part of the core Markdown spec, but Hugo supports them out-of-the-box.\nName Age Bob 27 Alice 23 Inline Markdown within tables Italics Bold Code italics bold code List Types Ordered List First item Second item Third item Unordered List List item Another item And another item Nested Unordered list Fruit Apple Orange Banana Dairy Milk Cheese Nested Ordered list Fruit Apple Orange Banana Dairy Milk Cheese Third item Sub One Sub Two Other Elements — abbr, sub, sup, kbd, mark GIF is a bitmap image format.\nH2O\nXn + Yn = Zn\nPress CTRL+ALT+Delete to end the session.\nMost salamanders are nocturnal, and hunt for insects, worms, and other small creatures.\nThe above quote is excerpted from Rob Pike\u0026rsquo;s talk during Gopherfest, November 18, 2015.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","permalink":"https://chenshuaiming.com/posts/systemverilog-syntax/","summary":"\u003cp\u003eThis article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.\u003c/p\u003e","title":"SystemVerilog Syntax Guide"},{"content":" Social Media 📲 Xi\u0026rsquo;an , China\nchensm1023@gmail.com\nGithub\nLinkedIn\nBilibili\nFeatures 💥 ☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive\nAsset pipeline \u0026ndash; Hugo\u0026rsquo;s built-in asset generator with fingerprinting, bundling, and minification. Three layout modes \u0026ndash; Regular, Home-Info, and Profile. Light and dark themes \u0026ndash; Automatic switching based on browser preference, plus a manual toggle. Multilingual support \u0026ndash; Includes a built-in language selector. Search \u0026ndash; Client-side search powered by Fuse.js. SEO optimized \u0026ndash; Open Graph, Twitter Cards, and Schema.org structured data out of the box. Cover images \u0026ndash; Per-post cover images with responsive image support. Table of contents \u0026ndash; Auto-generated from heading structure. Multiple authors \u0026ndash; Native support for multi-author sites. Social icons and share buttons \u0026ndash; Configurable social links and per-post sharing. Breadcrumb navigation Post archives and taxonomies Code block copy buttons \u0026ndash; One-click copying with Chroma syntax highlighting. Related post suggestions Zero JS build dependencies \u0026ndash; No webpack, Node.js, or other tooling required. Topic Description Installation guide Detailed installation and update instructions Features wiki page In-depth explanations of all features FAQ wiki Common questions and configuration walkthroughs Icons wiki Documentation for social icons and share icons Variables wiki List of all available template variables Overiding templates Guide to customizing templates without forking Releases Detailed history of releases Performance ☄️ PaperMod consistently scores near-perfect results on Pagespeed Insights.\nSupport 🫶 Star this repository to show your support. Share PaperMod with others who might find it useful. Sponsor the project on GitHub Sponsors or Ko-Fi. Special Thanks 🌟 Highlight.js Fuse.js Feather Icons Simple Icons All contributors and supporters Stargazers 📈 ","permalink":"https://chenshuaiming.com/about/","summary":"\u003c!--\nPaperMod is a fast, clean, and responsive Hugo theme designed for bloggers and content creators. It offers a modern design with a focus on readability and performance, making it an excellent choice for personal blogs, portfolios, and documentation sites.\n\n\u003e Based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3), with additional features and customization options.\n\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003ePaperMod at Hugo Themes\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://themes.gohugo.io/themes/hugo-papermod/\"\u003ePaperMod@themes.gohugo.io\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003eMinimum Hugo Version\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://github.com/gohugoio/hugo/releases/tag/v0.146.0\"\u003eHugo v0.146.0+\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003eDiscord Community\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://discord.gg/ahpmTvhVmp\"\u003eJoin Discord to chat with the community\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n        \u003ctr\u003e\n\t\t\t\u003ctd\u003eGithub Discussion\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://github.com/adityatelange/hugo-PaperMod/discussions\"\u003eJoin Discussions on Github\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003eLive Demo\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://adityatelange.github.io/hugo-PaperMod/\"\u003eadityatelange.github.io/hugo-PaperMod\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003eDocumentation\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://github.com/adityatelange/hugo-PaperMod/wiki\"\u003eGithub Wiki\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003eExample Site Source\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite\"\u003eexampleSite branch\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://www.star-history.com/adityatelange/hugo-papermod\"\u003e\u003cimg src=\"https://api.star-history.com/badge?repo=adityatelange/hugo-PaperMod\u0026amp;theme=dark\" alt=\"Star History Rank\" /\u003e\u003c/a\u003e\u003c/td\u003e\n\t\t\t\u003ctd\u003e\u003ca href=\"https://ko-fi.com/H2H229ZWH\"\u003e\u003cimg src=\"https://ko-fi.com/img/githubbutton_sm.svg\" alt=\"ko-fi\" /\u003e\u003c/a\u003e\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png\" alt=\"Mockup image\" title=\"Mockup\"/\u003e\n\u003c/p\u003e","title":"About"},{"content":"如果您觉得内容有帮助。欢迎请我喝杯咖啡☕🥪\n","permalink":"https://chenshuaiming.com/support/","summary":"\u003cp\u003e如果您觉得内容有帮助。欢迎请我喝杯咖啡☕🥪\u003c/p\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"../IMG_8414.jpeg\" alt=\"alipay_qrcode\" width=\"250\" /\u003e  \n\u003c/div\u003e","title":"Support Me"},{"content":"","permalink":"https://chenshuaiming.com/ai/","summary":"","title":"AI Assistant"}]