Electronic – System verilog synthesis in Vivado

system-verilogverilogvivado

I am trying to synthesis system verilog (.sv) file in vivado. The file uses defines from another verilog (.v) file. This combination is not working. I tried renaming define file into *.sv then the error got resolved.

Is there such constraint that all defines for system verilog should be in another system verilog file ?

If no, what is the best way to resolved this issue ? I dont want to rename the file since it is part of release from different team. Please help.

Let know if you need further info on this.

Regards,

Tollin

Best Answer

Vivado Synthesis Guide guide mentions about this issue in page 260:

Targeting SystemVerilog for a Specific File

By default, the Vivado synthesis tool compiles *.v files with the Verilog 2005 syntax and *.sv files with the SystemVerilog syntax. To target SystemVerilog for a specific *.v file in the Vivado IDE, right-click the file, and select Source Node Properties. In the Source File Properties window, change the File Type to SystemVerilog, and click OK.

TCL Command to Set Properties

Alternatively, you can use the following Tcl command in the Tcl Console:

set_property file_type SystemVerilog [get_files <filename>.v]

Related Topic