Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attributes/contraints to a module #396

Closed
andresdemski opened this issue Jun 3, 2020 · 2 comments
Closed

Add attributes/contraints to a module #396

andresdemski opened this issue Jun 3, 2020 · 2 comments
Labels

Comments

@andresdemski
Copy link

andresdemski commented Jun 3, 2020

Hi,

In order to add PS8 instance (for ZynqMP devices) to nMigen project, i need to add the following constraint:

set_property DONT_TOUCH true [get_cells  "ps/PS8_i"]

The only way i found was:

core = Test()
plat = MyPlatform()
constraints = '''
set_property DONT_TOUCH true [get_cells  "ps/PS8_i"]
'''
plat.build(core, add_constraints=constraints)

Is there any other way to do this? How can i add a constraint/attribute to a module in the elaborate method?

@whitequark
Copy link
Member

whitequark commented Jun 3, 2020

Do you actually want to add the attribute to an instance? In that case try Instance("PS8", a_DONT_TOUCH="true", ...).

@andresdemski
Copy link
Author

andresdemski commented Jun 3, 2020

Works like a charm. Thanks you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants