Comments (11)
This would be great. I have a couple of use cases I would like to have supported here
- As a developer, creating a python tool that uses Edalize, I would like to access stdout/stderr independently of each other
- As a user of FuseSoC I would like to run FuseSoC (and thereby Edalize) with minimal output in the normal case, but have access to the full output if something goes wrong
- As a user of FuseSoC I would like to set a verbose mode and a silent mode
2 or 3 is probably most relevant for FuseSoC, but I'm mentioning it here so that the design in Edalize enables this
from edalize.
It would be a really nice feature!!
from edalize.
Is it on your roadmap? We would like use this feature in TerosHDL.
from edalize.
In the past I've used tool output to help automated CI flows make decisions on build and test outcomes and sometimes it has been necessary to use stdout or stderr. I could definitely make use of this feature if it were available.
from edalize.
It sounds like there are multiple uses for this. Just started looking into it hoping it would be a simple hack but after reading up a bit I'm not so sure anymore. The documentaion warns against capturing stdout when using subprocess.check_call and recommends using subprocess.run instead, which would break Python 2. Perhaps this is the time that Python2 support is dropped, or maybe it works fine with check_call. Does anyone have experience with this?
from edalize.
Sadly this is stretching my knowledge quite far. I'd be wary of using subprocess.check_call
because of the warning that the child process will block if it produces too much for stdout. These tools can produce an awful lot of stdout.
I know we've used subprocess.Popen()
in the past. Briefly looking at the documentation it looks like Popen
is a more flexible option but I don't know what the implications/drawbacks are.
from edalize.
There is a subprocess.check_output()
-- however the entire stdout / stderr will be stored in memory.
from edalize.
It's a lot of output for sure, but it can't realistically be more than a couple of megabytes which is a drop in the ocean when it comes to EDA tools. But I have no idea what is "too much" output that will cause the process to block. kilobytes of data? Megabytes? Not a clue. Don't think check_output will be enough here since there are likely users who wants to separate stdout and stderr.
Still, we need to move forward with this. My original idea was to just create new file-like objects with open
, pass them through the constructor and use one for each of stdout and stderr. Then the user can do whatever with those things. Print or write to a file. Perhaps that is just fine despite the scary warnings from the subprocess docs. I'll give it a shot
from edalize.
Since we're off Python 2 the Python 3.5+ subprocess.run
interface should be available. The capture_output
argument is newer, but it reads like the stdout
and stderr
arguments do the same thing. I think all of these are just wrappers for subprocess.Popen
so all of the earlier warnings might still apply, but perhaps it would offer a cleaner interface.
from edalize.
Yeah, reading this conversation again I'm not sure we should be afraid of these warnings. Let's just go with the easiest solution and patch if necessary
from edalize.
I want this!
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.