Skip to content
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

Adding fst and struct trace support #274

Open
wants to merge 2 commits into
base: pymtl4.0-dev
Choose a base branch
from

Conversation

KelvinChung2000
Copy link

I have added support for tracing the structure correctly in the waveform

I have also added fst format to reduce the trace file size since tracing the structure increases the file size.

@KelvinChung2000
Copy link
Author

Are there any ways to check if the metadata has changed so we can make Verilator perform a recompile? Now, if I turn the vl_trace_struct off, I must delete the obj directory to make the flag take effect.

@cbatten
Copy link
Contributor

cbatten commented Apr 4, 2024

I think we write some specific metadata into a comment in the generated verilog so when we regenerate the verilog with different metadata it ends up forcing a recompile? Maybe you can see how we do this for VCD tracing? We have a way where if you turn on VCD tracing it results in forcing Verilator to do a recompile?

@yo96
Copy link
Contributor

yo96 commented Apr 4, 2024

Here's where we do the check:

# Check if the configurations from the last run are the same
is_config_cached = False
config_file = f'pymtl_import_config_{ip_cfg.translated_top_module}.json'
new_cfg = s.serialize_cfg( ip_cfg )
if os.path.exists(config_file):
with open(config_file) as fd:
if s.is_same_cfg( json.load( fd ), new_cfg ):
is_config_cached = True

@KelvinChung2000
Copy link
Author

Is the [0] after a 1-bit signal in the trace added by Verilator? Or is it coming from the RTL translation pass?

@yo96
Copy link
Contributor

yo96 commented Apr 4, 2024

Is the [0] after a 1-bit signal in the trace added by Verilator? Or is it coming from the RTL translation pass?

I think it comes from the translated verilog.

@KelvinChung2000
Copy link
Author

I want to fix that, but it will probably be in another pull request. I will open an issue and ask where to look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants