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

Create a RTL Netlist view #1037

Open
alaindargelas opened this issue Oct 5, 2023 · 12 comments
Open

Create a RTL Netlist view #1037

alaindargelas opened this issue Oct 5, 2023 · 12 comments

Comments

@alaindargelas
Copy link
Collaborator

  1. Create a Five-box Data Model similar to:
    https://www.intel.com/content/www/us/en/docs/programmable/683236/22-4/design-netlist-infrastructure-beta.html
    within the UHDM schema, with back pointers to VPI Schema

  2. Create a new UHDM application that reads-in UHDM VPI model and write out UHDM Netlist Model along with necessary VPI model

  3. Write the code that transforms the UHDM elaborated tree into the Netlist model
    Complex data-type flattening
    Net Drive-Load graph
    Instance hierarchy
    SysteVerilog Interface flattening
    Optional flattening
    Inference of common elements (DFF....)

@alaindargelas
Copy link
Collaborator Author

This will create the necessary datastructure to populate Yosys::RTLIL directly (Bypassing Yosys::AST) or other tools necessitating a netlist view of the design.

@Thomasb81
Copy link
Contributor

  1. Create a Five-box Data Model

Do you mean a data model suitable for a graphical representation of a design or a part of ?

@alaindargelas
Copy link
Collaborator Author

alaindargelas commented Oct 6, 2023

The 5 box model is the standard EDA model for modeling a hierarchical netlist (datastructure).
It is indeed also useful to represent a netlist graphically, but that is secondary.

@QuantamHD
Copy link
Contributor

Cool references @alaindargelas. Sounds like a great idea

@alaindargelas
Copy link
Collaborator Author

@QuantamHD , I'm currently learning the code of synlig, trying to address some of the cases I opened.
Once I resolve all my outstanding issues, and maybe a couple I saw opened recently, I'll switch to this case.
This project is probably a couple of years out with current staffing, in the meantime we need synlig support.
I'm trying to enroll some help from the community here.

@lzxqaq
Copy link

lzxqaq commented Nov 24, 2023

This is great and very helpful.

@Donmar001
Copy link

@alaindargelas How to identify the DFF in the code by the VPI,use the vpi_get_str to map the name?

@alain-rs
Copy link

If the dff is instantiated in the input file, then you need to consider it as a blackbox , it has to go through synthesis unaltered, for that you need to read along with your input file another Verilog file containing the blackbox definition of the DFFs. Use the (* blackbox *) attribute, that is already supported in my fork of Synlig, similarly here, the blackbox would pass through and be regurgitated as-is in this netlist view.

If the dff is always statement in the input file, then we need a piece of code called inference that does control/data path analysis and infers the behavior of clock set reset, a similar code exists in Yosys.

@Donmar001
Copy link

If the dff is instantiated in the input file, then you need to consider it as a blackbox , it has to go through synthesis unaltered, for that you need to read along with your input file another Verilog file containing the blackbox definition of the DFFs. Use the (* blackbox *) attribute, that is already supported in my fork of Synlig, similarly here, the blackbox would pass through and be regurgitated as-is in this netlist view.

If the dff is always statement in the input file, then we need a piece of code called inference that does control/data path analysis and infers the behavior of clock set reset, a similar code exists in Yosys.

emmm,i dont really understand it,i just want to extract all the DFF in the netlist,can you list a example to explain it

@Donmar001
Copy link

tmp.zip
@

If the dff is instantiated in the input file, then you need to consider it as a blackbox , it has to go through synthesis unaltered, for that you need to read along with your input file another Verilog file containing the blackbox definition of the DFFs. Use the (* blackbox *) attribute, that is already supported in my fork of Synlig, similarly here, the blackbox would pass through and be regurgitated as-is in this netlist view.

If the dff is always statement in the input file, then we need a piece of code called inference that does control/data path analysis and infers the behavior of clock set reset, a similar code exists in Yosys.

tmp.zip
this is the netlist example

@alaindargelas
Copy link
Collaborator Author

It looks like you can use a simpler solution with hardcoded names of dffs.
Traverse all the modules recursively (Write a UHDM executable like the example hellouhdm in Surelog).
Use vpi_iterate(vpiModule) and dump all the ones that match the dff name you are looking for.

@Donmar001
Copy link

It looks like you can use a simpler solution with hardcoded names of dffs. Traverse all the modules recursively (Write a UHDM executable like the example hellouhdm in Surelog). Use vpi_iterate(vpiModule) and dump all the ones that match the dff name you are looking for.

thk u,bro leave a email to communicate the thechnology.sent message to me bro.my email is [email protected]

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

No branches or pull requests

6 participants