本文整理汇总了Python中chiptools.core.project.Project.add_unittest方法的典型用法代码示例。如果您正苦于以下问题:Python Project.add_unittest方法的具体用法?Python Project.add_unittest怎么用?Python Project.add_unittest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chiptools.core.project.Project
的用法示例。
在下文中一共展示了Project.add_unittest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: for
# 需要导入模块: from chiptools.core.project import Project [as 别名]
# 或者: from chiptools.core.project.Project import add_unittest [as 别名]
config = {
'simulation_directory': 'simulation',
'synthesis_directory': 'synthesis',
'simulator': 'vivado',
'synthesiser': 'vivado',
'part': 'xc7z030sbg485-2',
}
# The Project class provides an add_config or add_config_dict method. We use
# the add_config_dict method here to load the config dictionary, you can set
# individual configuration items using add_config.
project.add_config_dict(**config)
# Some unit tests have been written for the component and stored in
# basic_unit_test.py. The Project class provides an 'add_unittest' method for
# adding unit tests to the project, it expects a path to the unit test file.
project.add_unittest('basic_unit_test.py')
# The constraints are added to the project using the add_constraints method.
# The optional 'flow' argument is used to explicitly identify which synthesis
# flow the constraints are intended for (the default is to infer supported
# flows from the file extension).
# project.add_constraints('axi_lite_slave_example.xdc', flow='vivado')
# Synthesis generics can be assigned via the add_generic command, in this
# example we set the data_Width generic to 32:
project.add_generic('data_width', 32)
# Source files for the component are added to the project. The Project
# 'add_file' method accepts a file path and library name, if no library is
# specified it will default to 'work'. Other file attributes are available but
# not covered in this example.
示例2: for
# 需要导入模块: from chiptools.core.project import Project [as 别名]
# 或者: from chiptools.core.project.Project import add_unittest [as 别名]
config = {
'simulation_directory': 'simulation',
'synthesis_directory': 'synthesis',
'simulator': 'modelsim',
'synthesiser': 'ise',
'part': 'xc7a100tcsg324-1',
}
# The Project class provides an add_config or add_config_dict method. We use
# the add_config_dict method here to load the config dictionary, you can set
# individual configuration items using add_config.
project.add_config_dict(**config)
# Some unit tests have been written for the max_hold component and stored in
# max_hold_tests.py. The Project class provides an 'add_unittest' method for
# adding unit tests to the project, it expects a path to the unit test file.
project.add_unittest('max_hold_tests.py')
project.add_unittest('basic_unit_test.py')
# The constraints are added to the project using the add_constraints method.
# The optional 'flow' argument is used to explicitly identify which synthesis
# flow the constraints are intended for (the default is to infer supported
# flows from the file extension).
project.add_constraints('max_hold.xdc', flow='vivado')
project.add_constraints('max_hold.ucf', flow='ise')
# Synthesis generics can be assigned via the add_generic command, in this
# example we set the data_Width generic to 3:
project.add_generic('data_width', 3)
# Source files for the max_hold component are added to the project. The Project
# 'add_file' method accepts a file path and library name, if no library is