Comments (8)
This is interesting (relatively) the python method PyCallable_Check seems to think that the pointer passed in is NULL, at least that is what the debug looks like when matched up to the C source of the method. Revisit later.
from cocotb.
After some more looking at this it seems to be that the filter object is returning false and so not outputting anything to log.
from cocotb.
We should filter out the DEBUG messages that appear as cocotb starts up since they are generally meaningless to users.
We probably just want one INFO message to indicate that the Python interpreter has started successfully.
from cocotb.
How is logging enabled/ disabled? (Didn't find it in the documentation ;) )
from cocotb.
-DFILTER in lib/gpi/Makefile filters any debug log messages from the C world.
In Python it's all using the standard logging library so you can do something like this:
dut.log.setLevel(logging.ERROR)
cocotb.scheduler.log.setLevel(logging.DEBUG)
from cocotb.
Just trying to clarify some things:
The LOG_WARN etc macros in the library use gpi_log to send log messages to the Python handler, with the module name cocotb.gpi
How do I control the level of filtering on those messages from Python -assuming -DFILTER is defined?
from cocotb.
The logging is controlled by LOG_ however there is a bug at the moment in the filter inside gpi_log, currently wrapped with FILTER. The problem being that no matter what the filter level the python object we call always rejects message and so nothing is printed. The current code is a work around such that you can have logging from the C world but it is all or nothing and a compilation time option.
see bug #12
from cocotb.
ok - that matches the behaviour I was seeing.
Gordon
On Thu, Jul 11, 2013 at 4:17 AM, stuarthodgson [email protected]:
The logging is controlled by LOG_ however there is a bug at the moment in
the filter inside gpi_log, currently wrapped with FILTER. The problem being
that no matter what the filter level the python object we call always
rejects message and so nothing is printed. The current code is a work
around such that you can have logging from the C world but it is all or
nothing and a compilation time option.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-20799388
.
from cocotb.
Related Issues (20)
- Compile sources into different libs HOT 1
- Improve implementation of `Freeze` and `Release`
- `Release` does not work on GHDL
- `Force`/`Release` don't work on Verilator
- Setting value on forced signal causes implicit release on Riviera
- Questa's FLI allows depositing over a forced signal
- Treat each `MODULE` as it's own testsuite in JUnit results
- Backwards compat `TESTCASE`
- Add Python runner to quick start guide
- Allow Logic for BinaryValue.__eq__() in cocotb 1.8
- COCOTB_RESOLVE_X not working HOT 3
- Change CI's MacOS Verilator test to build cocotb from source
- Python Runner starts tests directly (not waiting for GUI) HOT 1
- Add value change triggers as methods to handles
- Make terminology used in documentation consistent
- Make working with packed objects easier
- `TypeError` exception when running simulation HOT 11
- Make `cocotb_tools.runner` work on native Windows environment
- Make sure all public interfaces are documented and typed
- COCOTB + Verilator reads stale signal values when on clock posedge HOT 1
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 cocotb.