KR20000042435A - Method for addressing memory of micro controller - Google Patents

Method for addressing memory of micro controller Download PDF

Info

Publication number
KR20000042435A
KR20000042435A KR1019980058600A KR19980058600A KR20000042435A KR 20000042435 A KR20000042435 A KR 20000042435A KR 1019980058600 A KR1019980058600 A KR 1019980058600A KR 19980058600 A KR19980058600 A KR 19980058600A KR 20000042435 A KR20000042435 A KR 20000042435A
Authority
KR
South Korea
Prior art keywords
memory
page
address
micro controller
memory area
Prior art date
Application number
KR1019980058600A
Other languages
Korean (ko)
Inventor
배종홍
Original Assignee
김영환
현대전자산업 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 김영환, 현대전자산업 주식회사 filed Critical 김영환
Priority to KR1019980058600A priority Critical patent/KR20000042435A/en
Publication of KR20000042435A publication Critical patent/KR20000042435A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
    • G06F9/342Extension of operand address space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/261Microinstruction address formation

Abstract

PURPOSE: A method for addressing a memory of a micro controller is provided to prevent a capacity deterioration caused by frequent updating processes of a page address, by dividing the page address for accessing page units into time when the address is read and time when the address is written, and to easily access all pages as expanding a special internal memory region. CONSTITUTION: A micro controller has a first/a second memory region and a third memory region. The first/the second memory regions have same upper memory address ranges. The third memory region has a lower memory address range. A method for addressing a memory of the micro controller for expanding the third memory region to page units, comprises the steps of: generating a control signal enabled accordingly whether a command of the micro controller is a direct or an indirect addressing mode command; and deciding whether the micro controller accesses the page units for the third memory region or accesses a predetermined page only, according to the control signal.

Description

마이크로 콘트롤러의 메모리 어드레싱 방법Memory addressing method of microcontroller

본 발명은 마이크로 콘트롤러의 메모리 어드레싱 방법에 관한 것으로, 특히 내부 메모리 영역의 효율적으로 확장할 수 있는 마이크로 콘트롤러의 메모리 어드레싱 방법에 관한 것이다.The present invention relates to a memory addressing method of a microcontroller, and more particularly, to a memory addressing method of a microcontroller that can efficiently expand an internal memory area.

시스템 전체의 제어를 위해서 8/16 비트의 마이크로 콘트롤러(Micro-Controller Unit: MCU)가 많이 이용되고 있다. 이러한 8/16 비트 마이크로 콘트롤러는 초기 설계시에 어드레스 영역이 8/16 비트로 정해져서 가용 메모리 영역이 64/256Kbytes 정도이다. 따라서, 메모리 용량이 많이 필요한 응용 분야를 위해서는 효율적인 메모리 확장 방안이 요구된다.An 8 / 16-bit Micro-Controller Unit (MCU) is widely used for system-wide control. Such an 8 / 16-bit microcontroller has an address area of 8/16 bits at initial design, so that the available memory area is about 64/256 Kbytes. Therefore, an efficient memory expansion method is required for an application that requires a large amount of memory.

도 1은 종래의 인텔(intel)의 80C52의 내부 메모리 맵을 나타낸 것이다.Figure 1 shows an internal memory map of a conventional Intel 80C52.

도 1에 있어서, 내부 메모리 영역은 공통의 상위 메모리 영역을 차지하는 A영역과 B영역, 그리고 하위 메모리 영역인 C 영역으로 구분된다.In FIG. 1, the internal memory area is divided into an A area and a B area occupying a common upper memory area, and a C area which is a lower memory area.

A 메모리 영역은 특별 기능 레지스터(Special Function Register: SFR) 영역으로서, 80h~ffh의 어드레스 주소를 가지며, 직접 어드레싱 모드만으로 엑세스 가능하며, 128byte의 크기를 가진다. 또한, B 메모리 영역은 사용자 영역으로서, A 영역과 동일 어드레스 주소와 크기를 가지며, 다만 간접 어드레싱 모드에서만 엑세스가 가능하다. 또한, C 메모리 영역은 일반적인 사용자 메모리 영역으로서, 00h~7fh의 어드레스 주소를 가지며, 128 bytes의 크기를 가진다. 이때, 최하위 메모리 영역인 00h~1fh의 메모리 영역은 32 bytes의 레지스터 영역(10)으로도 할당될 수 있으며, 20h~2fh의 메모리 영역(20)은 비트 단위로 엑세스가 가능하다. 이때, 어드레싱 모드로서의 직접 및 간접 어드레싱 모드는 명령어에 의해서 결정된다. 즉, 직접 어드레싱 모드는 그 명령어의 오퍼랜드(operand)를 데이터를 엑세스하기 위한 어드레스로 직접 이용하는 방식을 말한다. 한편, 간접 어드레싱 모드는 명령어의 오퍼랜드가 데이터를 엑세스하기 위한 어드레스의 어드레스가 되는 방식을 말한다. 이때, C 메모리 영역은 직접 및 간접 어드레싱 모드 둘 다 이용 가능하다. 따라서, 일반 메모리로서 또는 레지스터로서 엑세스가 가능하며, 이는 명령어에 의해서 구분되어진다. 만약, 도 1에 도시된 메모리 영역만으로 충분히 가능한 분야에서는 상관이 없지만 더 많은 메모리 영역이 필요하게 되면 도 2에 도시된 것과 같이, C 메모리 영역을 확장하는 형태로 이용되어진다.The A memory area is a special function register (SFR) area, which has an address address of 80h to ffh, can be accessed only by the direct addressing mode, and has a size of 128 bytes. In addition, the B memory area is a user area and has the same address address and size as the A area, but can be accessed only in the indirect addressing mode. In addition, the C memory area is a general user memory area and has an address address of 00h to 7fh and a size of 128 bytes. In this case, the memory area of 00h to 1fh, which is the lowest memory area, may also be allocated to the register area 10 of 32 bytes, and the memory area 20 of 20h to 2fh may be accessed in units of bits. At this time, the direct and indirect addressing modes as the addressing mode are determined by the instruction. In other words, the direct addressing mode refers to a method of directly using an operand of the instruction as an address for accessing data. Indirect addressing mode, on the other hand, refers to a manner in which an operand of an instruction becomes an address of an address for accessing data. At this time, the C memory area is available in both direct and indirect addressing modes. Thus, access is possible either as general memory or as a register, which is distinguished by instructions. If it is irrelevant in the field that can be sufficiently made with only the memory region shown in FIG. 1, but if more memory regions are needed, it is used in the form of extending the C memory region as shown in FIG.

도 2는 C 메모리 영역을 다수의 페이지로 확장하는 형태를 보여준다.2 illustrates a form in which a C memory area is extended to a plurality of pages.

도 2에 있어서, C 메모리 영역은 다수의 페이지로 확장되며, 페이지 단위로 엑세스 된다. 확장된 메모리 영역에 대하여 엑세스하기 위해서 페이지 어드레스를 저장하기 위한 레지스터(30)가 이용된다. 즉, 이 레지스터(30)에 저장된 페이지 어드레스는 C 메모리 영역의 각 페이지와 일대일 대응된다. 즉, 페이지 어드레스가 '0'이면 C 메모리 영역의 페이지 0이, '1'이면 페이지 1 등과 같이 매핑 된다. 이러한 방법을 사용하면 내부 메모리 영역을 효율적으로 확장할 수 있다. 그런데, 이와 같은 방법은 C 메모리 영역에 있는 레지스터 영역을 모든 페이지에서 불가능하게 한다.In FIG. 2, the C memory area is extended to a plurality of pages and accessed in units of pages. A register 30 is used to store the page address to access the extended memory area. In other words, the page address stored in this register 30 corresponds one-to-one with each page of the C memory area. That is, when the page address is '0', page 0 of the C memory area is mapped as '1', and page 1 is mapped. Using this method, you can effectively expand the internal memory area. However, this method disables the register area in the C memory area on every page.

본 발명은 상기 문제점을 해결하기 위하여 안출된 것으로써, 특정 내부 메모리 영역을 효율적으로 확장하면서도 모든 페이지의 엑세스가 가능한 마이크로 콘트롤러의 메모리 어드레싱 방법을 제공하는데 그 목적이 있다.The present invention has been made to solve the above problems, and an object thereof is to provide a memory addressing method of a microcontroller capable of accessing all pages while efficiently expanding a specific internal memory area.

도 1 및 도 2는 종래의 마이크로 콘트롤러의 메모리 어드레싱 방법을 설명하기 위한 도면.1 and 2 are diagrams for explaining a memory addressing method of a conventional microcontroller.

도 3은 본 발명의 일실시예에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법을 설명하기 위한 도면.3 is a diagram illustrating a memory addressing method of a microcontroller according to an exemplary embodiment of the present invention.

도 4는 본 발명의 다른 일실시예에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법을 설명하기 위한 도면.4 is a diagram for describing a memory addressing method of a microcontroller according to another exemplary embodiment of the present invention.

* 도면의 주요 부분에 대한 설명* Description of the main parts of the drawing

30, 40, 50, 60 : 레지스터30, 40, 50, 60: register

42, 44, 52, 62 : 버퍼42, 44, 52, 62: buffer

상기 목적을 달성하기 위한 본 발명에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법은 마이크로 콘트롤러의 명령어가 직접 또는 간접 어드레싱 모드 명령어인지의 여부에 따라 인에이블되는 제어신호를 발생하는 단계와, 상기 제어신호에 따라 소정 내부 메모리 영역에 대한 페이지 단위의 엑세스 혹은 소정 페이지만을 엑세스할 것인지를 결정하는 단계를 포함하여 이루어진다.A memory addressing method of a microcontroller according to the present invention for achieving the above object comprises the steps of generating a control signal enabled according to whether the instruction of the microcontroller is a direct or indirect addressing mode instruction, and according to the control signal. And determining whether to access a page unit or only a predetermined page of the internal memory area.

이하, 첨부된 도면을 참조하여 본 발명을 상세히 설명하고자 한다.Hereinafter, with reference to the accompanying drawings will be described in detail the present invention.

도 3은 본 발명의 실시예에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법을 설명하기 위한 도면이다.3 is a diagram for describing a memory addressing method of a microcontroller according to an exemplary embodiment of the present invention.

도 3에 있어서, 마이크로 콘트롤러의 메모리를 효율적으로 확장하기 위해서 명령어의 디코딩 결과에 따라 발생되는 Reg 제어신호를 이용한다. 이 Reg 신호는 직접 어드레싱 모드의 명령어일 때는 '1'로 인에이블 되고, 반대로 간접 어드레싱 모드의 명령어일 때는 '0'으로 디스에이블 된다. 이어서, Reg 신호에 따라서 페이지 어드레스를 저장하기 위한 레지스터(40)의 출력값의 유효 여부가 결정된다. 즉, Reg 신호가 '1'로 인에이블 되었을 때, 버퍼(42, 44)를 하이 임피이던스 상태가 되어 레지스터(40)의 출력값은 무시된다. 따라서, C 메모리 영역의 0 페이지만을 엑세스할 수 있게 된다. 반대로 Reg 신호가 '0'으로 디스에이블 되었을 때, 버퍼(42, 44)는 레지스터(40)의 출력값을 그대로 통과시킨다. 따라서, 레지스터(40)의 저장된 페이지 어드레스에 의해 C 메모리 영역의 모든 페이지를 엑세스할 수 있게 된다. 이러한 방법에 의해 C 메모리 영역의 레지스터 영역을 모든 페이지에서 볼 수 있게 된다. 그런데, 이러한 방식은 각 페이지간의 블록 데이터 전송시에는 페이지 어드레스의 빈번한 업데이트로 인하여 성능이 저하된다. 즉, C 메모리 영역의 한 페이지에서 다른 페이지로의 연속적으로 전송하는 블록 데이터 전송시, 레지스터(40)의 저장값은 리드시 한번 업데이트하고, 다시 라이트할 때 다시 한번 업데이트해야 한다. 이렇게 잦은 페이지 어드레스의 업데이트로 인하여 블록 데이터 전송 시간이 늘어나게 된다. 이를 개선하기 위하여 도 4에 도시된 바와 같이, 라이트와 리드시의 페이지 어드레스를 별도로 저장함으로써 이러한 문제를 해결할 수 있다.In FIG. 3, in order to efficiently expand the memory of the microcontroller, the Reg control signal generated according to the decoding result of the instruction is used. This Reg signal is enabled as '1' when the instruction is in direct addressing mode, and disabled as '0' when the instruction is in indirect addressing mode. Then, it is determined whether or not the output value of the register 40 for storing the page address is valid according to the Reg signal. In other words, when the Reg signal is enabled as '1', the buffers 42 and 44 are in a high impedance state and the output value of the register 40 is ignored. Therefore, only 0 pages of the C memory area can be accessed. On the contrary, when the Reg signal is disabled as '0', the buffers 42 and 44 pass the output value of the register 40 as it is. Thus, all pages of the C memory area can be accessed by the stored page address of the register 40. In this way, the register area of the C memory area can be viewed on every page. However, this method is degraded due to the frequent update of page addresses in block data transfer between pages. That is, in the case of block data transfer that is continuously transferred from one page to another page of the C memory area, the stored value of the register 40 must be updated once at read time, and again at the time of rewriting. This frequent page address update increases block data transfer time. In order to improve this, as shown in FIG. 4, this problem can be solved by separately storing the page addresses at the time of writing and writing.

도 4는 본 발명의 다른 실시예에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법을 설명하기 위한 도면이다.4 is a diagram for describing a memory addressing method of a microcontroller according to another exemplary embodiment of the present invention.

도 4에 있어서, C 메모리 영역의 각 페이지에 대한 리드시와 라이트시의 페이지 어드레스를 별도로 저장하기 위한 두 개의 레지스터(50, 60)를 두고 있다. 이때, Reg 신호는 두 개의 레지스터(50, 60)의 출력값을 차단 여부를 결정하는 버퍼(52, 54)의 제어신호로서 이용된다. 이러한 방법을 사용함으로써, 블록 데이터 전송시 잦은 페이지 어드레스의 업데이트로 인한 성능 저하를 방지할 수 있다.In Fig. 4, two registers 50 and 60 are provided for separately storing page addresses at the time of read and at the time of writing for each page of the C memory area. At this time, the Reg signal is used as a control signal of the buffers 52 and 54 for determining whether to cut off the output values of the two registers 50 and 60. By using this method, it is possible to prevent performance degradation due to frequent page address updates during block data transfer.

본 발명의 기술 사상은 상기 바람직한 실시예에 따라 구체적으로 기술되었으나, 상기한 실시예는 그 설명을 위한 것이며, 그 제한을 위한 것이 아님을 주의하여야 한다. 또한, 본 발명의 기술 분야의 통상의 전문가라면 본 발명의 기술 사상의 범위 내에서 다양한 실시예가 가능함을 이해할 수 있을 것이다.Although the technical spirit of the present invention has been described in detail according to the above-described preferred embodiment, it should be noted that the above-described embodiment is for the purpose of description and not of limitation. In addition, those skilled in the art will understand that various embodiments are possible within the scope of the technical idea of the present invention.

상기와 같이 이루어지는 본 발명에 따른 마이크로 콘트롤러의 메모리 어드레싱 방법은 효율적으로 특정 내부 메모리 영역을 확장하면서도 모든 페이지에 대한 엑세스가 용이하다. 특히, 페이지 단위의 엑세스를 위한 페이지 어드레스를 리드시와 라이트시 별도로 구분하여 엑세스함으로써, 페이지 어드레스의 잦은 업데이트로 인한 성능 저하를 막을 수 있다.The memory addressing method of the microcontroller according to the present invention as described above allows for easy access to all pages while efficiently extending a specific internal memory area. In particular, by separately accessing the page address for page-by-page access at read and write time, performance degradation due to frequent update of the page address can be prevented.

Claims (2)

동일한 상위 메모리 어드레스 범위를 가지는 제1 및 제2메모리 영역과, 그 하위 메모리 어드레스 범위의 제3메모리 영역을 가지는 마이크로 콘트롤러에서 제3메모리 영역을 페이지 단위로 확장하기 위한 마이크로 콘트롤러의 메모리 어드레싱 방법에 있어서,In the microcontroller having the first and second memory areas having the same upper memory address range, and the third memory area of the lower memory address range, the microcontroller memory addressing method for extending the third memory area in units of pages. , 마이크로 콘트롤러의 명령어가 직접 또는 간접 어드레싱 모드 명령어인지의 여부에 따라 인에이블되는 제어신호를 발생하는 단계; 및Generating a control signal enabled according to whether the instruction of the microcontroller is a direct or indirect addressing mode instruction; And 상기 제어신호에 따라 상기 제3메모리 영역에 대한 페이지 단위의 엑세스 혹은 소정 페이지만을 엑세스할 것인지를 결정하는 단계를 포함하는 것을 특징으로 하는 마이크로 콘트롤러의 메모리 어드레싱 방법.And determining whether to access page-by-page or only a predetermined page of the third memory area according to the control signal. 제1항에 있어서,The method of claim 1, 상기 제3메모리 영역에 대한 페이지 단위의 엑세스할 때, 리드와 라이트시의 페이지 어드레스를 별도로 하여 엑세스하는 것을 특징으로 하는 마이크로 콘트롤러의 메모리 어드레싱 방법.When accessing the page in the unit of the third memory area in a unit of page, the memory addressing method of the microcontroller, characterized in that the access to the page address at the time of read and write separately.
KR1019980058600A 1998-12-24 1998-12-24 Method for addressing memory of micro controller KR20000042435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980058600A KR20000042435A (en) 1998-12-24 1998-12-24 Method for addressing memory of micro controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980058600A KR20000042435A (en) 1998-12-24 1998-12-24 Method for addressing memory of micro controller

Publications (1)

Publication Number Publication Date
KR20000042435A true KR20000042435A (en) 2000-07-15

Family

ID=19565682

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980058600A KR20000042435A (en) 1998-12-24 1998-12-24 Method for addressing memory of micro controller

Country Status (1)

Country Link
KR (1) KR20000042435A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100470822B1 (en) * 2001-12-24 2005-03-08 매그나칩 반도체 유한회사 Method for memory addressing in micro controller and Apparutus for page mapping

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100470822B1 (en) * 2001-12-24 2005-03-08 매그나칩 반도체 유한회사 Method for memory addressing in micro controller and Apparutus for page mapping
US6934819B2 (en) 2001-12-24 2005-08-23 Hynix Semiconductor Inc. Method for memory addressing in micro controller and device using the same

Similar Documents

Publication Publication Date Title
US5963983A (en) Method and apparatus for dynamically creating conversion tables to access a semiconductor memory device
KR100526879B1 (en) flash file system
JP3657622B2 (en) Conversion lookaside buffer with variable page dimensions per entry
US5694567A (en) Direct-mapped cache with cache locking allowing expanded contiguous memory storage by swapping one or more tag bits with one or more index bits
EP0810527A1 (en) A sectored virtual memory management system and translation look-aside buffer (TLB) for the same
US5721874A (en) Configurable cache with variable, dynamically addressable line sizes
US20040215918A1 (en) Method, apparatus and computer program product for dynamically minimizing translation lookaside buffer entries across contiguous memory
JP2007280428A (en) Memory management
JPH0778766B2 (en) Method and apparatus for controlling direct execution of program in external storage device using randomly accessible and rewritable memory
US6122708A (en) Data cache for use with streaming data
JP3605205B2 (en) Data processing device and processing method
US7343469B1 (en) Remapping I/O device addresses into high memory using GART
US5734858A (en) Method and apparatus for simulating banked memory as a linear address space
US20060112256A1 (en) Method and apparatus for address mapping
US6542955B1 (en) Microcontroller virtual memory system and method
KR20000042435A (en) Method for addressing memory of micro controller
US6684290B2 (en) Memory rewriting apparatus and method for memory mapping rewriting program to same address space
KR100329768B1 (en) Memory addressing device for micro-controller unit
JPS5844263B2 (en) memory control circuit
KR100470822B1 (en) Method for memory addressing in micro controller and Apparutus for page mapping
JPH10293684A (en) Computer system and rise control method therefor
JPH0784886A (en) Method and unit for cache memory control
US5860140A (en) Circuit and method for learning attributes of computer memory
JPH06175917A (en) Flash memory
KR100281102B1 (en) ATA card using the flash memory

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application