-
Notifications
You must be signed in to change notification settings - Fork 184
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 backend to write *.f files #25
Comments
The idea of a dummy backend comes up from time to time. The big issue with such a backend is that it clashes with conditionals. With that said, I still understand there are many reasons for getting a list of files for use outside of what FuseSoC/Edalize can handle. But there is a way to do that already. FuseSoC will always write the EDAM file to the work root. It should be easy enough to parse that to extract the information of interest. It's a bit hacky since it requires at least running the setup stage, but perhaps we should allow a CLI flag that stops before even Edalize is called. What do you think? |
@imphil @olofk, I was just about to ask some questions related to this as I'm looking at doing this for our project. Can we resurrect this thread. So far I've got a 'filelist' backend that generates a VC file (.f/.vc) from the EDAM file list. It seems easy to generate a list of absolute file paths and include directories and write them out to the work directory. But what I wanted to do was allow the user to configure where the file should be written, for example, output the .f file parallel to the parent .core file. However, it doesn't look like the information for this is passed to Edalize. Is that correct? Or can I get the path to the parent .core file somehow? @olofk , what was your point about conditionals? I don't understand the issue here as I've not got a huge amount of experience looking at the internals. Shareef. |
Here's my first pass which will hopefully stimulate some discussion: sjalloq@08c07fd It requires an update to FuseSoC too: sjalloq/fusesoc@4db0343 |
@olofk , is it possible to force |
Sorry about the lack of feedback here. I would like to think a bit differently about the problem actually. The main use case here seems to be to run tool flows that accept .f files but don't have an Edalize backend. What I would like to do is to split this into two problems.
Looking at the first problem, I don't think this would necessarily have to be an Edalize backend. It can be a small utility that can be called on the command line or instantiated as a python class. This would allow stand-alone usage. For the second problem, I propose we create a "custom" backend. The only options we give to that backend would be which commands to run during configure, build and run. We can then tell it to run the edam2f script during the configure stage and launch whatever EDA tool we want during the build phase. What do you think? Also, regarding conditionals, this is less of a problem now with the new Edalize architecture where a "tool" will not necessarily correspond to a "backend" as is the case now. |
I had a vague memory of already doing something like this, and look what I just found https://github.com/olofk/edalize/tree/generic_tool I suggest we clean that up by adding a configure_cmd option, dropping the flist stuff and create a standalone edam2f script instead that we ship as an executable together with edalize |
Happy to look at this again in the future when I have time but for now we're already using this backend. |
Great that you got something working at least. I'll ping you if I can find the time to massage your filelist backend into an edam2f tool |
I'm happy to look at it if you want to send me some pointers and don't mind when it's done. |
@olofk Just wanted to resurrect this discussion. You recently merged the Filelist backend that I opened a PR on (#289) but we both forgot that it required an accompanying change to Fusesoc which you objected to: olofk/fusesoc#532 I never understood the objection and the thread went cold. Perhaps we can look at it again here and work out the best way forward. |
I and my team are very much interested in a filelist generation method for fusesoc/edalize! This would help a lot in starting integrating the tools into current standards flows and keep things running before adopting them more. I saw the last feature was removed and there's currently no branch for this feature, I would be interested in helping however/whenever possible. |
Ok, so I added a preliminary flist tool now. Would be great if you could try it out before I push it to main. It's on the https://github.com/olofk/edalize/tree/flist branch It uses the new Flow API and you can use it with the generic flow by setting the following keys in your target targets:
your_target:
flow: generic
flow_options:
tool: flist instead of the |
Where does it write the filelist? |
It gets written to the work root. If you are using FuseSoC, this is |
Can we get some feedback from others about whether this fits their needs before you push this. It doesn't fit ours so we won't be using it. I'll tidy up the Python version issues in our branch and people can use that if they want. I'll just have to change the class name if you push this. |
It looks really good. We don't have currently any requirements about where the filelist should be placed. It would be convenient to have the option to choose to place it in the IP folder, but currently this is good. The only change I propose is making the paths in the filelist global, instead of local to the work-root. This makes it easier for anyone to move or copy the files as they wish without the need to additionally text-parse the outputs for something the tool should be able to give. Relative paths would constraint some tools or scripts. |
@olofk I'm going to write a script that wraps this behaviour of the new Would you be happy having this installed as an entry point parallel to fusesoc? If so, is I need something that outputs the filelist at the same location as the core file. |
This diff shows a working example. I fixed At the moment the
|
This commit updates the output of `fusesoc core show` to add the filename of the core file itself. This change is required for tools such as the filelist Edalize backend as discussed in olofk/edalize#25. The output of `fusesoc core show` now looks like: CORE INFO Name: vee:el:en:vee Description: Top bombing Core root: /root/path/to/core/file Core file: basename.core
This commit updates the output of `fusesoc core show` to add the filename of the core file itself. This change is required for tools such as the filelist Edalize backend as discussed in olofk/edalize#25. The output of `fusesoc core show` now looks like: CORE INFO Name: vee:el:en:vee Description: Top bombing Core root: /root/path/to/core/file Core file: basename.core
This commit updates the output of `fusesoc core show` to add the filename of the core file itself. This change is required for tools such as the filelist Edalize backend as discussed in olofk/edalize#25. The output of `fusesoc core show` now looks like: CORE INFO Name: vee:el:en:vee Description: Top bombing Core root: /root/path/to/core/file Core file: basename.core
This commit updates the output of `fusesoc core show` to add the filename of the core file itself. This change is required for tools such as the filelist Edalize backend as discussed in olofk/edalize#25. The output of `fusesoc core show` now looks like: CORE INFO Name: vee:el:en:vee Description: Top bombing Core root: /root/path/to/core/file Core file: basename.core
Many EDA tools support digesting file lists in *.f files. Having a (pseudo-)backend which generates these files would serve as stopgap for EDA tools which we don't support natively so far, and opens the door to more exploration.
Feature list (to be discussed):
Design considerations:
The text was updated successfully, but these errors were encountered: