KR20050027261A - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
KR20050027261A
KR20050027261A KR1020057001422A KR20057001422A KR20050027261A KR 20050027261 A KR20050027261 A KR 20050027261A KR 1020057001422 A KR1020057001422 A KR 1020057001422A KR 20057001422 A KR20057001422 A KR 20057001422A KR 20050027261 A KR20050027261 A KR 20050027261A
Authority
KR
South Korea
Prior art keywords
software
register
drc
arithmetic
instruction
Prior art date
Application number
KR1020057001422A
Other languages
Korean (ko)
Other versions
KR100631396B1 (en
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 KR1020057001422A priority Critical patent/KR100631396B1/en
Publication of KR20050027261A publication Critical patent/KR20050027261A/en
Application granted granted Critical
Publication of KR100631396B1 publication Critical patent/KR100631396B1/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/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Microcomputers (AREA)

Abstract

A semiconductor device having a circuit which can be rewritten dynamically and a function for maintaining software compatibility in spite of the dynamically rewritable configuration. Simultaneously with software execution, data for rewriting a dynamically rewritable circuit and driver software for operating this are automatically generated and the latter part of an original program is replaced by the generated data. Thus, by maintaining software compatibility and diverting an existing software resource, it is possible to use the same software in various devices.

Description

반도체장치{SEMICONDUCTOR DEVICE}Semiconductor device {SEMICONDUCTOR DEVICE}

본 발명은, 동적으로 재기록 가능한 회로를 탑재한 반도체장치의 구성과, 그 이용방법에 관한 것이다.The present invention relates to a configuration of a semiconductor device equipped with a dynamically rewritable circuit and a method of using the same.

종래, 정보처리기기의 보급과 고성능화에 따라, 여러가지 어플리케이션이 등장하였고, 이들 어플리케이션은 소프트웨어로 기술되며, 범용 프로세서에서 실행되는 형태가 주류로 되어 있다. 그런데, 어플리케이션 중에는 범용 프로세서보다도 고도의 연산처리능력을 요구하는 것도 있고, 프로세서에는 한층 더 처리 능력의 향상이 요구되도록 되어 있다.Background Art Conventionally, with the spread of information processing apparatuses and high performance, various applications have emerged. These applications are described in software, and the forms executed in general-purpose processors have become mainstream. By the way, some applications require higher processing power than general-purpose processors, and the processor is required to further increase processing power.

이 때문에, 범용 프로세서에 부가해서 특정 어플리케이션에 특화한 전용회로를 한개의 칩에 탑재하는 것에 의해, 처리능력을 향상시키는 예가 있다. 또, 이 전용회로를 동적으로 재기록 가능한 회로(Dynamically Reconfigurable Circuit, 이하 DRC라 부른다)에 의해 구성하는 예가 특개평 10-4345호 공보나 특개평 10-335462호 공보에 개시되어 있다.For this reason, there is an example in which processing capacity is improved by mounting a dedicated circuit specialized for a specific application in one chip in addition to a general-purpose processor. Further, an example in which this dedicated circuit is constituted by a dynamically reconfigurable circuit (hereinafter referred to as DRC) is disclosed in Japanese Patent Laid-Open Nos. 10-4345 and 10-335462.

이러한 선행기술에서는, DRC 재기록 데이터를 어플리케이션의 소프트웨어 작성 시에 미리 작성하여 둔다. DRC 재기록 데이터에 의해 DRC를 재기록하는 것에 의해, DRC는 특정 어플리케이션을 위한 전용회로로서 기능하게 된다. 범용 프로세서에서 실행되는 소프트웨어에는, DRC 재기록 데이터와 재기록 명령이 포함되어 있다.In this prior art, the DRC rewritable data is created in advance at the time of software creation of the application. By rewriting the DRC with the DRC rewrite data, the DRC functions as a dedicated circuit for a particular application. Software running on a general purpose processor includes DRC rewrite data and rewrite instructions.

이것에 의해, 범용 프로세서는 어플리케이션의 실행 중 DRC를 재기록하여 전용회로로서 기능시키는 것에 의해, 그 처리능력을 향상시킬 수 있다.As a result, the general-purpose processor can improve its processing capacity by rewriting the DRC while the application is running and functioning as a dedicated circuit.

본원의 발명자들은, 이상의 선행기술처럼, DRC 재기록 데이터와 드라이버·소프트웨어를 이용하는 DRC와 칩 구성에 맞추어 미리 준비하고, DRC 재기록 명령과 DRC 재기록 데이터를 소프트웨어 내에 기술하는 구성에서는, DRC 구성이 다른 칩에서는 그 소프트웨어를 실행할 수 없게 된다는 문제점이 있다는 것을 알았다. 이것은, DRC의 구성에 의해 적용할 수 있는 소프트웨어의 범위가 제한받게 되고, 동일한 명령세트를 가지는 프로세서 소프트웨어이면서, DRC의 구성이 다르기 때문에 소프트웨어를 이용할 수 없다는 사태를 발생시키게 된다.As described above, the inventors of the present application prepare in advance according to the DRC and chip configuration using DRC rewritable data and driver software, and describe the DRC rewrite command and DRC rewrite data in software. I knew there was a problem with the software being unable to run. This limits the range of software that can be applied by the configuration of the DRC, and causes the situation that the software cannot be used because the processor software having the same instruction set and the configuration of the DRC are different.

본 발명의 목적은, DRC를 이용하여 처리능력을 향상시키면서도, DRC의 구성에 의하지 않고 소프트웨어의 호환성을 확보할 수 있는 반도체 집적회로 장치를 제공하는 것이다.SUMMARY OF THE INVENTION An object of the present invention is to provide a semiconductor integrated circuit device capable of ensuring software compatibility without improving the processing capacity by using the DRC, regardless of the DRC configuration.

도 1은 본 발명의 반도체 집적회로 장치의 구성을 나타내는 블럭도이다.1 is a block diagram showing the configuration of a semiconductor integrated circuit device of the present invention.

도 2는 DRC 드라이버 SW의 생성 및 실행의 타이밍을 나타내는 도면이다.2 is a diagram illustrating timing of generation and execution of a DRC driver SW.

도 3은 DRC의 구성예를 나타내는 블럭도이다.3 is a block diagram illustrating an exemplary configuration of a DRC.

도 4는 DRC의 구성요소인 입출력 레지스터·셀(IORC)의 구성예를 나타내는 블럭도이다.4 is a block diagram showing an example of the configuration of an input / output register cell (IORC) that is a component of a DRC.

도 5는 DRC의 구성요소인 연산셀(CC)의 구성예를 나타내는 블럭도이다.5 is a block diagram showing an example of a configuration of a computing cell (CC) that is a component of a DRC.

도 6은 재기록 판정 유닛(CDU)의 구성예를 나타내는 블럭도이다.6 is a block diagram showing a configuration example of a rewrite determination unit (CDU).

도 7은 재기록 판정 유닛(CDU)의 동작을 나타내는 블럭도이다.7 is a block diagram showing the operation of a rewrite determination unit (CDU).

도 8(A)는 통상 SW, 도 8(B)는 통상 SW로부터 HW/SW 생성 유닛(GU)에 의해 잘라낸 통상 SW, 도 8(C)는 HW/SW 생성유닛(GU)에 의해 작성된 DRC 드라이버 SW, 도 8(D)는 프로그램 중 명령의 동작 일람이다.8 (A) is a normal SW, FIG. 8 (B) is a normal SW cut out from the normal SW by the HW / SW generation unit GU, and FIG. 8 (C) is a DRC created by the HW / SW generation unit GU. The driver SW, Fig. 8D, shows a list of operations of the instructions in the program.

도 9는 HW/SW 생성 유닛(GU)의 동작을 나타내는 플로우도이다.9 is a flowchart illustrating the operation of the HW / SW generation unit GU.

도 10은 CDFG의 예이다.10 is an example of a CDFG.

도 11은 축약처리를 행한 CDFG의 예이다.11 is an example of a CDFG subjected to a reduction process.

도 12는 ALAP(As Late As Possible) 알고리즘을 이용하여 스케쥴링을 행한 CDFG의 예이다.12 is an example of a CDFG scheduled using an As Late As Possible (ALAP) algorithm.

도 13은 또 다른 ASAP(As Soon As Possible) 알고리즘을 이용하여 스케쥴링을 행한 CDFG의 예이다.13 is an example of a CDFG scheduled using another As Soon As Possible (ASAP) algorithm.

도 14는 본 발명의 반도체 집적회로 장치의 다른 구성을 나타내는 블럭도이다.Fig. 14 is a block diagram showing another configuration of the semiconductor integrated circuit device of the present invention.

도 15는 본 발명의 반도체 집적회로 장치의 또 다른 구성을 나타내는 블럭도이다.Fig. 15 is a block diagram showing another configuration of the semiconductor integrated circuit device of the present invention.

본원에 있어서 개시되는 발명 중 대표적인 것의 개요를 간단히 설명하면 아래와 같다.Briefly, an outline of typical ones of the inventions disclosed in the present application will be described below.

연산명령을 포함하는 소프트웨어를 실행하는 반도체장치로서, 복수의 연산셀과 복수의 레지스터셀을 포함하고, 연산셀이 실행하는 연산종류와 복수의 연산셀 및 복수의 레지스터셀 사이의 배선접속을 설정가능한 연산회로와, 소프트웨어에 의거하여 연산셀의 연산종류 및 배선접속을 설정하는 설정데이터와, 연산회로를 이용하여 소프트웨어와 등가의 처리를 행하기 위한 드라이버·소프트웨어를 생성하는 제어회로를 가진다.A semiconductor device that executes software including arithmetic instructions, comprising: a plurality of arithmetic cells and a plurality of register cells, the type of arithmetic operations executed by arithmetic cells and wiring connections between a plurality of arithmetic cells and a plurality of register cells can be set; The calculation circuit includes setting data for setting the calculation type and wiring connection of the calculation cell based on software, and a control circuit for generating a driver / software for performing processing equivalent to software using the calculation circuit.

여기서 연산종류는, 셀연산의 실행가능한 논리합, 논리곱, 배타적 논리합이 라는 논리연산, 가감승제라는 산술연산, 비교연산이 포함된다. 이러한 구성에 의해, 반도체장치 상에서 드라이버·소프트웨어를 생성하는 것이 가능하게 되고, 소프트웨어의 호환성을 확보할 수 있다. 또, 소프트웨어의 실행중에 드라이버·소프트웨어를 작성하는 것에 의해, 드라이버·소프트웨어를 작성하는 오버헤드를 유저가 의식하지 않고, 연산회로를 이용한 고속처리가 가능하게 된다. The types of operations include the executable OR of cell operations, the AND, the logical OR of exclusive OR, the arithmetic and LAM, and the comparative operation. Such a configuration makes it possible to generate driver software on a semiconductor device, thereby ensuring software compatibility. In addition, by creating the driver software during the execution of the software, high-speed processing using an arithmetic circuit can be performed without the user being aware of the overhead of creating the driver software.

또한, 연산명령을 포함하는 소프트웨어를 실행하는 반도체장치로서, 레지스터와, 연산기와, 복수의 연산셀과 복수의 레지스터셀을 포함하고, 연산셀이 실행하는 연산종류와 복수의 연산셀 및 복수의 레지스터셀 사이의 배선접속을 설정가능한 연산회로와, 소프트웨어를 저장하는 제 1 메모리영역과, 연산회로를 이용하여 소프트웨어와 등가의 처리를 행하기 위한 드라이버·소프트웨어를 저장하는 제 2 메모리영역과, 실행하는 소프트웨어를 제어하는 제어회로를 가지고, 소프트웨어의 처리는 n회 반복되어, 제 1 회로부터 제 i 회(i<n)까지의 처리는, 레지스터와 연산기를 이용하여 제 1 메모리로부터 판독된 소프트웨어를 실행함으로써 행해지고, 제어회로는 제i회의 처리를 받아, 실행하는 소프트웨어를 드라이버·소프트웨어로 전환하는 것에 의해, 제i+1회로부터 제 n 회까지의 처리는, 연산 회로를 이용하여 제 2 메모리영역으로부터 판독된 드라이버·소프트웨어를 실행함으로써 행해진다. 이러한 소프트웨어와 드라이버·소프트웨어를 다른 메모리 영역에 기억하고, 제어회로가 소프트웨어와 드라이버·소프트웨어를 전환하는 구성에 의해, 소프트웨어의 호환성을 확보할 수 있다.Also, a semiconductor device for executing software including arithmetic instructions, comprising a register, an arithmetic unit, a plurality of arithmetic cells, and a plurality of register cells, the type of arithmetic operations executed by arithmetic cells, a plurality of arithmetic cells, and a plurality of registers. An arithmetic circuit capable of establishing wiring connections between cells, a first memory area for storing software, a second memory area for storing drivers and software for performing processing equivalent to software using the arithmetic circuit, and With a control circuit for controlling software, the processing of the software is repeated n times, and the processes from the first to i times (i <n) execute the software read from the first memory using registers and arithmetic operators. The control circuit receives the i-th processing and switches the software to be executed by the driver software to obtain the i-th control circuit. The processes from +1 to n times are performed by executing the driver software read out from the second memory area by using a calculation circuit. Such software and driver software are stored in different memory areas, and the control circuit switches the software and the driver software, thereby ensuring software compatibility.

이러한 구성은, 특히 복수회 반복되는 소프트웨어(예컨대, 루프를 형성하고 있는 소프트웨어)에 유효하고, 이러한 루프는 화상처리나 음성처리에서 잘 나타나는 처리이다.This configuration is particularly effective for software that is repeated a plurality of times (e.g., software that forms a loop), and this loop is a process that appears well in image processing and audio processing.

이하, 본 발명에 의한 대표적인 실시형태를 도면에 따라 상세하게 설명한다. 또, 이하에 있어서는, 동일한 참조번호는 동일, 혹은 유사한 것을 나타낸다.EMBODIMENT OF THE INVENTION Hereinafter, typical embodiment by this invention is described in detail according to drawing. In addition, below, the same reference number shows the same or similar thing.

본 발명에서는, DRC를 이용하지 않고 범용 프로세서에서 실행되는 어플리케이션 소프트웨어(이하, 이와 같은 소프트웨어를「통상 SW」라 한다)로부터, 어플리케이션 소프트웨어의 일부분을 DRC에서 실행시키기 위한 DRC 드라이버·소프트웨어(이하, 이와 같은 소프트웨어를「DRC 드라이버 SW」라 한다)를 자동 생성하고, 범용 프로세서는, 통상 SW의 일부를 DRC 드라이버 SW로 치환하여 실행하는 것으로 처리능력을 향상시킨다.In the present invention, the DRC driver software for executing a part of the application software in the DRC from the application software (hereinafter referred to as "software SW") executed in the general-purpose processor without using the DRC (hereinafter referred to as The same software is automatically generated ("DRC driver SW"), and the general-purpose processor usually improves processing capacity by replacing part of the SW with the DRC driver SW and executing it.

통상 SW와 DRC 드라이버 SW와의 관계를 도 8(A)~(D)를 이용하여 설명한다. 도 8(A)의 예는 고속 푸리에 변환 프로그램의 일부이다. 고속 푸리에 변환은 멀티미디어 처리에서 잘 이용되는 처리이다. 도 8(A)의 프로그램은 범용 프로세서의 명령세트에 의해 기술되어 있다. 프로그램의 각 명령의 의미는 도 8(D)에 나타나 있다. 도 8에서 이용한 명령세트는 일례이고, 본 발명이 해당 명령세트에 한정되는 것이 아니라는 것은, 이하의 설명으로부터 명백해질 것이다.The relationship between normal SW and DRC driver SW is demonstrated using FIG. 8 (A)-(D). 8A is a part of the fast Fourier transform program. Fast Fourier Transform is a process that is best used in multimedia processing. The program of Fig. 8A is described by the instruction set of the general purpose processor. The meaning of each instruction of the program is shown in Fig. 8D. The instruction set used in FIG. 8 is an example, and it will be apparent from the following description that the present invention is not limited to the instruction set.

본 실시예에서는 통상 SW 중 반복 실행되는 소프트웨어 부분(루프)을 DRC로 실행시킨다. 이것은, DRC 드라이버 SW를 통상 SW의 실행 중 자동 생성하기 위해, 복수회 실행되는 소프트웨어부분을 DRC로 실행시키도록 하는 것이 효율적인 것으로 고려되기 때문이다. 도 8(A)의 예에서는, 제 4 행에서 제 18 행까지의 프로그램이 그 대상이 된다(도 8(B)).In this embodiment, a software portion (loop) that is repeatedly executed in SW is usually executed by DRC. This is because, in order to automatically generate the DRC driver SW during the execution of the normal SW, it is considered to be effective to execute the software portion executed multiple times by the DRC. In the example of FIG. 8 (A), the program from the 4th line to the 18th line becomes the target (FIG. 8 (B)).

본 발명에서는, 도 8(B)의 통상 SW에 의거하여, DRC 재기록 데이터와 DRC 드라이버 SW(도 8(C))를 생성한다. DRC 재기록 데이터는 DRC가 도 8(B)의 프로그램에서 실행되는 연산을 실행하도록 DRC를 설정하기 위한 데이터이다. 또, DRC 드라이버 SW는 통상 SW의 프로그램 중 DRC에서는 실행할 수 없는 명령을 실행하고, 범용 프로세서로부터 DRC에 데이터를 입력하고, DRC에서 실행된 결과를 범용 프로세서로 되돌리기 위한 프로그램이다. 따라서, 범용 프로세서는 범용 레지스터(GR)와 연산기(ALU)를 이용하여 도 8(B)를 실행하는 대신에, 도 8(C)를 실행하여 DRC를 이용해서 연산을 실행하는 것에 의해, 처리능력을 향상시킬 수 있는 것이다.In the present invention, the DRC rewrite data and the DRC driver SW (Fig. 8 (C)) are generated based on the normal SW of Fig. 8B. The DRC rewrite data is data for setting the DRC so that the DRC executes an operation executed in the program of Fig. 8B. The DRC driver SW is a program for executing instructions that cannot be executed in the DRC among the programs of the SW, inputting data from the general-purpose processor to the DRC, and returning the result executed in the DRC to the general-purpose processor. Therefore, instead of executing FIG. 8 (B) using the general register GR and the operator ALU, the general purpose processor executes the operation by using the DRC by executing FIG. 8 (C), thereby processing capacity. To improve.

도 1에 본 발명의 LSI칩(100)의 구성을 나타낸다. LSI칩(100)은 버스·스테이트·컨트롤러(BSC)와, 다이렉트·메모리·액세스·컨트롤러(DMAC)와, 온칩·메모리(OCM)와, DRC 드라이버 SW 저장메모리(DSM)와, 명령캐시(ICH)와, 데이터·캐시(DCH)와, 캐시 제어유닛(CCN)과, CPU(101)에 의해 구성된다. CPU(101)는 DRC 제어유닛(102)과, 명령버퍼(IBF)와, 명령 패치·유닛(IFU)과, 셀렉터(SEL)와, 명령 디코더(IDC)와, 범용 레지스터(GR)와, 연산기(ALU)와, DRC에 의해 구성된다. DRC 제어유닛(102)은 재기록 판정유닛(CDU)과, 하드웨어/소프트웨어 생성유닛(GU)(이하, HW/SW 생성유닛이라 기술한다)에 의해 구성된다.1 shows the configuration of the LSI chip 100 of the present invention. The LSI chip 100 includes a bus state controller (BSC), a direct memory access controller (DMAC), an on-chip memory (OCM), a DRC driver SW storage memory (DSM), and an instruction cache (ICH). ), The data cache DCH, the cache control unit CCN, and the CPU 101. The CPU 101 includes a DRC control unit 102, an instruction buffer IBF, an instruction patch unit IFU, a selector SEL, an instruction decoder IDC, a general purpose register GR, and an operator. (ALU) and DRC. The DRC control unit 102 is composed of a rewrite determination unit (CDU) and a hardware / software generation unit (GU) (hereinafter referred to as a HW / SW generation unit).

CPU(101)가 실행하는 명령은 명령캐시(ICH)에 저장되고, 명령패치·유닛(IFU)의 명령 로드신호에 따라 명령캐시(ICH) 내에 저장되어 있는 명령은 명령버퍼(IBF)로 전송된다. 동시에, 재기록 판정유닛(CDU)은 명령캐시(ICH)로부터 명령버퍼(IBF)에 전송되는 명령을 항상 감시한다.The instructions executed by the CPU 101 are stored in the instruction cache ICH, and the instructions stored in the instruction cache ICH are transmitted to the instruction buffer IBF according to the instruction load signal of the instruction patch unit IFU. . At the same time, the rewrite determination unit CDU always monitors the commands transmitted from the command cache ICH to the command buffer IBF.

재기록 판정유닛(CDU)은 도 8(A)의 예에서 말하면, 조건분기 명령(BF)을 검출하고, 그것에 의거하여 DRC에서 실행하는 후보가 되는 프로그램으로서 도 8(B)에 나타내는 소프트웨어부분을 잘라내고, 저장한다. DRC에서 실행하는 소프트웨어 부분을 결정하면, 재기록 판정유닛(CDU)은 HW/SW 생성유닛(GU)에 대하여, DRC 재기록 데이터의 작성, DRC 재기록 및 DRC 드라이버 SW의 작성을 지시한다. In the example of Fig. 8A, the rewrite determination unit CDU detects the conditional branch instruction BF, and cuts the software portion shown in Fig. 8B as a program to be a candidate to be executed in the DRC based on it. Pay and save. When determining the software portion to be executed in the DRC, the rewrite determination unit (CDU) instructs the HW / SW generation unit (GU) to create DRC rewrite data, DRC rewrite and DRC driver SW.

HW/SW 생성유닛(GU)은 잘라낸 프로그램으로부터 DRC 재기록 데이터를 생성하고, DRC 재기록을 행한다. 또, 재기록된 DRC를 이용하기 위한 DRC 드라이버 SW를 생성하고, 생성된 DRC 드라이버 SW는 드라이버 SW 저장메모리(DSM)에 저장한다. 이들의 처리가 종료하면, HW/SW 생성유닛(GU)은 재기록 판정유닛(CDU)에 종료를 통지함과 동시에, DRC 드라이버 SW가 저장되는 선두 어드레스를 통지한다.The HW / SW generation unit GU generates DRC rewrite data from the cut program, and performs DRC rewrite. In addition, a DRC driver SW for using the rewritten DRC is generated, and the generated DRC driver SW is stored in the driver SW storage memory DSM. When these processes are finished, the HW / SW generation unit GU notifies the rewrite determination unit CDU of the end and notifies the head address where the DRC driver SW is stored.

또, 통상 SW는 온칩·메모리(OCM)나 외부메모리·칩(EXTM)에 저장되어 있는 것이 일반적이다.In general, SW is usually stored in an on-chip memory (OCM) or an external memory chip (EXTM).

CPU(101)에 의한 프로그램의 실행은 이하와 같다. 도 8의 예에 의해 설명한다. 처음은 도 8(A)의 통상 SW가 그대로 실행된다. HW/SW 생성유닛(GU)으로부터 종료통지를 받은 후에, 재기록 판정유닛(CDU)은 명령캐시(ICH)로부터 명령버퍼(IBF)에 전송되는 통상 SW의 실행 중 명령이 DRC 드라이버 SW로 치환되는 프로그램의 조건분기 명령(도 8(B))의 제 15 행, 즉 도 8(A)의 제 18 행에 상당한다)까지 처리가 진행하는 것을 확인하면, 명령패치·유닛(IFU)을 통하여 셀렉터(SEL)를 전환하고, 명령 디코더(IDC)에 입력되는 명령을 명령버퍼(IBF)로부터 판정유닛(CDU)으로 전환한다. 다음에, 조건분기 명령의 분기 선(先) 어드레스를 DRC 드라이버 SW의 저장되는 선두 어드레스에 변환한 명령을, 셀렉터(SEL)를 통하여 명령 디코더(IDC)로 출력한다. 다음의 CPU 클럭·사이클에서는, 재기록 판정유닛(CDU)은 명령패치·유닛(IFU)을 통하여 셀렉터(SEL)를 전환하고, 명령 디코더(IDC)에 입력되는 명령을 판정유닛(CDU)으로부터 명령버퍼(IBF)로 전환한다. 이들에 의해, 이후는 DRC 드라이버 SW가 실행된다. DRC 드라이버 SW의 최후의 명령은 잘라낸 통상 SW의 다음 명령이 저장된 어드레스로의 무조건 분기명령(도 8(C) 제 15 행)이고, 이 명령의 실행에 의해 통상 SW의 실행으로 되돌아간다.The execution of the program by the CPU 101 is as follows. It demonstrates by the example of FIG. Initially, the normal SW of FIG. 8A is executed as it is. After receiving the termination notice from the HW / SW generation unit (GU), the rewrite determination unit (CDU) is a program in which a command during execution of a normal SW transmitted from the command cache ICH to the command buffer IBF is replaced with a DRC driver SW. When the processing advances to the 15th line of the conditional branch instruction (corresponding to the 18th line of FIG. 8A) of the conditional branch instruction of FIG. 8 (B), the selector (through the command patch unit IFI) SEL) is switched, and the command inputted to the command decoder IDC is switched from the command buffer IBF to the determination unit CDU. Next, the instruction which converted the branch line address of the conditional branch instruction into the head address stored in the DRC driver SW is output to the instruction decoder IDC via the selector SEL. In the next CPU clock cycle, the rewrite determination unit CDU switches the selector SEL through the instruction patch unit IFU, and receives the instruction inputted from the determination unit CDU from the instruction buffer. Switch to (IBF). By these, the DRC driver SW is subsequently executed. The last instruction of the DRC driver SW is an unconditional branch instruction (the 15th line in Fig. 8C) to the address where the next instruction of the cut-out normal SW is stored, and execution of this instruction returns to the execution of the normal SW.

여기에서, 명령캐시(ICH)에의 명령의 저장은 명령 디코더(IDC)의 실행을 받아, 캐시·컨트롤러(CCN)에 의해 행해진다. 캐시·컨트롤러(CCN)는 프로세서·버스(PRCB) 상의 모듈인 온칩·메모리(OCM)와, 다이렉트·메모리·액세스·컨트롤러(DMAC)와, 버스·컨트롤러(BSC)(외부메모리·칩(EXTM)에의 액세스의 경우)에 부가해서 드라이버 SW 저장메모리(DSM)에 대하여도 메모리·액세스를 실행 가능하게 구성되어 있는 점이 하나의 특징이다.Here, the instruction is stored in the instruction cache ICH by execution of the instruction decoder IDC and executed by the cache controller CCN. The cache controller (CCN) is an on-chip memory (OCM) module that is a module on the processor bus (PRCB), a direct memory access controller (DMAC), and a bus controller (BSC) (external memory chip (EXTM)). One feature is that the memory SW is configured to be executable in the driver SW storage memory (DSM).

도 2에 DRC 드라이버 SW의 생성 및 실행의 타이밍을 나타낸다.2 shows the timing of generation and execution of the DRC driver SW.

우선 통상 SW가 실행되고, 명령패치·유닛(IFU) 내의 프로그램·카운터에 저장되어 있는 현재 실행 중인 명령의 어드레스보다 앞의 어드레스에의 조건분기가 일어난 경우(도 8(A) 제 18 행)에는 재기록 판정유닛(CDU)은 통상 SW 중에 루프가 있다는 것으로 가결정한다.First, when a normal SW is executed and a conditional branch to an address preceding the address of the currently executing instruction stored in the program counter in the instruction patch unit IFU occurs (line 18 in Fig. 8A). The rewrite determination unit (CDU) temporarily determines that there is a loop in SW.

재기록 판정유닛(CDU)은 이후의 실행에서 명령캐시(ICH)로부터 명령버퍼(IBF)에 로드되는 명령, 즉 도 8(A) 제 4 행~제 18 행의 명령을 취득하여 저장한다.다시, 조건분기 명령에 의해 저장된 선두의 명령으로 되돌려진 경우에는,저장된 명령은 루프를 형성하고 있는 것으로 판정하고, DRC의 이용을 정식으로 결정한다. The rewrite determination unit (CDU) acquires and stores the instructions to be loaded into the instruction buffer IBF from the instruction cache ICH in the subsequent execution, that is, the instructions in the fourth to eighteenth lines of Fig. 8A. In the case of returning to the first instruction stored by the conditional branch instruction, the stored instruction is determined to form a loop, and the use of the DRC is formally determined.

HW/SW 생성유닛(GU)은 3회째의 루프로 DRC 재기록 데이터의 작성, DRC 드라이버 SW의 작성 및 DRC 재기록을 행한다. 3회째의 루프에서 DRC의 이용이 가능하게 되므로, CPU(101)는 연산유닛(ALU)에 의한 연산 대신에 제 4 회째 이후의 루프는 DRC 드라이버 SW를 실행하는 것에 의해 DRC에 의해 연산을 행하도록 한다. 또, DRC의 재기록이 3회째의 루프 실행 중 끝나지 않은 경우는 CPU(101)는 DRC의 재기록이 종료하는 시점을 포함하는 루프의 최후까지 통상 SW를 실행하게 된다.In the third loop, the HW / SW generation unit GU creates the DRC rewrite data, the DRC driver SW, and the DRC rewrite. Since the DRC can be used in the third loop, the CPU 101 can perform the operation by the DRC by executing the DRC driver SW instead of the operation by the operation unit ALU. do. If the rewriting of the DRC does not end during the third loop, the CPU 101 executes the normal SW to the end of the loop including the time point at which the rewriting of the DRC ends.

다음에, DRC의 구조를 도 3~도 5를 이용하여 상세하게 설명한다. 도 3은 DRC의 내부구성을 나타내고 있다. 입출력 레지스터셀(IORC)과, 연산셀(CC)과, 입출력 레지스터셀(IORC)에의 데이터 입력포트(200)와, 레지스터 지정 입력포트(201)와, 셀입력선(203a,203b,203c)과, DRC의 데이터 출력포트(202)와, 각 셀로부터의 셀출력선(204a,204b)과, 배선영역(205)과, 배선 프로그램 소자(206)로 구성된다. 배선 프로그램 소자(206)는 배선영역(205) 중 배선끼리 결선을 결정하기 위한 스위치 소자와 이들 스위치 소자의 온/오프 상태를 기억하기 위해 도시하지 않은 기억소자(예컨대, SRAM, Flash 메모리 등)에 의해 구성된다.Next, the structure of the DRC will be described in detail with reference to Figs. 3 shows the internal structure of the DRC. The input / output register cell IORC, the operation cell CC, the data input port 200 to the input / output register cell IORC, the register designation input port 201, the cell input lines 203a, 203b, 203c, And a data output port 202 of the DRC, cell output lines 204a and 204b from each cell, a wiring region 205, and a wiring program element 206. The wiring program element 206 is provided in a switch element for determining wirings among the wiring regions 205 and a storage element (for example, SRAM, Flash memory, etc.) not shown in order to store the on / off states of these switch elements. It is composed by.

DRC에의 데이터 입력 시에는 명령 디코더(IDC)로부터 레지스터 지정 입력포트(201)에 레지스터 지정신호가 입력되고, 1개의 입출력 레지스터·셀(IORC)이 선택된다. 데이터는 데이터 입력포트(200)에 의해 입력되고, 선택된 입출력 레지스터·셀(IORC)에만 입력된다. 또, DRC로부터의 데이터의 출력 시에는 명령 디코더(IDC)에서 레지스터 지정 입력포트(201)에 레지스터 지정신호가 입력된다. 이들에 의해 출력셀렉터(OSEL)가 전환되고, 1개의 입출력 레지스터·셀(IORC)의 출력이 선택된다. 데이터는 셀출력선(204a)에서 출력셀렉터(OSEL)로 들어가고, 선택된 데이터만 데이터 출력포트(202)에서 출력된다.When data is input to the DRC, a register designation signal is input from the instruction decoder IDC to the register designation input port 201, and one input / output register cell IOC is selected. Data is input by the data input port 200 and is input only to the selected input / output register cell IORC. When the data is output from the DRC, a register designation signal is input to the register designation input port 201 by the instruction decoder IDC. These switch the output selector OSEL and select the output of one input / output register cell IORC. Data enters the output selector OSEL from the cell output line 204a, and only selected data is output from the data output port 202.

도 4는 도 3의 입출력 레지스터·셀(IORC)의 구성을 나타내고 있다. 입출력 레지스터·셀(IORC)은 입력셀렉터(ISEL)와 셀·레지스터(CR)에 의해 구성되고 있다. 입력셀렉터(ISEL)는 레지스터 지정 입력포트(201)로부터의 입력에 따라, 배선으로부터의 셀입력선(203a) 또는 데이터 입력포트(200)로부터의 입력으로 전환한다. 입력셀렉터(ISEL)를 통하여 입력된 데이터는 셀·레지스터(CR)에 유지된다. 이 셀·레지스터(CR)는 클럭입력(301)과 동기하여 동작하고, 리세트 입력(302)에 의해 리세트된다. 또, 도 3에서는 클럭 및 리세트의 배선은 생략하고 있지만, 전체의 입출력 레지스터·셀(IORC)과 연산셀(CC)에 접속되어 있다. 셀·레지스터(CR)에 유지된 데이터는 셀출력선(204a)에서 외부로 출력된다.FIG. 4 shows the configuration of the input / output register cell IOC of FIG. 3. The input / output register cell IORC is constituted by the input selector ISEL and the cell register CR. The input selector ISEL switches to the cell input line 203a from the wiring or the input from the data input port 200 in accordance with the input from the register designation input port 201. Data input via the input selector ISEL is held in the cell register CR. This cell register CR operates in synchronization with the clock input 301 and is reset by the reset input 302. In addition, although the wiring of a clock and a reset is abbreviate | omitted in FIG. 3, it is connected to the whole input / output register cell IORC and arithmetic cell CC. Data held in the cell register CR is output to the outside from the cell output line 204a.

또, 본 실시예에서는 데이터는 8비트 단위로 입출력이 행해지고 있지만, 이 크기에는 한정되지 않는다.In the present embodiment, data is input and output in units of 8 bits, but the size is not limited.

도 5는 도 3의 연산셀(CC)의 구성을 나타내고 있다. 연산셀(CC)은 셀연산유닛(CALU)과, 플립·플롭(FF)과, 연산 프로그램 소자(400)로 구성된다. 셀연산유닛(CALU)은 CPU 내의 ALU와 동일한 기능을 가지고, 연산 프로그램 소자(400)에 의해 어떤 연산기능을 사용하는지를 설정한다. 셀연산유닛(CALU)의 실행가능한 논리합, 논리곱, 배타적 논리합이라는 논리연산, 가감승제라는 산술연산, 비교연산 중에서, 연산 프로그램 소자(400)는 셀연산유닛(CALU)이 실행하는 연산을 설정한다.FIG. 5 shows the configuration of arithmetic cells CC of FIG. 3. The operation cell CC is composed of a cell operation unit CALU, a flip-flop FF, and an operation program element 400. The cell operation unit CALU has the same function as the ALU in the CPU and sets which calculation function is used by the calculation program element 400. Among the operable ORs, ANDs, and exclusive ORs of the cell operation units CALU, the arithmetic operations called addition and subtraction, and the comparison operation, the operation program element 400 sets an operation performed by the cell operation unit CALU.

이와 같이, 연산셀(CC)의 연산 프로그램 소자(400)의 설정에 의해, 연산셀(CC)의 연산 내용을 결정할 수 있다. 또, 배선 프로그램 소자(206)의 설정에 의해, 즉 데이터를 입출력 레지스터·셀(IORC), 연산셀(CC)에 입력하는지, 또 입출력 레지스터·셀(IORC)의 데이터 또는 연산셀(CC)의 연산결과를 어디에 출력하는지를 설정할 수 있다. 이와 같이 DRC 재기록 데이터는 연산 프로그램 소자(400)의 설정치와 배선 프로그램 소자(206)의 설정치를 포함하고, 소망의 연산을 실행 가능하게 한다.In this way, the calculation contents of the calculation cell CC can be determined by setting the calculation program element 400 of the calculation cell CC. In addition, by setting the wiring program element 206, that is, data is inputted to the input / output register cell IORC and the operation cell CC, or the data of the input / output register cell IORC or the operation cell CC. You can set where to output the result. In this manner, the DRC rewrite data includes the setting value of the operation program element 400 and the setting value of the wiring program element 206, thereby enabling the desired calculation to be executed.

도 6에 재기록 판정유닛(CDU)의 구성을, 도 7에 재기록 판정유닛(CDU)의 동작을 나타낸다. 재기록 판정유닛(CDU)는 분기 어드레스 저장버퍼(BAB)와, 루프·카운터(LC)와, 명령 어드레스 판정유닛(IADU)과, DRC 상태 레지스터(DSR)와, 통상 SW 일시저장 버퍼(TBF)와, 분기 컨트롤러(BCL)로 구성된다. 더욱이, DRC 상태 레지스터(DSR)는 HW/SW 생성유닛(GU)의 상태를 나타내는 부분, DRC 드라이버 SW에의 분기 어드레스를 저장하는 부분 및 DRC 드라이버 SW로 치환하는 통상 SW의 다음의 명령이 있는 어드레스를 저장하는 부분의 3개 부분으로 구성된다.6 shows the configuration of the rewrite determination unit (CDU), and FIG. 7 shows the operation of the rewrite determination unit (CDU). The rewrite determination unit (CDU) includes a branch address storage buffer (BAB), a loop counter (LC), an instruction address determination unit (IADU), a DRC status register (DSR), a normal SW temporary buffer (TBF), , Branch controller (BCL). Moreover, the DRC status register DSR replaces an address having a portion indicating the state of the HW / SW generating unit GU, a portion storing a branch address to the DRC driver SW, and a next instruction of the normal SW to be replaced by the DRC driver SW. It consists of three parts of the part to be stored.

이하, 도 7에 재기록 판정유닛(CDU)의 동작을 설명한다. 우선, 명령캐시(ICH)로부터 명령버퍼(IBF)에 보내지는 명령을 명령 어드레스 판정유닛(IADU)에 취입한다(500). 명령 어드레스 판정유닛(IADU)은 명령패치·유닛(IFU) 중 프로그램·카운터(PC) 내의 어드레스를 추출하고, 그 현재 실행 중인 명령의 어드레스가 드라이버 SW 저장메모리(DSM)의 어드레스 영역에 해당하는지 아닌지를 판정한다(501).Hereinafter, the operation of the rewrite determination unit (CDU) is described in FIG. First, an instruction sent from the instruction cache ICH to the instruction buffer IBF is read into the instruction address determination unit IADU (500). The instruction address determination unit (IADU) extracts an address in the program counter PC from the instruction patch unit IFU, and whether the address of the currently executing instruction corresponds to the address area of the driver SW storage memory DSM. (501).

해당하는 경우는 현재 DRC 드라이버 SW를 실행 중인 것을 의미한다. 이 때, 루프 카운터(LC)가 이외의 값이면(502) DRC 드라이버 SW의 제 1 행의 명령(즉 도 8(C)의 제 1 행의 MOV 명령)이기 때문에, 루프·카운터(LC)를 0으로 리세트하고, 분기 컨트롤러(BCL)는 셀렉터(SEL)에 명령버퍼(IBF) 측으로 전환시킨다. 루프 카운터(LC)가 0의 경우에는 어느 것도 하지 않는다. 루프·카운터(LC)에는 통상 SW 중에 연솔해서 실행되는 루프의 회수가 유지되어 있고, 리세트 신호에 의해 리세트된다.In this case, it means that the DRC driver SW is currently running. At this time, if the loop counter LC is any other value (502), the loop counter LC is set because the instruction of the first row of the DRC driver SW (that is, the MOV instruction of the first row of FIG. 8C). Reset to zero, branch controller BCL switches selector SEL to command buffer IBF side. Do nothing if the loop counter LC is zero. In the loop counter LC, the number of loops that are normally executed in SW is kept and reset by the reset signal.

해당하지 않는 경우에는 현재 통상 SW를 실행 중인 것을 의미하므로, 명령 어드레스 판정유닛(IADU)은 명령이 조건분기 명령인지 아닌지를 판정한다. 조건분기 명령이 아니고, 또 이 때 루프·카운터(LC)의 값이 1이면, 제 2 회째의 루프를 실행하고 있게 된다. 그 때문에, 통상 SW를 취득하기 위해(도 2를 참조), 명령 어드레스 판정유닛(IADU)은 명령을 통상 SW 일시저장 버퍼(TBF)에 저장한다.If it is not applicable, it means that the normal SW is currently being executed, so the instruction address determination unit (IADU) determines whether the instruction is a conditional branch instruction. If it is not a conditional branch instruction and the value of the loop counter LC is 1 at this time, the second loop is executed. Therefore, in order to acquire the normal SW (see Fig. 2), the instruction address determination unit IADU stores the instruction in the normal SW temporary storage buffer TBF.

단계 505에서, 명령 어드레스 판정유닛(IADU)은 DRC 상태 레지스터(DSR)를 체크한다. DRC 상태 레지스터(DSR)는 DRC의 상태를 나타내는 제 1 레지스터와, DRC 드라이버 SW에의 분기 어드레스(예컨대 도 8(C)의 제 1 행의 MOV 명령이 저장된 어드레스)를 저장하는 제 2 레지스터와, DRC 드라이버 SW로 전환되는 통상 SW의 다음 어드레스(예컨대 도 8(A)의 L003:(제 19 행))를 저장하는 제 3 어드레스로 구성된다. 제 1 레지스터에는「DRC 이용불가」,「DRC 이용준비중」,「DRC 이용준비 완료」의 3 상태 중 어느 하나가 저장되어 있다. CPU 리세트를 받아 「DRC 이용불가」의 값으로 갱신되고, HW/SW 생성유닛(GU)에 의한 DRC 이용준비 개시 시에 「DRC 이용준비중」의 값으로 갱신되고, DRC 이용준비 완료 시에 「DRC 이용준비 완료」의 값으로 갱신된다. DRC 이용준비 완료 시에 제 2 어드레스는 갱신되고, GU에의 동작개시의 통지 시에 제 3 어드레스는 경신된다.In step 505, the command address determining unit IADU checks the DRC status register DSR. The DRC status register (DSR) is a first register indicating the state of the DRC, a second register for storing a branch address (for example, an address where the MOV instruction in the first row of FIG. 8C is stored) to the DRC driver SW, and a DRC It consists of a 3rd address which stores the next address (for example, L003: (19th line) of FIG. 8 (A)) of the normal SW switched to the driver SW. The first register stores one of three states: "DRC unavailable", "DRC ready" and "DRC ready". Receives a CPU reset and updates it to the value of "DRC not available", updates it to the value of "DRC ready to use" at the start of DRC ready by the HW / SW generation unit (GU), and at the completion of DRC ready to use DRC ready to use ”is updated. Upon completion of the DRC usage preparation, the second address is updated, and upon notification of the start of operation to the GU, the third address is updated.

DRC 상태 레지스터(DSR)의 제 1 레지스터가 「DRC 이용준비 완료」의 값이면, 분기 컨트롤러(BCL)는 명령패치·유닛(IFU)을 통하여 셀렉터(SEL)를 DRC 제어유닛(CDU)에 전환하고, 재기록 판정유닛(CDU)으로부터의 출력을 명령 디코더(IDC)에 연결하도록 한다. 그 후, 분기명령의 분기 선 어드레스를 드라이버 SW 저장메모리(DSM) 내의 DRC 드라이버 SW의 선두 어드레스로 변경한 분기명령을 보낸다. If the first register of the DRC status register DSR is the value of "DRC ready to use", the branch controller BCL switches the selector SEL to the DRC control unit CDU via the command patch unit IFU. The output from the rewrite determination unit (CDU) is connected to the command decoder (IDC). Thereafter, a branch instruction is performed in which the branch line address of the branch instruction is changed to the head address of the DRC driver SW in the driver SW storage memory (DSM).

DRC 상태 레지스터(DSR)의 제 1 레지스터가 「DRC 이용준비 완료」의 값 이외이면, 루프의 존재 판정을 행한다(도 2에서 가결정 처리). 우선, 명령 어드레스 판정유닛(IADU)은 현재의 프로그램·카운터(PC)와 분기 선 어드레스를 비교한다(513). 분기 선 어드레스 쪽이 큰 경우는 루프는 존재하지 않으므로, 루프·카운터(LC)를 0으로 한다(514). 프로그램·카운터(PC) 쪽이 큰 경우에는 또 명령 어드레스 판정유닛(IADU)은 분기 어드레스·버퍼(BAB)에 저장된 분기 선 어드레스와, 분기명령의 분기 선(先)을 비교한다. 분기 어드레스·버퍼(BAB)는 분기명령을 실행한 경우에 그 분기 선 어드레스를 상신 유지하는 버퍼이다. 따라서, 분기 선이 분기 어드레스·버퍼(BAB)의 어드레스와 같다면, 루프의 존재를 결정하고, DRC 재기록 데이터, DRC 드라이버 SW의 생성처리로 이동한다. 구체적으로는, 루프·카운터에 1을 가산하고(509), 그 값이 2이면(510), 명령 어드레스 판정유닛(IADU)은 분기명령을 통상 SW 일시저장 버퍼(TBF)에 저장하고, DRC 상태 레지스터(DSR)의 제 3 레지스터에 현재의 PC 값을 1개 진행한 값(예컨대 도 8(A)의 L003:(제 19 행)의 어드레스)을 대입하여, HW/SW 생성유닛(GU)에 대하여 DRC 이용준비의 개시신호를 보낸다(511).If the first register of the DRC status register (DSR) is other than the value of &quot; DRC ready to use &quot;, the existence of a loop is determined (temporary decision processing in Fig. 2). First, the instruction address determination unit IADU compares the current program counter PC with the branch line address (513). If the branch line address is larger, since there is no loop, the loop counter LC is set to 0 (514). When the program counter PC is larger, the instruction address determination unit IADU further compares the branch line address stored in the branch address buffer BAB with the branch line of the branch instruction. The branch address buffer (BAB) is a buffer which holds the branch line address up to date when a branch instruction is executed. Therefore, if the branch line is the same as the address of the branch address buffer BAB, the existence of the loop is determined, and the process moves to the generation process of the DRC rewrite data and the DRC driver SW. Specifically, 1 is added to the loop counter (509), and if the value is 2 (510), the instruction address determination unit (IADU) stores the branch instruction in the normal SW temporary storage buffer (TBF), and the DRC state. A value obtained by advancing one current PC value (e.g., address L003: (19th line) in Fig. 8A) into the third register of the register DSR is inputted to the HW / SW generation unit GU. In response to the start of the DRC ready signal is sent (511).

한편, 분기 선이 분기 어드레스·버퍼(BAB)의 어드레스와 다르게 되면, 새로운루프 존재의 가능성이 있다. 그런데, 명령 어드레스 판정유닛(IADU)은 루프·카운터(LC)에 1을 대입하고, 통상 SW 일시저장 버퍼(TBF)를 일괄 클리어한다.On the other hand, if the branch line is different from the address of the branch address buffer BAB, there is a possibility that a new loop exists. By the way, the instruction address determination unit IADU substitutes 1 into the loop counter LC to clear the normal SW temporary storage buffer TBF collectively.

상기 동작을 도 8의 프로그램 예에 의거하여 설명하면 이하와 같게 된다.The above operation will be described based on the program example of FIG. 8.

제 1 회째의 루프 실행에서는, 도 8(A)의 제 1 행~제 17 행의 명령은 루프·카운터(LC)는 0이고, 도 7의 플로우에서는 어떤 것도 실행되지 않는다. 18행째의 조건분기 명령(BF)이 취입되면, 루프·카운터(LC)를 1로 하는 동시에(508), 분기 선 어드레스(제 4 행)가 분기 어드레스·버퍼(BAB)에 상신된다. In the first loop execution, the instruction in the first to seventeenth lines of FIG. 8A is 0 in the loop counter LC, and nothing is executed in the flow of FIG. When the conditional branch instruction BF of the 18th line is accepted, the loop counter LC is set to 1 (508), and the branch line address (fourth line) is updated in the branch address buffer BAB.

제 2 회째의 루프 실행에서는, 제 5 행~제 17 행째의 각 명령은 루프·카운터(LC)가 1이므로, 통상 SW 일시저장 버퍼(TBF)에 저장된다(504). 제 18 행째의 조건분기 명령(BF)이 취입되면, 그 분기 선 어드레스와 분기 어드레스·버퍼(BAB)에 저장된 어드레스는 일치하므로(507), 루프·카운터(LC)를 2로(509) 하여, 조건분기 명령(BF)을 통상 SW 일시저장 버퍼(TBF)에 보내는 동시에, HW/SW 생성유닛(GU)에 DRC 이용준비를 개시시킨다(510, 511).In the second loop execution, the instructions of the fifth to seventeenth lines are stored in the SW temporary storage buffer TBF because the loop counter LC is 1 (504). When the conditional branch instruction BF of the eighteenth line is accepted, the branch line address and the address stored in the branch address buffer BAB match (507), so that the loop counter LC is set to 2 (509), The conditional branch instruction BF is sent to the normal SW temporary storage buffer TBF, and the HW / SW generation unit GU starts to prepare for DRC use (510, 511).

제 3 회째의 루프 실행에서는, 제 5 행~제 17 행째의 각 명령은 루프·카운터(LC)가 2이므로, 도 7의 플로우에서는 어떤 것도 실행되지 않는다. 제 18 행째의 조건분기 명령(BF)이 취입되고, DRC가 이용 가능한 상태로 되어 있다면, 분기명령의 분기 선 어드레스를 DRC 드라이버 SW의 선두 어드레스(도 8(C)의 제 1 행)로 변경하는 것으로, 이후의 루프 실행은 DRC를 이용하여 행해진다.In the third loop execution, since the loop counter LC is 2 for each of the fifth to seventeenth lines, nothing is executed in the flow of FIG. If the conditional branch instruction BF of the eighteenth row is accepted and the DRC is in a usable state, the branch line address of the branch instruction is changed to the head address of the DRC driver SW (the first row in Fig. 8C). The subsequent loop execution is done using DRC.

DRC 드라이버 SW의 실행에서는, JMP명령(도 8(C)의 제 15 행)에 의해 통상 SW의 L003(도 8(A)의 제 19 행)으로 분기하고, 통상 SW의 실행으로 복귀한다.In the execution of the DRC driver SW, the program branches to L003 (the 19th line in FIG. 8A) of the normal SW by a JMP instruction (the 15th line in FIG. 8C), and returns to the execution of the normal SW.

다음에, HW/SW 생성유닛(GU)의 동작을 도 9의 플로우도를 기초로 설명한다. HW/SW 생성유닛(GU)은 재기록 판정유닛(CDU)으로부터 명령을 받고, 통상 SW 일시저장 버퍼(TBF)로부터 통상 SW(도 8(B))를 취득하는 동시에, DRC 상태 레지스터(DSR)의 제 1 레지스터에는 「DRC 이용준비중」의 값을 입력한다(600).Next, the operation of the HW / SW generation unit GU will be described based on the flowchart of FIG. The HW / SW generation unit (GU) receives a command from the rewrite determination unit (CDU), acquires the normal SW (Fig. 8 (B)) from the normal SW temporary storage buffer TBF, and simultaneously stores the DRC status register DSR. A value of "DRC ready for use" is input to the first register (600).

HW/SW 생성유닛(GU)은, 우선 취득한 통상 SW로부터 도 10에 나타낸 바와 같이 CDFG(Control Data Flow Graph)를 작성한다(601). CDFG는 입력된 통상 SW 중 각 명령을 노드(명령)에서, 명령 오퍼랜드의 데이터 의존관계를 엣지(화살표)로 나타낸 것이다. 또, 도 10에서 블럭의 괄호 내의 숫자는 도 8(B)에 대응하는 행수를 나타내고 있다.The HW / SW generation unit GU first creates a CDFG (Control Data Flow Graph) from the acquired normal SW as shown in FIG. 10 (601). In the CDFG, each command of the inputted normal SW is represented at the node (command), and the data dependency relation of the command operand is indicated at the edge (arrow). In Fig. 10, numerals in parentheses in the block indicate the number of rows corresponding to Fig. 8B.

도 10은, 도 8(B)의 통상 SW로부터 그대로 CDFG를 작성한 것이다. 의존관계에는, 「제어 상의 의존관계」와「데이터 상의 의존관계」의 2종류가 있다. 「제어 상의 의존관계」란, 예컨대 DT명령으로 레지스터(R0)의 값을 설정하고, 레지스터(R0)의 값에 따라서 조건분기 명령(BF)을 실행한다는 의존관계이다. 이것은 범용 프로세서의 명령세트에 의존하는 것이고, 미리 의존관계를 등록하여 둘 필요가 있다. 「데이터 상의 의존관계」는, 예컨대 MOV명령으로 전송된 데이터를 이용하여 SUB에서 연산을 행한다는 의존관계이다. 따라서, 프로그램의 내용에 의해 결정할 필요가 있다. 오퍼랜드에 다른 명령의 오퍼랜드와 의존관계가 없는 것을 최상위에 위치하고, 의존관계에 따라 보다 하위에 위치한다. 「데이터 상의 의존관계」는 구체적으로 이하와 같이 하여 결정한다.Fig. 10 shows the CDFG as it is from the normal SW of Fig. 8B. There are two types of dependency relationships: "dependency on control" and "dependency on data". The "control dependency" is a dependency relationship that sets the value of the register R0 by a DT instruction and executes the conditional branch instruction BF in accordance with the value of the register R0. This depends on the instruction set of the general purpose processor and needs to register the dependency in advance. The "dependency relationship on data" is a dependency relationship that, for example, performs calculation in the SUB using data transmitted by the MOV instruction. Therefore, it is necessary to determine by the contents of the program. The operand does not have any dependencies with the operands of other instructions, and it is located at the top and lower according to the dependency. The "dependency on data" is specifically determined as follows.

도 8(B) 제 2 행~제 4 행, 제 10 행의 명령의 오퍼랜드는 그것보다 앞의 명령의 오퍼랜드에 의존관계가 없기 때문에, 같은 열에 위치한다. 「MOV@R6, R2」란 「레지스터(R6)의 지시하는 어드레스에 저장된 데이터를 레지스터(R2)에 전송하기」라는 의미이다. 즉, 오퍼랜드의 오른쪽 값이 @을 포함하는 MOV명령은 외부로부터 레지스터에 데이터를 판독한다는 명령이고, 또 @에 따른 오퍼랜드는 도 8(B) 내에서 처음 출현하기 때문에, 「데이터 상의 의존관계」로서는 최상위에 위치하게 된다. 제 5 행의 명령 「MUL」은 레지스터(R2, R3)의 데이터를 이용하므로, 제 3 행~제 4 행의 명령과 의존관계를 갖는다. 제 7 행의 명령은 「MUL」의 실행결과는 레지스터(MACL)에 입력되기 때문에, 레지스터(MACL)의 데이터를 레지스터(R7)에 전송하기 위한 것이다.8 (B) The operands of the instructions in the second to fourth and tenth lines are located in the same column because they have no dependency on the operand of the instruction preceding it. "MOV @ R6, R2" means "transferring the data stored at the address indicated by the register R6 to the register R2." That is, the MOV instruction whose right value of the operand contains @ is an instruction to read data from the outside into a register, and since the operand according to @ first appears in FIG. It is located at the top. Since the instruction "MUL" in the fifth row uses the data in the registers R2 and R3, it has a dependency relationship with the instructions in the third to fourth rows. The instruction in the seventh line is for transferring the data of the register MACL to the register R7 because the execution result of "MUL" is input to the register MACL.

이하의 프로그램에 대하여도 마찬가지로 하여 의존관계를 결정하지만, 엣지의 결정에는 동일한 레지스터 이름이라도 내용이 갱신되어 있는 경우가 있는 것에 주의할 필요가 있다. 예를 들어, 제 8 행의 「SUB R7, R1」은 「레지스터(R7)의 데이터와 레지스터(R1)의 데이터의 차이를 레지스터(R1)에 저장한다」라는 의미이다. 제 8 행의 명령의 실행에 의해 데이터가 갱신되므로, 제 9 행의 「MOW R1, @R5」는 제 8 행의 명령과 의존관계는 있지만, 제 6 행의「MOW @R4, R1」과는 의존관계가 존재하지 않는다.Similarly, the following program is used to determine the dependency relationship. However, it is necessary to note that the contents of the same register name may be updated when determining the edge. For example, "SUB R7 and R1" in the eighth row means "store the difference between the data of the register R7 and the data of the register R1 in the register R1". Since the data is updated by the execution of the instruction in the eighth row, "MOW R1 and @ R5" in the ninth row is dependent on the instruction in the eighth row, but is different from the "MOW @ R4 and R1" in the sixth row. There is no dependency.

이와 같이, 착안하는 명령에 대하여, 그 이전에 실행된 명령 중, 오퍼랜드에 공통의 레지스터 이름을 가지는 명령과 의존관계를 설정하는 것으로 CDFG를 작성할 수 있다. 다만, 공통의 레지스터 이름을 가지는 명령이 복수인 경우에는 레지스터의 데이터가 갱신되는 가능성을 고려하여, 직전에 실행된 명령과의 사이에 의존관계를 설정한다.In this way, the CDFG can be created by setting a dependency relationship with an instruction having a common register name among the instructions executed before the instruction to be considered. However, when there are a plurality of instructions having a common register name, a dependency relationship is set between the instructions executed immediately before in consideration of the possibility of updating the register data.

도 10의 CDFG를 축약한 것이 도 11의 CDFG이다. 축약하는 것으로 DRC의 회로 구성을 단순하게 하고, DRC에서의 연산처리가 고속으로 행해진다는 효과가 있다.CDFG in FIG. 10 is abbreviated as CDFG in FIG. In short, the circuit configuration of the DRC is simplified, and the arithmetic processing in the DRC is performed at high speed.

제 1 축약의 형태가 701의 2명령(도 10)을 801의 1명령(도 11)으로 축약하는 것이다. STS명령은 일체의 연산처리를 행하지 않고 데이터를 레지스터 사이에서 전송하는 명령이다. 이와 같은 전송은 범용 프로세서에서 처리하는 경우에는 명령세트의 구성상 필요로 하는 명령에서는 있는 것이지만, DRC에서 처리하는 경우에는 직접 필요한 데이터의 저장된 레지스터와 연산셀을 접속하도록 하면 되기 때문에, 이와 같은 명령을 DRC의 구성에 반영시킬 필요는 없다. 이와 같이, 데이터를 레지스터 사이에서 전송하는 명령은 미리 축약대상으로 하는 명령으로서 사전에 등록하여 둔 것으로 제 1 축약을 실행할 수 있다.The first form of abbreviation is to abbreviate 2 instructions (FIG. 10) of 701 to 1 instructions (FIG. 11) of 801. FIG. The STS instruction is an instruction to transfer data between registers without performing any operation processing. Such a transfer may be performed by an instruction set required by the instruction set when the general purpose processor processes it. However, when a DRC process is performed, the register stored in the necessary data and the operation cell may be directly connected. It does not need to be reflected in the composition of the DRC. In this way, the command for transferring data between registers is a command to be abbreviated in advance, and is registered in advance, so that the first abbreviation can be executed.

제 2 축약의 형태가 702의 4명령(도 10)을 802의 3명령(도 11)으로 축약하는 것이다. 범용 프로세서에서는 시계열에서 처리가 되기 때문에, 레지스터 이름이 달라도 그 내용이 동일한 것이 발생한다. DRC에서 처리하는 경우에는 필요한 데이터의 저장된 레지스터와 연산셀을 접속하도록 하면 되기 때문에, 이와 같은 레지스터 이름의 차이를 DRC의 구성에 반영시킬 필요는 없다. 그 때문에, 연산명령(도 8의 예에서는 MUL명령, ADD명령, SUB명령)에 대해서는, 그 레지스터의 데이터의 내용을 비교하여, 레지스터가 다르더라도 동일한 데이터가 저장되어 있는 경우에는 축약하도록 한다. 예컨대, 제 8 행의 SUB명령과 제 11 행의 ADD명령의 오퍼랜드는 레지스터(R7)가 공통이고, 레지스터(R1), 레지스터(R3)에서 다르게 되어 있다. 그러나, 각각 데이터 상의 의존관계를 취하면 어떤 레지스터에 저장된 내용도 「레지스터(R4)의 지시하는 어드레스에 저장된 데이터」이기 때문에, 상기와 같은 축약이 가능하게 된다.The second form of abbreviation is to abbreviate 4 instructions 702 (FIG. 10) to 802 3 instructions (FIG. 11). In general-purpose processors, because they are processed in time series, the contents of the register can be the same even if the register names are different. In the case of processing by the DRC, it is not necessary to reflect such a difference in register names in the structure of the DRC because the registers and data cells stored in necessary data may be connected. Therefore, for arithmetic instructions (MUL instruction, ADD instruction, and SUB instruction in the example of FIG. 8), the contents of the data of the registers are compared, and abbreviated when the same data is stored even if the registers are different. For example, the operands of the SUB instruction in the eighth row and the ADD instruction in the eleventh row have a common register R7 and are different in the registers R1 and R3. However, if the dependence on each data is taken, the contents stored in any register are &quot; data stored at the address indicated by the register R4, &quot;

다음에, HW/SW 생성유닛(GU)은 단계(601)에서 작성한 도 11에 나타내는 CDFG의 각 노드에 대하여, 스케쥴링, 즉 하드웨어·리소스의 제약을 고려한 후에 각 노드를 실행하는 클럭·사이클의 할당을 행한다(602).Next, the HW / SW generation unit GU allocates a clock cycle to each node of the CDFG shown in FIG. 11 created in step 601 after scheduling, that is, considering hardware resource constraints. (602).

이 스케쥴링의 한 방법으로서 ALAP 알고리즘과 ASAP 알고리즘을 도 11의 CDFG에 대하여 병용하여 적용한 예를 도 12 및 도 13에 나타낸다. ALAP(As Late As Possible) 알고리즘은 동시에 실행 가능한 명령을 뒤에서부터 채워가는 스케줄링이다. 동시에 실행할 수 없는 명령의 제1은 상호 의존관계에 있는 명령이다. 제2는 DRC의 외부에 액세스하는 명령은 그 사이클에 1개 밖에 실행할 수 없다. 이 결과가 도 12이다.12 and 13 show examples in which the ALAP algorithm and the ASAP algorithm are used in combination with the CDFG of FIG. 11 as a method of scheduling. As Late As Possible (ALAP) algorithm is a scheduling that fills the back of concurrently executable instructions. The first of the commands that cannot be executed at the same time is the commands that are in interdependence. The second is that only one instruction that accesses the outside of the DRC can be executed in the cycle. This result is shown in FIG.

더욱이, 도 12의 스케쥴링에 대하여, 동시에 실행가능한 명령을 앞에서부터 채워가는 ASAP(As Soon As Possible) 알고리즘을 적용한 것이 도 13이다. 가능한한, 명령을 실행하는 사이클을 앞에 채우는 것에 의해 처리시간에 여유가 생긴다.Moreover, FIG. 13 applies the As Soon As Possible (ASAP) algorithm that fills the concurrently executable instructions from the front with respect to the scheduling of FIG. 12. As much as possible, the processing time is spared by prepending the cycle of executing the instruction.

1 사이클에 포함되는 명령은 1 클럭·사이클에서 실행할 수 있고, 사이클 1~8의 8 클럭·사이클에서 전체의 명령을 실행할 수 있다.Instructions included in one cycle can be executed in one clock cycle, and the entire instruction can be executed in eight clock cycles in cycles 1 to 8.

HW/SW 생성유닛(GU)은 도 13에 나타내는 스케쥴링된 CDFG에서, DRC 재기록 데이터를 생성한다. 구체적으로, 이하와 같다. 노드 부분을 입출력 레지스터·셀(IORC) 및 연산셀(CC)에 할당한다. MOV명령에 대하여는 입출력 레지스터·셀(IORC)을 할당하고, 연산명령에 대하여는 연산셀(CC)을 할당한다. 연산명령의 내용에 따라, 연산셀의 연산내용의 설정을 행하는 연산 프로그램 소자(400)의 설정 데이터를 작성한다. 또, CDFG의 엣지는 데이터의 흐름을 나타내고 있으므로, CDFG의 엣지의 접속관계에 따라서, 입출력 레지스터·셀(IORC) 및 연산셀(CC)이 상호 배선되도록, 배선 프로그램 소자(206)의 설정 데이터를 작성한다(603). 이 연산 프로그램 소자(400)의 설정 데이터 및 배선 프로그램 소자(206)의 설정 데이터가 DRC 재기록 데이터이다. The HW / SW generation unit GU generates DRC rewritable data in the scheduled CDFG shown in FIG. Specifically, it is as follows. The node portion is allocated to the input / output register cell (IORC) and arithmetic cell (CC). The input / output register cell (IORC) is allocated to the MOV instruction, and the operation cell (CC) is allocated to the operation instruction. According to the contents of the calculation instruction, setting data of the calculation program element 400 for setting the calculation contents of the calculation cell is created. In addition, since the edge of the CDFG represents the flow of data, the setting data of the wiring program element 206 is set so that the input / output register cell IORC and the operation cell CC are interconnected in accordance with the connection relationship of the edges of the CDFG. (603). The setting data of the arithmetic program element 400 and the setting data of the wiring program element 206 are DRC rewrite data.

HW/SW 생성유닛(GU)은 DRC 재기록 데이터에 따라 DRC의 연산 프로그램 소자(303)와 배선 프로그램 소자(206)를 재기록한다(604). 이것과 병행하여 DRC 드라이버 SW의 작성을 행한다(605).The HW / SW generation unit GU rewrites the operation program element 303 and the wiring program element 206 of the DRC according to the DRC rewrite data (604). In parallel with this, a DRC driver SW is created (605).

DRC 드라이버 SW의 작성방법에 대하여 설명한다. 도 13의 CDFG로부터 도 8(C)에 나타내는 DRC 드라이버 SW를 생성한다.How to create a DRC driver SW is described. The DRC driver SW shown in FIG. 8C is generated from the CDFG in FIG.

우선, 범용 레지스터(GR)에 저장되어 있는 데이터를 DRC의 입출력 레지스터·셀(IORC)로 이동시킬 필요가 있다. 예를 들어, 도 8(B) 제 3 행의「MOV @R6, R3」라는 명령은 「범용 레지스터(R6)가 지시하는 어드레스에 저장된 데이터를 범용 레지스터(R3)로 전송한다」명령이다. 이 명령을 DRC에서 실행하기 위해서는, 우선 범용 레지스터(R6)의 데이터를 DRC 중에 이동시켜 둘 필요가 있다. 따라서, 도 8(C) 제 1 행 「MOV R6, dR6」라는 명령이 마련된다. 이 명령은 「범용 레지스터(R6)에 저장된 데이터(어드레스)를 DRC의 입출력 레지스터·셀(dR6)로 전송한다」라는 의미이다. 이와 같은 명령이 도 8(C)의 제 1 행~제 3 행에 마련되어 있다.First, it is necessary to move the data stored in the general-purpose register GR to the input / output register cell IORC of the DRC. For example, the instruction "MOV @ R6, R3" in the third line of FIG. 8B is a "transfer data stored in the address indicated by the general register R6 to the general purpose register R3" instruction. In order to execute this instruction in the DRC, it is necessary to first move the data in the general register R6 during the DRC. Therefore, the instruction "MOV R6, dR6" of the 1st line of FIG. 8C is provided. This instruction means "transfer the data (address) stored in the general register R6 to the I / O register cell dR6 of the DRC." Such an instruction is provided in the first to third lines of Fig. 8C.

그 후, 도 13의 각 노드 중, DRC 이외에서 실행되는 명령이 DRC 드라이버 SW에 마련되어 있다. 도 8(C)의 제 5 행~제 12 행의 명령은 각각 도 13의 사이클 1~8에 포함되는 노드에 대응하고 있다.Subsequently, among the nodes shown in FIG. 13, a command to be executed other than the DRC is provided in the DRC driver SW. The commands in the fifth to twelfth rows in FIG. 8C correspond to nodes included in cycles 1 to 8 in FIG. 13, respectively.

도 8(C) 제 5 행「MOV @dR6, dR3」은 「입출력 레지스터·셀(dR6)이 지시하는 어드레스에 저장된 데이터를 입출력 레지스터·셀(dR3)로 전송한다」명령이고, 이것은 도 13의 사이클1의 「MOV @R6, R3」에 대응하고 있다. 이하 마찬가지지만, 예를 들어, 사이클3에서는「MOV @R4, R1」,「MUL」의 2개의 노드가 존재하고 있고, 후자는 DRC가 실행하는 명령이기 때문에, DRC 드라이버 SW에는 나타나지 않는다. 또, 사이클6은 「ADD」라는 DRC가 실행하는 명령밖에 존재하지 않는다. 그 경우에는, 빈 사이클이 발생하고 있는 것으로서, 노·오퍼레이션 명령(NOP)을 추가한다.(C) Fifth line "MOV @ dR6, dR3" is a "transfer data stored at the address indicated by the input / output register cell dR6 to the input / output register cell dR3" command, which is the same as that of FIG. It corresponds to "MOV @ R6, R3" of cycle 1. Although the same applies below, for example, in Cycle 3, two nodes, "MOV @ R4, R1" and "MUL" exist, and the latter is a command executed by the DRC, and thus does not appear in the DRC driver SW. In addition, cycle 6 contains only instructions executed by the DRC called "ADD". In that case, an empty operation has occurred, and a no operation instruction (NOP) is added.

또, 연산명령에 대하여는 DRC에서 실행시키기 위해서, 연산에 필요한 데이터는 범용 레지스터(GR)가 아니라, DRC의 입출력 레지스터·셀(IORC)에 저장하게 된다. 그 때문에, 연산실행 후의 값을 범용 레지스터(GR)에 되돌릴 필요가 있다. 따라서, 도 8(C)의 제 13 행과 제 14 행의 명령이 마련되어 있다. 예를 들어, 「MOV dR5, R5」는 「입출력 레지스터·셀(dR5)에 저장된 데이터를 범용 레지스터(R5)에 전송한다」명령이다.In order to execute arithmetic instructions in the DRC, data required for arithmetic operations are stored in the I / O register cell IRC of the DRC, not in the general purpose register GR. Therefore, it is necessary to return the value after the calculation execution to the general purpose register GR. Therefore, the instructions of the thirteenth row and the fourteenth row of Fig. 8C are provided. For example, "MOV dR5 and R5" is a "transfer data stored in the input / output register cell dR5 to the general purpose register R5" instruction.

마지막으로, 통상 SW의 실행으로 복귀하기 위해서, 통상 SW에서 조건분기 명령의 다음의 어드레스에의 무조건 분기명령(JMP)(도 8(C) 제 15 행)을 마련한다. 이 무조건 분기명령의 분기 선은 DRC 상태 레지스터의 제 3 레지스터에 저장된 어드레스로 한다.Finally, in order to return to the execution of the normal SW, the unconditional branch instruction JMP (the 15th line in FIG. 8C) from the normal SW to the next address of the conditional branch instruction is provided. The branch line of this unconditional branch instruction is an address stored in the third register of the DRC status register.

이와 같이, 도 13의 스케쥴링된 CDFG를 기본으로 도 8(C)의 DRC 드라이버 SW로 생성하고 있다. 캐시의 미스나 인터럽트 등의 외적 요인을 배제하여 고려하면, 본래 통상 SW가 일회의 루프 실행으로 14 사이클 필요하였던 것에 대해서, 루프의 코어부분(도 8(C)의 제 5 행~제 12 행)의 8 사이클로 실행할 수 있다.In this way, the scheduled CDFG of FIG. 13 is generated by the DRC driver SW of FIG. 8C. Taking into account external factors such as cache misses and interrupts, the core portion of the loop is originally required for 14 cycles in a single loop execution (lines 5 to 12 of Fig. 8C). Can be run in 8 cycles.

작성된 DRC 드라이버 SW는 드라이버 SW 저장메모리(DSM)에 저장된다. 저장하는 장소는 초회라면 드라이버 SW 저장메모리(DSM)의 선두 어드레스로 하고, 이후는 전회 기록된 부분의 뒤에 기록한다. 기록 영역이 충분하지 않은 경우에는 다시 드라이버 SW 저장메모리(DSM)의 선두 어드레스부터 기록하도록 한다.The created DRC driver SW is stored in the driver SW storage memory (DSM). The storage destination is the first address of the driver SW storage memory (DSM) if it is the first time, and the data is recorded after the last recorded part. If there is not enough recording area, data is written again from the head address of the driver SW storage memory (DSM).

단계 605까지 종료하면, HW/SW 생성유닛(GU)은 DRC 상태 레지스터(DSR)의 제 1 레지스터에 「DRC 이용준비 완료」의 값을 기록하고, DRC 상태 레지스터(DSR)의 제 2 레지스터에 단계 605에서 작성한 DRC 드라이버 SW의 저장된 메모리의 선두 어드레스를 기록한다(606).Upon completion of step 605, the HW / SW generation unit GU writes a value of "DRC ready to use" in the first register of the DRC status register DSR, and steps to the second register of the DRC status register DSR. The head address of the memory stored in the DRC driver SW created in step 605 is recorded (606).

이상에 서술한 플로우에 따라 HW/SW 생성유닛(GU)을 동작시키는 것에 의해, 프로그램 실행 시에 자동적으로 DRC 재기록 데이터 작성 및 재기록과, DRC 드라이버 SW 작성을 행할 수 있다.By operating the HW / SW generation unit GU in accordance with the above-described flow, DRC rewrite data creation and rewriting and DRC driver SW creation can be performed automatically at the time of program execution.

도 14를 이용하여 도 1의 구성의 변형예를 설명한다. 이 실시예는, 도 1에 나타낸 제 1 실시예의 DRC, 재기록 판정유닛(CDU), HW/SW 생성유닛(GU)을 CPU(101)로부터 분리한 예이다. 구체적으로는, DRC를 프로세서·버스(PRCB)에 접속하고, 셀렉터(SEL)의 제어를 재기록 판정유닛(CDU)이 직접 제어한다. 또, 명령버퍼(IBF)를 셀렉터(SEL)의 뒤에 배치하고 있다.The modification of the structure of FIG. 1 is demonstrated using FIG. This embodiment is an example in which the DRC, rewrite determination unit (CDU), and HW / SW generation unit (GU) of the first embodiment shown in FIG. 1 are separated from the CPU 101. Specifically, the DRC is connected to the processor bus PRCB, and the rewrite determination unit CDU directly controls the control of the selector SEL. The command buffer IBF is placed behind the selector SEL.

도 1의 구성과의 동작의 차이는, DRC의 입출력 레지스터·셀(IORC)에의 액세스가 어드레스를 지정하여 행해지는 것이다. 예를 들어, 도 8(C)의 DRC 드라이버 SW의 제 1 행째의 [MOW R6 dR6]등과 같은 DRC의 입출력 레지스터·셀(IORC)에 액세스하고 있는 명령은, DRC가 직접 프로세서·버스(PRCB)에 접속하고 있기 때문에, 입출력 레지스터·셀(IORC)의 어드레스가 직접 지정 되지 않고, 간접 지정된다. 예컨대, [MOV R6 @R12]와 같은 어드레스 지정이 된다. 이 명령은, 범용 레지스터(R6)의 데이터를 범용 레지스터(R12)에 지시되는 입출력 레지스터·셀(IORC)에 전송하는 것을 의미하고 있다.The difference in operation from the configuration in FIG. 1 is that access to the input / output register cell (IORC) of the DRC is performed by designating an address. For example, an instruction that accesses an input / output register cell (IORC) of a DRC such as [MOW R6 dR6] on the first line of the DRC driver SW in FIG. Since it is connected to, the address of the input / output register cell (IORC) is not directly specified, but indirectly. For example, addressing such as [MOV R6 @ R12] is performed. This instruction means that the data of the general purpose register R6 is transferred to the input / output register cell IORC indicated by the general purpose register R12.

이 변형예에서는, DRC를 CPU의 외부에 배치하는 것으로, 도 1의 구성과 비교하여 DRC의 사이즈를 크게 하는 것이 가능하다. 또, DRC와, 재기록 판정유닛(CDU)과, HW/SW 생성유닛(GU)이 CPU(101)와 분리되어 있기 때문에, 설계의 변경이 용이하다. 더욱이, CPU 이외의 모듈이 DRC를 이용하는 것도 가능하다. 예를 들어, 다이렉트·메모리·액세스·컨트롤러(DMAC)에 의해, DRC 상의 입출력 레지스터셀(IOR)에 액세스하여 DRC를 이용할 수 있다. 이 경우에는, DRC와 CPU(101)에서 다른 처리를 동시에 실행시키는 것도 가능하다.In this modification, by arranging the DRC outside the CPU, it is possible to increase the size of the DRC as compared with the configuration of FIG. In addition, since the DRC, the rewrite determination unit (CDU), and the HW / SW generation unit (GU) are separated from the CPU 101, the design can be easily changed. Moreover, it is also possible for modules other than the CPU to use the DRC. For example, the direct memory access controller (DMAC) can access the input / output register cell (IOR) on the DRC to use the DRC. In this case, it is also possible to execute different processes simultaneously in the DRC and the CPU 101.

도 15를 이용하여 도 1의 구성의 또 다른 변형예를 설명한다. 이 구성예에서는, 도 1에 나타낸 DRC 제어유닛(102)의 기능을, DRC 제어전용 프로세서(DCP)에서 실현하고 있는 점이 다르다. 본 구성예에서는, DRC 제어유닛(102)의 기능을 DRC 제어전용 프로세서(DCP)에서 실장하기 때문에, 그 내부의 재기록 판정유닛(CDU) 및 HW/SW 생성유닛(GU)의 동작을 소프트웨어로 실현한다. 따라서, DRC 제어전용 프로세서(DCP)의 소프트웨어를 교체만으로 용이하게 DRC 제어유닛(102)을 갱신할 수 있고, 본 기술을 이용한 LSI칩 제조 후에도 본 LSI의 기능을 향상시키는 것이 가능하게 된다. 물론, 도 14의 구성과 도 15의 구성을 조합하여 실시하는 것도 가능하다.Another modification of the structure of FIG. 1 is demonstrated using FIG. In this configuration example, the function of the DRC control unit 102 shown in FIG. 1 is realized by the DRC control dedicated processor (DCP). In this configuration example, since the functions of the DRC control unit 102 are implemented in a DRC control dedicated processor (DCP), the operations of the internal rewrite determination unit (CDU) and the HW / SW generation unit (GU) are realized in software. do. Therefore, the DRC control unit 102 can be easily updated by simply replacing the software of the DRC control dedicated processor (DCP), and the function of the LSI can be improved even after the LSI chip is manufactured using the present technology. Of course, it is also possible to implement combining the structure of FIG. 14 and the structure of FIG.

더욱이, 본 발명은 여러가지 변형이 가능하다. 예를 들어, 실행하는 통상 SW를 예비적으로 실행해놓고, DRC 재기록 데이터 및 DRC 드라이버 SW를 미리 등록하여 두도록 하여도 된다. 이 경우는 통상 SW의 실행 중에 DRC 재기록 데이터 및 DRC 드라이버 SW의 생성처리가 불필요하게 되기 때문에, 제 2 회째 루프로부터 DRC를 이용한 연산처리가 행해진다.Moreover, the present invention can be modified in various ways. For example, the normal SW to be executed may be preliminarily executed, and the DRC rewrite data and the DRC driver SW may be registered in advance. In this case, since the process of generating the DRC rewrite data and the DRC driver SW becomes unnecessary during execution of the normal SW, the arithmetic processing using the DRC is performed from the second loop.

본 발명의 구성에 의해, 프로세서와 DRC를 탑재하는 반도체장치에서, 소프트웨어로부터 DRC 재기록 데이터와 DRC 드라이버 SW를 자동생성하는 것이 가능하게 된다. 이러한 구성에 의해, DRC를 이용하는 경우에도 DRC에 맞춘 전용 프로그램을 기술할 필요가 없고, 소프트웨어의 호환성을 유지할 수 있다. 이와 같이, 소프트웨어의 호환성을 유지하는 것으로, 기존 소프트웨어 자산을 유용하면서 적어도 동일한 명령세트로 기능할 프로세서라면 동일한 소프트웨어를 이용할 수 있다.According to the configuration of the present invention, it is possible to automatically generate DRC rewritable data and DRC driver SW from software in a semiconductor device equipped with a processor and a DRC. With this configuration, even when using the DRC, it is not necessary to describe a dedicated program suitable for the DRC, and software compatibility can be maintained. As such, maintaining the compatibility of the software allows the same software to be used as long as the processor is useful and will function at least with the same instruction set.

본 발명은, 특히 복수회 반복되는 소프트웨어(예컨대, 루프를 형성하고 있는 소프트웨어)에 유효하고, 이와 같은 루프는 화상처리나 음성처리에서 잘 나타내는 처리이다.The present invention is particularly effective for software that is repeated a plurality of times (e.g., software that forms a loop), and such a loop is a process well represented in image processing or audio processing.

Claims (12)

연산명령을 포함하는 소프트웨어를 실행하는 반도체장치로서,A semiconductor device that executes software containing operation instructions, 레지스터와,Registers, 연산기와,With a calculator, 복수의 연산셀과 복수의 레지스터셀을 포함하고, 상기 연산셀이 실행하는 연산종류와 상기 복수의 연산셀 및 상기 복수의 레지스터셀 사이의 배선접속을 설정가능한 연산회로와,An arithmetic circuit comprising a plurality of arithmetic cells and a plurality of register cells, the arithmetic circuit capable of setting the types of arithmetic operations executed by the arithmetic cells and wiring connections between the arithmetic cells and the plurality of register cells; 상기 소프트웨어에 의거하여, 상기 연산셀의 상기 연산종류 및 상기 배선접속을 설정하는 설정데이터와, 상기 연산회로를 이용하여 상기 소프트웨어와 등가의 처리를 행하기 위한 드라이버·소프트웨어를 생성하는 제어회로를 가지는 반도체장치.Based on the software, the setting data for setting the operation type and the wiring connection of the operation cell, and a control circuit for generating driver software for performing processing equivalent to the software using the operation circuit. Semiconductor device. 제 1 항에 있어서,The method of claim 1, 상기 제어회로는, 상기 레지스터와 상기 연산기를 이용하여 상기 소프트웨어를 실행하고 있는 기간 중에, 상기 설정데이터 및 상기 드라이버·소프트웨어를 생성하도록 구성된 반도체장치.And the control circuit is configured to generate the setting data and the driver software during a period of executing the software using the register and the calculator. 제 2 항에 있어서,The method of claim 2, 상기 소프트웨어의 처리는 n회 반복되고,The processing of the software is repeated n times, 제 1 회로부터 제 i 회(i<n)까지의 처리는 상기 레지스터와 상기 연산기를 이용하여 상기 소프트웨어를 실행하는 것에 의해 행해지고,Processing from the first to i times (i <n) is performed by executing the software using the register and the calculator, 제 i+1 회로부터 제 n 회까지의 처리는 상기 연산회로를 이용하여 상기 드라이버·소프트웨어를 실행하는 것에 의해 행해지는 반도체장치.The semiconductor device from the i + 1 th time to the n th time is performed by executing the driver software using the arithmetic circuit. 제 1 항에 있어서,The method of claim 1, 상기 드라이버·소프트웨어는 적어도 상기 레지스터로부터 상기 연산회로의 상기 레지스터셀에의 데이터 전송명령과, 상기 연산회로의 상기 레지스터셀로부터 상기 레지스터에의 데이터 전송명령을 포함하는 반도체장치.And the driver software includes at least a data transfer instruction from the register to the register cell of the arithmetic circuit and a data transfer instruction from the register cell of the arithmetic circuit to the register. 제 1 항에 있어서,The method of claim 1, 제어회로는 상기 설정데이터 및 상기 드라이버·소프트웨어를 생성하는 소프트웨어를 실행하는 것에 의해, 상기 설정데이터 및 상기 드라이버·소프트웨어를 생성하는 반도체장치.The control circuit generates the setting data and the driver software by executing software for generating the setting data and the driver software. 제 1 항에 있어서,The method of claim 1, 상기 연산회로는 버스에 접속된 반도체장치.And said computing circuit is connected to a bus. 제 1 항에 있어서,The method of claim 1, 상기 소프트웨어를 실행하는데 필요한 클럭사이클 수는 상기 드라이버·소프트웨어를 실행하는데 필요한 클럭사이클 수보다도 작은 반도체장치. A semiconductor device, wherein the number of clock cycles required to execute the software is smaller than the number of clock cycles required to execute the driver software. 연산명령을 포함하는 소프트웨어를 실행하는 반도체장치로서,A semiconductor device that executes software containing operation instructions, 레지스터와,Registers, 연산기와,With a calculator, 복수의 연산셀과 복수의 레지스터셀을 포함하고, 상기 연산셀이 실행하는 연산종류와 상기 복수의 연산셀 및 상기 복수의 레지스터셀 사이의 배선접속을 설정가능한 연산회로와,An arithmetic circuit comprising a plurality of arithmetic cells and a plurality of register cells, the arithmetic circuit capable of setting the types of arithmetic operations executed by the arithmetic cells and wiring connections between the arithmetic cells and the plurality of register cells; 상기 소프트웨어를 저장하는 제 1 메모리영역과,A first memory area for storing the software; 상기 연산회로를 이용하여 상기 소프트웨어와 등가의 처리를 행하기 위한 드라이버·소프트웨어를 저장하는 제 2 메모리영역과,A second memory area for storing driver software for performing processing equivalent to the software by using the arithmetic circuit; 실행하는 소프트웨어를 제어하는 제어회로를 가지고,Has a control circuit that controls the software to execute, 상기 소프트웨어의 처리는 n회 반복되고,The processing of the software is repeated n times, 제 1 회로부터 제 i 회(i<n)까지의 처리는 상기 레지스터와 상기 연산기를 이용하여 상기 제 1 메모리영역에서 판독된 상기 소프트웨어를 실행하는 것에 의해 행해지고,Processing from the first to i times (i <n) are performed by executing the software read from the first memory area using the register and the calculator, 상기 제어회로는 상기 제 i 회의 처리를 받아, 실행하는 소프트웨어를 상기 드라이버·소프트웨어로 전환하는 것에 의해, 제 i+1 회로부터 제 n 회까지의 처리는 상기 연산회로를 이용하여 상기 제 2 메모리영역에서 판독된 상기 드라이버·소프트웨어를 실행하는 것에 의해 행해지는 반도체장치.The control circuit receives the i-th processing and switches the software to be executed to the driver software. A semiconductor device carried out by executing the driver software read in the. 제 8 항에 있어서,The method of claim 8, 상기 제어회로는, 상기 소프트웨어에 의거하여 상기 연산셀의 상기 연산종류 및 상기 배선 접속을 설정하는 설정데이터와, 상기 연산회로를 이용하여 상기 소프트웨어와 등가의 처리를 행하기 위한 드라이버·소프트웨어를 생성하는 반도체장치.The control circuit generates setting data for setting the operation type and the wiring connection of the calculation cell based on the software, and a driver software for performing processing equivalent to the software using the calculation circuit. Semiconductor device. 제 8 항에 있어서,The method of claim 8, 상기 제어회로는, 연산회로의 상기 연산종류 및 상기 배선접속을 설정하는 설정데이터를 가지고,The control circuit has setting data for setting the calculation type and the wiring connection of the calculation circuit, 상기 소프트웨어를 실행하고 있는 기간 중에, 상기 연산회로는 상기 설정데이터에 의해 상기 연산셀의 상기 연산종류 및 상기 배선접속을 설정하는 반도체장치.And said computing circuit sets said operation type of said computing cell and said wiring connection by said setting data during said software execution period. 제 8 항에 있어서,The method of claim 8, 상기 드라이버·소프트웨어는 적어도 상기 레지스터로부터 상기 연산회로의 상기 레지스터셀에의 데이터 전송명령과, 상기 연산회로의 상기 레지스터셀로부터 상기 레지스터에의 데이터 전송명령을 포함하는 반도체장치.And the driver software includes at least a data transfer instruction from the register to the register cell of the arithmetic circuit and a data transfer instruction from the register cell of the arithmetic circuit to the register. 제 8 항에 있어서,The method of claim 8, 상기 드라이버·소프트웨어를 실행하는데 필요한 클럭사이클 수는 상기 소프트웨어를 실행하는데 필요한 클럭사이클 수보다도 작은 반도체장치.A semiconductor device, wherein the number of clock cycles required to execute the driver software is smaller than the number of clock cycles required to execute the software.
KR1020057001422A 2005-01-26 2002-09-13 Semiconductor device KR100631396B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020057001422A KR100631396B1 (en) 2005-01-26 2002-09-13 Semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020057001422A KR100631396B1 (en) 2005-01-26 2002-09-13 Semiconductor device

Publications (2)

Publication Number Publication Date
KR20050027261A true KR20050027261A (en) 2005-03-18
KR100631396B1 KR100631396B1 (en) 2006-10-04

Family

ID=37384550

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020057001422A KR100631396B1 (en) 2005-01-26 2002-09-13 Semiconductor device

Country Status (1)

Country Link
KR (1) KR100631396B1 (en)

Also Published As

Publication number Publication date
KR100631396B1 (en) 2006-10-04

Similar Documents

Publication Publication Date Title
US7603540B2 (en) Using field programmable gate array (FPGA) technology with a microprocessor for reconfigurable, instruction level hardware acceleration
JP3714598B2 (en) Changing thread priorities on multithreaded processors
JP4006180B2 (en) Method and apparatus for selecting a thread switch event in a multithreaded processor
EP2372530A1 (en) Data processing method and device
US20060294344A1 (en) Computer processor pipeline with shadow registers for context switching, and method
US4562538A (en) Microprocessor having decision pointer to process restore position
US6154837A (en) Microcomputer enabling an erase/write program of a flash memory to interrupt by transferring interrupt vectors from a boot ROM to a RAM
KR20170141205A (en) A central processing unit having a DSP engine and an enhanced context switch function unit
Dodiu et al. Custom designed CPU architecture based on a hardware scheduler and independent pipeline registers-architecture description
US6986028B2 (en) Repeat block with zero cycle overhead nesting
US9805152B1 (en) Compilation of system designs
JP3790626B2 (en) Method and apparatus for fetching and issuing dual word or multiple instructions
US7516311B2 (en) Deterministic microcontroller context arrangement
US7870311B2 (en) Preemptive packet flow controller
KR100631396B1 (en) Semiconductor device
US6993674B2 (en) System LSI architecture and method for controlling the clock of a data processing system through the use of instructions
JP3900499B2 (en) Method and apparatus for using FPGA technology with a microprocessor for reconfigurable, instruction level hardware acceleration
JP4800582B2 (en) Arithmetic processing unit
TWI249130B (en) Semiconductor device
Pereira et al. Co-designed FreeRTOS deployed on FPGA
JP2003347930A (en) Programmable logic circuit and computer system, and cache method
WO2007039837A2 (en) Implied instruction set computing (iisc) / dual instruction set computing (disc) / single instruction set computing (sisc) / recurring multiple instruction set computing (rmisc) based computing machine / apparatus / processor
US20020129229A1 (en) Microinstruction sequencer stack
JP3097602B2 (en) Data processing device
JP2000029508A (en) Programmable controller

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee