; --------------------------------------------------------------------------------
; @Title: CPC700 Register
; @Props:
; @Author: -
; @Changelog: 
; @Manufacturer: 
; @Doc: 
; @Core: 
; @Chip: 
; @Copyright: (C) 1989-2020 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: percpc700.per 5901 2015-01-09 12:29:12Z askoncej $
config 16. 8.
munging.le
base 0
;TREE "Proz. Interface"
;%include cpc700/rom.ph
;TREE.END
TREE "Memory Controller"
;begin include file cpc700/mem.ph
;parameters: 0xff500008 0xff50000c 0x0
GROUP.long 0xff50000c++3
OUT 0xff500008 %l %le 0x0+20
LINE.LONG 0. "MCOPT1,Memory Controller Options 1"
GROUP.long 0xff50000c++3
OUT 0xff500008 %l %le 0x0+24
LINE.LONG 0. "MBEN,Memory Bank Enable"
GROUP.long 0xff50000c++3
OUT 0xff500008 %l %le 0x0+38
LINE.LONG 0. "MB0SA,Memory Bank 0 Starting Address"
;end include file cpc700/mem.ph
;0xff800000
TREE.END
TREE "PCI Interface"
;%include cpc700/pci.ph 0xfee00000 0fec00000    ; ADDR-REG DATA-REG Base-Adr.
;begin include file cpc700/pci.ph
;parameters: 0xfec00000 0fec00004
;Configuration Register MPC8240
;MSR[LE]=0 / MAP B / %LE
if (r(msr)&0x000001)==0
base 0x000000
width 8. 8.
endian.le 
endif
TREE.OPEN "PCI Configuration Space Header"
if (r(msr)&0x000001)==0
GROUP.long 0fec00004++3
OUT 0xfec00000 %l %le 80000000 
LINE.LONG 0. "0x00:,"
HEXMASK.WORD 2. 00.--15. 1.    "      DID ,Device ID(0x0003)"
HEXMASK.WORD 0. 00.--15. 1.    "      VID ,Vendor ID(0x1057)"
GROUP.WORD 0fec00004++3
OUT 0xfec00000 %l %le 80000004
LINE.LONG 0. "0x04:,"
HEXFLD.WORD 0 "   PCICMD , PCI command register"
BITFLD.WORD 0. 9. "  FBTB ,Fast back-to-back" "0,1"
BITFLD.WORD 0. 8. "  SERR ,Enables the SERR driver" "0,1"
BITFLD.WORD 0. 6. "  PERR ,Parity error response" "0,1"
BITFLD.WORD 0. 4. "  MWAI ,Memory-write-and-invalidate" "0,1"
BITFLD.WORD 0. 3. "  SC ,Special cycles" "0,1"
BITFLD.WORD 0. 2. "  BM ,Bus master" "Agent,Host"
BITFLD.WORD 0. 1. "  MS ,Memory space" "0,1"
BITFLD.WORD 0. 0. "  IO ,I/O space" "0,1"
TEXTLINE "                   "
HEXFLD.WORD 2 "PCISTAT ,PCI status register"
BITFLD.WORD 2. 15. "   DPE ,Detected Parity Error" "0,1"
BITFLD.WORD 2. 14. "   SSE ,Signal SystemError" "0,1"
BITFLD.WORD 2. 13. "   RMA ,Received Master-Abort" "0,1"
BITFLD.WORD 2. 12. "   RTA ,Received Target-Abort" "0,1"
BITFLD.WORD 2. 11. " STA ,Signaled Target-Abort" "0,1"
BITFLD.WORD 2. 9.--10. "  DEVSEL ,Device Select Timing" "0,1,?..."
TEXTLINE "                                "
BITFLD.WORD 2. 08. "  DPD ,Data Parity Detected" "0,1"
BITFLD.WORD 2. 07. " FB2BC ,Fast Back-to-Back Capable" "0,1"
BITFLD.WORD 2. 05. "    66 ,66-MHz Capable" "0,1"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 80000008
LINE.LONG 0. "0x08:,"
HEXMASK.BYTE 3. 00.--07. 1. "    PBCCR ,Class code"
HEXMASK.BYTE 2. 00.--07. 1. "   SUBCCODE ,Subclass code"
HEXMASK.BYTE 1. 00.--07. 1. "        PIR ,Standard programming interface"
HEXMASK.BYTE 0. 00.--07. 1. "         ID ,Revision ID"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 8000000C
LINE.LONG 0. "0x0C:,"
HEXMASK.BYTE 3. 00.--07. 1.    "     BIST ,BIST Control"
HEXMASK.BYTE 2. 00.--07. 1.    "   HEADTYPE ,Header Type"
HEXFLD.BYTE  1.             "       PLTR ,Latency Timer"
HEXFLD.BYTE  0.             "      PCLSR ,Cache Line Size"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 8000003C
LINE.LONG 0. "0x3C:,"
HEXFLD.BYTE 3. "  MAX_LAT ,MAX LAT"
HEXFLD.BYTE 2. "    MIN_GNT ,MIN GNT"
HEXFLD.BYTE 1. "     INTPIN ,Interrupt Pin"
HEXFLD.BYTE 0. "        ILR ,Interrupt Line"
endif
TREE "Address Translation (only supported in agent mode.)"
if (r(msr)&0x000001)==0
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 80000010
; LINE.LONG 0 "0x10:,Local Memory Base Address Register"
TEXTLINE "0x10: "
HEXFLD.LONG  0 "  LMBAR   ,Local Memory Base Address Register"
HEXMASK.LONG 0. 12.--31. 1000 0.    "  IMBA ,Inbound memory base address"
BITFLD.LONG  0. 03.--03. "  Pre ,space is prefetchable" "0,1"
BITFLD.LONG  0. 01.--02. "  TYPE ,inbound memory window may be located within the PCI address space" "00,01,10,11"
BITFLD.LONG  0. 00.--00. "  MSI ,Memory space indicator" "0,1"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 80000310
; LINE.LONG 0 "ITWR ,Inbound Translation Window Register (PCI Offset 0x310)"
TEXTLINE "0x310: "
HEXFLD.LONG 0 " ITWR    ,Inbound Translation Window Register (PCI Offset 0x310)"
HEXMASK.LONG 0. 12.--30. 1000 0.    "  ITBA ,Inbound Translation Base Address"
BITFLD.LONG 0. 0.--4.         "  Size ,Inbound Window Size" "Disabled,00001 (res),00010 (res),00011 (res),00100 (res),00101 (res),00110 (res),00111 (res),01000 (res),01001 (res),01010 (res),01011 (4K   (2^12)),01100 (8K   (2^13)),01101 (16K  (2^14)),01110 (32K  (2^15)),01111 (64K  (2^16)),10000 (128K (2^17)),10001 (256K (2^18)),10010 (512K (2^19)),10011 (1M   (2^20)),10100 (2M   (2^21)),10101 (4M   (2^22)),10110 (8M   (2^23)),10111 (16M  (2^24)),11000 (32M  (2^25)),11001 (64M  (2^26)),11010 (128M (2^27)),11011 (256M (2^28)),11100 (512M (2^29)),11101 (1G   (2^30)),11110 (res),11111 (res)"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 80000300
; LINE.LONG 0 "OMBAR ,Outbound Translation Window Register (PCI Offset 0x300)"
TEXTLINE "0x310: "
HEXFLD.LONG 0 " OMBAR   ,Outbound Translation Window Register (PCI Offset 0x300)"
HEXMASK.LONG 0. 12.--30. 1000 0.    "  OMBA ,Outbound Memory Base Address"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 80000308
; LINE.LONG 0 "OTWR ,Outbound Translation Window Register (PCI Offset 0x308)"
TEXTLINE "0x308: "
HEXFLD.LONG 0 " OTWR    ,Outbound Translation Window Register (PCI Offset 0x308)"
HEXMASK.LONG 0. 12.--31. 1000 0.    "  OTBA ,Outbound Translation Base Address"
BITFLD.LONG 0. 0.--4.         "  Size ,Inbound Window Size" "Disabled,00001 (res),00010 (res),00011 (res),00100 (res),00101 (res),00110 (res),00111 (res),01000 (res),01001 (res),01010 (res),01011 (4K   (2^12)),01100 (8K   (2^13)),01101 (16K  (2^14)),01110 (32K  (2^15)),01111 (64K  (2^16)),10000 (128K (2^17)),10001 (256K (2^18)),10010 (512K (2^19)),10011 (1M   (2^20)),10100 (2M   (2^21)),10101 (4M   (2^22)),10110 (8M   (2^23)),10111 (16M  (2^24)),11000 (32M  (2^25)),11001 (64M  (2^26)),11010 (128M (2^27)),11011 (256M (2^28)),11100 (512M (2^29)),11101 (1G   (2^30)),11110 (res),11111 (res)"
GROUP.LONG 0fec00004++3
OUT 0xfec00000 %l %le 8000014
TEXTLINE "0x14: "
HEXFLD.LONG  0 "  PCSRBAR ,Peripheral Control and Status Base Address Register"
HEXMASK.LONG 0. 12.--31. 4096. 0. "  ADDR ,PCI base address mapped to the runtime register (DMA,I2O,...)"
endif
TREE.END
;"Base Address Register"
TREE.END
;"PCI Configuration Space Header"
TREE.OPEN "PCI Configuration Registers"
if (r(msr)&0x000001)==0
GROUP.WORD 0fec00004++3
OUT 0xfec00000 %l %le 80000044 
LINE.WORD 2 "PCIARB, PCI arbiter control register"
BITFLD.WORD 2. 15. "EPCI ,Enable internal PCI arbitration" "0,1"
BITFLD.WORD 2. 13.--14. "  PM ,Parking mode control" "last device use bus,device using REQ0/GNT0,MPC8240,res"
BITFLD.WORD 2. 10.--10. "  RPCC ,Retry PCI configuration cycle" "respond,retries all"
BITFLD.WORD 0. 07.--07. "  PL ,MPC8240 priority level" "low,high"
HEXMASK.WORD 0. 00.--04. 1. 0. "  EDPL ,Ext. device priority levels"
endif
TREE.END
;"PCI Configuration Registers"
; "The peripherals with MSR[LE]=1 are not supported at the moment" !!!
;end include file cpc700/pci.ph
TREE.END
;CPR
;PLB
;OPB
;IIC0-1
;Uart0-1
;GPT
;TREE "Debug Registers"
;%include 8260/debug.ph
;TREE.END
TEXTLINE ""

