vscode-terosHDL
vscode-terosHDL copied to clipboard
'show netlist' cannot find the top module
when i use the show netlist button to use yosys, I found the plugin always show the sub module
So I modified the source code of the plugin in the file : teros-technology.teroshdl-2.0.7/out/lib/netlist_viewer/netlist_viewer.js
to identify the top moule
- before
const script_code = `${cmd_files}; hierarchy -top top; proc; opt; write_json ${output_path_filename}; stat`;
- after
if (cmd_files === "read_verilog -sv top.v")
{
script_code = `${cmd_files}; hierarchy -top top; proc; opt; write_json ${output_path_filename}; stat`;
}
else
{
script_code = `${cmd_files}; proc; opt; write_json ${output_path_filename}; stat`;
}
but to use this function, we must name the top module by top.

Could you share a reproducible example? (In code)
This is my structure
the plugin will always set the id.v as top module before i modify the code
Have 1 file or more? What button are you using? Are you using the project manager?
the button i used is 'nestlist viewer'

and i used the project manager

In the project manager, rigth? There are 2 buttons:
https://terostechnology.github.io/terosHDLdoc/netlist/start.html
https://terostechnology.github.io/terosHDLdoc/project_manager/hierarchy.html
the plugin's yosys dosen't have the capability to find the top module, so I edited the source code as I showed before.
In the project manager, rigth? There are 2 buttons:
https://terostechnology.github.io/terosHDLdoc/netlist/start.html
https://terostechnology.github.io/terosHDLdoc/project_manager/hierarchy.html
i used the first one, because the second will show nothing to me.

and, if i click the first 'netlist viewer', the schemetic viewer won't show netlist before I switch the schmetic viewer to anthor and switch back I will show you tomorrow after I make this bug to a GIF
Please, share a complete example in code, not an image. So I can reproduce it.
Okk. I could take a look the next week. It would be really useful if you can share all your project. Or a minimum example. In other case it's difficult for me reproduce your error.
El jue., 21 jul. 2022 16:26, GrootOfSDUST @.***> escribió:
In the project manager, rigth? There are 2 buttons:
https://terostechnology.github.io/terosHDLdoc/netlist/start.html
https://terostechnology.github.io/terosHDLdoc/project_manager/hierarchy.html
i used the first one, because the second will show nothing to me. [image: image] https://user-images.githubusercontent.com/55238899/180238640-163e0868-a059-44b9-81f4-ff1bf817d4ee.png
and, if i click the first 'netlist viewer', the schemetic viewer won't show netlist before I switch the schmetic viewer to anthor and switch back I will show you tomorrow after I make this bug to a GIF
— Reply to this email directly, view it on GitHub https://github.com/TerosTechnology/vscode-terosHDL/issues/331#issuecomment-1191553248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNN4R7A7QJOOU6PFR3ZZQTVVFM2HANCNFSM54HK3T2Q . You are receiving this because you commented.Message ID: @.***>
fixed