예제 #1
0
    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")
예제 #2
0
파일: run_3.py 프로젝트: suzizecat/colibri
# -*- coding: utf-8 -*-
from os.path import join, dirname, abspath
import subprocess
from vunit.sim_if.ghdl import GHDLInterface
from vunit.sim_if.factory import SIMULATOR_FACTORY
from vunit import VUnit, VUnitCLI

################################################################################

################################################################################
#Check simulator.
print("=============================================")
simname = SIMULATOR_FACTORY.select_simulator().name
code_coverage = (simname == "ghdl" and \
                (GHDLInterface.determine_backend("")=="gcc" or  \
                GHDLInterface.determine_backend("")=="GCC"))
print("Simulator = " + simname)
print("=============================================")

################################################################################
#VUnit instance.
ui = VUnit.from_argv()

#Add module sources.
test_1_src_lib = ui.add_library("src_lib")
test_1_src_lib.add_source_files("exampleRunpy_1.vhd")

#Add tb sources.
test_1_tb_lib = ui.add_library("tb_lib")
test_1_tb_lib.add_source_files("tbVhdlVunitRunpy.vhd")