EP0809180B1

Data processing circuit, microcomputer, and electronic equipment

Abstract

This record has no abstract on file.

EP0809180B1, drawing sheet 1
Sheet 1 of 24

Term

Term ended

Expired 22 May 2017, 9.3 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

9 claims: 9 independent, 0 dependent

  1. 1
    A data processing circuit comprising:a dedicated stack pointer register that is used only for the stack pointer (14);decoding means (20) for decoding object code of a group of dedicated stack pointer instructions which have object code specifying said dedicated stack pointer register as an implicit operand and which relate to processing based on said dedicated stack pointer register, and for outputting a control signal based on said object code, execution means (10) for executing said group of dedicated stack pointer instructions based on said control signal and the contents of said dedicated stack pointer register;and a plurality of registers (11) provided in a contiguous sequence, wherein said group of dedicated stack pointer instructions comprises at least one of a sequential push instruction and a sequential pop instruction having data for specifying a plurality of registers in the object code thereof;said decoding means (20) decodes at least one of said sequential push instruction and said sequential pop instruction;and    said execution means (10) performs at least one of a process of executing a plurality of sequential pushes of data from said plurality of registers to a stack provided in memory and a process of executing a plurality of sequential pops of data from said stack to said plurality of registers, based on the contents of a memory address specified by said dedicated stack pointer register (14) and said data for specifying a plurality of registers, during the execution of at least one of said sequential push instruction and said sequential pop instruction;characterized in that    said execution means (10) comprises: write means for writing the contents of a given register that is one of said plurality of registers (11) to a stack provided in memory (50B), based on a memory address specified by said dedicated stack pointer register (14);number-of-times-written count means (46) for counting the number-of-times-written of said write means;and comparison means (45) for comparing said number-of-times-written counted by said count means with the value of said data for specifying a plurality of registers;wherein said write means comprises: write memory address generation means (30, 32) for adding a first input and a second input by an adder, and for generating a write memory address for specifying a write destination: first input control means (45) for providing control such that the first input of said adder is the contents of said dedicated stack pointer register at the start of execution of a sequential dedicated instruction, and is a write address generated subsequently by a write address generation means;second input control means (45) for outputting an offset used during the writing of one word to said stack to the second input of said adder;and write means (45) for writing to said stack the contents of a register specified by subtraction processing which uses said data for specifying a plurality of registers and said number-of times-written, based on said write memory address;whereby the writing of the contents of said plurality of registers to said stack and the ending of said writing are controlled based on the comparison result of said comparison means.
  2. 2
    A data processing circuit comprising:a dedicated stack pointer register that is used only for the stack pointer (14);decoding means (20) for decoding object code of a group of dedicated stack pointer instructions which have object code specifying said dedicated stack pointer register as an implicit operand and which relate to processing based on said dedicated stack pointer register, and for outputting a control signal based on said object code;execution means (10) for executing said group of dedicated stack pointer instructions based on said control signal and the contents of said dedicated stack pointer register;and a plurality of registers (11) provided in a contiguous sequence,    wherein said group of dedicated stack pointer instructions comprises at least one of a sequential push instruction and a sequential pop instruction having data for specifying a plurality of registers in the object code thereof;said decoding means (20) decodes at least one of said sequential push instruction and said sequential pop instruction;and    said execution means (10) performs at least one of a process of executing a plurality of sequential pushes of data from said plurality of registers to a stack provided in memory and a process of executing a plurality of sequential pops of data from said stack to said plurality of registers, based on the contents of a memory address specified by said dedicated stack pointer register (14) and said data for specifying a plurality of registers, during the execution of at least one of     characterized in that    said execution means (10) comprises: read means for reading the contents of a stack provided in memory based on a memory address specified by said dedicated stack pointer register, and storing said contents in a given register of said plurality of registers;number-of-times-read count means for counting the number-of-times-read of said read means;and comparison means (45) for comparing said number-of-times-read counted by said count means with the value of said data for specifying a plurality of registers;wherein said read means comprises: first input control means (45) for providing control such that the first input of an adder is the contents of said dedicated stack pointer register at the start of execution of a sequential dedicated instruction, and is a read memory address generated subsequently by a read address generation means;second input control means (45) for outputting an offset used during the reading of one word from said stack to the second input of said adder;read means (45) for reading the contents of said stack based on said read memory address and storing said contents in a register specified based on said number-of-times-read;whereby the reading of the contents of said stack and the ending of said reading are controlled based on the comparison result of said comparison means.
  3. 3
    The data processing circuit as defined in claim 1 or 2, further comprising:n general-purpose registers (11) specified by register numbers 0 to n-1;wherein object code of at least one of said sequential push instruction and said sequential pop instruction comprises a final register number to which one of said register numbers is specified, as said data for specifying a plurality of registers;and    said execution means (10) performs at least one of a process of executing a plurality of sequential pushes of data into a stack provided in memory from a plurality of registers starting from register 0 to a register specified by said final register number and a process of executing a plurality of sequential pops of data from said stack to a plurality of registers starting from register 0 to a register specified by said final register number, based on the contents of a memory address specified by said dedicated stack pointer register.
  4. 4
    The data processing circuit as defined in any one of claims 1 to 3, further comprising:a program counter register (12) used only for the program counter;wherein said group of dedicated stack pointer instructions comprises branch instructions that are an instruction for branching to a subroutine and a return instruction from said subroutine;said decoding means (20) decodes said branch instructions;said execution means (10) comprises: means for executing at least one of a process of saving the contents of said program counter register (12) to a given second area of said stack provided in memory and a process of restoring the contents of said second area to said program counter register (12), based on a memory address specified by said dedicated stack pointer register, during the execution of said branch instruction;and means for updating the contents of said dedicated stack pointer register (12) based on said saving and restoration.
  5. 5
    The data processing circuit as defined in any one of claims 1 to 4, wherein said circuit uses instructions of a reduced instruction set computer.
  6. 6
    The data processing circuit as defined in any one of claims 1 to 5, wherein:a fixed-length instruction is decoded and execution is based on said fixed-length instruction.
  7. 7
    A microcomputer comprising the data processing circuit as defined in any one of claims 1 to 6, storage means, and input and output means for inputting data from and for outputting data to external devices.
  8. 8
    The microcomputer as defined in claim 7,    wherein a program that is executed thereby uses a program language that secures a storage region for auto-variables by using said stack pointer.
  9. 9
    Electronic equipment comprising the microcomputer defined in claim 7 or 8.