1717
1818class Rivierapro (Edatool ):
1919
20- argtypes = ["plusarg" , "vlogdefine" , "vlogparam" ]
20+ argtypes = ["plusarg" , "vlogdefine" , "vlogparam" , "generic" ]
2121
2222 @classmethod
2323 def get_doc (cls , api_ver ):
@@ -37,6 +37,11 @@ def get_doc(cls, api_ver):
3737 "type" : "String" ,
3838 "desc" : "Additional options for compilation with vlog" ,
3939 },
40+ {
41+ "name" : "vcom_options" ,
42+ "type" : "String" ,
43+ "desc" : "Additional options for compilation with vcom" ,
44+ },
4045 {
4146 "name" : "vsim_options" ,
4247 "type" : "String" ,
@@ -90,6 +95,7 @@ def _write_build_rtl_tcl_file(self, tcl_main):
9095 args = ["-2008" ]
9196 else :
9297 args = []
98+ args += self .tool_options .get ("vcom_options" , [])
9399 elif f .file_type == "tclSource" :
94100 cmd = None
95101 tcl_main .write ("do {}\n " .format (f .name ))
@@ -122,6 +128,9 @@ def _write_build_rtl_tcl_file(self, tcl_main):
122128 elif cmd == "vcom" :
123129 if not common_compilation_vhdl :
124130 common_compilation_vhdl += ["vcom" ]
131+ common_compilation_vhdl += self .tool_options .get (
132+ "vcom_options" , []
133+ )
125134 common_compilation_vhdl += [f .name , "\\ \n " ]
126135 else :
127136 common_compilation_vhdl += [f .name , "\\ \n " ]
@@ -164,6 +173,8 @@ def _write_run_tcl_file(self):
164173 # Top-level parameters
165174 for key , value in self .vlogparam .items ():
166175 args += ["-g{}={}" .format (key , self ._param_value_str (value ))]
176+ for key , value in self .generic .items ():
177+ args += ["-g{}={}" .format (key , self ._param_value_str (value ))]
167178 tcl_launch .write (" " .join (args ) + "\n " )
168179 tcl_launch .close ()
169180
0 commit comments