This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Regarding simulator porting using CGEN
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Shrirang Khishti <shrirangk at KPITCummins dot com>
- Cc: cgen at sources dot redhat dot com
- Date: Thu, 13 Oct 2005 15:14:00 -0400
- Subject: Re: Regarding simulator porting using CGEN
- References: <4A1BE23A7B777442B60F4B4916AE0F1307FE2B7D@sohm.kpit.com>
Hi -
Shrirang Khishti wrote:
> [...] I am working on porting binutils,simulator for a new
> target. I have successfully ported assembler, disassembler using
> CGEN . Now I want to port simulator for my target using the same
> cgen CPU files. [...]
The process is roughly as follows.
First, decide whether you want to end up with a gdb- or sid-based
simulator, since cgen can generate decoding kernels for either. Next,
check out the respective simulator distribution sources, and
duplicate/rename the configury / directory structure of another
cgen-based target (m32r might still work). Then, have cgen generate
the kernel for your target. Finally, write the necessary glue C or
C++ code to interface the chosen infrastructure with the kernel. This
consists mainly of boilerplate code that embodies the instruction
fetch/decode/execute loop.
- FChE