Commit graph

262 commits

Author SHA1 Message Date
Ian Carmichael
2fd7c40770 * Temporarily change LOADDRMASK in sky build. 1998-04-09 03:17:43 +00:00
Frank Ch. Eigler
11c47f314b * R5900 sky COP2 testing continuing. Today only small
VCALLMS-related were found/fixed.

[ChangeLog.sky]

	* sky-vu.c ({read,write}_vu_special_reg): Add CMSAR[01] as special
 	registers for a VU.  Behavior not as mandated.
	({read,write}_vu_{misc,special}_reg): Create sim_io_error upon
	access to unknown register.  Behavior not as mandated.

	* sky-vu.h (anonymous register numbering enum): Add CMSAR[01].

	* sky-libvpe.c (indebug): Cache $ENV{'SKY_DEBUG'}.

[ChangeLog]


	* Makefile.in (SIM_SKY_OBJS): Added sky-vudis.o.

	* interp.c (decode_coproc): Refer to VU CIA as a "special"
	register, not as a "misc" register.  Aha.  Add activity
	assertions after VCALLMS* instructions.
1998-04-08 22:22:58 +00:00
Ian Carmichael
997d07bb70 * Add sky-vudis.h, sky-vudis.c. 1998-04-08 20:14:44 +00:00
Andrew Cagney
8764538f22 Keep sim-main.c and tx.igen 1998-04-07 23:15:53 +00:00
Doug Evans
4b61e1073f Keep sky-gs.[ch] if sky. 1998-04-07 22:54:10 +00:00
Frank Ch. Eigler
174ff2242b * R5900 COP2 sim testing in progress. The majority of instructions actually
work!

[ChangeLog.sky]

	* sky-vu.h (vu_device): Represent "macro instruction just stuffed
 	into fetch buffer" condition with new "m" bit.  Rename old "m" to
 	"l".

	* sky-libvpe.c (indebug): Save snapshot of environment value;
 	workaround for suspected memory corruption.
	(fetch_inst): Respect new "m" macro-instruction flag for reporting
 	successful fetch to caller.
	(exec_inst): Disassemble instruction here instead of fetch time.
  	Renamed old "m" -> "l" flag in VU state to track interlock
 	release.
	(vpecallms_cycle): Call exec_inst only if fetch_inst did some
 	work.

	* sky-vu.c (vu_attach, vu[01]_device): Revamped initialization to
 	ensure complete clear of tail part of struct at attach time.
	(vu0_busy): Fix thinko.
	(vu0_macro_issue): Adapt to new "l" flag.
	(vu0_micro_interlock_released): Ditto.
 	(write_vu_special_reg): Ditto.
	(read_vu_special_reg): Compute VBS0/VBS1 bits more explicitly.
  	The other VU status bits are not yet computed.

[ChangeLog]

	* interp.c (decode_coproc): Do not apply superfluous E (end) flag
 	to upper code of generated VU instruction.
1998-04-07 22:47:53 +00:00
Frank Ch. Eigler
2ebb2a6855 * R5900 COP2 is now ready for testing. Let loose the dogs!
Mon Apr  6 19:55:56 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (cop_[ls]q): Replaced stub with proper COP2 code.

	* sim-main.h (LOADADDRMASK): Redefine to allow 128-bit accesses
 	for TARGET_SKY.

	* r5900.igen (SQC2): Thinko.
1998-04-07 00:01:31 +00:00
Frank Ch. Eigler
ebcfd86a2e * R5900 COP2 function nearly complete. PKE sim now aware of new GPUIF
masking facility for PATH3 transfers.

[ChangeLog.sky]

Sun Apr  5 12:11:45 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-libvpe.c (exec-inst): Added "M" bit detection for upper
 	instruction.

	* sky-pke.c (pke_check_stall): Added more assertions.
	(pke_code_mskpath3): Use new GPUIF M3P control register.

	* sky-pke.h (VU[01]_CIA): New macros that give VU CIA
 	pseudo-register addresses.

	* sky-vu.h (vu_device, VectorUnitState): Merged structs.
	(VectorUnitState.mflag): New field.
	(VU_REG_{CMSAR0,CMSAR1,FBRST}) Added missing control registers.

	* sky-vu.c (vu0_busy): New function.
	(vu0_q_busy): New function.
	(vu0_macro_issue): New function.
	(vu0_micro_interlock_released): New function.
	(vu0_busy_in_{micro,macro}_mode): Deleted stubs.
	(vu0_macro_hazard_check): Deleted stubs.
	(vu_attach): Adapted code to merged device & state struct.
	(read_vu_special_reg): Compute VBS0/VBS1 bits in STAT register.

[ChangeLog]
start-sanitize-sky
Sun Apr  5 12:05:44 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (*): Adapt code to merged VU device & state structs.
	(decode_coproc): Execute COP2 each macroinstruction without
 	pipelining, by stepping VU to completion state.  Adapted to
	read_vu_*_reg style of register access.

	* mips.igen ([SL]QC2): Removed these COP2 instructions.

	* r5900.igen ([SL]QC2): Transplanted these COP2 instructions here.

	* sim-main.h (cop_[ls]q): Enclosed in TARGET_SKY guards.

end-sanitize-sky
1998-04-05 16:40:03 +00:00
Andrew Cagney
64ed8b6a8c aclocal.m4: Don't enable inlining when cross-compiling.
mips/*: Tune mips simulator - allow all memory transfer code to be inlined.
1998-04-05 07:16:54 +00:00
Andrew Cagney
278bda4050 Cleanup INLINE support for simulators using common framework.
Make IGEN responsible for co-ordinating inlining of generated files.
By default, aclocal.m4 disabled all inlining.
1998-04-04 12:33:11 +00:00
Ron Unrau
c567d0b941 * sim-main.h: add vif registers
* interp.c: incorporate vif register load/store
        * sky-pke.[ch]: add register load/store routines
        * sku-vu.c: P register is float
1998-04-02 21:02:38 +00:00
Andrew Cagney
69d5a56645 Re-do load/store operations so that they work for both 32 and 64 bit
ISAs.
Enable tx39 as igen again.
1998-04-02 19:35:39 +00:00
Andrew Cagney
725fc5d927 For mips get_mem_size call. Force the return of a 32 bit value
regardless of the target's word bitsize.
1998-04-02 03:27:24 +00:00
Ron Unrau
2151467d63 sky-vu.[ch]: prototype decls, cast floats to ints before register transfer
interp.c: integrate VU register read/writes
sim-main.h : track tm-txvu.h
1998-04-01 17:31:24 +00:00
Frank Ch. Eigler
6b0c51c929 * You bop one on the head ... another one appears.
Wed Apr 1 08:20:31 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* mips.igen (SQC2/LQC2): Make bodies sky-target-only also.
1998-04-01 13:19:07 +00:00
James Lemke
1ff39ecb10 * sky-dma.c: Clarify text in warning msg.
* interp.c: Add global option "float-type".
	* sky-vu.h: Add SIM_DESC sd; to VectorUnitState for accessing
	global options.
1998-03-31 21:46:31 +00:00
Frank Ch. Eigler
6ed00b0607 * Continuing sky R5900 / COP2 work. Added extra sanitize tags to hide
128-bit MIPS part.

[ChangeLog]

Mon Mar 30 18:41:43 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (decode_coproc): Continuing COP2 work.
  	(cop_[ls]q): Hide 128-bit COP2 more.

	* sim-main.h (COP_[LS]Q): Hide 128-bit COP2 more.

[ChangeLog.sky]

Mon Mar 30 18:44:15 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-libvpe.c: Code too wide - ran indent on SCEI code.

	* sky-vu.h (vu0_busy*, vu0_macro*): New entry points for COP2
 	interface.

	* sky-vu.c (vu0_busy*, vu0_macro*): Stub functions for above.
1998-03-30 23:56:52 +00:00
Gavin Romig-Koch
34f51d8723 * configure.in (mipstx39*-*-*): Use gencode simulator rather
than igen one.
	* configure : Rebuild.
1998-03-30 19:54:15 +00:00
Frank Ch. Eigler
7dd4a46650 * Oops, added #ifdef TARGET_SKY around R5900 COP2 implementation skeleton. 1998-03-29 22:53:31 +00:00
Frank Ch. Eigler
b59e0b6815 * Modified sky PKE behavior according to new SCEI specs. 1998-03-28 00:35:43 +00:00
Frank Ch. Eigler
15232df4a3 * Inserted skeleton of R5900 COP2 simulation. Merged old vu[01].[ch] code
into single PKE-style vu.[ch].


[ChangeLog]

Fri Mar 27 16:19:29 1998  Frank Ch. Eigler  <fche@cygnus.com>

start-sanitize-sky
	* Makefile.in (SIM_SKY_OBJS): Replaced sky-vu[01].o with sky-vu.o.

	* interp.c (sim_{load,store}_register): Use new vu[01]_device
 	static to access VU registers.
	(decode_coproc): Added skeleton of sky COP2 (VU) instruction
 	decoding.  Work in progress.

	* mips.igen (LDCzz, SDCzz): Removed *5900 case for this
 	overlapping/redundant bit pattern.
	(LQC2, SQC2): Added *5900 COP2 instruction skeleta.  Work in
	progress.

	* sim-main.h (status_CU[012]): Added COP[n]-enabled flags for
 	status register.

end-sanitize-sky

	* interp.c (cop_lq, cop_sq): New functions for future 128-bit
 	access to coprocessor registers.

	* sim-main.h (COP_LQ, COP_SQ): New macro front-ends for above.

[ChangeLog.sky]

	* sky-engine.c (engine_run): Adapted from vu[01] -> vu merge.

	* sky-hardware.c (register_devices): Ditto

	* sky-pke.c (pke_fifo_*): Made these functions private again, now
 	that the GPUIF code does not use them.

	* sky-pke.h (pke_fifo_*): Removed newly private declarations.

	* sky-vu.c (*): Major rework: merge of old sky-vu0.c and
 	sky-vu1.c.  Management of two VU devices parallels two PKEs.
	Work in progress.

	* sky-vu.h (*): Other half of merge.
	(vu_device): New struct, parallel to pke_device.
1998-03-27 22:00:56 +00:00
Patrick Macdonald
76969284c3 sky-gs.c: initial drop of GS control registers (outstanding questions)
sky-gs.h: initial drop of GS control registers
Makefile.in: added sky-gs.o to sanitized list
sky-gpuif.c (gif_io_write_buffer): correct memset length error, renamed
trace file for gif
1998-03-27 18:36:33 +00:00
Ron Unrau
d44859a2d8 * sky-vu.c: new file to read/write VU registers
* Makefile.in .Sanitize: add sky-vu.c
	* sky-vu.h: define registers as enum, export read/write routines
        * sky-vu[01].[ch]: use register read/write routines in sky-vu.c
        * interp.c: use register read/write routines in sky-vu.c
1998-03-27 14:44:39 +00:00
Andrew Cagney
d8f5304972 Do top level sim-hw module for device tree.
Add to aclocal.m4, update all configure files.
1998-03-27 11:42:16 +00:00
Andrew Cagney
82ea14fd9d Define CPU_INDEX. Initialize.
For mips_options, iterate over MAX_NR_PROCESSORS when setting options.
1998-03-27 04:25:45 +00:00
Andrew Cagney
d89fa2d80a Re-do --enable-sim-hardware so that each simulator can specify the devices
it wants built.
Generate hw-config.h.
1998-03-25 01:41:33 +00:00
Andrew Cagney
612a649eee * interp.c (Max, Min): Comment out functions. Not yet used.
* vr4320.igen (DCLZ): Pacify GCC, 64 bit arg, int format.
1998-03-24 23:16:57 +00:00
Ian Carmichael
9fa5e700c0 * Several fixes and performance enhancements from my 2 weeks working in Japan. 1998-03-24 22:23:33 +00:00
Frank Ch. Eigler
121d6745bc * Monster bug fixes & improvements from the last two days' demo-testing work.
* sky-pke.h (pke_fifo*): Exported these formerly private functions.
	(pke_device): Added FIFO cache fields.

	* sky-pke.c (pke_fifo_reset): New function for GPUIF client -
 	clear FIFO contents.
	(pke_pcrel_fifo): Added caching facility to prevent O(n^2) cost for
	searching for consecutive operand words.

	* sky-libvpe.c (MEM, uMEM): New/changed macros that perform modulo
 	calculations to handle out-of-range VU memory addresses.
	(*): Replaced many previous uses of MEM[] and state->uMEM[] with
	calls to above macros.

	* sky-vu.h (struct VectorUnitState): Added qw/dw size fields for
	MEM/uMEM buffers, for overflow prevention.  Renamed MEM/uMEM fields
	to catch all their prior users.

	* sky-vu0.c (vu0_attach): Manually align MEM0/MEM1 buffers to force
	16-byte alignment.  (zalloc is not enough.)

	* sky-vu1.c (vu1_attach): Ditto.
	(init_vu): Store buffer sizes from allocation into VectorUnitState.

	* sky-gpuif.h (GifPath): Use a pke_fifo strucf instead of
 	temporary fixed-size array for flexible FIFO sizing.

	* sky-gpuif.c (SKY_GPU2_REFRESH): This is now an integer value to be
	used as a modulus for periodic refresh.
	(refresh): New function to send GPU2 refresh code periodically.
	(*): Use pke_fifo calls to en/dequeue GPUIF tags & operands.

	* sky-pke.h (struct pke_device): Added fields to allow caching of
 	results from recent FIFO searches.
1998-03-20 22:12:06 +00:00
Frank Ch. Eigler
0b9843e5ee * Changes today consist just of some code hardening. 1998-03-18 19:33:33 +00:00
Frank Ch. Eigler
9b23b76d68 * Added --with-sim-gpu2=<path> option for linking SCEI's GPU2 library with
the stand-alone executable.


[in ChangeLog.sky:]

	* sky-gpuif.c (call_gs): Call properly into GPU2 library if
 	configured --with-sim-gpu2.  Use SKY_GPU2_REFRESH symbol as
 	placeholder for future GPU2-refresh policy.

[in ChangeLog:]

	* Makefile.in (MIPS_EXTRA_LIBS, SIM_EXTRA_LIBS): Added
 	configurable settings for stand-alone simulator.

start-sanitize-sky
	* configure.in: Added --with-sim-gpu2 option to specify path of
 	sky GPU2 library.  Triggers -DSKY_GPU2 for sky-gpuif.c, and
 	links/compiles stand-alone simulator with this library.

	* interp.c (MEM_SIZE): Increased default sky memory size to 16MB.
end-sanitize-sky

	* configure.in: Added X11 search, just in case.

	* configure: Regenerated.
1998-03-18 00:20:40 +00:00
Frank Ch. Eigler
9614fb3c36 * PKE testing was driven by SCEI "test0" bucket; code coverage remains
effectively full.  The code is believed to be functionally complete now.
  Some code cleanup is included at no extra charge in this version.

Fri Mar 13 20:21:57 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-vu1.c: (dump_mem): Commented out function to satiate
 	warning-ful compilation.

	* sky-pke.c: (pke_reset): New function, called explicitly at
 	initialization and at FBRST.
	(pke_fifo_flush): New function to flush (skip over) existing
 	quadwords in FIFO.
	(pke_fifo_fit): New function to add space for new quadword in
 	FIFO.
	(pke_fifo_access): New function to absolute-index into FIFO.
	(pke_fifo_old): New function to remove old quadwords from FIFO.
	(pke_begin_interrupt_stall): New function to abstract
 	interrupt-caused stalls.
	(pke_*): Access PKE FIFO only thorugh pke_fifo functions.
	(pke_pcrel_*): Renamed pke_pc_* functions.
	(pke_code_unpack): Numerous logic tweaks for latest UNPACK
 	behavior changes & clarifications from SCEI.

	* sky-pke.h (struct pke_fifo): New explicit FIFO representation.
	(struct pke_device): Use struct above.
	(PKE_DEBUG): Removed macro as misnomer.

	* sky-hardware.c: Moved *_cmd_install declarations out.

	* sky-hardware.h: Moved *_cmd_install declarations in.
1998-03-14 01:47:06 +00:00
Gavin Romig-Koch
ca8c38472e Sanity for 4320 1998-03-11 17:05:20 +00:00
Andrew Cagney
eefc25e592 Allow more than just read, write and exec memory spaces in the core
module.
1998-03-11 12:18:39 +00:00
Andrew Cagney
10572b6a43 * sky-gdb.c (vu_option_handler): Delete unused local unit.
(log_option_handler): Delete extra arg from printf, twice.
* sky-pke.c (config.h): Include.
(string.h, strings.h): Include.
(pke_issue): Delete unused locals imm, num
* sky-libvpe.c: Pacify GCC.
* sky-gpuif.c (gif_io_write_buffer): Pacify GCC.
* sky-dma.c (config.h): Include.
(string.h, strings.h): Include.
(dma_io_read_buffer): Pacify GCC.
(dma_io_write_buffer): Pacify GCC.  Initialize pmem before first use.
(do_dma_transfer): Delete unused local variables qwbuf and local.
1998-03-11 11:57:55 +00:00
Gavin Romig-Koch
5fa71251a0 * vr4320.igen (clz,dclz) : Added.
(dmac): Replaced 99, with LO.
1998-03-10 15:37:24 +00:00
Gavin Romig-Koch
d843d7ca34 * mips/vr4320.igen: Mark the insn in here as vr4320 only.
Reorder the insns.
1998-03-09 20:22:45 +00:00
Frank Ch. Eigler
fd90908986 * Numerous changes & small bug fixes in PKE sim code and test suite.
for sim/testsuite/sky:

	* t-pke4.run: Removed test, since it succeeds yet returns a
 	non-zero exit code.

	* Makefile.in (RUNOPTS): Removed --memory-size flag, made
 	unnecessary by sim/mips/interp.c changes.
	(TESTS): Removed t-pke4.ok target.

	* t-pke3.trc: Classified tests with [---] indicators, to match
 	items up with entries documented in testplan.sgml.  Added numerous
 	additional tests.  They assert behavior that assumes certain
 	favorable answers to PKE question set #6 to SCEI.

	* t-pke1.trc: Added some [---] indicators.

  for sim/mips:

	* sky-pke.c (pke_issue): Revamped interrupt & stall code.  Assume
 	that ER1/ER0/PIS bits are only set if not masked by ERR bits.
  	Signal PIS only if unmasked.
	(pke_code_error): Signal ER1 only if unmasked.
	(pke_pc_fifo): Signal ER0 only if unmasked.
	(pke_code_unpack): Round up num_operands for last operand's
 	partial-word.  Factor out "R" bit handling for better coverage
 	analysis.  Fill upper words of a quadword with zeroes for Vn_m
 	UNPACK with n < 4.

	* sky-device.c (device_error): Made function accept varargs.

	* sky-device.h (device_error): Changed declaration to match.

	* interp.c (sim_open): Made 0x0000 area memory be an alias of
	the K0/K1 segments.  Sanitized code.
1998-03-06 22:46:40 +00:00
Andrew Cagney
6ba4c1539f Fix opcode fields in SHFL.* 1998-03-05 21:32:31 +00:00
Frank Ch. Eigler
370e0ef781 * Fixed a double-buffering bug in PKE, due to naive use of
complex macros with side-effects.  Gripes.
1998-03-05 20:23:59 +00:00
James Lemke
9ce23bf951 * interp.c (sim_open): Map 4M of memory at zero for SKY sim only. 1998-03-04 23:33:36 +00:00
Frank Ch. Eigler
5068e793ef * Merely eliminated silly duplicated code, to raise test coverage.
* sky-pke.c (pke_issue): Move interrupt-handling into decode logic.
	(pke_code_*): Remove duplicated interrupt-handling code.
1998-03-04 19:14:03 +00:00
Ron Unrau
a859684b25 sim-main.h: track SKY register number changes from gdb
interp.c: ditto
1998-03-04 08:47:31 +00:00
Gavin Romig-Koch
dd15abd5a6 * vr4320.igen: New file.
* Makefile.in (vr4320.igen) : Added.
	* configure.in (mips64vr4320-*-*): Added.
	* configure : Rebuilt.
	* mips.igen : Correct the bfd-names in the mips-ISA model entries.
	Add the vr4320 model entry and mark the vr4320 insn as necessary.
1998-03-03 17:03:57 +00:00
Andrew Cagney
ca6f76d135 Fix DIV, DIV1 (wrong check for overflow) and DIVU1 (shouldn't check
for overflow).
Pacify GCC.
1998-03-03 05:39:49 +00:00
Frank Ch. Eigler
f62dff78f9 * Continuing PKE sim unit tests. Found little bugs in VU instead.
* sky-vu1.c (vu1_io_write_register_window): Make CIA (pc) write
 	effective by updating more registers.

	* sky-libvpe.c: Updated to match earlier VU state-change code.

	* sky-vpe.h: Removed unused globals from declarations.
1998-03-03 00:00:09 +00:00
Ron Unrau
8c6a2b75b9 add sky-gdb.c to sky_files 1998-03-02 14:43:52 +00:00
Ron Unrau
aaab4e578d sky-gdb.c: new file - temporary demo version of the sim interface
sky-hardware.c: add sim commands
Makefile.in: build sky-gdb.c
1998-03-01 14:41:38 +00:00
Andrew Cagney
0e701ac37b Add generic sim-info.c:sim_info() function using module mechanism.
Clean up compile probs in mips/vr5400.
1998-02-28 02:51:06 +00:00
Doug Evans
7c5d88c1bb * interp.c (DECLARE_OPTION_HANDLER): Use it.
(mips_option_handler): New argument `cpu'.
	(sim_open): Update call to sim_add_option_table.
1998-02-28 02:43:31 +00:00