Changeset 493

Ignore:
Timestamp:
Feb 11, 2011, 11:40:03 AM (8 years ago)
Message:

incorporated some text from the eu report that needs to be pared down

File:
1 edited

Legend:

Unmodified
 r492 \documentclass{llncs} \author{Claudio Sacerdoti Coen\inst{1} \and Dominic P. Mulligan\inst{1}} \usepackage[english]{babel} \usepackage{graphicx} \author{Claudio Sacerdoti Coen \and Dominic P. Mulligan} \authorrunning{C. Sacerdoti Coen and D. P. Mulligan} \title{An executable model of the 8051/8052 series microprocessor in Matita} \begin{abstract} We summarise the recent encoding of an executable model of the 8051/8052 microprocessor within Matita's internal logic. We summary the recent encoding of an executable formal model of the 8051/8052 microprocessor within Matita's internal logic. \end{abstract} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction} \label{sect.introduction} Compiler verification, as of late, is a hot topic' in computer science research. This rapidly growing field is motivated by one simple question: to what extent can you trust your compiler?' \subsection{The 8051/8052} \label{subsect.8051-8052} The MCS-51 is an eight bit microprocessor introduced by Intel in the late 1970s. Commonly called the 8051, in the three decades since its introduction the processor has become a highly popular target for embedded systems engineers. Further, the processor and its immediate successor, the 8052, is still manufactured by a host of semiconductor suppliers---many of them European---including Atmel, Siemens Semiconductor, NXP (formerly Phillips Semiconductor), Texas Instruments, and Maxim (formerly Dallas Semiconductor). The 8051 is a well documented processor, and has the additional support of numerous open source and commercial tools, such as compilers for high-level languages and emulators. For instance, the open source Small Device C Compiler (SDCC) recognises a dialect of C, and other compilers targeting the 8051 for BASIC, Forth and Modula-2 are also extant. An open source emulator for the processor, MCU8051 IDE, is also available. \begin{figure}[t] \begin{center} \includegraphics[scale=0.5]{memorylayout.png} \end{center} \caption{High level overview of the 8051 memory layout} \label{fig.memory.layout} \end{figure} The 8051 has a relatively straightforward architecture, unencumbered by advanced features of modern processors, making it an ideal target for formalisation. A high-level overview of the processor's memory layout is provided in Figure~\ref{fig.memory.layout}. Processor RAM is divided into numerous segments, with the most prominent division being between internal and (optional) external memory. Internal memory, commonly provided on the die itself with fast access, is further divided into 128 bytes of internal RAM and numerous Special Function Registers (SFRs) which control the operation of the processor. Internal RAM (IRAM) is further divided into a eight general purpose bit-addressable registers (R0--R7). These sit in the first eight bytes of IRAM, though can be programmatically shifted up' as needed. Bit memory, followed by a small amount of stack space resides in the memory space immediately after the register banks. What remains of the IRAM may be treated as general purpose memory. A schematic view of IRAM layout is provided in Figure~\ref{fig.iram.layout}. External RAM (XRAM), limited to 64 kilobytes, is optional, and may be provided on or off chip, depending on the manufacturer. XRAM is accessed using a dedicated instruction. External code memory (XCODE) is often stored in the form of an EPROM, and limited to 64 kilobytes in size. However, depending on the particular manufacturer and processor model, a dedicated on-die read-only memory area for program code (ICODE) may also be supplied. Memory may be addressed in numerous ways: immediate, direct, indirect, external direct and code indirect. As the latter two addressing modes hint, there are some restrictions enforced by the 8051 and its derivatives on which addressing modes may be used with specific types of memory. For instance, the 128 bytes of extra internal RAM that the 8052 features cannot be addressed using indirect addressing; rather, external (in)direct addressing must be used. The 8051 series possesses an eight bit Arithmetic and Logic Unit (ALU), with a wide variety of instructions for performing arithmetic and logical operations on bits and integers. Further, the processor possesses two eight bit general purpose accumulators, A and B. Communication with the device is facilitated by an onboard UART serial port, and associated serial controller, which can operate in numerous modes. Serial baud rate is determined by one of two sixteen bit timers included with the 8051, which can be set to multiple modes of operation. (The 8052 provides an additional sixteen bit timer.) As an additional method of communication, the 8051 also provides a four byte bit-addressable input-output port. The programmer may take advantage of the interrupt mechanism that the processor provides. This is especially useful when dealing with input or output involving the serial device, as an interrupt can be set when a whole character is sent or received via the serial port. Interrupts immediately halt the flow of execution of the processor, and cause the program counter to jump to a fixed address, where the requisite interrupt handler is stored. However, interrupts may be set to one of two priorities: low and high. The interrupt handler of an interrupt with high priority is executed ahead of the interrupt handler of an interrupt of lower priority, interrupting a currently executing handler of lower priority, if necessary. The 8051 has interrupts disabled by default. The programmer is free to handle serial input and output manually, by poking serial flags in the SFRs. Similarly, exceptional circumstances' that would otherwise trigger an interrupt on more modern processors, for example, division by zero, are also signalled by setting flags. \begin{figure}[t] \begin{center} \includegraphics[scale=0.5]{iramlayout.png} \end{center} \caption{Schematic view of 8051 IRAM layout} \label{fig.iram.layout} \end{figure} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{The CerCo project} \label{subsect.cerco.project} The CerCo project (`Certified Complexity') is a current European FeT-Open project incorporating three sites---the Universities of Bologna, Edinburgh and Paris Diderot 7---throughout the European Union. The ultimate aim of the project is to produce a certified compiler for a large subset of the C programming language targetting a microprocessor used in embedded systems. In this respect, the CerCo project bears a deal of similarity with CompCert, another European funded project. However, we see a number of important differences between the aims of the two projects. \begin{enumerate} \item The CerCo project aims to allow reasoning on aspects of the intensional properties of C programs. That is, \item The CompCert project compiled a subset of C down to the assembly level. A semantics for assembly language was provided. \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Overview of paper} \label{subsect.overview.paper} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Development strategy} \label{sect.development.strategy} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Putting dependent types to work} \label{sect.putting.dependent.types.to.work} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Related work} \label{sect.related.work} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECTION                                                                      % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Conclusions} \label{sect.conclusions} \end{document}