skills/qemu/verilog-basics-for-lowlevel/SKILL.md
Verilog basics skill for firmware and kernel engineers. Use when reading RTL to understand hardware behavior, reset/clock domains, bus protocols, or collaborating with hardware teams. Activates on queries about Verilog basics, RTL, hardware description, clock domain, reset synchronizer, or MMU in hardware.
npx skillsauth add mohitmishra786/low-level-dev-skills verilog-basics-for-lowlevelInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Give firmware and kernel engineers enough Verilog/SystemVerilog literacy to read RTL: modules, clocks/resets, combinational vs sequential logic, bus interfaces, and why hardware behavior explains driver bugs — not a replacement for HDL design courses.
module uart_tx (
input wire clk,
input wire rst_n, /* active-low async reset */
input wire start,
input wire [7:0] data,
output reg busy
);
/* sequential logic */
always @(posedge clk or negedge rst_n) begin
if (!rst_n)
busy <= 1'b0;
else if (start)
busy <= 1'b1;
/* ... */
end
endmodule
wire = combinational/network; reg in always block = flip-flop unless combinational always @(*).
| Construct | Meaning |
|-----------|---------|
| posedge clk | Registered update |
| assign x = a & b | Combinational |
| case / if in always @(*) | Mux logic |
| Parameters #(.WIDTH(32)) | Configurable width |
Avoid #delay in synthesizable RTL — simulation only.
rst_sync_n)| Bus | Typical use | |-----|-------------| | APB | Slow peripherals, simple reg interface | | AHB | Higher throughput on-chip | | AXI | DMA, modern SoCs — bursts, channels |
Linux regmap MMIO maps to APB/AXI slave decode in RTL address map.
Signals crossing clk_a → clk_b need synchronizers (2+ FFs). Metastability causes intermittent firmware bugs — not fixed in software alone.
# Typical open-source sim (conceptual)
iverilog -o sim.vvp design.v tb.v
vvp sim.vvp
QEMU/peripheral models may not match RTL edge cases.
/verilog-basics-for-lowlevel Explain this APB register block and when STATUS bit updates relative to WRITE
| Symptom | Cause | Fix | |---------|-------|-----| | Bit toggles once | Pulse in RTL | Poll latch / clear-on-read in driver | | Random corruption | CDC | Hardware synchronizer; don't hack delays | | Read stale data | Bus bridge buffer | Follow RM ordering / barrier | | IRQ stuck | Level vs pulse in RTL | Match handler ACK sequence | | Verilog vs VHDL | Mixed SoC docs | Focus on interface signals table |
skills/baremetal/mmio-and-bit-manipulation — register access from Cskills/baremetal/peripherals-from-datasheet — RM ↔ RTLskills/baremetal/datasheet-and-refmanual-reading — doc navigationskills/kernel-dev/device-tree — hardware integration in Linuxskills/qemu/protocol-analysis — validate bus timingdevelopment
QEMU/KVM skill for virtualization and kernel development. Use when running qemu-system-x86_64 with KVM, configuring virtio devices, VFIO passthrough, QMP monitor, libvirt, or booting custom kernels. Activates on queries about QEMU, KVM, virtio, VFIO, virsh, virt-install, or -kernel -append.
development
Hardware virtualization internals skill for Intel VT-x and AMD-V. Use when studying VMCS/VMCB, EPT/NPT page tables, VMEXIT handling, APIC virtualization, or building minimal hypervisors. Activates on queries about VMX, SVM, VMCS, EPT, NPT, VMEXIT, or type-1 hypervisor.
testing
Linux containers internals skill for namespaces, cgroups, and OCI. Use when understanding clone/unshare namespaces, cgroups v2 limits, overlayfs, runc, seccomp profiles, capabilities, or escape mitigations. Activates on queries about namespaces, cgroups, overlayfs, runc, seccomp-bpf, OCI spec, or container escape.
tools
Reverse engineering skill for binary analysis. Use when decompiling with Ghidra, analyzing with radare2, scripting RE tools, triaging with strings/file/xxd, or diffing binaries. Activates on queries about Ghidra, radare2, r2, decompiler, Binary Ninja, Diaphora, or stripped binary analysis.