def test_parses_gcc_backend(self, check_output): version = b"""\ GHDL 0.31 (20140108) [Dunoon edition] Compiled with GNAT Version: 4.8 GCC back-end code generator Written by Tristan Gingold. Copyright (C) 2003 - 2014 Tristan Gingold. GHDL is free software, covered by the GNU General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. """ check_output.return_value = version self.assertEqual(GHDLInterface.determine_backend("prefix"), "gcc")
def test_parses_gcc_backend(self, check_output): version = b"""\ GHDL 0.31 (20140108) [Dunoon edition] Compiled with GNAT Version: 4.8 GCC back-end code generator Written by Tristan Gingold. Copyright (C) 2003 - 2014 Tristan Gingold. GHDL is free software, covered by the GNU General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. """ check_output.return_value = version self.assertEqual(GHDLInterface.determine_backend(), "gcc")
# Check simulator. print("=============================================") simulator_class = SIMULATOR_FACTORY.select_simulator() simname = simulator_class.name print(simname) if (simname == "modelsim"): f = open("modelsim.do", "w+") f.write("add wave * \nlog -r /*\nvcd file\nvcd add -r /*\n") f.close() print("=============================================") # Check GHDL backend. code_coverage = False try: if (GHDLInterface.determine_backend("") == "gcc" or GHDLInterface.determine_backend("") == "GCC"): code_coverage = True else: code_coverage = False except: print("") ############################################################################## # VUnit instance. ui = VUnit.from_argv() ############################################################################## # Add module sources.