SpinalHDL / SpinalHDL/SpinalHDL
Question: Is there a way to get the SpinalConfig object during elaboration phase?
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2k
- Forks
- 391
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
I'm new to this so the wording might be a bit confusing. Also, there is a chance that this might be an instance of the XY problem as well.
Essentially what I want to do is call an external tool (a couple of python scripts) that does some RTL generation. I have already created Blackbox sub-classes corresponding to the generated code. Now, instead of having to call the external tool in a separate step, I thought it might be a good idea if I run python using scala.sys.process or something similar.
I've configured my SpinalConfig to generate files in a gen/ folder in the workspace root. I'd like to make it so my external tool also dumps files in the same path. But I don't want to hard-code the path when I'm calling my script. I'd like it if I can just set the targetDirectory once in SpinalConfig and access it at the place where I'm caling scala.sys.process. Is there a way to achieve something like this?
Best Regards,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SpinalConfig and the elaboration flow, then inspect how Blackbox subclasses interact with generated output and how scala.sys.process is invoked. Done means determining whether the configured targetDirectory can be accessed at the external-tool call site without hard-coding the path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scala
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100