Replies: 5 comments 1 reply
-
C8051F120 Extended Special Function Register (SFR) spaceThe 8051 has a set of Special Function Registers in a portion of RAM that's distinct from ordinary data memory and program memory. CIP-51 expands the number of SFRs via SFR paging. The C8051F120 SFR pages are numbered 0, 1, 2, 3, and F. All 8051 SFRs are inherited by CIP-51 and reside on SFR page 0. SFRs for some C8051F120 device-specific peripherals also reside on Page 0. Those SFRs that are most critical to MCU operation are each available on every SFR page, A few examples are the Accumulator (A), B, DPTR (the Data Pointer), one interrupt enable and one interrupt priority register ( The value in SFRPAGE determines which page of SFRs is accessed during execution of direct-access MOVs to/from SFR space. How to implement SFR paging in a
|
Beta Was this translation helpful? Give feedback.
-
I'm going be revising
(This work will be done in my own fork of the master repository but isn't there yet.) I will have a few questions about what's necessary in each of these files to capture the unique aspects of CIP-51 and Cx51. A couple of the specific subjects I've begun working on, with no. 1 being the one I'm focused on finishing first.
Perhaps @GhidorahRex , @emteere or others more knowledgeable than me in Ghidra development, can connect with me so that I can more fully describe where I need some help? (Ryan has been working with me on a loader that needs the additional memory space in order to load larger binaries.) |
Beta Was this translation helpful? Give feedback.
-
Mapping the upper code banksCIP-51 MCUs use the The two COBANK bits (5 and 4) select which of the four banks is used to fetch constant operands for MOVC and flash MOVX instructions. The two IFBANK bits (1 and 0) select one of the four banks is used for fetching instruction opcodes |
Beta Was this translation helpful? Give feedback.
-
Submitted PR #7320 for first round of work on CIP-51 support. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
In order to add support to Ghidra for the Silicon Labs CIP-51 (originally created by Cygnal Integrated Products, which was later acquired by Silicon Labs),
8051.ldefs
needs a new variant of the 8051 processor.The need for a new variant is driven by features of the CIP-51 and supporting compilers that can't be adequately handled with any of the existing variants. The solution description below discusses some of these.
Describe the solution you'd like
CIP-51 implements the full 8051 instruction set and on-chip peripherals as the original 8051. Devices based on the CIP-51 core offer additional special purpose on-chip peripherals which vary from model to model.
The CIP-51 memory model is also based on the original 8051, but with extensions to allow for additional memory and for the various on-chip peripheral devices specific to the CIP-51 family.
Initially I think we should focus on the C8051F120, a member of what may be the earliest CIP-51 variant family. Its feature set appears to be fairly representative of the CIP-51 family in general.
There are at least two compilers/toolchains that specifically support CIP-51 extensions to the 8051:
Describe alternatives you've considered
Extensions to the 8051 as implemented in existing variants--
mx51
,80251
,80390
, andmx51
--can't be used to accurately and adequately describe the extensions present in CIP-51.Additional context
I may be able to handle some of the additions or changes to the existing
8051.pspec
/.cspec
/.ldefs
but can definitely use help from anyone who already knows the CIP-51 architecture or is willing to read up on it.To fully achieve support for CIP-51, changes to the
.sinc
file may also be required.Pointers to the applicable Silicon Labs and Keil documentation should soon follow in one or more replies to this comment.
Beta Was this translation helpful? Give feedback.
All reactions