What is the difference between .svh and .pkg?

Hi,

I found something special difference when I’ve seen .svh and .pkg file.
I think both are the very similarly working such as something get together into the one file.

For example,

In .svh file


`include "packet.sv"
`include "monitor.sv"
`include "sequence.sv"
`include "sequencer.sv"
`include "driver.sv"

and in the pkg file

package example_pkg;
import uvm_pkg::*;
`include "uvm_macros.svh"
`include "example.svh"
endpackage


I think both are working very similarly…
What is the difference between .svh and .pkg?
Can I implement do as the below instead using .svh?

package example_pkg;
import uvm_pkg::*;
`include "uvm_macros.svh"
`include "example.svh"

`include "packet.sv"
`include "monitor.sv"
`include "sequence.sv"
`include "sequencer.sv"
`include "driver.sv"
endpackage


In reply to UVM_LOVE:

Compilers only care about file extensions for files you put on the command line. It uses that to choose which language to compile. The file extension for `include files does not matter As you cannot switch languages midstream.

Most tools only recognize *.sv for Systemverilog by default, so I suggest sticking with that.

In reply to dave_59:

In reply to UVM_LOVE:
Compilers only care about file extensions for files you put on the command line. It uses that to choose which language to compile. The file extension for `include files does not matter As you cannot switch languages midstream.
Most tools only recognize *.sv for Systemverilog by default, so I suggest sticking with that.

Thanks Dave_59