1. 将所有文件编译成目标文件:
使用命令:iverilog -o <target_file> <source_file1> <source_file2> ...
2. 将目标文件链接成可执行文件:
使用命令:vvp <target_file>
3. 如果文件之间有多级调用关系,则需要在编译和链接时加上-y参数,以指定搜索路径:
使用命令:iverilog -o <target_file> -y <path_to_source_files> <source_file1> <source_file2> ...
使用命令:vvp -y <path_to_source_files> <target_file>