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

..03-May-2022-

.gdbinitH A D16-Apr-199932 32

BUGSH A D16-Apr-19992.4 KiB12468

COPYINGH A D19-Dec-201234.3 KiB675553

ChangeLogH A D19-Dec-2012144.4 KiB4,0402,872

ChangeLog.00H A D16-Apr-199979.8 KiB2,1691,553

INSTALLH A D16-Apr-199921.4 KiB813475

Makefile.inH A D19-Dec-201223.4 KiB908669

READMEH A D19-Dec-20129.3 KiB353222

RUNH A D16-Apr-199927.7 KiB950644

altivec.igenH A D01-Jan-201367.1 KiB2,3602,086

altivec_expression.hH A D01-Jan-20131.5 KiB4922

altivec_registers.hH A D01-Jan-20132 KiB6223

basics.hH A D19-Dec-20122.9 KiB13969

bits.cH A D19-Dec-20122.5 KiB13497

bits.hH A D19-Dec-20127.6 KiB288146

cap.cH A D19-Dec-20123.1 KiB134100

cap.hH A D19-Dec-20121.3 KiB6027

config.inH A D15-Sep-20099.3 KiB354243

configureH A D20-Nov-2012254.5 KiB9,1836,161

configure.acH A D18-Oct-201130 KiB933826

corefile-n.hH A D19-Dec-20122.7 KiB9767

corefile.cH A D19-Dec-20129.4 KiB415330

corefile.hH A D19-Dec-20126 KiB22769

cpu.cH A D19-Dec-20128 KiB404280

cpu.hH A D19-Dec-20125.4 KiB254142

dc-complexH A D19-Dec-20122.1 KiB5857

dc-simpleH A D19-Dec-2012935 2524

dc-stupidH A D19-Dec-20122.1 KiB5857

dc-test.01H A D19-Dec-20121 KiB2423

dc-test.02H A D19-Dec-20121 KiB2423

debug.cH A D19-Dec-20125 KiB158121

debug.hH A D19-Dec-20124 KiB174125

device.cH A D19-Dec-201248.6 KiB1,9981,649

device.hH A D19-Dec-201217.1 KiB797456

device_table.cH A D19-Dec-20127.3 KiB310248

device_table.hH A D19-Dec-20128.3 KiB323202

dgen.cH A D19-Dec-20128.5 KiB336270

double.cH A D19-Dec-20121.1 KiB4214

dp-bit.cH A D01-Jan-201327.1 KiB1,2991,004

e500.igenH A D01-Jan-2013109.2 KiB3,3473,014

e500_expression.hH A D01-Jan-20135.4 KiB172114

e500_registers.hH A D01-Jan-20133.1 KiB8544

emul_bugapi.cH A D19-Dec-201218.7 KiB586455

emul_bugapi.hH A D19-Dec-2012867 274

emul_chirp.cH A D19-Dec-201256.4 KiB2,0351,616

emul_chirp.hH A D19-Dec-20122.8 KiB754

emul_generic.cH A D19-Dec-20128.7 KiB343262

emul_generic.hH A D19-Dec-20124 KiB178120

emul_netbsd.cH A D19-Dec-201235.4 KiB1,4791,273

emul_netbsd.hH A D19-Dec-2012867 274

emul_unix.cH A D19-Dec-201270.9 KiB2,8242,411

emul_unix.hH A D19-Dec-2012892 285

events.cH A D19-Dec-201211.1 KiB409295

events.hH A D19-Dec-20121.8 KiB7935

filter.cH A D19-Dec-20123 KiB150112

filter.hH A D19-Dec-20121.2 KiB4310

filter_filename.cH A D19-Dec-20121.1 KiB3814

filter_filename.hH A D19-Dec-2012938 275

gdb-sim.cH A D01-Jan-201366.8 KiB1,2991,254

gen-icache.cH A D19-Dec-201218.8 KiB675571

gen-icache.hH A D19-Dec-20121.8 KiB6826

gen-idecode.cH A D19-Dec-201245.7 KiB1,5491,291

gen-idecode.hH A D19-Dec-20121.2 KiB4012

gen-itable.cH A D19-Dec-20123.4 KiB12383

gen-itable.hH A D19-Dec-2012891 286

gen-model.cH A D19-Dec-201212.1 KiB394324

gen-model.hH A D19-Dec-2012891 306

gen-semantics.cH A D19-Dec-20126.8 KiB250195

gen-semantics.hH A D19-Dec-20122.5 KiB8110

gen-support.cH A D19-Dec-20123.7 KiB136102

gen-support.hH A D19-Dec-2012894 296

hw_com.cH A D19-Dec-201214.2 KiB559321

hw_core.cH A D19-Dec-20123.4 KiB14385

hw_cpu.cH A D19-Dec-20124.3 KiB16774

hw_cpu.hH A D19-Dec-20121,021 3411

hw_disk.cH A D19-Dec-201215.6 KiB560344

hw_eeprom.cH A D19-Dec-201221.8 KiB839596

hw_glue.cH A D19-Dec-201210.7 KiB371202

hw_htab.cH A D19-Dec-201220.7 KiB691421

hw_ide.cH A D19-Dec-201224.3 KiB869631

hw_init.cH A D19-Dec-201219.9 KiB721411

hw_iobus.cH A D19-Dec-20122.5 KiB10051

hw_memory.cH A D19-Dec-201215.5 KiB538396

hw_nvram.cH A D19-Dec-20126.7 KiB264178

hw_opic.cH A D19-Dec-201253 KiB1,8271,427

hw_pal.cH A D19-Dec-20129.2 KiB366238

hw_phb.cH A D19-Dec-201228.9 KiB1,068725

hw_phb.hH A D19-Dec-20121.1 KiB4015

hw_register.cH A D19-Dec-20123.5 KiB13253

hw_sem.cH A D19-Dec-20126.7 KiB289164

hw_shm.cH A D19-Dec-20125.8 KiB236123

hw_trace.cH A D19-Dec-20122.6 KiB10344

hw_vm.cH A D19-Dec-20127.2 KiB275176

idecode_branch.hH A D19-Dec-20121.8 KiB6227

idecode_expression.hH A D19-Dec-201210.2 KiB417299

idecode_fields.hH A D19-Dec-20122.8 KiB10539

igen.cH A D19-Dec-201215.2 KiB565493

igen.hH A D19-Dec-20125.1 KiB19975

inline.cH A D19-Dec-20122 KiB9857

inline.hH A D19-Dec-201213.7 KiB498369

interrupts.cH A D19-Dec-201215.1 KiB541430

interrupts.hH A D19-Dec-20125 KiB17077

ld-cache.cH A D19-Dec-20123.1 KiB12790

ld-cache.hH A D19-Dec-20122.5 KiB9126

ld-decode.cH A D19-Dec-20124.4 KiB155117

ld-decode.hH A D19-Dec-20124.1 KiB14337

ld-insn.cH A D19-Dec-201226.6 KiB990775

ld-insn.hH A D19-Dec-20125.4 KiB297180

lf.cH A D19-Dec-20128.9 KiB439376

lf.hH A D19-Dec-20122.5 KiB12964

main.cH A D19-Dec-20126.6 KiB332258

misc.cH A D19-Dec-20123.7 KiB215168

misc.hH A D19-Dec-20122.1 KiB9550

mon.cH A D19-Dec-201211.6 KiB445361

mon.hH A D19-Dec-20122.2 KiB10864

options.cH A D19-Dec-20127.7 KiB247193

options.hH A D19-Dec-2012937 307

os_emul.cH A D19-Dec-20123.7 KiB146101

os_emul.hH A D19-Dec-20121.7 KiB6021

pk_disklabel.cH A D19-Dec-201211 KiB401289

ppc-instructionsH A D19-Dec-2012172 KiB5,0244,586

ppc-spr-tableH A D19-Dec-20121.7 KiB9391

ppc.mtH A D16-Apr-199951 43

psim.cH A D19-Dec-201232.3 KiB1,221961

psim.hH A D19-Dec-20123.8 KiB18494

psim.texinfoH A D01-Jan-201341.2 KiB1,107835

registers.cH A D19-Dec-20125 KiB198164

registers.hH A D19-Dec-20128.1 KiB348208

sim-endian-n.hH A D19-Dec-20122.6 KiB13493

sim-endian.cH A D19-Dec-20121.8 KiB7440

sim-endian.hH A D19-Dec-201210.9 KiB408272

sim-main.hH A D14-Dec-2001146 117

sim_callbacks.hH A D19-Dec-20122.7 KiB11730

sim_calls.cH A D19-Dec-20128.6 KiB397294

std-config.hH A D19-Dec-201218.5 KiB672214

table.cH A D19-Dec-20127.6 KiB345258

table.hH A D19-Dec-20122 KiB7741

tree.cH A D19-Dec-201231.5 KiB1,3061,049

tree.hH A D19-Dec-20123.3 KiB14361

vm.cH A D19-Dec-201231.4 KiB1,198899

vm.hH A D19-Dec-20123.3 KiB15589

vm_n.hH A D19-Dec-20124.2 KiB134104

words.hH A D19-Dec-20123 KiB12050

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