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

Add features to build a TyVcd with additional artifact scopes #7

Closed
rameloni opened this issue Jun 6, 2024 · 0 comments
Closed

Add features to build a TyVcd with additional artifact scopes #7

rameloni opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@rameloni
Copy link
Owner

rameloni commented Jun 6, 2024

Sometimes simulation tools may create additional scopes in a testbench that wrap the dut. An example is ChiselSim for chisel which creates 2 additional scopes in the output trace file (TOP and svsimTestbench) in the testbench and instantiates the module as dut. On the other hand, firtool generates the hgldd file without that knowledge, therefore a tool should know how these additional scopes are linked to the hgldd.

To fix this, it should be possible to provide a function that, given a sequence of top_scope_names to be added and the top_module_name, produces a new Hgldd with update scopes, like the following:

fn add_extra_modules(
    hgldds: Vec<Hgldd>,         // source hgldd
    extra_modules: Vec<String>, // the top scopes to be added (i.e. TOP, svsimTb, dut)
    top_module_name: &String,   // the name of the current top_module
) -> Vec<Hgldd>

And it would generate a new Hgldd with the following hierarchy of scopes:
TOP -> svsmiTb -> dut -> others... and the dut replaces top_module_names.

To avoid the name replacement of the top module, one can specify that name as last entry of the list extra_modules. In this way the solution should cover 2 cases (allowing to replace or not the top module name).

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

No branches or pull requests

1 participant