def test_capi2_get_tool(): from fusesoc.core import Core core_file = os.path.join(tests_dir, "capi2_cores", "misc", "tools.core") core = Core(core_file) assert None == core.get_tool({"tool": None}) assert "verilator" == core.get_tool({"tool": "verilator"}) assert "icarus" == core.get_tool({"target": "with_tool"}) assert "verilator" == core.get_tool({"target": "with_tool", "tool": "verilator"})
def test_capi2_get_tool(): from fusesoc.core import Core core_file = os.path.join(tests_dir, "capi2_cores", "misc", "tools.core") core = Core(core_file) assert None == core.get_tool({'tool': None}) assert 'verilator' == core.get_tool({'tool': 'verilator'}) assert 'icarus' == core.get_tool({'target': 'with_tool'}) assert 'verilator' == core.get_tool({ 'target': 'with_tool', 'tool': 'verilator' })
def test_capi2_get_tool(): from fusesoc.core import Core core_file = os.path.join(tests_dir, "capi2_cores", "misc", "tools.core") core = Core(core_file) assert None == core.get_tool({'tool' : None}) assert 'verilator' == core.get_tool({'tool' : 'verilator'}) assert 'icarus' == core.get_tool({'target' : 'with_tool'}) assert 'verilator' == core.get_tool({'target' : 'with_tool', 'tool' : 'verilator'})
def test_get_tool(): cores_root = os.path.join(os.path.dirname(__file__), "cores") core = Core(os.path.join(cores_root, "atlys", "atlys.core")) assert None == core.get_tool({"target": "sim", "tool": None}) assert "icarus" == core.get_tool({"target": "sim", "tool": "icarus"}) assert "ise" == core.get_tool({"target": "synth", "tool": None}) assert "vivado" == core.get_tool({"target": "synth", "tool": "vivado"}) core = Core(os.path.join(cores_root, "sockit", "sockit.core")) assert "icarus" == core.get_tool({"target": "sim", "tool": None}) assert "icarus" == core.get_tool({"target": "sim", "tool": "icarus"}) del core.main.backend assert None == core.get_tool({"target": "synth", "tool": None}) assert "vivado" == core.get_tool({"target": "synth", "tool": "vivado"}) core.main.backend = "quartus"
def test_get_tool(): cores_root = os.path.join(os.path.dirname(__file__), 'cores') core = Core(os.path.join(cores_root, 'atlys', 'atlys.core')) assert None == core.get_tool({'target': 'sim', 'tool': None}) assert 'icarus' == core.get_tool({'target': 'sim', 'tool': 'icarus'}) assert 'ise' == core.get_tool({'target': 'synth', 'tool': None}) assert 'vivado' == core.get_tool({'target': 'synth', 'tool': 'vivado'}) core = Core(os.path.join(cores_root, 'sockit', 'sockit.core')) assert 'icarus' == core.get_tool({'target': 'sim', 'tool': None}) assert 'icarus' == core.get_tool({'target': 'sim', 'tool': 'icarus'}) del core.main.backend assert None == core.get_tool({'target': 'synth', 'tool': None}) assert 'vivado' == core.get_tool({'target': 'synth', 'tool': 'vivado'}) core.main.backend = 'quartus'
def test_get_tool(): cores_root = os.path.join(os.path.dirname(__file__), 'cores') core = Core(os.path.join(cores_root, 'atlys', 'atlys.core')) assert None == core.get_tool({'target' : 'sim', 'tool' : None}) assert 'icarus' == core.get_tool({'target' : 'sim', 'tool' : 'icarus'}) assert 'ise' == core.get_tool({'target' : 'synth', 'tool' : None}) assert 'vivado' == core.get_tool({'target' : 'synth', 'tool' : 'vivado'}) core = Core(os.path.join(cores_root, 'sockit', 'sockit.core')) assert 'icarus' == core.get_tool({'target' : 'sim', 'tool' : None}) assert 'icarus' == core.get_tool({'target' : 'sim', 'tool' : 'icarus'}) del core.main.backend assert None == core.get_tool({'target' : 'synth', 'tool' : None}) assert 'vivado' == core.get_tool({'target' : 'synth', 'tool' : 'vivado'}) core.main.backend = 'quartus'