Hi sree,
For simplicity keep all files in one directory.
For SPI environment execution using Questasim follow the sequence as below,
From the command prompt navigate to SPI environment directory & then use below command,
qverilog SPI.v (DUT)
package.sv(package file)
interface.sv(interface file)
top.sv(top level module file)
e.g. qverilog spi.v
pkg.sv spi_if.sv spi_top.sv
Regards,
Vikas