程序没有报错,TestBench也没有报错
在modelsim报错
Loading work.project_tb(fast)
# Loading work.project(fast)
# ** Error (suppressible): (vsim-3009) [TSCALE] - Module 'project' does not have a timeunit/timeprecision specification in effect, but other modules do.
# Time: 0 ps Iteration: 0 Instance: /project_tb/project_tb File: F:/FPGA/project/verilog TimeDelay/project.v
# Error loading design
解决方法
在源码的开头也加上
`timescale 1ns/1ps
再次运行modelsim
解决问题