vscode-terosHDL icon indicating copy to clipboard operation
vscode-terosHDL copied to clipboard

'show netlist' cannot find the top module

Open GrootLiu opened this issue 3 years ago • 9 comments

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.

1658404064268

GrootLiu avatar Jul 21 '22 11:07 GrootLiu

Could you share a reproducible example? (In code)

qarlosalberto avatar Jul 21 '22 13:07 qarlosalberto

This is my structure image the plugin will always set the id.v as top module before i modify the code

GrootLiu avatar Jul 21 '22 14:07 GrootLiu

Have 1 file or more? What button are you using? Are you using the project manager?

qarlosalberto avatar Jul 21 '22 14:07 qarlosalberto

the button i used is 'nestlist viewer' image

and i used the project manager image

GrootLiu avatar Jul 21 '22 14:07 GrootLiu

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

qarlosalberto avatar Jul 21 '22 14:07 qarlosalberto

the plugin's yosys dosen't have the capability to find the top module, so I edited the source code as I showed before.

GrootLiu avatar Jul 21 '22 14:07 GrootLiu

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

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

GrootLiu avatar Jul 21 '22 14:07 GrootLiu

Please, share a complete example in code, not an image. So I can reproduce it.

qarlosalberto avatar Jul 24 '22 18:07 qarlosalberto

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: @.***>

qarlosalberto avatar Oct 11 '22 07:10 qarlosalberto

fixed

qarlosalberto avatar Jul 03 '23 17:07 qarlosalberto