在tb中加上下面一组语句,用来产生波形文件。 initial begin $shm_open("./SPISLAVE.shm"); $shm_probe ("AS"); end 如果把上面的语句注释掉,运行的过程似乎是正确的,如下: ncsim: v04.00.(s005): (c) Copyright 1995 - 2002 Cadence Design Systems, Inc. ncsim: v04.00.(s005): Started on Dec 10, 2010 at 12:24:34 ncsim -f ncsim.args -messages SIMLOG Loading snapshot worklib.SIMLOG:verilog .................... Done ncsim> run Simulation complete via $finish(1) at time 60 US + 0 .\code\mosi_24.v:75 #60000 $finish; ncsim> exit ncsim: v04.00.(s005): Exiting on Dec 10, 2010 at 12:24:37 (total: 00:00:03) 但是加上上面的语句,运行的过程如下: ncsim: v04.00.(s005): (c) Copyright 1995 - 2002 Cadence Design Systems, Inc. ncsim: v04.00.(s005): Started on Dec 10, 2010 at 12:24:34 ncsim -f ncsim.args -messages SIMLOG Loading snapshot worklib.SIMLOG:verilog .................... Done ncsim> run