ATP a W90210F inbond Electronics Corp. " W90210F PA-RISC Embedded Controller 4 Version 1.4, 10/8/97 The above information is ihe exclusive intellectual property of Winbond Electronics Corp. and shall not be disclosed, distributed or reprodused without! permission from Winbond,Winbond AEBS Table of Contents TABLE OF CONTENTS 1. GENERAL DESCRIPTION 2. FEATURES 3. W90210F 208-PIN PQFP PIN CONFIGURATION 4. W90210F PIN DESCRIPTION 5. W90210F CPU CORE .1 Architecture 5.1.1 PA-RISC Rev. 1.1 third edition 5.1.2 Level 0 implementation 5.1.3 Multimedia Extension Instruction Set 5.2 CPU resources 5.2.1 General registers 5.2.2 Shadow registers 5.2.3 Processor Status Word (PSW) 5.2.4 Control registers 5.2.5 W90210F Extemal Interrupt Request register (EIRR; CR23) 5.2.6 AIRs (Architecture Invisible Registers) 5.3 Implementation of the PA-RISC instructions 5.3.1 Implementation of Level 0 instructions 5.3.2 Implementation of cache-related instructions 5.3.3 PA-RISC multimedia extension instruction set 5.3.4 DIAG instruction 5.4. Debug Special Function Unit 5.5 Addressing and access control 5.5.1 Memory and I/O space 5.5.2 RESET addresses 5.5.3 Access control 5.6 Interruptions 6. PIPELINE ARCHITECTURE 2 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from Winbond Electronics Corp. rrr rewrrenreenvevemnrevomercvomonevomonevononeanenn cere oneeee one ceeBaee COME ERMC EMME OTE ECCT: W90210F 12 12 12 12 12 12 12 13 13 14 15 15 15 16 16 17 1? 19 20 20 20 20 21 22 Version 7.4, 10/897AEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F 6.1 Branch prediction 22 6.2 Load use interlock 23 7. ON-CHIP CACHE MEMORIES 24 7.1 Instruction cache 24 7.2 Data cache 24 7.2.1 Write-through Cache Support 25 7.3 Non-cacheable address space 25 8. MEGACELLS DESCRIPTION 26 .1 DRAM Controller & ROM Controller 26 8.1.1 DRAM controller 26 8.1.2 ROM controller 27 8.1.3 Memory controller registers 27 8.2 DMA Controller (DMAC) 30 8.2.1 Register Description: 30 8.3 Timer / Counter 32 $.4 Serial I/O 33 8.4.1 UART Register Definition 33 8.5 Parallel Port 36 8.5.1 ECP Register Description 36 9. TIMING DIAGRAM 39 9.1 Memory controller 39 9.1.1 DRAM AC Timimg 39 9.1.2 ROM AC Timimg 39 9.2 DMA Controller 41 9.2.1 DMA device register read timing 4] 9.2.2 DMA device register write timing A? 9.2.3 DMA demand mode data read cycles 43 9.2.4 DMA demand mode data write cycles Ad 9.2.5 DMA block mode data read cycles 45 9.2.6 DMA block mode data write cycles 46 APPENDIX A. PA-RISC MULTIMEDIA INSTRUCTION SET 48 APPENDIX B. DIAGNOSTIC INSTRUCTIONS 53 3 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond | W90210F Electronics Corp. 4 Version 1.4, 10/897 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. AEBS 1. General Description The W90210F Embedded Controller is part of Winbond s W30K Embedded processor family. The processor is a high-performance, highly integrated 32-bit processor intended for a wide range of embedded applications, such as set-top box, web browser, X-terminal, and visual/data communication devices.. The Wg0210F CPU core is based on the HP PA-RISC architecture and is upward code compatible with the WS0K. The PA-RISC architecture incorporates traditional RISC elements, such as instruction pipelining, a register-to- register instruction set and a large, general-purpose register file. Separate on-chip instruction and data caches allow the W907210F to fetch an instruction and access data ina single processor cycle. The W90210F includes several features that greatly increase performance, reduce system component count and ease the overall system design task. In addition to its cache memories, the W90210F s on-chip support features include a DRAM controller, ROM/FLASH ROM interface, PCI bridge, DMA controller, two serial ports with FIFO, IEEE 1284 parallel port, timer/counters, and enhanced debug support- all features that are commonly required in embedded applications. Figure 1.1 shows the system diagram of W90210F. GPU RST, CPU CLOCK Interface: Unit. internal bus Address/Control Bus S 32-bit Data Bus = PGI Bridge DRAM 2-Channel Peripheral Interface DMA Bridge Controller Trousers aa mr ae oS ROM? : Serial ed |FLASH ROM SU ype pgs SSE pees Ports Interface LL: | 8/16/3 2-bitl : ECP " ROM f Timer Figure 1.1 W90270F Sysiem Diagram 5 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS 2. Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F Features Main features of the W90210F PA-RISC architecture PA-RISC 1.1 third edition instruction set PA-RISC level zero implementation Support PA-RISC Multimedia Extension 1.0 instruction set W90K binary compatible for user software High-performance implementation Five-stage pipeline Precise, efficient handling of pipeline stalls and exceptions Delayed branch with static branch prediction Forward: not taken Backward: taken One-cycle stall when prediction is wrong HIT under miss Both load and store can be queued when miss Load/store single cycle execution after previous miss On-chip cache memory Internal |-cache: Direct mapped, 4 KB cache (256 entries, four words/entry) Wrap around fetching when cache miss Cache freeze capability Internal D-cache: 2-way set associative, 2 KB cache 84 entries, four words/entry) Write-back cache with write buffer Write-through option New line send to CPU before dirty line write back Enhanced debug capability Debug SFU supports both instruction breakpoints and data breakpoints High on-chip integration and simple I/O interface 486-like bus interface for CPU core Memory controller to support four banks of DRAM and ROM/FLASH ROM 2-channel 8-bit DMA controller Pl bridge Two Serial ports with FIFO Extended Capabilities Port (ECP) Two 24-bit timer/counters Power Down mode Provide power down mode for power saving operation 6 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from Winbond3. W90210F 208-Pi MAS VDD MA4 MAS VSS MAG MA? VSSI MAB MAg VDDI MAIO MAI ROMEN ROMR WH ROMOEF RCS#HO RCSHI VDD RCS#He RACSHS PCLK VSS RST osc VSI RCIRST PGICLK VDDI GNTo# GNT1# PREG O# PREG 1# PDAS1 PDASO PDA29 PDA28 PDA27 VSS PDA26 PDA2S VDD PDA24 COMBE3 PDA23 PDA22 PDAZ1 PDA2O PDAIS PDA18 PDA? PDAIS Winbond NPs =pZz OprZ Electronics Corp. Ww E # QF v 8 + Oro ongzg yeozg -=nwozg oNDZ ou< o-02 o-02 ws 4+O O-O02 n=02 hk-0z o- 02 N=02 =-202 -o0e o-0z2 oor Smad ao MO agg 10z ou< FOZ oog ans W90210F NoOZz =0z o0zZ OUOUUUOUUUUOUUBUOUODRPOUOUODOCOOUOLDUBUUOUPOUOUBPUDOCHAOUOUODCUOOUBOODCRBOUCRPOOSBOo 4 q q a 20 25 30 35 40 45 50 CO et ora O ne oro ofoross O yeoaroa UUSUUPOUOU OUUUBUOURPOUCUUBLU q c A 8 # 3 Ue 2 0 0 aa ( an 7 W90210F 208-pin PQFP 1] Oo oo-g 150 145 140 135 130 125 120 115 110 OHOOOMONONONNONONEONOAONONONOONNONO RIO eNO eee a a ymo@zoo oo< 8 tmegbon an no | on< %- ROM Adarese) 22bit oy Memory Data | latch enable 4 Ah A CPU Interface [> Bus H =. | Interfaces: ROM and FLASH Seen Cnn cs#[4] ROM/FLASH Read Wait State oat Tnnaanne anes can Figure 8.3 ROM controller diagram For each bank of ROM, two registers are used to specify the bank address range: ROM Bank Base Address Register. ROM Bank Size Register. ROM Configuration Register is used to program the ROM data bus size of each bank. ; ROM Bus Size 00 : 8-bit ROM 01 : 16-bit ROM 10 : 32-bit ROM 11: reserved i 01/2 3/4) 5l6/7 Bank Bank Bank Bank 3 2 1 0 ROM Configuration Register Figure 8.4 ROM configuration register programming ROM Wait State Register is used to program the number of wait states needed to access ROM. 8.1.3 Memory controller registers In Memory Controller, two IO ports are used to access the entire register set: the index port is at address 22h and the data port is at address 23h. To access a register, first write the index into the index port and then read or write the data through the data port. The internal register for the memory controller is listed as follows: ROM controller reqister : Index Bit No. Description 00h [0:7] ROM bank 0 base address register[0:7] Oth [0:7] ROM bank 0 base address register[8:15] 02h [0:7] ROM bank 1 base address register[0:7] ef Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from Winbond(\ Winbond W90210F Electronics Corp. 2st nsenuinsannmmnnsnemsonuaisanusan nin ennsonansonnununninieenansnmsonvanta ene an Se O3h [0:7] ROM bank 1 base address register[8:15] 04h [0:7] ROM bank 2 base address register[0:7] O5h [0:7] ROM bank 2 base address register[8:15] O6h [0:7] ROM bank 3 base address register[0:7] O7h [0:7] ROM bank 3 base address register[8:15] The register O~7 has no default value. O8h [0:7] [0:3] ROM bank 0 size. [4:7] ROM bank 1 size. O9h [0:7] [0:3] ROM bank 2 size. [4:7] ROM bank 3 size. OXXX disable. 1000 > 64K, 1001 > 128K, 1010 256K, 1011 512k, 1100 31M, 1101-32M, 1110 4M, 1111-3 16M. The default value is 0. Oah [0:7] [0:1] bank 3 band width: 0@> 8 bit, 013 16 bit, 10> 32_bit, 11> reserved [2:3] bank 2 band width: 0@> 8 bit, 014 16_bit, 103 32_bit, 11> reserved [4:5] bank 1 band width: 0@> 8 bit, 014 16_bit, 10> 32_bit, 11- reserved [6:7] bank 0 band width: 0@> 8 _ bit, 014 16 bit, 10> 32_bit, 11- reserved The default width of bank 0~3 is set by memory data bus bit 30 and 31. Obh [0:7] [0:2] ROM access wait state. 000 -> wait 2 state. 001 wait 3 state. 010 > wait 4 state. 011 wait 5 state. 100 > wait 6 state. 101 wait 7 state. 110 > wait 8 state. 111- wait 9 state. The default wait state is. [3] access ROM bank only. Default bankO only. [4] LA mode. Default LA mode. DRAM Controller Register Index BitNo. Description 20h [0:7] DRAM bank 0 base address register[0:7] 21h [0:7] DRAM bank 0 base address register[8:1 1] 22h [0:7] DRAM bank 1 base address register[0:7] 23h [0:7] DRAM bank 1 base address register[8:1 1] 24h [0:7] DRAM bank 2 base address register[0:7] 25h [0:7] DRAM bank 2 base address register[8:1 1] 26h [0:7] DRAM bank 3 base address register[0:7] 27h [0:7] DRAM bank 3 base address register[8:1 1] The registers 20~27 has no default value. 28h [0:7] [0:1] DRAM bank 3 type : 00> 256K, 01 > 1M, 10 4M, 11 16M, [2:3] DRAM bank 2 type : 00-3 256K, 01 > 1M, 10 4M, 11 16M, [4:5] DRAM bank 1 type : 00> 256K, 01 1M, 10 4M, 11 16M, [6:7] DRAM bank 0 type : 00-3 256K, 01 > 1M, 10 4M, 11 16M, Default 256K type. 29h [0:7] [0] Parity check enable. (default 0) [1] Enable DRAM bank 3.(default 0} [2] Enable DRAM bank 2 (default 0} [3] Enable DRAM bank 1 (default 0} [4] Enable DRAM bank 0.(default 0} [5] Disable DRAM address range from AQ000 to FFFFF.{default 0) [6] Fast write mode enable.(default 0} [7] EDO fast page mode enable.(default 0) 28 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 2ah [0:7] [0:1] RAS# precharge time (default 0} [2] CAS# precharge time (default 0) [3] Write cycle CAS# pulse width (default 1) [4:5] Read cycle RAS# to CAS# delay.(default 'bO1) [6:7] Write cycle RAS# to CAS# delay. (default 'b01) 2bh [0:7] [0:1] Refresh period. 00 :> 15us. (default). 01 :> 30us. 10 : 60us. 11 : disable refresh (for test only). [2] Refresh cycle. RAS# active pulse width after CAS# disactive. [3:4] Refresh cycle. RAS# active to CAS# inactive delay.(default 'bO1) [5] Refresh cycle. CAS# active to RAS# active delay (default 0) [6:7] Read cycle CAS# pulse width. (default 'b01) 29 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F 8.2 DMA Controller (DMAC) The DMAG megacell provides two DMA channels to support DMA transfers between 8-bit I/O devices and main memory. The DMA mechanism will provide two different methods for performing DMA transfers: demand-mode transfers and block-mode transfers. The DMAC hardware is responsible for synchronizing transfers with memory or external devices. When the DMAC is configured for demand mode, an external device requests a DMA transfer with a request input (DREQ1:0#). The DMAC acknowledges the requesting device with an acknowledge signal (DACK1:0#) when the requesting device is accessed. In block mode, DMA transfers are not requested by an external device. The DMA operation is initiated by software and continued until terminated or suspended. The DMA operation is started when the enable bit in the Configuration Register is set. DMAC megacell q_ DREQH2] SSAR TSAR DACK#[2] LETH Ior Bus MODE Interf nterface TXCOUNT > lOW q> IoDATals] DEV address D DAZ] cS] Figure 8.5 DMA controller In programming the megacell registers, the register address is defined by the BASE register plus the offset value. 8.2.1 Register Description: Source Starting Address Register (SSAR0=080, SSAR1=084): SSAR is a read/write 32-bit register that contains the starting address of the DMA transfer source. Target Starting Address Register (TSAR0=081, TSAR1=085): TSAR is a read/write 32-bit register that contains the starting address of the DMA transfer target. Length/Count Register (LETH0=082, LETH1=086): LETH is a read/write 32-bit register that records the counts of current DMA transfer. 30 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. DMA Channel Mode Register (MODE0=20c, MODE1=21): The MODE register specifies the operation mode of each channel. The Wait State Number specifies the number of wait state needed for the particular DMA channel. The Recovery State Number specifies the number of wait state needed for the recovery of the DMA channel. The channel terminal count flags indicate that a DMA operation has stopped. The DMA channel enable bits enable or suspend a DMA operation after a channel is set up. If a enable bit for a channel is cleared when a channel is active, the DMA will be suspended after pending requests for the channel are serviced. The DMA operation will resume normally when the bit is reset. DMA Channel Enable Bit Terminal Indicator 0: Polling 1: Interrupt DMA is used by Parallel Port (ECP) Terminal Count Flag Transfer Start (only for memory-to-memory) Transfer Type: Block (0) or Demand(1) DMA I/O Type 00: 8-bit 01: 16-bit 10: 32-bit 11: reserved DMA Transfer Type 00: memory to memory 01: memory to I/O 10: /O to memory 11: reserved Recovery State Wait State oy 01234567 891011 1516 20 MODE Figure 8.6 Programming DMA controller MODE regisier 31 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from Winbond Version 1.4, 10/8/97AEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F 8.3 Timer / Counter Timer/Counter megacell q TCLEK TCRIL Peripheral TICRIL p TINTL __] Interface TCR? TINT2 TICR2 Figure 8.7 Timer/Gounter Megacell Two 24-bit decrementing timers will be implemented. When the timers interrupt enable bit is set to one and the counter decrements to zero, the timer will assert the associated interrupt signal. The interrupt signal will assert one of the 32 external interrupts defined by the El bits in the control register. When a timer reaches zero, the timer hardware reloads the counter with the value from the timer initial count register and continues decrementing. Each timer is controlled and initialized by two registers: a timer control register and an timer initial count register. These registers are all memory mapped I/O registers. Timer Control register: Ol1234 23 24 21 TE CETE reserved TCR Pre-Scalar (PS): A pre-scalar value can be used to divide the input clock. Interrupt Enable bit (IE): When IE is set to one and the counter decrements to zero, the timer asserts its interrupt signal to interrupt the GPU. Counter Enable bit (CE): Setting the CE bit to one causes the timer to begin decrementing. Setting the CE bit to zero stops the timer. Timer Interrupt bit (Tl): The timer sets this bit to one to indicate that it has decrement to zero. This bit remain one until software sets it to zero. Timer Initial Count Register: 0 78 31 reserved A 24-bit read/write register for the initial counter value. 32 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY 8.4 Serial O The serial I/O megacell implements a full-duplex, bi-directional UART with FIFO. | Input Butter. | | Input Shift Reg. | q SIN | Output Buffer | (Output Shit | p SOUT Peripheral Control Logic Interface Control Register Status Register Timing generator | Serial YO megacell q__ osc Figure 8.8 Serial VO with FIFO 8.4.1 UART Register Definition Description 0 | 3F8, DLAB=0 RBR[O:7] - Receiver Buffer Register. - Read only. - bit 7 is LSB. 0 | 3F8, DLAB=0 THR[O:7] - Transmitter Holding Register. - Write only. - bit 7 is LSB. L 3F9, DLAB=0 TER[3:7] - Interrupt Enable Register. * bit 7: Irpt_RDA enable (1/0- Enable/Disable). * bit 6: Irpt_THRE enable (1/0- Enable/Disable). * bit 5: Irpt_RLS enable (1/0- Enable/Disable). * bit 4: Irpt_MOS enable (1/0- Enable/Disable). - bit 3: Loop-back enable (1/0- Enable/Disable). QO | 3F8, DLAB=1 | DLL[O:7] * Divisor Latch Register (LS). 1 3F9, DLAB=1 DLM[O0:7] * Divisor Latch Register (MS). 2 | 3FA TIIR[0:7] - Interrupt Ident. Register. - Read only. * bit 7: No Irpt pending (L/0- True/False). * bit 6: Irpt ID bit (2). * bit 5: Irpt ID bit (1). * bit 4: Irpt ID bit (0). - bit 3: DMA mode select (1/0- Mode 1/Mode 0). - bit 2: RCVR trigger (LSB). - bit 1: RCVR trigger (MSB). - bit 0: FIFO mode enable (1/0- Enable/Disable). 33 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 2 3FA FCR[0:7] - FIFO Control Register. - Write only. * bit 7: FIFO mode enable (1/0- Enable/Disable). - bit 6: Reset RCVR FIFO. (self_clearing bit) - bit 5: Reset XMIT FIFO. (self_clearing bit) - bit 4: DMA mode select (1/0- Mode 1/Mode 0). - bit 3: (Reserve). - bit 2: (Reserve). * bit 1: RCVR trigger (LSB). * bit 0: RCVR trigger (MSB). 3 3FB LCR[O0:7] - Line Control Register. * bit 7: Word length select (LSB). * bit 6: Word length select (MSB). - bit 5: Number of stop bit. - bit 4: Parity enable. (L/O- Enable/Disable) - bit 3: Even parity select. (1/0- Even/Odd parity) - bit 2: Stick parity enable. (1/0- Enable/Disable) - bit 1: Set break. - bit 0: Divisor Latch Access Bit (DLAB). 4 3FC TORI[O:7] - Time Out Register. - bit 7 ~ L: Time out bit-count. - bit 0: Inpt_TOUT enable. (1/0- Enable/Disable) 5 3FD LSR[0:7] - Line Status Register. - Read only. - Write: Null operation. - bit 7: Data Ready (DR). - bit 6: Overrun Error (OE). - bit 5: Parity Error (PE). - bit 4: Framing Error (FE). - bit 3: Break Interrupt (BI). - bit 2: THR Empty (THRE). - bit L: Transmitter Empty (TEMT). - bit O: Error in RCVR FIFO (Err_RCVR). 6 | 3FE MOS[0:7] | - MODEM Status Register: non-exist - Write: Null operation. - Read: Get 8"b0 7 | 3FF SCR[0:7] - Scratchpad Register. - Read/Write-able Note: 1. Irpt_RDA: Received Data Available interrupt. Irpt_THRE: Transmitter Holding Register Empty interrupt. Irpt_RLS: Receiver Line Status Interrupt. Irpt_ MOS: MODEM Status Interrupt. Irpt_TOUT: Receiver Time OUT Intermupt. 2. Baud rate = Frequency input / (16 * ({DLM, DLL} + 2)) 34 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN 3. Interrupt Identification: TR[4+ - None 4th MOS 3rd _THRE 2nd _RDA 2nd TOUT Ist _RLS * Irpt_RLS- caused by: Overrun Error or Parity Error or Framing Error or Break Interrupt. - reset by: Reading LSR. * Irpt_RDA- caused by: Received data >= RCVR trigger level. - reset by: Reading RBR or RCVR FIFO drops below the trigger level. * Trpt_TOUT- caused by: RCVR FIFO is non-empty and have not been accessed (Read/write) for the time >= TOUR[L:7]. - reset by: Reading RBR. * Trpt_THRE- caused by: THRE has been set. - reset by: Reading IIR (if source of INTR is Irpt_THRE) or writing THR. * Irpt_MOS- MODEM Status interrupt: Non-implemented. 4. RCVR Interrupt trigger level programing: FCR[O FCR[1 T level 0 0 Lb 0 L 4b 1 0 8b L L L4 4. FCR[7] is always |. Write FCR[7] to 0 has no effect. 6. Transmitter/Receiver Character length programing: 6 Character 5 bits 6 bits 7 bits 8 bits 35 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN AEBS 8.5 Parallel Port The parallel port megacell implements the IEEE 1284 parallel port. The IEEE 1284 standard provides for high speed bi-directional communication between the PS and an external peripheral. The parallel port defines 5 modes of data transfer. Each mode provides a method of transfering data in either the forward direction, reverse direction, or bi-directional data transfer. The defined modes are: Standard parallel port mede PS/2 parallel port mode Parallel port FIFO mode ECP parallel port mode Centronix Peripheral mode (Vendor specified mode) Other modes defined in the IEEE 1284 standard like test mode and configuration mode are also supported. 8.5.1 ECP Register Description 1. Data Register (offset 378) RAW 0 7 I | This is the standard parallel port data register. Writing to this register in Standard mode shall drive data to the parallel port data lines. In all other modes the drivers may be tri-stated by setting the direction bit in the der register. Read to this register return the value on the data lines. Standard mode: write data_reg: copu_data[0:7}> data_reg[0:7] > PAD_ED[0:7] read data_reg: data_reg[0:7}> cpu_data PS/2 mode, forward: write data_reg: cpu_dda data_reqg PAD_ED read data_reg: data_reg cpu_data PS/2 mode, reverse: write data_reg: cpu_data data_reg read data_reg: PAD_ED- cpu_data Centronix Peripheral mode: read data_req: PAD_ED cpu_data Other mode: write data_reg: cou_data[O:7}> data_reg[0:7] read data_reg: undefined 2. DSR register (offset 379) Read only 0 7 I | This read-only register reflects the inputs on the parallel port interface. Bit [O]- nBusy: inverted parallel porBusy signal Bit [1]- nAck: parallel portnAck signal Bit [2]- PError: parallel portPErrer signal Bit [3]- Select: parallel portSelect signal Bit [4]- nFault: parallel portnFault signal Bit [5:7]- reserved 3. DCR register (offset 37a) RAV 0 7 | | | | | | | | | This register directly controls several output signals as well as enabling some functions. The drivers for nStrobe, nAutoFd, ninit, and nSelectin are open-collector in standard mode. Bit [0:1]- reserved Bit [2]- Direction O: forward (default) Drivers are enabled. 1: reserved 36 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond Winbond ssi W90210F In Standard mode or Parallel FIFO mode, this bit is forced to 0. The drivers are enabled, i.e. the data pins of the parallel port are always outputs. Otherwise, this bit tri-states the data output drivers, so that data will be read from the peripheral. Bit [3]- ackIntEn 1: Enable an interrupt on the rising edge of nAck. Q: Disable the nAck interrupt (default) Bit [4]- Selectin; is inverted and then driven as parallel prot nSelectin (default 1). Bit [5]- nInit; is driven as parallel port ninit (default 1). Bit [6]- autofd; is inverted and then driven as parallel port nAutoFd (default 0}. In centronic peripheral mode, when the nAck is active, the bit will be cleared by hardware. Bit [7]- strobe; is inverted and then driven as parallel port nStrobe (default 0). 4. ECR register (offset 243) (RAV) 0 7 I | Bit[O:2]- mode (R/W) 000: Standard parallel port mode (default). In this mode, FIFO is reset and common collector drivers are used on the control lines (nStrobe, nAutoFd, ninit, and nSelectin). Direction bit is cleared to "0". 001: PS/2 parallel port mode The direction could be forward or reverse. In reverse direction, reading the data register returns the value on the data lines not the value in the data register. 010: Parallel port FIFO mode This is the same as Standard parallel port mode except that Pwords are written or DMAed to the FIFO. FIFO data is automatically transmitted using the standard parallel port protocol. Note that this mode is only useful when the direction bit is 0. 011: ECP parallel port mode In the forward direction, Pwords is placed into the FIFO and transmitted automatically to the peripheral using ECP protocol. In the reverse direction, bytes are moved from the ECP data port and packed into Pwords in the FIFO. All drivers have active pull-ups. 100: Centronic peripheral mde In this mode, the parallel port acts as a reverse port in centronics mode and the direction bit is forced to 1. The nAutofd bit (DCR bit 6) is cleared, nAck is active until nAutofd bit (DCR bit 6) is set to 1 by software. And the parallel port data will be latched in the data register. 101: Reserved 110: Test mode In this mode, the FIFO may be read or written, but the data will not be transmitted on the parallel port. Using this mode to test the depth of the FIFO, the write-threshold, and the read-threshold. 111: Configuration mode In this mode, the CNFGA and CNFGB registers are accessible at addresses 244 and 246 Bit[3]- nErrintrEn (R/W, Valid only in ECP mode) 1: Disable the interrupt generated on the asserting edge of nFault (default). 0: Enables an interrupt pulse on the high to low edge of nFault. Note that an interrupt pulse will be generated if nFault is asserted and this bit is written froma"1" toa "0". This prevents interrupts from being lost in the time between the read of the ecr and the wrtie of the ecr. Bit[4]- dmaEn (R/W) 1: Enables DMA, DMA starts when servicelntr (bit 5) is 0. Q: Disables DMA unconditionally (default). Bit[5]- servicelntr (R/W) 1: Disables DMA and all of the service interrupts (default). 0: Enables one of the following 3 cases of interrupts. Once one of the 3 service interrupts has occurred, servicelntr bit shall be set to a "1" by the hardware. Writing this bit to a "1" will not cause an interrupt. case 1: dmaEn = 1 During DMA (this bit is set to a 1 when terminal count is reached) case 2: dmaEn =0, direction = 0 This bit shall be set to 1 whenever there are writelntrThreshold or more Pwords free in the FIFO. case 3: dmaEn =0, direction = 1 37 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond Winbond ssi W90210F This bit shall be set to 1 whenever there are readintrThreshold or more valid Pwords to be read from FIFO. Bit[6]- Full (Read only} 1: direction = 0 The FIFO cannot accept another Pword. 1: direction = 1 The FIF@ is completely full. 0: direction = 0 The FIFO has at least 1 free Pword 0: direction = 1 The FlFChas at least 1 free byte. Bit[7]- empty (Read only) 1: direction =0 The FIFO is completely empty 1: direction =1 The FIF contains less than 1 Pword of data 0: direction =9 The FIFO contains at least 1 byte of data 0: direction =0 The FIFO contains at least 1 Pword of data 5. CONFIGA register (offset 244) (RAV only in configuration mode) 0 7 I | | | | | | | | Bit [O]- Indicates if interrupts are pulsed or level (Read only) 0: pulse 1: level Bit [1:3 ]- Pword size (R/W) 001: Pword size = 1 byte 010: Pword size = 4 byte 000 and 011 ~ 111: reserved Bit [4]- reserved Bit [5]- nBytelnTransceiver (Read only) 0: When transmiting (at host recovery), there is one byte in the transceiver waiting to be transmitted that does not affect the FIFO full bit. Bit [6:7]- Snapshot of the Pword This field is not used for Pword size of 1 byte. For host recovery situations these bits indicate what fraction of a Pword was not transmitted so that software can re-transmit the unsent bytes. If the Pword size is 4 bytes the value of these two bits is a snapshot of the last Pword being transmitted in mode 011 event 35 when the FIFO was reset (port was transitioned from mode 011 to mode 000 or 001) 00- the Pword at the head of the FIFO contained a complete Pword 01- the Pword at the head of the FIFO contained only 1 valid bytes. 10- the Pword at the head of the FIFO containeed 2 valid bytes. 11- the Pword at the head of the FIFO contained 3 valid bytes. 6. Reverse address register (offset 245) (Read only) 0 7 I | Bit [0:1]- Reserved Bit [2]- Tag_all 1: To indicate the unread bytes of the FIFO storing the reverse data/ command that has at least one address bytes. 0: There is no address byte in the FIFO Bit [3:6]- TagO, Tagi, Tag2, Tag3 to check if there is one byte of the following read Pword = 4 bytes is the reverse address. TagO, Tag1, Tag2 and Tag3 are individually for the byteO, byte1, byte2 and byte3 of the Pword Bit [7]- Tag to check if the byte of the following read Pword (1 byte) is the reverse address. 38 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 9. Timing Diagram 9.1 Memory controller 9.1.1 DRAM AC Timimg POLK 7 Wf VLA LS VS VS NAF NS VS x X MA11 - MAO x MD31 - MDo _tiv _ ftv RAS3# - RASO# { f toy CAS3#-CASO# | k > tay WE# / Symbol Parameter Min Max Unit tev RAS# valid delay ref. to POGLK rising ns t-y2 RAS# valid delay ret. to PCLK rising ns tad CAS# valid delay ret. to PCLK rising ns tayo RAS# valid delay ret. to PCLK rising ns | twy WE# valid delay ref. to PCLK rising ns tye Memory data setup time ns tyh Memory data hold time ns toy Memory address valid delay ns 9.1.2 ROM AC Timimg 9.1.2.1 Flash ROM Write Timimg PCLK ij MA19 - MAO x f X t as RCSO# - A 7 tos ROMRW# { x j I . lwp j ROMOE# " tds > MD31 - MDO f K > tdh Symbol Parameter Min Max Unit tas Address setup time ns 39 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond Electronics Corp. AEBS tes Chip select setup time ns tHe Data setup time ns tah Data hold time ns | tw Flash ROM write pulse width f PCLK 9.1.2.2 ROM Read Timimag poiK ~\ SN INS NINN INS TS tac 4 MA19 - MAO x f x y tts _ |_ RCSO# - A 7 r A ROMRW# r * top 4 _,, |__- ROMOE# K A j F > tds tH MD31 - MDO 4 cc y)__ th Symbol Parameter Min Max Unit tor Access time 3 PCLK tos Chip select setup tome ns ton Output enable pulse ns tac Data setup tome ns tah Data hold time ns 40 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. AEBS 9.2 DMA Controller 9.2.1 DMA device register read timing DMA device register read timing cs we IOR oe DMARDY DA0:1 I> Andiace DD<0:7> \ al data At Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. AEBS 9.2.2 DMA device register write timing DMA device register write timing cs we low oe DMARDY DA0:1 I> Andiace DD<0:7> sath data 42 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 9.2.3 DMA demand mode data read cycles DMA cycle -- data read timing (demand mode) DREQ _] ~ DACK ~ IOR ~ DMARDY ~ TC cs DA Dont care DD<0:7> ~ < > 43 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. 9.2.4 DMA demand mode data write cycles DMA cycle -- data write timing (demand mode) DREQ J ~ DACK ~ low ~ DMARDY ~ TG cs DA Do'nt care DD<0:7> ~ 44 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 9.2.5 DMA block mode data read cycles DMA cycle -- data read timing (block mode) DREQ _J DACK ~ IOR ~ DMARDY ~ TC cs DA Dont care DD<0:7> ~ < > 45 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS 9.2.6 DMA block mode data write cycles DMA cycle -- data write timing (block mode) DREQ __J DACK ~ low DMARDY ~ TG cs DA Do'nt care DD<0:7> ~ L ROM/FLASH Read timing RCS _ ROMEN | ROM_OE~ ROM_RW 7 MADDR<0:11>__ MD<0:31> or MD<0:15> or MD<0:7> 46 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondElectronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F AEBS FLASH Write timing RCS _ ROMEN ri] ROM_OE = ROM_RW2 MADDR<0:11>___ = MD<0:31> or MD<0:15> or MD<0:7> 47 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS Appendix A. PA-RISC Multimedia Instruction Set Halfword parallel add HADD Format: HADD, cmplt r,t Os 5:10 W115 2B 27:31 | 02 | r2 | ri [o bf 3 fsa} ct | 6 5 5 31 4 21 5 Purpose: To add multiple pairs of halfwords in parallel with optional saturation. Description: The corresponding halfwords of GR rl and GR r2 are added together in parallel. Optional saturation is performed, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of the range of the target format. The halfword results are placed in GR t. The completer, cmplt, determines whether modular, signed-saturation, or unsigned- saturation arithmetic is performed. When no completer is specified (sat=3) modular arithmetic is performed. The completer "ss" (sat=1) designates signed saturation. The completer us" (sat=0) indicates unsigned saturation. For signed saturation, all operands are treated as signed numbers, and the results are signed nuimbers. For unsigned saturation, the first operands, from GR rl, are treated as unsigned numbers, the second operands, from GR r2, are treated as signed numbers, and the results are unsigned numbers. Operation: GR{[t]{0..15} GR[rl]{0..15} + GR[r2]{0..15}; GR[t]{16..31} GR[rl]{16..31} + GR[r2]{16..31}; switch (cmplt) { case $s: if (max_signed_sat_L) /* sat=1 */ GR[t]{0..15} Ox7FFF; else if (min_signed_sat_L) GR[t]{0..15} 0x8000; if (max_signed_sat_R) GR[t]{16..31} < Ox7FFF; else if (min_signed_sat_R) GR[t]{16..31} 0x8000; break; case ss: if (max_unsigned_sat_L) /* sat=O0 */ GR[t]{0..15} OxFFFF; else if (min_unsigned_sat_L) GR[t]{0..15} 0x0000,; if (max_unsigned_sat_R) GR[t]{16..31} < OxPFFF; else if (min_unsigned_sat_R) GR[t]{16..31} 0x0000; break; default: /* sat=3 */ break; } Exceptions: None. 48 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Halfword parallel subtract HSUB Format: HSUB,cmplt rt,r2,t Os S10 WAS 26 27:34 | 02 | re | ri [o bl 1 fsa ct 6 5 5 31 4 21 5 Purpose: To subtract multiple pairs of halfwords in parallel with optional saturation. Description: The corresponding halfwords of GR r2 are subtracted from the halfwords of GR rl in parallel. Optional saturation is performed, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of the range of the target format. The halfword results are placed in GR t. The completer, cmplt, determines whether modular, signed-saturation, or unsigned- saturation arithmetic is performed. When no completer is specified (sat=3) modular arithmetic is performed. The completer "ss" (sat=L) designates signed saturation. The completer us" (sat=0) indicates unsigned saturation. For signed saturation, all operands are treated as signed numbers, and the results are signed nuimbers. For unsigned saturation, the first operands, from GR rl, are treated as unsigned numbers, the second operands, from GR r2, are treated as signed numbers, and the results are unsigned numbers. Operation: GR[t]{0..15} (GR[rl]{0..15} +- GR[r2]{0..15} + 1; GR[t]{16..31} (GR[rl]{ 16..31} +- GR[r2]{ 16.31} + Lb; switch (cmplt) { case ss: if (max_signed_sat_L) /* sat=1 */ GR[t]{0..15} Ox7FFF; else if (min_signed_sat_L) GR[t]{0..15} 0x8000; if (max_signed_sat_R) GR[t]{16..31} < Ox7FFF; else if (min_signed_sat_R) GR[t]{16..31} 0x8000; break; case ss: if (max_unsigned_sat_L) /* sat=O0 */ GR[t]{0..15} < OxFFFF; else if (min_unsigned_sat_L) GR[t]{0..15} 0x0000; if (max_unsigned_sat_R) GR[t]{16..31} < OxFFFF; else if (min_unsigned_sat_R) GR[t]{16..31} 0x0000; break; default: /* sat=3 */ break; } Exceptions: None. 49 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Halfword parallel average HAVE Format: HAVE rt,r2,t Os S10 WAS 26 27:34 | 02 | re | ri fo bl op ff ct | 6 5 5 31 6 1 5 Purpose: To average multiple pairs of halfwords in parallel. Description: The corresponding halfwords of GR rl and GR r2 are averaged in parallel. Both operands are unsigned. The average is obtained by adding the corresponding halfwords, and shifting the result right by one bit, to perform a divide by 2, with the halfword carry bit from the addition shifted back into the leftmost position of each result. The halfword results are placed in GR t. Unbiased rounding is performed on the result of summation, to reduce the accumulation of rounding errors with cascaded operations. Operation: cat(carry_L, sum{0..15}}) GR[rl]{0..15} + GR[r2]{0..15} cat(carry_R, sum{16..31}) GR[rl]{16..31} + GR[r2]{16..31} new_Isb_L < sum{ 14} | sum{ 15}, /* unbiased rounding */ new_Isb_R < sum{30} | sum{3L}; /* unbiased rounding */ GR[t]{0..15} cat(carry_L,sum{0..13}, new_Isb_L), GR[t]{16..31} < cat(carry_L,sum{16..29}, new_Isb_R); Exceptions: None. 50 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Halfword parallel shift left and add HSHLADD Format: HSHLADD r,kr2,t or HSL1ADD rt,r2,t HSL2ADD r1r2t HSL3ADD r,r2t Os B10 44145 PB PFs | 02 | r2 | ri fo bl 7 [xp] ct 6 5 5 314 21 5 Purpose: To perform multiple pairs of halfword shift left and add operations in parallel with saturation. Description: Each halfword of GR rl is shifted left by k bits, and then added to the corresponding halfword of GR r2. Signed saturation is performed on the addition, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of range. The halfword results are placed in GR t. The shift amount is either 1, 2, or 3, and is encoded in the k field of the instruction. All operands are treated as signed numbers, and the results are signed numbers. Signed saturation is performed. For this instruction, signed saturation is based both on the shift operation and the add operation. That is, if the result of the shift operation is not representable in 16 bits, signed saturation occurs. If GR rl was positive, maximum saturation occurs. If GR rl was negative, minimum saturation occurs. If the result of the shift operation is representable in 16 bits, then saturation is determined by the add operation in the normal fashion. Operation: GR[t]{0..15} < Ishift(GR[rl]{0..15},k) + GR[r2] {0.15}; GR[t]{16..31} < Ishift(GR[rl]{ 16..31},k) + GR[r2]{16..3L}; if (max_signed_sat_L) GR[t]{0..15} Ox7FFF; else if (min_signed_sat_L) GR[t]{0..15} Ox8000; if (max_signed_sat_R) GR[t]{16..31} Ox7FFF; else if (min_signed_sat_R) GR[t]{16..31} 0x8000; Exceptions: None. 51 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Halfword parallel shift right and add HSHRADD Format: HSHRADD r,kr2,t or HSR1ADD rt,r2,t HSR2ADD rt 12, HSR3ADD r,r2,t Os B10 41415 PR 27:34 oz [2 [i [ops [xp | 6 5 5 31 4 21 5 Purpose: To perform multiple pairs of halfword shift right and add operations in parallel with saturation. Description: Each halfword of GR rl is shifted right by k bits, and then added to the corresponding halfword of GR r2. The bits shifted into each halfword, from the left, are the same as the sign bit for each halfword. Signed saturation is performed on the addition, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of range. The halfword results are placed in GR t. The shift amount is either 1, 2, or 3, and is encoded in the k field of the instruction. All operands are treated as signed numbers, and the results are signed numbers. Signed saturation is performed. Operation: GR[t]{0..15} arshifi(GR[r1]{0..15}.k) + GR[r2]{0..15}; GR[t]{16..31} arshift(GR[rl]{16..31},.k) + GR[r2]{16..31}; if (max_signed_sat_L) GR[t]{0..15} Ox7FFF; else if (min_signed_sat_L) GR[t]{0..15} 0x8000; if (max_signed_sat_R) GR[t]{16..31} Ox7 FFF; else if (min_signed_sat_R) GR[t]{16..31} 0x8000; Exceptions: None. 52 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN AEBS Appendix B. Diaqnostic Instructions HALT Format: HALT Os 5:10 W115 2125 26 2734 (os | - | - [-[-[ H- | 6 5 5 2 3 5 1 5 Purpose: To halt instruction pipeline and entry ICE single-step mode. Description: The HALT instruction clears instruction pipeline. Any unfinished bus cycle and internal |/D- cache operation will be cleared before CPU entering single-step mode. Operation: Enforce CPU clear pipeline and entry single-step mode; Note: This instruction can be executed by code running at any privileged level. (different from other diagnostic instr.) 53 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond Electronics Corp. W90210F Move to AIR MTAIR Format: MTAIR rt Os S10 WAS 2125 26 2734 po | t | + |-j|-]oo }] - | 6 5 5 2 3 5 1 5 Purpose: To copy value into a specified AIR from a general register. Description: If the AIF[t] is existed, the contents of GR[r] is copied into AIR/t]. If AIR[t] has n bits where n<=32, the least significant n bits of GR[r] are moved into AIR[t]. Operation: if(t > 6) undefined operation; else if(priv |= 0) privilege instruction trap; else AIR[t] <-- GRU); Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. Notes: AIR[O]: Internal configuration register - bit31: - bit30: - bit29: - bit28: - bit27: - bit26: - bit25: - bit24: - bit23: - bit22: - bit21: - bit20: - bitt9: (defaul Internal |-Cache enable (0/1- disable/enable) Internal D-Cache enable (0/1- disable/enable} Burst write enable (0/1- cisable/enable) Default endian bit (0/1- big/little endian) Trap step mode @iable (0/1- disable/enable) reserved reserved Enter Sleep state Multiplier wait state (0/1- 0/1 wait state) Freeze 1st 1K of |-Gache (0/1- disable/enable) Freeze 2nd 1K of I-Cache (0/1- disable/enable) Freeze 3rd 1K of |-Cache (0/1- disable/enable) Freeze 4th 1K of |-Cache (0/1- disable/enable) t: 13'b0) AIR[1]: PSW register (default: 32'h0} AIR[2]: TMR (timer register) AIR[3]: Non-cacheable Offset registr AIR[4]: Non-cacheable Mask register AIR[5]: Write-Through Offset register AIR[6]: Write-Through Mask register AIR[7]: PCO register (program counter) 54 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F Move from AIR MFAIR Format: MFAIR. rit Os S10 WAS 21:25 26 27:34 pos | oe | f-f- fom Ft 6 5 5 2 3 5 L 5 Purpose: To copy value into a general register from AIR register. Description: If the AIR[r] is existed, the contents of AIF[r] is copied into GRit]. lf AIR[r] has only n bits where n<=32, the least significant n bits of AIR[r] are moved into GR[f] and the others are zero. Operation: if(t > 6) undefined operation; else if(priv != 0) privilege instruction trap; else GR{t] <-- AIR[H: Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. Notes: AIR[O]: Internal configuration register AIR[1]: PSW register AIR[2]: TCP (timer comparator register) AIR[3]: Non-cacheable Offset register AIR[4]: Non-cacheable Mask register AIR[5]: Write-Through Offset register AIR[6]: Write-Through Mask register AIR[7]: PCO register (program counter) 55 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN Move to Itag MTITAG Format: MTITAG b Os S10 WAS 2125 26 2734 po | > | - |-j-joe }} - | 6 5 5 2 3 5 1 5 Purpose: To copy a value into Itag from a general register. Description: GR r is copied into a specified entry of ltag. Operation: entry <-- GR[b][24:31]; Itag[entry][0:20] <-- GR[b][0:20); Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. Note: ltag[entry][0:19]: tag field. Itag[entry][20]: valid bit. Move from Itag Format: MFITAG bt Os 5:10 W115 2125 26 2734 ee 6 5 5 2 3 5 1 5 Purpose: To copy a value into general register from ltag. Description: The content of a specified ltag_entry is copied into GR t. Operation: way <-- AIR[O][26]; entry <-- {way, GR[b][25:31]}; GAR[t][0:21] <-- ltag[entry][0:21] Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. 56 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond Electronics Corp. ir errrrenvrrenverenvevennrernnorsennorsansmrsansansareannaseaaese nace coaae eee cee CEEOL EE IEEE TEE CEES W90210F Move to I-Cache MTICAH Format: MTICAH rb Os S10 WAS 2125 26 2734 pos | > | ts |-j|-jo fH - | 6 5 5 2 3 5 1 5 Purpose: To copy a value into |-Cache from a general register. Description: GR r is copied into specified |-Cache entry. Operation: entry <-- GR[b][2 1:27]; word <-- GR[b][28:29); way <-- AIR[O][26]; |-Cache[way, entry, word] <-- GR[r]; Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. 57 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN Move from I-Cache MFICAH Format: MFICAH b,t Os S10 WAS 2125 26 2734 po | > | - |-j-|o ft | 6 5 5 2 3 5 1 5 Purpose: To copy a value into general register from |-Cache. Description: A word of specified |-Cache entry is copied into GR t. Operation: entry <-- GR[b][2 1:27]; word <-- GR[b][28:29); way <-- AIR[O][26]; GAlt] <-- |-Cache[way, entry, word]; Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. 58 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. PEPE O TNO DET OIE DE MIDRAND DET ONIE DE MAIDA TONI AD DIAN TU ATNID AD DNDN TU TOAI AD Dau PANT ATOAI AT Pee aTAIM TDD e Pe ee PaTAIN aN aT aN TaN Move to Dtag MTDTAG Format: MTDTAG b Os S10 WAS 2125 26 2734 po | > | - |-j-joc }} - | 6 5 5 2 3 5 1 5 Purpose: To copy a value into Dtag from a general register. Description: GR r is copied into a specified entry of Dtag. Operation: entry <-- GR[b][25:31]; Itaglentry][0:22] <-- GR[b][0:22); Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. Note: Itag[entry][0:21]: tag field. Itag[entry][22]: valid bit. ltag[entry][23]: dirty bit. 59 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F Move from Dtag MFDTAG Format: MFDTAG bt Os S10 WAS 2125 26 2734 pos | > | - |-j}-|o ft | 6 5 5 2 3 5 1 5 Purpose: To copy a value into general register from Dtag. Description: The content of a specified Dtag_entry is copied into GR t. Operation: entry <-- GR[b][25:31]; GA[t][0:22] <-- ltag[entry][0:22] Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. 60 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Move to D-Cache MTDTAG Format: MTDCAH rb Os S10 WAS 2125 26 2734 pos | > | st |-j-j oe fT - | 6 5 5 2 3 5 1 5 Purpose: To copy a value into D-Cache from a general register. Description: GR r is copied into specified D-Cache entry. Operation: entry <-- GR[b][2 1:27]; word <-- GR[b][28:29); |-Gache[entry, word] <-- GR[r]; Exception: Privilege ingruction trap. Restriction: This instruction can be executed only by code running at the most privileged level. 61 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Winbond W90210F Move from D-Cache MFDCAH Format: MFDCAH bt Os S10 WAS 2125 26 2734 pos | > | - |-j|-jor ft | 6 5 5 2 3 5 1 5 Purpose: To copy a value into general register fram D-Cache. Description: A word of specified D-Cache entry is copied into GR t. Operation: entry <-- GR[b][2 1:27]; word <-- GR[b][28:29); GR[t] <-- |-Cache[entry, word]; Exception: Privilege instruction trap. Restriction: This instruction can be executed only by code mning at the most privileged level. 62 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondAEBS Winbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY Halfword Parallel Multiply HPMPY Format: HPMPY,cmplt r1,r2,t Os 610 WAS 2125 26 2731 [ 05 [ x2 | ri [satgl/-] 12 fof ct | 6 5 5 212 5 1 5 Purpose: To multiply multiple pairs of halfwords in parallel with optional saturation. Description: The corresponding halfwords of GR r/ and GR r2 are multiplied together in parallel. Optional saturation is performed, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of the range of the target format. The halfword results are placed in GR fF. The completer, cmpit, determines whether modular, signed-saturation, or unsigned-saturation multiplication is performed. When no completer is specified modular arithmetic is performed. The completer "ss" designates signed saturation. The completer ws" indicates unsigned saturation. For signed saturation, all operands are treated as signed numbers, and the results are signed numbers. For unsigned saturation, the first operands, from GR r/, are treated as unsigned numbers, the second operands, from GR r2, are treated as signed numbers, and the results are unsigned numbers. Operation: switch(cmplt) { case u(g=0, sat=00, unsigned multiplication) { GR[t]{O0..15} zero_ext(GR[rl ]{0..15}) x zero_ext(GR[r2]{0..15}) GR[t]{16..31} < zero_ext(GR[rl]{ 16..31L}) x zero_ext(GR[r2]{ 16..31}) } case s(g=1, sat=00, signed multiplication) { GR[t]{0..15} < sign_ext(GR[rl]{0..15}) x sign_ext(GR[r2]{0..15}) GR[t]{16..31} sign _ext(GR[rl]{16..31}) x sign_ext(GR[r2]{16..31}) } case us(g=0, sat=01, unsigned multiplication with saturation) { GR[t]{0..15} < zero_ext(GR[rl ]{0..15}) x zero_ext(GR[r2]{0..15 }) GR[t]{16..31} < zero_ext(GR[rl]{16..31}) x zero_ext(GR[r2]{ 16..31}) if (unsigned_sat_L) GR[t]{0..15} < OxFFFF, if (unsigned_sat_R) GR[t]{16..31} < OxFFFF; break; } case ss(g=1, sat=O1, signed multiplication with saturation) { GR[t]{0..15} sign_ext(GR[r1]{0..15}) x sign_ext(GR[r2]{0..15}) GRIt]{16..31} sign_ext(GR[rl]{16..31}) x sign_ext(GR[r2]{16..31}) if (pos_signed_sat_L) GR[t]{0..15} Ox7FFF; else if (neg_signed_sat_L) GR[t]{0..15} 0x8000; if (pos_signed_sat_R) GR[t]{16..31} Ox7FFF; else if (neg_signed_sat_R) GR[t]{16..31} < 0x8000; break; } default: break; } Exception: None Restriction: Winbond defined instruction for W90210F. 63 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondW90210F Winbond : Electronics Corp. *~ ATP Halfword Multiply HMPY Format: HMPY, cmplt = r1,r2,t Os B10 WAS 21:25 26 27:34 | 05 | r2 | ri fefl-] 12 fi] t | 6 5 5 212 5 1 5 Purpose: To inultiply corresponding halfwords of two registers. Description: The corresponding 16-bit halfwords of GR ri and GR r2 are interpreted as signed or unsigned 16-bit integers and are arithmetically multiplied together. The 32-bit result is placed in GR . The cmplt completer is specified by the g and the bits in the instruction. Operation: switch(cmplt) { case uhh (g=0, c=00, unsigned multiplication) { GR[t]{0..31} zero_ext(GR[rl1]{0..15}) x zero_ext(GR[r2]{0..15}) break; } case shh (g=1, c=00, signed multiplication) [{ GR[t]{0..31} < sign_ext(GR[rl]{0..15}) x sign_ext(GR[r2]{0..15}) break; } case uhl (g=0, c=01, unsigned multiplication) { GR[t]{0..31} zero_ext(GR[rl]{0..15}) x zero_ext(GR[r2]{16:31}) break; } case shl (g=1, c=01, signed multiplication) { GR[t]{0..31} < sign ext(GR[rl]{0..15}) x sign_ext(GR[r2]{ 16:31} break; } case ulh (g=0, c=10, unsigned multiplication) { GR[t]{0..31} < zero_ext(GR[rl]{16:31}) x zero_ext(GR[r2]{0..15}) break; } case slh (g=1, c=10, signed multiplication) { GR[t]{0..31} < sign_ext(GR[rl]{16:31}) x sign_ext(GR[r2]{0..15}) break; } case ull (g=0, c=11, unsigned multiplication) { GR[t]{0..31} zero_ext(GR[rl]{16:31}) x zero_ext(GR[r2]{ 16:31 }) break; } case sll (g=l, c=11, signed multiplication) { GR[t]{0..3 1} < sign_ext(GR[rl]{16:31}) x sign_ext(GR[r2]{ 16:31}) break; } } Exception: None Restriction: Winbond defined instruction for W90210F. 64 Version 1.4, 10/8/97 The above information is ihe exclusive intellectual property of Winbond Electronics Corp. and shall not be disclosed, distributed or reprodused without! permission from Winbond,Winbond W90210F Electronics Corp. (0 reneennnnernnenrnnnnrnnennnnnnnnnnnnninnmninnnnnnninnniannnnannnaannntnnnannnntannaaaniamngonanenaeeS AEBS Halfword Absolute and Add HABSADD Format: HABSADD, cmplt rl, r2,t Os 610 W145 T6417 18:20 2125 26 27:34 | 05 | r2 | ri [sat}-[13 Feet | 6 5 5 2 3 5 1 5 Purpose: To add multiple pairs of halfwords in parallel with absolute and optional saturation. Description: The corresponding halfwords of GR rl are added with the halfwords of absoluted GR r2 in parallel. Optional saturation is performed, which forces each halfword result to either the maximum or the minimum value, if the result would have been out of the range of the target format. The halfword results are placed in GR t. The completer, cmplt, determines whether modular, signed-saturation, or unsigned-saturation arithmetic is performed. When no coinpleter is specified (sat=3) modular arithmetic is performed. The completer "ss" (sat=1) designates signed saturation. The completer "us" (sat=0) indicates unsigned saturation. For signed saturation, all operands are treated as signed numbers, and the results are signed numbers. For unsigned saturation, the first operands, from GR rl, are treated as unsigned numbers, the second operands, from GR r2, are treated as signed numbers, and the results are unsigned numbers. Operation: if (GR[r2]{O} == 1) GR[t]{O..15} < GR[rl]{0..15} + (~GR[r2]{0..15} + 1); else GR[t}{0.15} < GR[rl]{0..15} + GR[r2]{0..15} ; #(GR[r2]{16} == 1) GR[t]{16.31} GR[rl]{16:31} + (~GRr2]{ 16.31} + 1; else GR[t]{ 16.31} GR[rl]{16:31} + GR[r2]{16..31}; switch (cmplt) { case ss: if(max_signed_sat_L) /* sat=L*/ GR[t]{0:15} < Ox7FFF; else if (min_signed_sat_L) GR[t]{0:15} < 0x8000; if(max_signed_sat_R) GR[t]{ 16:31} < Ox7FFF; else if (min_signed_sat_R) GR[t]{ 16:31} < O0x8000; break; case us: if(max_unsigned_sat_L) /*sat=0*/ GR[t]{0:15} < OxFFFF; else if (min_unsigned_sat_L) GR[t]{0:15} < O0x0000; if(max_unsigned_sat_R) GR[t]{ 16:31} < OxFFFF; else if (min_unsigned_sat_R) GR[t]{ 16:31} < 0x6000; break; default: /*sat=3*/ break; Exceptions: None Restriction: Winbond defined instruction for W90210F. 65 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond W90210F Electronics Corp. rrr rewrrenrerenrevenrevemerceomonevomnesonnecnenn cece oneaee oe 0eeBAeC EMEC ERATE EMCEE TEE CEL TE EEE TAO E TEE ET ECM TTY AEBS Load Halfword Unpacked LDHU Format: LDHU, cmplt d(s,b),t Os S10 W115 2125 28 2734 | 05 | b | ims [shi-| 14 Ppl t | 6 5 5 213 5 1 5 Purpose: To load a halfword and unpack into a general register. Description: The aligned halfword at the effective address is uppacked into two bytes, zero-extended to two halfwords and loaded into GR t. The completer, cmplt, determines if the offset is the base register, b, or the base register plus the short displacement, d. The displacement is encoded in the im5 field. The completer, encoded in the a and m fields of the instruction, also specifies base register modification. If base register modification is specified and b=t, the value loaded is the unpacked halfwords at the effective address. Operation: switch (cmplt) { case MB: offset < GR[b] + low_sign_ext(im5,5); /* a=l,m=1 */ GR[b] GRID] + low_sign_ext(im5,5); break; case MA: offset GRIb]; /* a=0,m=1 */ GR[b] < GRI[b] + low_sign_ext(im5,5); break; default: offset < GR[b] + low_sign_ext(im5,5); /* m=0 */ break; } GR[t] cat(zero_ext(mem_load(offset,0,7),16), zero_ext(mem_load(offset,8,15),16)) Exception: None. Restriction: Winbond defined instruction for W902 LOF. 66 Version 1.4, 10/8/97 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from WinbondWinbond Electronics Corp. ) TTT, [Tr Winbond HY Electronics Corp. CORPORATE HEADQUARTERS: INFORMATION CONTACTS: NO. 4, Creation Rd. Ill Rongken Yang Science-Based Industrial Park Special Product Design Dept. | Hsinchu, Taiwan, R..C. TEL: $86-35-792632 TEL: 886-35-770066 E-mail: rkyang@winbond.com tw FAX: 886-35-792647 W90210F Note: All data and specifications are subject to change without notice. 67 The above information is the exctusive intelectual property of Winbond Electronics Corp. and shall nol be disclosed, distributed er reproduced without permission from Winbond Version 1.4, 10/8/97