pass value from system verilog to VHDL (std_logic_vector)

S

sundar

Hi,
In my VHDL DUT I have a generic declared as std_logic_vector as below
generic_name : std_logic_vector := "0100000000";

My verification environment is in System Verilog where I need to pass
a value to this generic during mapping it in System Verilog

dut
#(
..generic_name (),
)
....
I cudnt able to pass any value from my test bench and my Questasim
6.3c simulator states
# ** Error: (vsim-3051) VHDL generic 'generic_name' is the wrong type
for the associated Verilog parameter.

Please let me know your thoughts.

Thanks,
Sundar
Note: I had a workaround by leaving the dut mapping as blank and
passing value during vsim like
-g/tb/dut_0/generic_name=10'b0100000000.
 
M

Marcus Harnisch

sundar said:
I cudnt able to pass any value from my test bench and my Questasim
6.3c simulator states
# ** Error: (vsim-3051) VHDL generic 'generic_name' is the wrong type
for the associated Verilog parameter.

See section "VHDL Instantiation Criteria Within Verilog" in the Questa
User Guide. std_logic_vector is not among the supported types for
generics.

Regards
Marcus
 
S

sundar

sundar said:
I cudnt able topassany value from my test bench and my Questasim
6.3c simulator states
# ** Error: (vsim-3051) VHDL generic 'generic_name' is the wrong type
for the associated Verilog parameter.

See section "VHDL Instantiation Criteria Within Verilog" in the Questa
User Guide. std_logic_vector is not among the supported types for
generics.

Regards
Marcus

--
note that "property" can also be used as syntaxtic sugar to reference
a property, breaking the clean design of verilog; [...]

(seen onhttp://www.veripool.com/verilog-mode_news.html)
Hello Marcus,
I decalred parameter inteeger type and passed it to VHDL wrapper to
convert it into std_logic_vector which helped me in this regard.

Thanks,
Sundar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top