Comments (3)
OK, how about the following. Instead of passing top_core
in the EDAM dict, allow Fusesoc to expand environment variables and a special __CORE_PATH__
string. Perhaps there's a cleaner way of doing the same thing but my knowledge of the Fusesoc internals is limited.
diff --git a/fusesoc/capi2/core.py b/fusesoc/capi2/core.py
index ce17725..745cded 100644
--- a/fusesoc/capi2/core.py
+++ b/fusesoc/capi2/core.py
@@ -79,6 +79,21 @@ class String(str):
)
+class StringWithVars(str):
+ """A string containing environment variables to expand and/or the special
+ __CORE_PATH__ variable that should be expanded to the dirname of the parent
+ core file. """
+
+ def __init__(self, string):
+ self.string = os.path.expandvars(string)
+
+ def parse(self, core_root):
+ self.string = self.string.replace('__CORE_PATH__', core_root)
+
+ def __str__(self):
+ return self.string
+
+
class Integer(int):
pass
@@ -396,6 +411,8 @@ class Core:
if hasattr(section, member):
_member = getattr(section, member)
if _member:
+ if isinstance(_member, StringWithVars):
+ _member.parse(os.path.abspath(self.core_root))
options[member] = StringWithUseFlags(_member).parse(flags)
for member in section.lists:
if hasattr(section, member):
from edalize.
I think the core functionality of the filelist plugin is useful and something people want, but I don't want to build in any special logic to find where the toplevel core file is located.
The closest thing I can give you is to do something like:
DIR=`fusesoc core show <your_core> | grep Core\ root | sed 's/^Core root: *//g'`
fusesoc run <your_core> --outpath=$DIR
which would give you the directory of the top level core file.
If that works for you, I think we can modify the backend to drop the top_core dependency. Otherwise I am fine with removing it for now and put this functionality back at a later point.
from edalize.
OK, let's take it out. That solution doesn't meet our requirements and I'm happy to maintain our own fork if we can't get a solution that doesn't require horrid work arounds.
from edalize.
Related Issues (20)
- Xcelium: file list HOT 1
- Modelsim missing in tools
- Support a Vivado IP-packaging flow HOT 2
- Simulating Vivado IPs (xci, bd) HOT 4
- `make_libraries_directories` on Windows fails due to `mkdir -p` HOT 3
- GHDL Support for cocotb simulation flow HOT 2
- Vars do not survive Edaflow
- Add update_compile_order to vivado workflow HOT 1
- QSys Pro 23 files are not processed correctly by the filter HOT 4
- Jinja2 issue witth edarool loader HOT 4
- Vivado flow not re-run when Verilog parameter is changed HOT 3
- Yosys: `configure_main` should check for "file_type" in fileset, or provide a default
- Incorrect toplevel name used when loading EDIF netlist in Vivado
- How to read an EDIF netlist into Vivado that isn't the toplevel?
- Not possible to fully suppress stdout in edatool API?
- Passing Verilog string parameters with quotes
- edalize/flows/edaflow.py # Yeah, I know. It's just a temporary hack HOT 1
- Symbiflow tool doesn't pass Yosys parameters when using VPR as PnR HOT 1
- Error using f4pga flow for Xilinx
- Edatool.tool_options.get() returns string "None" rather than NoneType
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edalize.