Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Export synthesized top-module and import in another project

I am working on a project where different engineers will be developing different modules of a large design completely separately. The design must be entirely bottom-up because the module developers may never know anything about the rest of the design. So, I need the ability to create a project, synthesize it, and export the netlist (along with a stub file). Then, in another project/design I need to import that netlist as a submodule.

I was able to do this easily in Quartus Standard (versions 12-17) by exporting a QXP netlist and importing that netlist in another project. In Quartus Pro 17.0, QXP netlists are no longer supported. I attempted to do the same thing using QDP files, but had no luck. I tried exporting the design as a "partition" but it will not let me export the top-module as a partition (only sub-modules). Export/import "design" does not help here either because when "importing", it seems to assume the design (QDB\) file being imported represents the entire design.

So, how can I export a synthesized design from the top-module and import the result (netlist or qdb...) in another project? As a reminder, my use-case involves lower-level designs that will never have any knowledge of the higher-level designs. So, it is not possible to create a full design and designate sub-modules as partitions.

Note: while I use the GUI to figure things out, ultimately my projects will be entirely command line, so any Tcl or command-line commands are very helpful (e.g. quartus_syn/quartus_cdb commands/options).

17 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Things are different with Pro. See slide 11 of that training I linked you to. I/O are now exclusively top-level (periphery). With Standard edition incremental compilation, yes, you could get away with creating a .qxp file that included both core and periphery resources. However, it greatly complicated the integration in the final design. By putting a line in the sand, so to speak, between core and periphery resources, the flow works much better for a team-based design (less file transfer between team members; just the .qdb and optionally .sdc).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I will never need to access periphery resources in intermediate projects. All I require is the ability to create a project which can be synthesized (in its entirety) to a qxp or qdb file that can be reused elsewhere. Basically, I will be creating a project(s) whose sole purpose is to be reused (in its entirety - from its top-module) within another project.

    So, is it possible to do this in Pro, or will I need to create some kind of dummy wrapper module surrounding intermediate project so that I can export my module as a partition? This seems very backwards, so I am hoping this is not the case.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I just tried it out. You need to be using 17.1 and you have to be targeting Arria 10. If you do that, then you can export a .qdb of the whole project without creating a wrapper or just exporting the root_partition.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I just tried it out. You need to be using 17.1 and you have to be targeting Arria 10. If you do that, then you can export a .qdb of the whole project without creating a wrapper or just exporting the root_partition.

    --- Quote End ---

    I will go ahead and try this on 17.1. Unfortunately, my production design may need to be 17.0 due to other requirements. I will keep you updated as I experiment. Thank you for all of your help.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I just tried it out. You need to be using 17.1 and you have to be targeting Arria 10. If you do that, then you can export a .qdb of the whole project without creating a wrapper or just exporting the root_partition.

    --- Quote End ---

    If you export the whole design, how can you import that in another project? It appears that importing a design is the equivalent of 'replacing' your current design with the contents of that QDB file. Therefore when 'importing' a design, Quartus Pro expects the design to have the same 'revision' as the current project.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    @sstrell thank you for all of your help so far. I tried to export my project via Project->Export Design or quartus_cdp --export_design, but then if I try to use it in the consumer project, I see the following error message:

    Error (18633): The archive "my_top_module.qdb" contains a full design and cannot be imported via the import_block comamnd nor as a source file in the QSF.

    Is it absolutely true that you must create a wrapper module in order to export your top-module as a non-root partition? This will create significant complications for me, so I want to determine whether or not this is absolutely necessary before I proceed.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have determined that you do not need a dummy top module, but I was only able to succeed via command-line:

    in developer project:

    quartus_syn to synthesize

    quartus_cdb --export_partition root_partition --snapshot synthesized (to export the synthesized root_partition)

    in consumer project:

    quartus_syn --analysis_and_elaboration (to elaborate design and obtain hierarchy for partitions)

    Add the following to QSF:

    set_instance_assignment -name partition <partition-name-in-consumer> -to <instance-in-consumer-hierarchy> -entity <consumer-top-module>

    set_instance_assignment -name qdb_file_partition <qdb-file> -to <instance-in-consumer-hierarchy> -entity <consumer-top-module>

    quartus_syn (to synthesize)

    quartus_cdb --export_partition root_partition --snapshot synthesized (to export the root_partition)

    Recurse if necessary (e.g. consumer project becomes developer project, and a new consumer project is created).

    The only problem that remains for me is that I must use an 'entity' declaration in my stub file. In Quartus Standard and other tools, a simple component declaration is sufficient. I hope this is a bug and not intended as it further complicates the VHDL.