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
Strings are not quoted for Xilinx ISE/xst "-generics" option #175
Comments
Thanks for reporting. Those string parameters have given me a lot of headache. I need to check that and ideally write some unit tests. Regarding the file parameter expansion, it will expand environment variables, ~ and then convert to an absolute path before it is passed to the EDA tool if you pass it on the command line. If you set default values in the .core file, it will be relative to the work root (e.g. build/system_name/sim-isim). Currently, I've been using hacks like setting the value to ../src/system_name/path/to/file as the default value. This is of course a horrible solution and I have been planning to make it easier to refer to files in the exported source directories. But, funny thing is that I'm just in this moment working on another feature that will likely be of great help here. I'm implementing a new parameter, copyto, that you can set on files in filesets to copy them to a location relative the work root. In your case that would mean that you specify your file with |
copyto is implemented now. You can find it on the |
...and pushed to master. Will investigate the quoting problems soon |
Thanks, I will check this out in the next days. I had already the idea of a similar concept of copyto. But generally FuseSoc is great, it really helps to target hdl code for different tools and also publish a project in a reproducable manner to e.g. Github. Many thanks for your work |
First of all. Thanks for letting me know that you find the tool helpful! copyto works also for no-export mode (that was one of the reasons I chose copyto instead of moveto). That is also useful for example when you use Vivado xci files since they tend to leave a lot of temp files in the directory where the xci lives, so it can pollute source repositores. Hmm.. I haven't checked how file_open behaves. Do you mean that it search both in the working directory and the source file directory, or only in the latter? If it's the latter, then the copyto functionality still isn't helping out all that much I guess, but you can still add a pre_build_script to copy the file manually before building. Regarding the start-eda-tool option, I see what you mean. That would be useful also for debugging with simulators like modelsim. I will start working towards this. As a first step I think that we could generate two tcl files. One that contains everything but the last line, and then another file that just sources the first file and start running. That way you have an easier option to run the first file yourself and open the tool. Need to dig into that a bit as I haven't used ISE tcl mode very much. |
Could you please check if the patch applied to the isequotes branch works for you? That should remove the need to manually escape strings for ISE |
If this works for you, please close the issue and we can track your request for interactive mode in #178 |
Thanks, I will hopefully have time to check it at the weekend. |
Works ! |
Hi,
I encountered a problem when using the [parameters] section of fusesoc together with ISE:
fussoc parameters of type "file" or "str" passed to the -generics option of xst must be quoted with ".
The generated tcl file should for example look like:
project set "Generics, Parameters" "RamFileName=\"compiled_code/monitor.hex\"" -process "Synthesize - XST"
Currently the " are missing, as temporary workaround I have added them to the parameter itself
[parameter RamFileName] datatype=file default=\"compiled_code/monitor.hex\" description=Initial boot RAM contents (in hex) paramtype=vlogparam scope=public
But this will not work with isim which expects the parameter without quotes :-(
In addition I'm not sure about expected semantics of "file" parameters:
I would assume that the path should be expanded to a path relative to the build root when passed to the tools, like it is done for the project files.
The text was updated successfully, but these errors were encountered: