Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20641 Discussions

Export synthesized top-module and import in another project

Altera_Forum
Honored Contributor II
3,555 Views

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).
0 Kudos
17 Replies
Altera_Forum
Honored Contributor II
1,430 Views

Check out this online training: 

 

https://www.altera.com/support/training/course/obbdr100.html 

 

and this app note: 

 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/tt/tt-intel-fpga-design-reuse.pdf 

 

The training is based off of 17.0 while the app note uses 17.1, so the process of creating the root_partition export in the developer project is a little easier (it's in the GUI now). I think you're missing that the root_partition doesn't get imported into the consumer project; it essentially *becomes* the consumer project for the consumer to "fill in" with the internal design in the designated empty partition "hole".
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

 

--- Quote Start ---  

Check out this online training: 

 

https://www.altera.com/support/training/course/obbdr100.html 

 

and this app note: 

 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/tt/tt-intel-fpga-design-reuse.pdf 

 

The training is based off of 17.0 while the app note uses 17.1, so the process of creating the root_partition export in the developer project is a little easier (it's in the GUI now). I think you're missing that the root_partition doesn't get imported into the consumer project; it essentially *becomes* the consumer project for the consumer to "fill in" with the internal design in the designated empty partition "hole". 

--- Quote End ---  

 

 

Thank you @sstrell! I will make sure to look through the training material. I have looked through the second link.  

 

I guess what confuses is me, is the "it essentially *becomes* the consumer project...". I want to synthesize project B, and generate B.qdb. I also want to synthesize projects C, D, E, F... and create netlists C.qdb, D.qdb, E.qdb, F.qdb. All of these projects will be synthesized before project A exists at all. Finally, project A will be created with its own logic, instantiate modules C, D, E, F..., and import the corresponding netlists. Project A will then be synthesized. Note that this may even be recursive; project A may be just one module in a much larger design. 

 

Again all of this is quite straightforward in Quartus Standard using QXP netlists. Maybe I am just misunderstanding your wording (and the wording in the Quartus Pro documentation). 

 

Thanks, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

Sorry about the duplicate post.... I did not see my reply in the thread. 

 

I am going through that training class that @strell mentioned. My confusion remains. I want to export my entire project/design as a synthesized netlist (ONLY synthesis)... not a sub-module of my design. How can I do this, if I cannot export the top level of my design as a partition? Do I just use the '--export_design' option to quartus_cdb? I cannot figure out how to do this in the GUI, but like I mentioned before I ultimately need to do this all via command-line or Tcl. 

 

The Altera docs and training always export a sub-module as a partition. I want to export my top-level module as a netlist and import it elsewhere as a submodule. And to reiterate, I will only be running synthesis on this module. Fitting and timing will not be run until all submodules have been included in a final design. 

 

Thank you, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

I am going through that training class that @strell mentioned. My confusion remains. I want to export my entire project/design as a synthesized netlist (ONLY synthesis)... not a sub-module of my design. How can I do this if I cannot export the top level of my design as a partition? Do I just use the '--export_design' option to quartus_cdb (I have not had luck with this yet...)? I cannot figure out how to do this in the GUI, but like I mentioned before I ultimately need to do this all via command-line or Tcl. 

 

The Altera docs and training always export a sub-module as a partition. I want to export my top-level module as a netlist and import it elsewhere as a submodule. And to reiterate, I will only be running synthesis on this module. Fitting and timing will not be run until all submodules have been included in a final design. 

 

Thank you, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

Try this wording: the developer project is where you create the top-level design that turns into the root_partition. Think of it like swiss cheese: there's a big hole in the middle that will be filled in with the internal function of the design. You then have a consumer project that takes that root_partition where the hole is filled in. 

 

Your project letter names you mention don't designate which project will be the developer project where the root_partition will be designed with multiple holes for the other parts of the design. Once that is done a consumer project gets created from it and the holes are filled in with .qdb files from each person working on a different part of the design. Each of these people will have to honor the Logic Lock region assignments defined in the developer project so that their part of the design is placed in the correct hole in the swiss cheese. 

 

You have to create the top-level design and root_partition.qdb in its own project to make all this happen.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

Thank you again @sstrell. I am not sure which project I would designate as the developer project. At first glance, it seems like I would want the final project (defining the final top-module, peripherals, etc) to be the developer project with the root_partition. But then the fact that the 'consumer' project takes the root_partition and fills in 1 or more holes does not fit my model. Maybe you could help me determine what project(s) should be the developer and consumer? 

 

I have projects A, B, and C. I want to export the entire B and C designs (their top-modules) as netlists. Again, B and C will never have any knowledge of A. A will instantiate the B and C modules and import their netlists. As I mentioned in a previous post, project A might ultimately be a submodule of another larger design. 

 

In Quartus Standard, the process is essentially: Compile projects B and C to netlists and create stubs. Instantiate B and C in project A and import the netlists and stubs. Compile project A.  

 

This process can repeat recursively if A is a submodule of a larger design or if B and C have submodules. 

 

Should the 'developer' project be the final project that results in a bitstream, or is that a 'consumer' project?
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

No, the developer project for periphery reuse is just the top-level I/O and logic designated as part of the top. It is not the final project. The consumer project is the final project with the full design. 

 

Which of A, B, or C has the top-level I/O? That would be the developer project in your scenario. There can't be more than one project with top-level I/O. If there is a project that instantiates A, that is the developer project. 

 

It sounds more like you do not want to be exporting and reusing root_partition, that you just want to integrate a number of design partitions into a final project (which would be the consumer project). In that case, you essentially have multiple developer projects (A, B, and C) each providing a .qdb file to add to the "larger design" you mention. That's the "Core Reuse" flow, not Periphery Reuse.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

 

--- Quote Start ---  

No, the developer project for periphery reuse is just the top-level I/O and logic designated as part of the top. It is not the final project. The consumer project is the final project with the full design. 

 

Which of A, B, or C has the top-level I/O? That would be the developer project in your scenario. There can't be more than one project with top-level I/O. If there is a project that instantiates A, that is the developer project. 

 

It sounds more like you do not want to be exporting and reusing root_partition, that you just want to integrate a number of design partitions into a final project (which would be the consumer project). In that case, you essentially have multiple developer projects (A, B, and C) each providing a .qdb file to add to the "larger design" you mention. That's the "Core Reuse" flow, not Periphery Reuse. 

--- Quote End ---  

 

 

Okay, that helps. So in the "Core Reuse" flow, my problem remains that I want to have developer projects A, B, and C, and I want to compile a QDB and reuse the top module of each of these projects. I have not been able to determine a way to reuse an entire design. I cannot export a design partition of the top module of a project: only sub-modules. Any further advice? Thanks again for all of the help. And sorry for the wordy/confusing replies :D
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

That's not how design reuse works. You don't reuse the top module from multiple projects because there can only be one top that connects to the I/O. Are you saying that there is no overlap of top-level I/O use between the three projects? If that's the case, the easiest thing would be to create a new top-level design entity (.v or .vhd) that merges the I/O pin use of the three designs and instantiates the three designs then use .qdb files for the submodules for each design. Basically create a top-level wrapper file.

0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

 

--- Quote Start ---  

That's not how design reuse works. You don't reuse the top module from multiple projects because there can only be one top that connects to the I/O. Are you saying that there is no overlap of top-level I/O use between the three projects? If that's the case, the easiest thing would be to create a new top-level design entity (.v or .vhd) that merges the I/O pin use of the three designs and instantiates the three designs then use .qdb files for the submodules for each design. Basically create a top-level wrapper file. 

--- Quote End ---  

 

 

Okay.... I do not understand why this is not how design reuse works. This is exactly how I do this with Quartus Standard (and all previous versions of Quartus as well as all other tools I use). The top module of a project is not necessarily the top module of an entire design. There should be some way to synthesize my entire project to a netlist and reuse that netlist elsewhere. Is this possible in Quartus Pro? 

 

In the design flow I desire, only the last/final project will touch I/O. For intermediate projects, I just want to generate a netlist for reuse. 

 

Thank you for the help, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

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).

0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

 

--- 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.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

 

--- 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.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

@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.
0 Kudos
Altera_Forum
Honored Contributor II
1,430 Views

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.
0 Kudos
Reply