From cc9bc93202f868d3e6bd38e96a292d775285d5d8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 9 Jun 1998 16:54:09 +0000 Subject: * Updates to tx3904 peripheral simulations for ECC. Tue Jun 9 12:29:50 1998 Frank Ch. Eigler * dv-tx3904cpu.c (deliver_*_interrupt,*_port_event): Set the CAUSE register upon non-zero interrupt event level, clear upon zero event value. * dv-tx3904irc.c (*_port_event): Handle deactivated interrupt signal by passing zero event value. (*_io_{read,write}_buffer): Endianness fixes. * dv-tx3904tmr.c (*_io_{read,write}_buffer): Endianness fixes. (deliver_*_tick): Reduce sim event interval to 75% of count interval. * interp.c (sim_open): Added jmr3904pal board type that adds PAL-based serial I/O and timer module at base address 0xFFFF0000. --- sim/mips/interp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sim/mips/interp.c') diff --git a/sim/mips/interp.c b/sim/mips/interp.c index f35674a..104e0d8 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -363,6 +363,8 @@ static const OPTION mips_options[] = /* start-sanitize-tx3904 */ #define BOARD_JMR3904 "jmr3904" "|" BOARD_JMR3904 +#define BOARD_JMR3904_PAL "jmr3904pal" + "|" BOARD_JMR3904_PAL #define BOARD_JMR3904_DEBUG "jmr3904debug" "|" BOARD_JMR3904_DEBUG /* end-sanitize-tx3904 */ @@ -481,6 +483,7 @@ sim_open (kind, cb, abfd, argv) #if (WITH_HW) if (board != NULL && (strcmp(board, BOARD_JMR3904) == 0 || + strcmp(board, BOARD_JMR3904_PAL) == 0 || strcmp(board, BOARD_JMR3904_DEBUG) == 0)) { /* match VIRTUAL memory layout of JMR-TX3904 board */ @@ -518,6 +521,19 @@ sim_open (kind, cb, abfd, argv) sim_hw_parse (sd, "/tx3904tmr@0xfffff100 > int tmr1 /tx3904irc"); sim_hw_parse (sd, "/tx3904tmr@0xfffff200 > int tmr2 /tx3904irc"); + /* add PAL timer & I/O module */ + if(! strcmp(board, BOARD_JMR3904_PAL)) + { + /* the device */ + sim_hw_parse (sd, "/pal@0xffff0000"); + sim_hw_parse (sd, "/pal@0xffff0000/reg 0xffff0000 64"); + + /* wire up interrupt ports to irc */ + sim_hw_parse (sd, "/pal@0x31000000 > countdown tmr0 /tx3904irc"); + sim_hw_parse (sd, "/pal@0x31000000 > timer tmr1 /tx3904irc"); + sim_hw_parse (sd, "/pal@0x31000000 > int int0 /tx3904irc"); + } + if(! strcmp(board, BOARD_JMR3904_DEBUG)) { /* -- DEBUG: glue interrupt generators --- */ -- cgit v1.1