Commit graph

1406 commits

Author SHA1 Message Date
Andrew Cagney
04cdafa7a4 * hw-tree.c (hw_tree_find_property): Return NULL when device is not found.
(hw_tree_find_*_property): Clean up error message when property is not found.
* dv-pal.c (hw_pal_io_read_buffer): Check the smp property is present before
looking for it.
1998-03-25 22:37:33 +00:00
Ian Carmichael
8d0bd9889c * Added HAVE_FPU_CONTROL_H and HAVE___SETFPUCW to fix non-linux builds. 1998-03-25 21:54:06 +00:00
Joyce Janczyn
52ef605e6d * simops.c (OP_F0FD): Initialise variable 'sp' for rti instruction. 1998-03-25 17:10:01 +00:00
Andrew Cagney
c357e16ac8 * dv-mn103int.c (decode_group): A group register every 4 bytes not 8.
(write_icr): Rewrite equation updating request field.
(read_iagr): Fix check that interrupt is still pending.
1998-03-25 14:52:44 +00:00
Andrew Cagney
8077fed51e * interp.c (sim_open): Tidy up device creation.
* dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero value.
(mn103int_io_read_buffer): Convert absolute address to register block offsets.
(read_icr, write_icr): Convert block offset into group offset.
1998-03-25 05:37:42 +00:00
Andrew Cagney
6100784a60 * interp.c (sim_open): Create second 1mb memory region at 0x40000000.
(sim_open): Create a device tree.
(sim-hw.h): Include.
(do_interrupt): Delete, needs to use dv-mn103cpu.c
* dv-mn103int.c, dv-mn103cpu.c: New files.
1998-03-25 04:15:38 +00:00
Andrew Cagney
8388c9a564 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM): Define.
(SP): Define.
1998-03-25 04:07:31 +00:00
Andrew Cagney
05d7918e53 * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value,
hw_pal_timer, hw_pal_timer_value): Define.
(hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support
(do_counter_event, do_counter_read, do_counter_value,
do_counter_write): new functions.

* hw-tree.c (hw_printf): Send tree dump to stderr, same as other
trace output.
* hw-base.c (hw_create): Stop searching for a device when one is
found.
1998-03-25 03:44:37 +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
e855e57637 Pacify GCC. 1998-03-25 00:08:52 +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
Andrew Cagney
d797f46f3c * gen-engine.c (print_run_body): Re-extract the CIA after
processing any events.  Events may not restart the simulator.
1998-03-24 21:30:00 +00:00
Joyce Janczyn
8dcf23d28b Add new files: mn10300.igen, mn10300.dc, sim-main.h, op_utils.c 1998-03-24 21:23:29 +00:00
Joyce Janczyn
55045e7b32 Port mn10300 simulator to build with the common simulator framework
under the configure option --enable-sim-common.
1998-03-24 20:30:03 +00:00
Joyce Janczyn
6274d39b87 Add code to support building mn10300 simulator with the common simulator
framework.
1998-03-24 20:26:06 +00:00
Joyce Janczyn
5abdc30591 Add support for building simulator based on common simulator framework.
Separate out files which get compiled depending on --enable-sim-common
configuration.
1998-03-24 20:19:55 +00:00
Joyce Janczyn
4f262a370d Add ability to configure mn10300 built with common simulator code base.
Use --enable-sim-common to build this way; default configure has not
changed.
1998-03-24 20:16:25 +00:00
Joyce Janczyn
13e0e254dc New {load/store}_{byte/half/word} macros for simulator built with
common framework.
1998-03-24 20:11:44 +00:00
Joyce Janczyn
0543ebbb26 Header file required by igen generated files. 1998-03-24 20:08:00 +00:00
Joyce Janczyn
7986ea1323 IGEN input files for mn10300 simulator. 1998-03-24 20:07:22 +00:00
Stu Grossman
753ad2d3c5 * Makefile.in: Get SHELL from configure.
* configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
	NT native builds.
1998-03-24 17:50:09 +00:00
Stu Grossman
63330b2e2e * Make-common.in: Get SHELL from configure.
* (stamp-tvals sim-inline.c):  Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* Makefile.in (nltvals.def):   Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
	NT native builds.
1998-03-24 17:48:58 +00:00
Joyce Janczyn
9bd4b4618d Build IGEN with the mn10300 simulator. 1998-03-24 16:18:58 +00:00
Andrew Cagney
7c130f2971 New function hw_strdup() - use memory tied to hw device.
Tidy up hw-properties error messages.
New device dv-glue.c (copied from ../ppc/hw_glue.)
Only attach a port after a devices initialization has finished.
1998-03-22 22:33:34 +00:00
Andrew Cagney
b2846e630d Fix typos: Setting trace in wrong function, ME vs HW. 1998-03-22 05:51:57 +00:00
Andrew Cagney
775b309a4e Copy function ../ppc/device_table.c:generic_device_init_address() to
hw-base.c:do_hw_attach_regs().  Use in dv-pal.
Add hw_tree_delete to hw-tree.c.
1998-03-22 05:49:30 +00:00
Andrew Cagney
937a4bdc12 Add function hw_trace() and macro HW_TRACE - provides trace support
for HW devices.
1998-03-22 05:33:41 +00:00
Andrew Cagney
e5f0d498af Add hw_{malloc,zalloc,free} functions to hw_device. Any memory
allocated using these functions is reclaimed when the corresponding
device is deleted.
1998-03-22 05:06:27 +00:00
Andrew Cagney
b1e9223cee Replace *attach_address() arguments SPACEMASK:ADDR with SPACE:ADDR.
Add notes to hw-device.h that discuss the interpretation of SPACE:ADDR
on a BUS.
1998-03-22 04:18:52 +00:00
James Lemke
fc609c6c69 Added DMAC unit test cases. 1998-03-20 22:51:39 +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
Andrew Cagney
ae7c344679 Prototype common device framework. Plenty more work to go. 1998-03-18 04:08:21 +00:00
Andrew Cagney
9a8e61f1d4 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
sim_dv_src in Makefile. Take list of devices as parameter to m4
macro..
* configure: Regenerated to track ../common/aclocal.m4 changes.
1998-03-18 02:07:56 +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
670ae6c936 * Added "t-pke4" test case that I forgot to check in when it was created. 1998-03-17 20:49:50 +00:00
Frank Ch. Eigler
08b284172b * Added the "c_gen.pl" perl script into this directory, so the current
bunch of tests may be run on non-Toronto hosts.
1998-03-17 20:47:03 +00:00
Frank Ch. Eigler
fb9e431635 * Some changes in PKE tests, as per SCEI e-mail. t-pke1 still fails, but
will ignore this until next SCEI clarification.

	* tsv308_1.trc: Fixed test case as per SCEI email.
	* tsv316_1.trc: Ditto.
	* tsv408_1.trc: Same.
	* tsv416_1.trc: Again.
	* t-pke3.trc: Added more padding to one VU test to widen timing race.
1998-03-17 00:07:19 +00:00
Andrew Cagney
a8ff502679 Pass sim_cia cia into trace_prefix() 1998-03-16 03:44:33 +00:00
Doug Evans
b01a8697e2 * config.in (HAVE_FCNTL_H): Add.
* configure: Regenerate.
	* Makefile.in (SIM_OBJS): Add devices.o.
	* m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
	(UART_*): Define m32r serial port parameters.
	(M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
	* m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
	* devices.c: To here.
	* sim-if.c: Don't include signal.h,sim-core.h.
	(sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
	(sim_resume): Call sim_module_{resume,suspend}.
	* m32r.c (m32r_h_cr_{get,set}): Use register number enums.

	* tconfig.in (SIM_HANDLES_LMA): Define.

	* sim-if.c (do_trap): Result is new pc.
	Handle --environment=operating.
	* sem-switch.c,sem.c: Regenerate.
start-sanitize-m32rx
	* semx.c: Regenerate.
end-sanitize-m32rx
1998-03-15 05:15:18 +00:00
Doug Evans
84c6d152d1 * dv-sockser.c, dv-sockser.h: New files.
* Make-common.in (dv-sockser.o): Add rule for.
	* aclocal.m4: Check for fcntl.h.
	* config.h: Add HAVE_FCNTL_H.

	* sim-break.c (remove_breakpoint): Fix thinko.

	* sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
	Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
1998-03-15 02:43:00 +00:00
Frank Ch. Eigler
86a6094133 * Added "test0" test bucket from SCEI. Due to changes in the behavior specs
of PKE, some old test cases had to be modified.  There are suspected bugs
  in the SCEI test cases too, so "make check" does not run cleanly at present.

	* tss*.trc: New files, generated by perl script from
	SCEI "test0" bucket.

	* tsv*.trc: New files, generated by perl script from SCEI "test0"
 	bucket.  Note that tsv432_0 may obsolete t-pke1.

	* Makefile.in (TESTS): Run new scripts.
	(check): Bulldoze through failing test cases with "make -k" until
 	SCEI fixes some of them.
	(.run.ok): Increased run-time limit since some test runs can take
 	several seconds.
1998-03-14 01:51:03 +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
Fred Fish
93f75411f6 * sim-base.h (struct sim_state_base): Add prog_syms and
define macro STATE_PROG_SYMS.
	* sim-trace.c (trace_one_insn): Add variables abfd, symsize,
	symbol_count, and asymbols.  Call bfd_get_symtab_upper_bound
	and bfd_canonicalize_symtab, to get symbol table on first use
	and preserve it via STATE_PROG_SYMS for future calls to
	bfd_find_nearest_line.
1998-03-13 20:39:00 +00:00
Angela Marie Thomas
2b9cac47f5 massive sanitization fixes 1998-03-13 13:09:32 +00:00
Angela Marie Thomas
786786305f new .Sanitize files 1998-03-13 11:03:37 +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