3
\$\begingroup\$

I created a 4-bit CPU in latest version of Quartus. Now I wonder which files are necessary if I want to put the files in source control? I understand that bdf, sof and qpf files should be versioned. Do I need to version the qsf, qwf and/or the files in /db ? The repository is github.com/montao/opencpu

$ tree
.
├── alu1bit.bdf
├── alu1bit.sof
├── alu4bit.bdf
├── alu4bit.sof
├── db
│   ├── system.db_info
│   └── system.sld_design_entry.sci
├── decoder2to4.bdf
├── decoder2to4.sof
├── fulladder.bdf
├── fulladder.sof
├── light.bdf
├── light.sof
├── mux4to1.bdf
├── mux4to1.sof
├── README.md
├── system.bdf
├── system.qpf
├── system.qsf
├── system.qws
└── system.sof

1 directory, 20 files

enter image description here

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I'd just let Quartus do the copying archiving with project->copy procject and project-> archive \$\endgroup\$
    – Voltage Spike
    Commented Apr 10, 2017 at 19:43
  • 1
    \$\begingroup\$ @laptop2d, but the user stated they want to check files in to version control software. Archiving them before doing so every time, and unarchiving them when restored, several times a day would be a real burden. \$\endgroup\$
    – TonyM
    Commented Apr 13, 2017 at 5:48

2 Answers 2

3
\$\begingroup\$

I can't answer specifically about github. But I can answer on what you should archive from a Quartus II project, be it into a version control repository, ZIP file or whatever...

You need to archive all of the following that you have:

qpf Quartus Project File qsf Quartus Settings File bdf/bsf/vhd/v design source files sdc Timequest constraints file sof/pof programming files (whichever one you use)

The list gets bigger if you've used Qsys. You haven't, and many projects don't ever, so I'll leave that to one side here.

You could archive the report files, some do...but I wouldn't. They run megabytes, or tens of, and can be regenerated. From the same Quartus/SP version and the same source files and input files above, you will get the same synthesis run and and configuration files produced along the same reports.

Don't archive any of the subdirectories such as 'db' - they're working directories, created during synthesis. The only exception is an 'output_files' or suchlike directory containing pofs/sofs, if you've selected the qsf/GUImenu option to store these in a subdirectory which you haven't here.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ the sof/pof are binaries that get generated when you run the build process, so there is no need to put those in version control \$\endgroup\$
    – stanri
    Commented Jun 24, 2019 at 7:39
  • \$\begingroup\$ @stanri, sof/pof must be stored. First, they're the only files used by manufacturing/production. Secondly, when other engineers check out the project and try to resynthesize, a proof is getting the same checksum sof/pof as those checked in. \$\endgroup\$
    – TonyM
    Commented Jun 28, 2019 at 8:46
  • 1
    \$\begingroup\$ It's not recommended to use git to store binary files (stackoverflow.com/questions/29744929/…). For firmware versioning and storage of binary files for production git has a releases feature (help.github.com/en/articles/about-releases). \$\endgroup\$
    – stanri
    Commented Jun 28, 2019 at 11:34
  • \$\begingroup\$ @stanri, that's a github-specific aspect. I've clarified my answer to explain I'm talking about what from Quartus should be archived, not about github. As explained, the programming files must be archived. \$\endgroup\$
    – TonyM
    Commented Jun 28, 2019 at 14:30
  • \$\begingroup\$ @TonyM I disagree. OP asked about source control. Programming files are not source material as they can be regenerated. Whether programming files should be archived is a separate issue. (Of course they should, but not necessarily in source control.) \$\endgroup\$
    – TypeIA
    Commented Sep 18, 2019 at 11:34
1
\$\begingroup\$

I was looking for the same answer though found a full list of files if you use Qsys and IP cores. Here the link goes, the post is at the path Altera Forums > Device and Tools Related > Quartus II and EDA Tools Discussion > Version control for the Quartus project.


Minimum set of files

.qpf
.qsf
.qsys     ( Helps to regenerate your QSYS design. )
.sopcinfo ( required by software team )
.sof

Verilog files designed by you
      ( Files generated by QSYS don't seem to be required there on repository
        as they will be generated each time you regenerate your Qsys system.
        So you may not wish to upload synthesis folder on repository. )

Verilog files generated by Megawizard plug in manager.
      ( As it will contain information about customization of particular
        mega function. )

.pin file ( Contains information about all pins in your design. Although it can
        be eliminated, it may be useful. )
.sdc file which you have prepared.( SDC files auto generated by Quartus may be ignored. )

.qip file generated by Qsys
      ( available in synthesis folder once you generate QSYS design.
        only .qip, not all Verilog and other files. )
      ( without those .qip you have to open a qsys file then
        the project can auto load qsys IP into the project. )

IP Tips

You can avoid these IPs almost entirely by using
i) Inference (so you can write behavioural, mostly portable VHDL code)
    http://www.altera.co.uk/literature/hb/qts/qts_qii51007.pdf
ii) using the altera_mf library yourself (instantiate the megawizard IPs
    without using the megawizard). For example, the alsyncram megafunction
    can be found in quartus help.
    http://quartushelp.altera.com/13.0/mergedProjects/hdl/mega/mega_file_altsynch_ram.htm .
    The parameter list are the generics to the component.

Minimum set for IP:
    .v wrapper and megawizard .v
    .qip, .sip
\$\endgroup\$
2
  • \$\begingroup\$ Apparently the other answer also mentions bdf/bsf. \$\endgroup\$
    – minghua
    Commented Sep 9, 2017 at 6:08
  • \$\begingroup\$ The incremental_db folder is also useful if you are relying on partial synthesis with post fit design partitions. \$\endgroup\$ Commented Sep 9, 2017 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.