Пример #1
0
# Create a new Project
project = Project(root=project_root)

# Configure project, you may wish to edit some of these settings depending
# on which simulation/synthesis tools are installed on your system.
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)