CGEN, the Cpu tools GENerator

CGEN (pronounced seejen) is a framework for developing generators of CPU-related tools such as assemblers, disassemblers and simulators. It specifies a description language for describing the architecture and organization of a CPU without reference to any particular application. Additional applications can be written within the framework. CGEN is written in Scheme and can be run under the GNU Guile interpreter. It is placed under a free software license.


May, 2019: Moving to GIT
Yeah it's been a while. But some folks are still building and using CGEN, so we've made it easier.

October 18, 2009: CGEN 1.1 is released
Yeah, it's been awhile. But we're not gone, and CGEN is still under active development. This release includes several new ports: cris, Fujitsu FRV, Ubicom ip2k, iq2000, lm32, m32c, mep, mt, openrisc, sh/sh64, xc16x, xstormy16. It also contains generators for more applications: cpu docs, GCC intrinsics, the CPU component of the SID simulator. Read the NEWS file for more details on what's included in 1.1.

July 28, 2000: CGEN 1.0 is released
This is the first release of CGEN. It includes the most important applications, including the assembler, disassembler and simulator generators. A handful of CPU descriptions are also included: ARM7T, Intel i960, IA-32, Renesas M32R/D, Fujitsu FR-30, SPARC and more.


A snapshot of the CGEN manual is available as hypertext.


Source Code

If you are not doing active development on CGEN, you should get the latest official release. The FTP server is often very busy, see one of the mirror sites if you're having trouble connecting.

You can access the development source tree a couple of different ways.

Anonymous GIT read-only access
  git clone git://
Read-only web-based GIT access
You can browse the source code using the gitweb interface.

Web Pages

These web pages are maintained using CVS. They are accessible using:
Read-only CVS
  cvs -d login
  {enter "anoncvs" as the password}
  cvs -d co htdocs
Read-write CVS (CGEN developers only)
  CVS_RSH=ssh ; export CVS_RSH
  cvs -d co htdocs

Bug reports and patches

If you would like to report a bug in CGEN, please send an email to the mailing list.

Patches must be approved and will be checked into the source tree by the maintainers. All patches must conform to the GNU Coding Standards and be accompanied by a ChangeLog entry. Please send patches to the mailing list.

Mailing lists

There are three mailing lists related to CGEN:

A mailing list for discussion of all issues related to development, including patches.
CVS commit messages are automatically sent to this list so that people can track changes. Don't send messages to this list.
Problem reports (PRs) and PR activities are sent to this list by the bug tracking system GNATS.
You can use this form to subscribe or unsubscribe to the above mailing lists.
Mailing list: Your e-mail address:
Digest version?

Scheme resources

CGEN is written in Scheme (and justifiably!). Many folks are new to Scheme and some are new to functional programming. Rather than try to keep an up-to-date collection of references, the Guile home page includes such a resource list already. Many universities teach Scheme as an introductory programming language, so a search on the World Wide Web should turn up lots of tutorial material, if that's what you're looking for.

A couple of excellent books on Scheme are:


CGEN uses the Guile Scheme implementation. The Guile home page is here.

CGEN currently supports Guile 1.6.8, and 1.8.5.

CPU documentation

Perhaps this section can become a collection of links to CPU vendors' reference documentation. Please send suggestions and amendments to the mailing list.

The GCC project reading list contains a good list.

Vendor Documentation

CGEN Generated Documentation

These pages are generated from the cpu description files.