• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..11-Oct-2012-

.gdbinitH A D11-Oct-201232 32

BUGSH A D11-Oct-20122.4 KiB12468

COPYINGH A D11-Oct-201217.6 KiB341281

ChangeLogH A D11-Oct-2012133 KiB3,6442,604

ChangeLog.00H A D11-Oct-201279.8 KiB2,1691,553

INSTALLH A D11-Oct-201221.4 KiB813475

Makefile.inH A D11-Oct-201222.8 KiB890652

READMEH A D11-Oct-20129.4 KiB354223

RUNH A D11-Oct-201227.7 KiB950644

acconfig.hH A D11-Oct-2012404 165

altivec.igenH A D11-Oct-201266.9 KiB2,3572,083

altivec_expression.hH A D11-Oct-20121.5 KiB5122

altivec_registers.hH A D11-Oct-20122.1 KiB6423

basics.hH A D11-Oct-20123 KiB14069

bits.cH A D11-Oct-20122.6 KiB13597

bits.hH A D11-Oct-20127.6 KiB289146

cap.cH A D11-Oct-20123.2 KiB135100

cap.hH A D11-Oct-20121.4 KiB6127

config.inH A D11-Oct-20128.9 KiB363245

configureH A D11-Oct-2012149.1 KiB5,3154,401

configure.inH A D11-Oct-201225.8 KiB767673

corefile-n.hH A D11-Oct-20122.7 KiB9867

corefile.cH A D11-Oct-20129.5 KiB416330

corefile.hH A D11-Oct-20126.1 KiB22869

cpu.cH A D11-Oct-20128 KiB405280

cpu.hH A D11-Oct-20125.4 KiB255142

dc-complexH A D11-Oct-20122.2 KiB5958

dc-simpleH A D11-Oct-20121,005 2625

dc-stupidH A D11-Oct-20122.2 KiB5958

dc-test.01H A D11-Oct-20121.1 KiB2524

dc-test.02H A D11-Oct-20121.1 KiB2524

debug.cH A D11-Oct-20124.9 KiB154116

debug.hH A D11-Oct-20124 KiB173123

device.cH A D11-Oct-201248.7 KiB1,9991,649

device.hH A D11-Oct-201217.2 KiB798456

device_table.cH A D11-Oct-20127.4 KiB311248

device_table.hH A D11-Oct-20128.3 KiB324202

dgen.cH A D11-Oct-20128.5 KiB337270

double.cH A D11-Oct-20121.1 KiB4314

dp-bit.cH A D11-Oct-201227.6 KiB1,3081,004

e500.igenH A D11-Oct-2012109.3 KiB3,3493,016

e500_expression.hH A D11-Oct-20125.5 KiB174114

e500_registers.hH A D11-Oct-20123.2 KiB8744

emul_bugapi.cH A D11-Oct-201218.7 KiB582450

emul_bugapi.hH A D11-Oct-2012937 284

emul_chirp.cH A D11-Oct-201256.5 KiB2,0361,616

emul_chirp.hH A D11-Oct-20122.8 KiB764

emul_generic.cH A D11-Oct-20128.7 KiB344262

emul_generic.hH A D11-Oct-20124.1 KiB179120

emul_netbsd.cH A D11-Oct-201235.1 KiB1,4701,266

emul_netbsd.hH A D11-Oct-2012937 284

emul_unix.cH A D11-Oct-201270.7 KiB2,8132,401

emul_unix.hH A D11-Oct-2012962 295

events.cH A D11-Oct-201211.1 KiB409294

events.hH A D11-Oct-20121.9 KiB8035

filter.cH A D11-Oct-20123 KiB151112

filter.hH A D11-Oct-20121.2 KiB4410

filter_filename.cH A D11-Oct-20121.2 KiB3914

filter_filename.hH A D11-Oct-20121,008 285

gen-icache.cH A D11-Oct-201218.9 KiB676571

gen-icache.hH A D11-Oct-20121.9 KiB6926

gen-idecode.cH A D11-Oct-201245.8 KiB1,5501,291

gen-idecode.hH A D11-Oct-20121.3 KiB4112

gen-itable.cH A D11-Oct-20123.5 KiB12483

gen-itable.hH A D11-Oct-2012961 296

gen-model.cH A D11-Oct-201212.2 KiB395324

gen-model.hH A D11-Oct-2012961 316

gen-semantics.cH A D11-Oct-20126.8 KiB251195

gen-semantics.hH A D11-Oct-20122.6 KiB8210

gen-support.cH A D11-Oct-20123.8 KiB137102

gen-support.hH A D11-Oct-2012964 306

hw_com.cH A D11-Oct-201214.3 KiB560321

hw_core.cH A D11-Oct-20123.4 KiB14485

hw_cpu.cH A D11-Oct-20124.3 KiB16874

hw_cpu.hH A D11-Oct-20121.1 KiB3511

hw_disk.cH A D11-Oct-201215.7 KiB561344

hw_eeprom.cH A D11-Oct-201221.8 KiB840596

hw_glue.cH A D11-Oct-201210.7 KiB372202

hw_htab.cH A D11-Oct-201220.8 KiB693422

hw_ide.cH A D11-Oct-201224.3 KiB870631

hw_init.cH A D11-Oct-201220 KiB722411

hw_iobus.cH A D11-Oct-20122.6 KiB10151

hw_memory.cH A D11-Oct-201215.5 KiB539396

hw_nvram.cH A D11-Oct-20126.8 KiB265178

hw_opic.cH A D11-Oct-201253.1 KiB1,8281,427

hw_pal.cH A D11-Oct-20129.3 KiB367238

hw_phb.cH A D11-Oct-201229 KiB1,069725

hw_phb.hH A D11-Oct-20121.2 KiB4115

hw_register.cH A D11-Oct-20123.6 KiB13353

hw_trace.cH A D11-Oct-20122.7 KiB10444

hw_vm.cH A D11-Oct-20127.3 KiB276176

idecode_branch.hH A D11-Oct-20121.9 KiB6327

idecode_expression.hH A D11-Oct-201210.3 KiB418299

idecode_fields.hH A D11-Oct-20122.9 KiB10639

igen.cH A D11-Oct-201215.2 KiB566493

igen.hH A D11-Oct-20125.2 KiB20075

inline.cH A D11-Oct-20122 KiB9957

inline.hH A D11-Oct-201213.7 KiB499369

interrupts.cH A D11-Oct-201215.2 KiB542430

interrupts.hH A D11-Oct-20125.1 KiB17177

ld-cache.cH A D11-Oct-20123.2 KiB12890

ld-cache.hH A D11-Oct-20122.5 KiB9226

ld-decode.cH A D11-Oct-20124.5 KiB156117

ld-decode.hH A D11-Oct-20124.2 KiB14437

ld-insn.cH A D11-Oct-201226.6 KiB991775

ld-insn.hH A D11-Oct-20125.5 KiB298180

lf.cH A D11-Oct-20129 KiB441377

lf.hH A D11-Oct-20122.5 KiB13064

main.cH A D11-Oct-20126.7 KiB339263

misc.cH A D11-Oct-20123.7 KiB216168

misc.hH A D11-Oct-20122.1 KiB9650

mon.cH A D11-Oct-201211.7 KiB446361

mon.hH A D11-Oct-20122.3 KiB10964

options.cH A D11-Oct-20127.8 KiB248193

options.hH A D11-Oct-20121,007 317

os_emul.cH A D11-Oct-20123.8 KiB147101

os_emul.hH A D11-Oct-20121.8 KiB6121

pk_disklabel.cH A D11-Oct-201211 KiB402289

ppc-instructionsH A D11-Oct-2012171.2 KiB4,9964,557

ppc-spr-tableH A D11-Oct-20121.8 KiB9290

ppc.mtH A D11-Oct-201251 43

psim.cH A D11-Oct-201231.7 KiB1,201941

psim.hH A D11-Oct-20123.8 KiB18594

psim.texinfoH A D11-Oct-201241.2 KiB1,106834

registers.cH A D11-Oct-20125 KiB199164

registers.hH A D11-Oct-20128.1 KiB349208

sim-endian-n.hH A D11-Oct-20122.7 KiB13593

sim-endian.cH A D11-Oct-20121.9 KiB7540

sim-endian.hH A D11-Oct-201211 KiB410273

sim-main.hH A D11-Oct-2012146 117

sim_callbacks.hH A D11-Oct-20122.8 KiB11630

sim_calls.cH A D11-Oct-201211.1 KiB468321

std-config.hH A D11-Oct-201218.5 KiB673214

table.cH A D11-Oct-20127.6 KiB346258

table.hH A D11-Oct-20122 KiB7841

tree.cH A D11-Oct-201230.6 KiB1,2621,018

tree.hH A D11-Oct-20123.3 KiB14058

vm.cH A D11-Oct-201231.4 KiB1,199899

vm.hH A D11-Oct-20123.3 KiB15689

vm_n.hH A D11-Oct-20124.3 KiB135104

words.hH A D11-Oct-20123 KiB11747

README

1
2
3		PSIM 1.0.1 - Model of the PowerPC Environments
4
5
6    Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22
23    ----------------------------------------------------------------------
24
25
26PSIM is a program written in extended ANSI-C that implements an
27instruction level simulation of the PowerPC environment.  It is freely
28available in source code form under the terms of the GNU General
29Public License (version 2 or later).
30
31The PowerPC Architecture is described as having three levels of
32compliance:
33
34	UEA - User Environment Architecture
35	VEA - Virtual Environment Architecture
36	OEA - Operating Environment Architecture
37
38PSIM both implements all three levels of the PowerPC and includes (for
39each level) a corresponding simulated run-time environment.
40
41In addition, PSIM, to the execution unit level, models the performance
42of most of the current PowerPC implementations (contributed by Michael
43Meissner).  This detailed performance monitoring (unlike many other
44simulators) resulting in only a relatively marginal reduction in the
45simulators performance.
46
47
48A description of how to build PSIM is contained in the file:
49
50		ftp://ftp.ci.com.au/pub/psim/INSTALL
51	or	ftp://cambridge.cygnus.com/pub/psim/INSTALL
52
53while an overview of how to use PSIM is in:
54
55	ftp://ftp.ci.com.au/pub/psim/RUN
56or	ftp://cambridge.cygnus.com/pub/psim/RUN
57
58This file is found in:
59
60	ftp://ftp.ci.com.au/pub/psim/README
61or	ftp://cambridge.cygnus.com/pub/psim/README
62
63
64Thanks goes firstly to:
65
66	Corinthian Engineering Pty Ltd
67	Cygnus Support
68	Highland Logic Pty Ltd
69
70who provided the resources needed for making this software available
71on the Internet.
72
73More importantly I'd like to thank the following individuals who each
74contributed in their own unique way:
75
76	Allen Briggs, Bett Koch, David Edelsohn, Gordon Irlam,
77	Michael Meissner, Bob Mercier, Richard Perini, Dale Rahn,
78	Richard Stallman, Mitchele Walker
79
80
81				Andrew Cagney
82				Feb, 1995
83
84
85    ----------------------------------------------------------------------
86
87
88    What features does PSIM include?
89
90	Monitoring and modeling
91
92		PSIM includes (thanks to Michael Meissner)
93		a detailed model of most of the PowerPC
94		implementations to the functional unit level.
95
96
97	SMP
98
99		The PowerPC ISA defines SMP synchronizing instructions.
100		This simulator implements a limited, but functional,
101		subset of the PowerPC synchronization instructions
102		behaviour.  Programs that restrict their synchronization
103		primitives to those that work with this functional
104		sub-set (eg P() and V()) are able to run on the SMP
105		version of PSIM.
106
107		People intending to use this system should study
108		the code implementing the lwarx instruction.
109
110	ENDIAN SUPPORT
111
112		PSIM implements the PowerPC's big and little (xor
113		endian) modes and correctly simulates code that
114		switches between these two modes.
115
116		In addition, psim can model a true little-endian
117		machine.
118
119	ISA (Instruction Set Architecture) models
120
121		PSIM includes a model of the UEA, VEA and OEA.  This
122		includes the time base registers (VEA) and HTAB
123		and BATS (OEA).
124
125		In addition, a preliminary model of the 64 bit
126		PowerPC architecture is implemented.
127
128	IO Hardware
129
130		PSIM's internals are based around the concept
131		of a Device Tree.  This tree intentionally
132		resembles that of the Device Tree found in
133		OpenBoot firmware.  PSIM is flexible enough
134		to allow the user to fully configure this device
135		tree (and consequently the hardware model) at
136		run time.
137
138	Run-time environments:
139
140		PSIM's UEA model includes emulation for BSD
141		based UNIX system calls.
142
143		PSIM's OEA model includes emulation of either:
144
145			o	OpenBoot client interface
146
147			o	MOTO's BUG interface.
148
149
150	Floating point
151
152		Preliminary support for floating point is included.
153
154
155    Who would be interested in PSIM?
156
157	o	the curious
158
159		Using psim, gdb, gcc and binutils the curious
160		user can construct an environment that allows
161		them to play with PowerPC Environment without
162		the need for real hardware.
163
164
165	o	the analyst
166
167		PSIM includes many (contributed) monitoring
168		features which (unlike many other simulators)
169		do not come with a great penalty in performance.
170
171		Thus the performance analyst is able to use
172		this simulator to analyse the performance of
173		the system under test.
174
175		If PSIM doesn't monitor a components of interest,
176		the source code is freely available, and hence
177		there is no hinderance to changing things
178		to meet a specific analysts needs.
179
180
181	o	the serious SW developer
182
183		PSIM models all three levels of the PowerPC
184		Architecture: UEA, VEA and OEA.  Further,
185		the internal design is such that PSIM can
186		be extended to support additional requirements.
187
188
189    What performance analysis measurements can PSIM perform?
190
191	Below is the output from a recent analysis run
192	(contributed by Michael Meissner):
193
194	For the following program:
195
196	long
197	simple_rand ()
198	{
199	  static unsigned long seed = 47114711;
200	  unsigned long this = seed * 1103515245 + 12345;
201	  seed = this;
202	/* cut-cut-cut - see the file RUN.psim */
203	}
204
205	Here is the current output generated with the -I switch on a P90
206	(the compiler used is the development version of GCC with a new
207	scheduler replacing the old one):
208
209	CPU #1 executed     41,994 AND instructions.
210	CPU #1 executed    519,785 AND Immediate instructions.
211	.
212	.
213	.
214	CPU #1 executed          1 System Call instruction.
215	CPU #1 executed    207,746 XOR instructions.
216
217	CPU #1 executed 23,740,856 cycles.
218	CPU #1 executed 10,242,780 stalls waiting for data.
219	CPU #1 executed          1 stall waiting for a function unit.
220	.
221	.
222	.
223	CPU #1 executed  3,136,229 branch functional unit instructions.
224	CPU #1 executed 16,949,396 instructions that were accounted for in timing info.
225	CPU #1 executed    871,920 data reads.
226	CPU #1 executed    971,926 data writes.
227	CPU #1 executed        221 icache misses.
228	CPU #1 executed 16,949,396 instructions in total.
229
230	Simulator speed was 250,731 instructions/second
231
232
233    What motivated PSIM?
234
235	As an idea, psim was first discussed seriously during mid
236	1994.  At that time its main objectives were:
237
238
239		o	good performance
240
241			Many simulators loose out by only providing
242			a binary interface to the internals.  This
243			interface eventually becomes a bottle neck
244			in the simulators performance.
245
246			It was intended that PSIM would avoid this
247			problem by giving the user access to the
248			full source code.
249
250			Further, by exploiting the power of modern
251			compilers it was hoped that PSIM would achieve
252			good performance with out having to compromise
253			its internal design.
254
255
256		o	practical portability
257
258			Rather than try to be portable to every
259			C compiler on every platform, it was decided
260			that PSIM would restrict its self to supporting
261			ANSI compilers that included the extension
262			of a long long type.
263
264			GCC is one such compiler, consequently PSIM
265			should be portable to any machine running GCC.
266
267
268		o	flexibility in its design
269
270			PSIM should allow the user to select the
271			features required and customise the build
272			accordingly.  By having the source code,
273			the compiler is able to eliminate any un
274			used features of the simulator.
275
276			After all, let the compiler do the work.
277
278
279		o	SMP
280
281			A model that allowed the simulation of
282			SMP platforms with out the large overhead
283			often encountered with such models.
284
285
286	PSIM achieves each of these objectives.
287
288
289    Is PSIM PowerPC Platform (PPCP) (nee CHRP) Compliant?
290
291	No.
292
293	Among other things it does not have an Apple ROM socket.
294
295
296    Could PSIM be extended so that it models a CHRP machine?
297
298	Yes.
299
300	PSIM has been designed with the CHRP spec in mind. To model
301	a CHRP desktop the following would need to be added:
302
303		o	An apple ROM socket :-)
304
305		o	Model of each of the desktop IO devices
306
307		o	An OpenPIC device.
308
309		o	RTAS (Run Time Abstraction Services).
310
311		o	A fully populated device tree.
312
313
314    Is the source code available?
315
316	Yes.
317
318	The source code to PSIM is available under the terms of
319	the GNU Public Licence.  This allows you to distribute
320	the source code for free but with certain conditions.
321
322	See the file:
323
324		ftp://archie.au/gnu/COPYING
325
326	For details of the terms and conditions.
327
328
329    Where do I send bugs or report problems?
330
331	There is a mailing list (subscribe through majordomo@ci.com.au) at:
332
333	powerpc-psim@ci.com.au
334
335	If I get the ftp archive updated I post a note to that mailing list.
336	In addition your welcome to send bugs or problems either to me or to
337	that e-mail list.
338
339	This list currently averages zero articles a day.
340
341
342     Does PSIM have any limitations or problems?
343
344	PSIM can't run rs6000/AIX binaries - At present PSIM can only
345	simulate static executables.  Since an AIX executable is
346	never static, PSIM is unable to simulate its execution.
347
348	PSIM is still under development - consequently there are going
349	to be bugs.
350
351	See the file BUGS (included in the distribution) for any
352	other outstanding issues.
353
354