-
Notifications
You must be signed in to change notification settings - Fork 189
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
symbiyosys: honour include paths #371
Conversation
The current `run` step of the symbiyosys backend generates a `sby` command which includes the hardcoded `-d build` argument. However, this command line argument is incompatible with multiple tasks. This fix removes the hardcoded `-d` argument and introduces a new `extra_options` tool option for the symbiyosys backend, which can be used to pass additional arguments for the `sby` command (e.g. `-d build`, if necessary). The example usage of the `extra_options`: ``` symbiyosys: tasknames: # A list of task names to pass to sby. Defaults to empty (in which case # sby will run each task in the .sby file) - my_proof extra_options: # A list of extra command line arguments to sby. Defaults to empty. - -d - build ```
@Henkru Can i have your thoughts also please? |
@@ -205,7 +246,6 @@ def _get_read_flags(self): | |||
"-D{}={}".format(key, self._param_value_str(value)) | |||
for key, value in self.vlogdefine.items() | |||
] | |||
+ ["-I{}".format(inc) for inc in self.incdirs] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer do includes with flags. This doesn't work
@@ -275,7 +315,7 @@ def _interpolate_sby(self, src): | |||
"as a Jinja2 template: {}.".format(src_path, err) | |||
) | |||
|
|||
files = "\n".join(self.rtl_paths) | |||
files = "\n".join(map(lambda x: f"{x.rel_name} {x.name}", self.includes)) + "\n" + "\n".join(self.rtl_paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the files template to contain include files in dst src
form
], | ||
} | ||
|
||
def _get_include_files(self, force_slash=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the include file name, no just the include directory
This PR is on top of #362, because symbiyosys is basically unusable without.
symiyosys tasks are performed within a sub directory of the working directory, and symiyosys copies all working source into that directory. Currently include files are not specified in the
[files]
section of the file, so are not copied in to that working set.This PR changes that, and generates entries for the include files. This are of the lesser used form
By using this form, we can honour the
include_path
property in the include files.so includes with paths in files can be honoured
a.sv
a.core
generates
The file structure within the symnbiyosys working directory now contains includes at the correct relative locations