** Error: C:/Modeltech_pe_edu_10.3b/examples/prtr1/Classifier_Codes/trialsv.sv(8): (vlog-13006) Could not find the package (top1). Design read will continue, but expect a cascade of errors after this failure. Furthermore if you experience a vopt-7 error immediately before this error then please check the package names or the library search paths on the command line.
my code is
entity top1 is
generic(word_length:integer :=32);
port(
clk,reset,ready : in std_logic;
data_in: in std_logic_vector(word_length -1 downto 0);
h: out std_logic_vector(word_length/4 -1 downto 0)
);
end top1;
That import line is attempting to load an SV package called “top1” which doesn’t exist, that is the error message you are getting. You don’t need to ‘import’ or otherwise do anything special to allow VHDL to be instantiated in Verilog
Also, you don’t want to have both a module in the SV named ‘top1’ and your vhdl entity named ‘top1’ They will overwrite each other and your simulation will only have which ever one was compiled last.
Finally your example has a number of typos, on things like the interface name not being consistent ‘itf’ vs ‘intf’
This time i want to be clear
i am having VHDL entity named top1 and saved with top1.vhd in the library named prtr1
now i to verify using system verilog module named testbench and saved it as svtrial.sv in the library prtr1
the code in the svtrial.sv goes down here