SuperAPI AI Directory

eda-vm

Design & creation

View repository

Updated 10-16 00:29

About this skill

EDA VM Workflow Guide

This Skill is used to standardize the complete interaction workflow for code transfer, tool invocation, and simulation/synthesis result return on a dedicated integrated circuit (IC) EDA virtual machine (vm).


1. Target Environment Quick Reference

Item Description
SSH alias vm(passwordless login and key algorithm are already configured in ~/.ssh/config )
Virtual machine system CentOS 6.x (Linux kernel 2.6.32, x86_64)
Login user and home directory crazy (/home/crazy)
Temporary working root directory ~/temp/(it is recommended to create a subdirectory for each task:~/temp/<project_name>/)
EDA toolchain support Synopsys (VCS, Verdi, DC, FM, SpyGlass, ICC/ICC2, PT, StarRC, HSpice, etc.), Cadence, Mentor, UVM-1.2
Environment variable entry point /opt/skel/tools_env/bashrc(the login shell loads it automatically)
VMware shared directory /mnt/hgfs/share(can be used for GB-level large waveform/GDS transfers)

2. Trigger Criteria

  1. Automatic trigger:
    • Tasks involving integrated circuit (IC) design, digital front-end/back-end, simulation verification, and EDA toolchain invocation (such as Verilog/SystemVerilog, UVM, VCS simulation, Verdi waveform export, Design Compiler logic synthesis, SpyGlass code lint, PrimeTime timing analysis, HSpice analog simulation, etc.).
  2. Manual/explicit trigger:
    • The user explicitly mentions ssh vm、虚拟机、把文件发到 vm or 在虚拟机中运行。
    • In addition to EDA tasks, if routine Linux tasks need to be executed in the virtual machine, they must be executed when the user explicitly requests it.

3. File Transfer Specifications (Extremely Important: Must add -O)

[!CAUTION] Must use scp -O protocol parameter
The higher-version OpenSSH built into Windows 10/11 uses the SFTP subsystem protocol for transfer by default, while the virtual machine's CentOS 6 sshd does not enable the SFTP channel. Directly executing scp will cause subsystem request failed on channel 0。All scp commands must carry the -O parameter (force Legacy SCP protocol)。

3.1 Transfer to Virtual Machine (Upload)

Before transfer, ensure that the project-specific directory has been created on the virtual machine:

# 1. 创建任务子目录
ssh -o BatchMode=yes vm "mkdir -p ~/temp/<project_name>"

# 2. 上传单个文件
scp -O <local_file> vm:~/temp/<project_name>/

# 3. 递归上传整个目录
scp -O -r <local_directory> vm:~/temp/<project_name>/

3.2 Pull Artifacts Back to Physical Machine (Download)

After the simulation run is complete, pull the generated logs, netlists, reports, etc. back to the physical machine for viewing:

# 1. 下载单个文件(如仿真日志或综合报告)
scp -O vm:~/temp/<project_name>/run.log ./run.log

# 2. 递归下载报告目录
scp -O -r vm:~/temp/<project_name>/reports ./reports

3.3 Alternative Channel for Very Large Files

If multi-GB-level waveform files (.fsdb / .vcd) or layout files (.gds) are involved, they can be operated directly through the VMware shared directory without network copying:

  • Virtual machine path:/mnt/hgfs/share/

4. Command Execution Specifications

4.1 Environment Loading and Execution Shell

Because the EDA tools' paths and License configuration are in ~/.bashrc and /opt/skel/tools_env/bashrc , when remotely invoking non-interactive SSH through automation tools,a login shell must be used for execution:

# 标准执行模板
ssh vm "bash -lc 'cd ~/temp/<project_name> && <command>'"

4.2 EDA Tool Headless / Batch Specifications

When executed via SSH, there is no X11 GUI interface. All EDA tools must explicitly specify batch/command-line mode operation. Directly launching graphical interactive interfaces is strictly prohibited (to prevent processes from hanging and blocking):

  • VCS compilation and simulation:
    # 编译
    vcs -full64 -sverilog +v2k -debug_access+all [files] -l compile.log
    # 仿真
    ./simv -l sim.log
    
  • Design Compiler (DC) synthesis:
    dc_shell -f run_dc.tcl | tee dc.log
    # 或
    dc_shell-t -f run_dc.tcl | tee dc.log
    
  • PrimeTime (PT) timing analysis:
    pt_shell -f run_pt.tcl | tee pt.log
    
  • SpyGlass static check:
    spyglass -batch -project my_proj.prj
    
  • HSpice analog simulation:
    hspice -i input.sp -o output.lis
    

4.3 Complex multi-step tasks (scripted execution recommended)

For tasks involving multi-step EDA flows (such as "code generation -> VCS compilation -> simulation waveform generation -> test result extraction"):

  1. Generate locally a run.sh or Makefile。
  2. containing the complete flow, and upload it to the virtual machine:
    scp -O run.sh vm:~/temp/<project_name>/run.sh
    
  3. Grant permissions and execute in the virtual machine:
    ssh vm "bash -lc 'cd ~/temp/<project_name> && chmod +x run.sh && ./run.sh'"
    

4.4 Long-running background tasks (background execution and polling)

If simulation or synthesis needs to run for a long time (more than 1 minute):

# 启动后台任务并重定向输出
nohup bash -lc "cd ~/temp/<project_name> && ./run.sh" > run.log 2>&1 & echo $! > pid.txt

# 检查进程状态
ps -ef | grep $(cat pid.txt)

# 实时查看输出日志末尾
tail -n 20 run.log

5. CentOS 6 features and pitfall avoidance guide

  1. Service management commands:
    • The virtual machine is CentOS 6,no systemctl command。
    • To view/start/stop services, use:service <service_name> status/start/restart。
  2. GCC and base library versions:
    • The default GCC and glibc versions are relatively old (glibc 2.12). If you compile local C/C++ tools or extensions, pay attention to compatibility and avoid depending on modern C++ standards (C++17/20).
  3. Temporary file cleanup:
    • Simulation runs may generate relatively large temporary files (such as csrc/、simv.daidir/, intermediate .dump)。
    • After the task is wrapped up and the results have been retrieved, you may ask the user whether to clean up the ~/temp/<project_name>/ directory to free up disk space on the virtual machine.