KR19980052162A - PLC instruction high speed processing system - Google Patents

PLC instruction high speed processing system Download PDF

Info

Publication number
KR19980052162A
KR19980052162A KR1019960071106A KR19960071106A KR19980052162A KR 19980052162 A KR19980052162 A KR 19980052162A KR 1019960071106 A KR1019960071106 A KR 1019960071106A KR 19960071106 A KR19960071106 A KR 19960071106A KR 19980052162 A KR19980052162 A KR 19980052162A
Authority
KR
South Korea
Prior art keywords
instruction
data
processor
hls
cpu
Prior art date
Application number
KR1019960071106A
Other languages
Korean (ko)
Other versions
KR100279511B1 (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 KR1019960071106A priority Critical patent/KR100279511B1/en
Publication of KR19980052162A publication Critical patent/KR19980052162A/en
Application granted granted Critical
Publication of KR100279511B1 publication Critical patent/KR100279511B1/en

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

본 발명은 산업용 제어기인 피엘시 적용되는 명령어 처리용 논리 연산기에 관한 것으로, 특히 명령어 해석이 주문형 반도체 게이트 어레이 칩으로 구성되는 소형, 경량 및 저소비전략의 하드웨어 논리연산기에서 실행되게 함으로써, CPU 부하부담을 줄여 명령어의 고속처리를 달성할 수 있게 한 피엘시 명령어 고속처리 시스템에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a logic processor for instruction processing, which is applied to PSI, which is an industrial controller. In particular, the instruction analysis is executed in a hardware logic calculator of a small, lightweight, and low-consumption strategy composed of an on-demand semiconductor gate array chip. The present invention relates to a PSI instruction high-speed processing system that can reduce and achieve high-speed processing of instructions.

본 발명의 특징은 데이터 어드레스 레지스터(13)와 프로세서(11)와 인터페이스 블록으로 구성되는 하드웨어 논리연산기(10)를 데이터 1비트 동작 처리되는 단일칩의 주문형 반도체로 설계하고, 상기 인터페이스 블록(15)을 통하여는 상기 프로세서(11)에 CPU(16)의 제어신호, 데이터신호, 어드레스 신호가 제공되게 연결하고, 상기 프로세서(11)에는 명령어 메모리(12)를 접속하여 5비트의 오피코드와 14비트의 오퍼랜드 명령어로 구성하고, 상기 프로세서(11)에는 데이터 메모리(14)를 접속하여 8비트 데이터 교환이 이루어지게 구성하여 사용빈도가 높은 명령어를 하드웨어 논리 연산처리함으로써, 주프로세서의 부담을 중여 궁극적으로 명령어 처리속도를 향상시킨다는데 있다.A feature of the present invention is to design a hardware logic operator 10 composed of a data address register 13, a processor 11, and an interface block as a single-chip on-demand semiconductor for one-bit data processing, and the interface block 15 The control signal, data signal, and address signal of the CPU 16 are provided to the processor 11 through the processor 11, and the instruction memory 12 is connected to the processor 11, thereby providing a 5-bit opcode and 14 bits. And operand instructions, and the processor 11 is connected to the data memory 14 so that 8-bit data exchange can be performed. It is to improve the instruction processing speed.

Description

피엘시(PLC) 명령어 고속처리 시스템PLC instruction high speed processing system

본 발명은 산업용 제어기인 피엘시에 적용되는 명령어 처리용 논리 연산기에 관한 것으로, 특히 명령어 해석이 주문형 반도체 게이트 어레이 칩으로 구성되는 소형, 경량 및 저소비전력의 하드웨어 논리연산기에서 실행되게 함으로써, CPU 부하부담을 줄여 명령어의 고속처리를 달성할 수 있게 한 피엘시 명령어 고속처리 시스템에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a logic processor for instruction processing applied to PSI, an industrial controller. In particular, CPU instruction is a burden by allowing instruction interpretation to be executed in a small, lightweight, and low power hardware logic calculator composed of a custom semiconductor gate array chip. The present invention relates to a PSI instruction fast processing system which can reduce the number of instructions to achieve high speed processing.

피엘시의 기본 명령어 고속 처리 시스템에 있어서의 선행기술이 특허공개 제 92-004937호에 제시된 바 있다.Prior art in the basic instruction high-speed processing system of PIEL has been presented in Japanese Patent Application Laid-Open No. 92-004937.

여기에는 타이밍 발생부, 프로그램 카운터부, 마이컴, 메모리부, 하드웨어 로직 제어부, 판독/기록신호 발생부, 코드 래치부, 시프트 레지스터부로 구성되고 있는 기존의 기술을 발전시켜 FPGA(Field Programming Gate Array)와 일반 논리 회로를 사용하여 구성하거나 소프트웨어 명령어를 처리하고 있다. 그 내용을 구체적으로 살펴보면 외부의 클럭펄스와 마이컴의 제어신호에 의해 동기되어 클럭펄스를 발생하는 타이밍 발생부와, 프로그램 데이터를 읽어오기 위하여 어드레스를 발생하는 프로그램 카운터와, 프로그램 카운터로부터 어드레스 지정에 의해 시스템 전체를 제어하는 마이컴과 프로그램 카운터에 의해 사용자가 원하는 데이터를 출력함과 아울러 데이터를 저장하는 메모리부와, 읽혀진 데이터를 래치하고 이에 따른 어드레스를 발생하는 코드 래치부와, 코드 래치부의 어드레스 타이밍발생부의 클럭펄스에 의해 메모리부로부터 출력된 데이터로 기본명령을 수행하는 하드웨어 로직제어부와 메모리부의 기본명령 코드를 읽고, 해당정보를 처리하는 판독/기록 신호발생부와 타이밍 발생부의 클럭펄스에 의해 하드웨어 로직제어부의 출력 데이터를 일시 저장하는 시프트 레지스터 처리부로 구성하고 있다. 또한 하드웨어 로직 제어부는 코드 래치부의 지정에 의한 메모리부의 출력 데이터 및 시프트 레지스터 처리부의 데이터를 논리 연산한 로직 연산기와 코드래치부의 명령어 코드 판별 신호를 인버터를 통해 반전시키고, 이를 타이밍 발생부의 클럭신호와 낸드화 시키는 낸드게이트와, 낸드게이트의 출력신호 및 코드래치부의 명령어 코드신호에 따라 상기 로직연산기의 출력신호를 선택하는 멀티플렉서와 멀티플렉서의 출력신호를 오아링하는 오아게이트와 마이컴의 마스터 컨트롤 세트신호 및 판독/기록 신호발생부의 기록신호에 의해 오아게이트의 각 출력 명령어를 제어하는 제어부와, 제어부 및 오아게이트의 출력을 앤드화시켜 각각의 명령어를 출력하는 앤드게이트로서 PLC기본 명령의 고속처리 시스템을 구성하고 있다.It includes the FPGA (Field Programming Gate Array) and the existing technology, which consists of a timing generator, a program counter, a microcomputer, a memory, a hardware logic controller, a read / write signal generator, a code latch, and a shift register. General logic circuits are used to construct or process software instructions. Specifically, the timing generator generates clock pulses in synchronization with an external clock pulse and a control signal of a microcomputer, a program counter for generating an address for reading program data, and an address from the program counter. The microcomputer and program counter that controls the entire system outputs the data desired by the user, and stores the data, a code latch unit for latching the read data and generating an address accordingly, and address timing of the code latch unit. The hardware logic control unit performs basic instructions with data output from the memory unit by the negative clock pulse, and the hardware logic by the clock pulses of the read / write signal generator and the timing generator that read the basic command codes of the memory unit and process the corresponding information. Output of control It consists of a shift register processing unit which temporarily stores data. In addition, the hardware logic controller inverts the logic code that logically computes the output data of the memory unit and the shift register processing unit by the designation of the code latch unit and the instruction code discrimination signal of the code latch unit through the inverter, and the clock signal and the NAND of the timing generator unit are inverted. Master control set signals and readouts of NAND gates, OA gates, and microcomputers that output the output signals of the multiplexer to select the output signal of the logic operator according to the NAND gate, the output signal of the NAND gate, and the instruction code signal of the code latch unit. And a high speed processing system for PLC basic instructions as an AND gate for outputting each instruction by ANDing the outputs of the controller and the OR gate by the recording signal of the recording / recording signal generator. have.

이러한 구성의 선행기술에서는 실제 명령어를 해석하는 것이 자체 프로세서가 아닌 마이컴에서 실행하고, 또 비트연산을 위해 시프트레지스터를 이용하여 하드웨어를 구성하고 있는데, 이때 일반 논리 소자를 사용하고 있어 사이즈 면적의 확대문제와 큰 소비전력 문제가 나타나고 있었고, 또한 명령어 처리 속도 측면과 처리결과의 신뢰성에 문제점이 노출되고 있다.In the prior art of such a configuration, the actual instructions are interpreted by the microcomputer, not by the processor itself, and the hardware is configured by using the shift register for bit operation. In this case, a general logic element is used to expand the size area. And big power consumption problems have appeared, and also problems in terms of instruction processing speed and reliability of processing results are exposed.

본 발명의 목적은 산업용 제어기인 피엘시에 적용되는 명령어 처리용 논리 연산기를 단일칩의 주문형 반도체 게이트 어레이로 구성하여 주요 명령어가 여기에서 하드웨어적으로 처리되게 함으로써, 주 CPU의 연산부를 덜어줌과 동시에 소형, 경량, 저소비전력 및 데이터처리 고속화를 달성할 수 있게 되는 피엘시 명령어 고속처리 시스템을 제공하는데 있다.An object of the present invention is to construct a logic processing unit for the instruction processing applied to the industrial controller PSI as a single-chip on-demand semiconductor gate array so that the main instructions are processed in hardware here, while at the same time reducing the operation unit of the main CPU It is to provide a PSI instruction high speed processing system that can achieve small size, light weight, low power consumption and high data processing speed.

본 발명의 특징은 데이터 어드레스 레지스터와 프로세서와 인터페이스 블록으로 구성되는 하드웨어 논리연산기를 데이터 1비트 동작 처리되는 단일칩의 주문형 반도체로 설계하고, 상기 인터페이스 블록을 통하여는 상기 프로세서에 CPU의 제어신호, 데이터신호, 어드레스 신호가 제공되게 연결하고, 상기 프로세서에는 명령어 메모리를 접속하여 5비트의 오피코드와 14비트의 오퍼랜드 명령어로 구성하고, 상기 프로세서에는 데이터 메모리를 접속하여 8비트 데이터 교환이 이루어지게 구성하여 사용빈도가 높은 명령어를 하드웨어 논리 연산처리함으로써, 주프로세서의 부담을 줄여 궁극적으로 명령어 처리속도를 향상시킨다는데 있다.A feature of the present invention is to design a hardware logic operator consisting of a data address register and a processor and an interface block as a single-chip on-demand semiconductor that performs one-bit data processing. A signal and an address signal are connected to each other, and an instruction memory is connected to the processor, and the 5-bit opcode and a 14-bit operand instruction are connected. The processor is connected to a data memory to perform 8-bit data exchange. By using hardware logical processing of frequently used instructions, the burden on the main processor is ultimately improved.

도 1은 본 발명 시스템의 피엘시 CPU보드의 블록구성도이다.1 is a block diagram of a CPU CPU board of the present invention system.

도 2는 본 발명 시스템의 하드웨어 논리 연산기의 블록 구성도이다.2 is a block diagram of a hardware logic calculator of the system of the present invention.

도 3은 본 발명 시스템의 프로세서의 블록 구성도이다.3 is a block diagram of a processor of the system of the present invention.

도 4는 본 발명 시스템의 제어레지스터 및 상태레지스터의 구조도이다.4 is a structural diagram of a control register and a state register of the system of the present invention.

* 도면의 주요 부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

10 : 하드웨어 논리 연산기11 : 프로세서10: hardware logic operator 11: processor

12 : 명령어 메모리13 : 데이터 어드레스 레지스터12: instruction memory 13: data address register

14 : 데이터 메모리15 : 인터페이스 블록14: data memory 15: interface block

16 : CPU17 : 데이터 선택부16: CPU17: data selector

18 : 제어부19 : 데이터 레지스터18: control unit 19: data register

20 : 제어레지스터20: control register

이하, 첨부도면을 참고로 하여 본 발명은 설명한다. 도 1은 본 발명에 따른 피엘시 CPU보드의 블록구성도로써, 데이터 어드레스 레지스터(13)와 프로세서(11)와 인터페이스 블록으로 구성되는 하드웨어 논리연산기(10)를 데이터 1비트 동작 처리되는 단일칩의 주문형 반도체로 설계하고, 상기 인터페이스 블록(15)을 통하여는 상기 프로세서(11)에 CPU(16)의 제어신호, 데이터신호, 어드레스 신호가 제공되게 연결하고, 상기 프로세서(11)에는 명령어 메모리(12)를 접속하여 5비트의 오피코드와 14비트의 오퍼랜드 명령어로 구성하고 있다.Hereinafter, the present invention will be described with reference to the accompanying drawings. 1 is a block diagram of a CPU CPU board according to an embodiment of the present invention, in which a hardware chip 10 comprising a data address register 13, a processor 11, and an interface block is a single-chip data processing operation. Designed as a custom semiconductor, the interface block 15 is connected to the processor 11 to provide a control signal, a data signal, and an address signal of the CPU 16, and the processor 11 has an instruction memory 12 ) Is composed of a 5-bit opcode and a 14-bit operand instruction.

상기의 하드웨어 논리연산기(Hardware Logic Solver : HLC)(10)는 본 발명의 실시예의 경우, 총 144여종의 명령어 중에서 사용빈도가 높은 21종의 명령어를 하드웨어 논리 연산처리하게 된다.In the embodiment of the present invention, the hardware logic operator (HLC) 10 performs a hardware logic operation on 21 types of instructions with a high frequency of use among a total of 144 types of instructions.

하기 표 1에서는 이러한 21종의 시퀀스 명령어를 나타낸다.Table 1 below shows these 21 kinds of sequence instructions.

[표 1]TABLE 1

이러한 명령어는 인식, 해석, 실행의 3단계 파이프 라인을 통하여 처리되게 된다.These instructions are processed through a three-stage pipeline of recognition, interpretation, and execution.

이를 설명하면, 먼저 상위에서 다운로드 시킨 프로그램은 명령어 메모리(12)에 저장된다. 명령어가 하드웨어 논리연산 명령어이며, CPU(16)에서 제어 레지스터(20)를 통해 HLS(10)의 인터페이스를 블록(15)에 시작명령을 전달하고, 인터페이스 블록(15)에서 이 명령을 해석하여 제어 응답신호를 CPU(16)에게 전달한다. 프로세서(11)은 명령어 인식을 하기 전에 명령어 포인터(Instruction Pointer IP)를 클리어시키고, 명령어 메모리(12)의 칩인에이블과 리드 신호를 출력한다. 상기 명령어 메모리에서 명령의 오피코드와 오퍼랜드가 패치된 후, 파이프 라인을 따라 명령어 처리 과정이 실행된다. 명령어 패치 단계는 수행 명령어를 명령어 메모리로부터 읽어 오고, 명령어 패치 어드레스는 명령어 포인터에 의하여 발생하며, 이러한 명령어 포인터는 프로그램 카운터의 기능을 갖는다.To explain this, the program downloaded from the upper level is stored in the instruction memory 12. The instruction is a hardware logic operation instruction, the CPU 16 passes the start command to the block 15 through the control register 20 to the interface of the HLS 10, and the interface block 15 interprets the control to control the instruction. The response signal is transmitted to the CPU 16. The processor 11 clears the instruction pointer (Instruction Pointer IP) before outputting the instruction, and outputs the chip enable and read signals of the instruction memory 12. After the opcodes and operands of the instructions are fetched from the instruction memory, instruction processing is performed along the pipeline. The instruction patch step reads execution instructions from instruction memory, and instruction patch addresses are generated by instruction pointers, which have the function of program counters.

하드웨어 논리연산 초기화 단계에서 0으로 클리어 된 명령어 포인터 클럭에 따라 1씩 증가하고, 다음 명령의 명령어 포인터 값이 된다. BIT명령 수행시 IP는 정지하고 있다가 다시 HLS 명령어를 만나면 카운터를 진행한다. IP 출력은 명령어 메모리의 어드레스로 사용되고 선택된 어드레스 값을 가지는 명령어의 오피코드가 패치되어 프로세서 블록의 명령어 레지스터에 저장된다. 동시에 명령어의 오퍼랜드 데이터 어드레스 레지스터(13)에 저장되어 해당 명령어의 실행에 필요한 오퍼랜드의 어드레스로 사용한다. 명령어 레지스터의 출력은 명령어 해석부에 전달되고, 데이터 어드레스 레지스터(13)의 출력은 명령어 레지스터의 출력이 해석되는 주기에 오퍼랜드를 패치한다. 명령어 해석단계는 패치한 명령어를 해석하여 명령어 프로세서에서 필요한 내부 제어 코드를 생성하고, 이와 동시에 데이터 어드레스 레지스터(13)에 저장된 오퍼랜드로 데이터 메모리를 악세스하여 데이터 인 레지스터(Data In Register)에 필요한 데이터 비트를 저장한다. 해석된 명령어 코드는 기능 레지스터(Function Resister ; FR)에 출력, 저장한다.It is incremented by 1 according to the instruction pointer clock that is cleared to 0 at the hardware logic initialization stage, and becomes the instruction pointer value of the next instruction. When BIT command is executed, IP stops and the counter progresses when HLS command is met again. The IP output is used as an address in the instruction memory and the opcode of the instruction having the selected address value is patched and stored in the instruction register of the processor block. At the same time, it is stored in the operand data address register 13 of the instruction and used as the address of the operand required for the execution of the instruction. The output of the instruction register is passed to the instruction interpreter, and the output of the data address register 13 patches the operand in a period in which the output of the instruction register is interpreted. The instruction interpretation step interprets the fetched instructions to generate internal control codes required by the instruction processor, and simultaneously accesses the data memory with the operands stored in the data address register 13 to data bits required for the data in register. Save it. The interpreted instruction code is output and stored in the function register (Function Resister (FR)).

상기 CPU는 도 1과 같이 intel80186의 CPU(16)와 하드웨어 논리연산기(10)와 메모리들로 구성되어 있어, 프로그램머가 레더(Ladder) 혹은 리스트(List)로 컴파일한 프로그램은 하드웨어 논리연산 명령어와 BTI 명령어 혼용으로 구성되므로 명령어 처리에서 HLS 블록과 CPU 블럭간의 인터페이스가 중요하며, 제어 레지스터의 시작/정지 신호와 데이터를 이용하여 신호를 주고 받는다. 프로세서 블록은 인터페이스 블록으로부터 제어신호와 오피코드, 오퍼랜드, 데이터를 입력받아 파이프 라인을 통해 각 명령어를 패치, 해석, 실행하여 결과를 저장하거나 출력시킨다. 데이터 메모리는 CPU와 HLS가 같이 공유하며, 명령어 메모리와 데이터 메모리의 제어 신호는 HLS에서 만들어 준다. 명령어 구성은 5비트 오피코드와 14비트 오퍼랜드로 되어 있으며, 데이터는 1비트 동작으로 처리한다.As shown in FIG. 1, the CPU is composed of the CPU 16 of the Intel80186, the hardware logical operator 10, and the memories. The program compiled by the programmer into a ladder or a list includes a hardware logic operation instruction and a BTI. Because it is composed of instruction mixed, the interface between HLS block and CPU block is important in instruction processing. It sends and receives signals using start / stop signals and data of control register. The processor block receives control signals, opcodes, operands, and data from the interface block, fetches, interprets, and executes each instruction through a pipeline to store or output a result. The data memory is shared by the CPU and the HLS, and the control signals of the instruction memory and the data memory are made by the HLS. The instruction structure consists of a 5-bit opcode and a 14-bit operand. The data is processed in 1-bit operation.

HLS 주문형 반도체 칩은 도 1과 같이 프로세서와 인터페이스 블록으로 구성되고 있으며, 프로세서 블록은 명령어 제어 해석부, 중앙 논리연산부, 마스터 명령 제어부, 정지제어부, 스택 명령해석부, 저장제어부는 VHDL로 설계하고, 데이터 어드레스 레지스터 블록은 외부 데이터 메모리의 어드레스를 결정하게 한다. 명령어 입력부는 명령어 메모리, 데이터 메모리에서 명령어의 오피코드와 오퍼랜드 및 데이터를 받아 명령어 레지스터와 데이터인 레지스터에 각각 입력(fetch)하는 블록으로 4MHz 클럭에 의해 데이터를 전달한다.The HLS custom semiconductor chip is composed of a processor and an interface block as shown in FIG. 1, and the processor block is designed as a VHDL instruction control interpreter, a central logic operator, a master instruction controller, a stop controller, a stack instruction interpreter, and a storage controller. The data address register block allows to determine the address of the external data memory. The instruction input unit is a block that receives the opcodes, operands and data of the instructions from the instruction memory and data memory and fetches them into the instruction register and the register which is the data, respectively.

도 2는 인터페이스 블록으로써, CPU(16)에서 제어신호를 받아 프로세서(1) 칩인에이블, 라이트, 리드와 같은 제어 명령을 내리고 HLS가 8비트를 사용하므로 데이터를 8/16비트로 전환하여, 상호 전달하는 제어 부분으로 레지스터(20)에서 CPU(16)로부터 데이터를 입력 받을 경우 LDS 신호를 이용하여 16비트 데이터를 8비트씩 상, 하위로 나누어서 HLS에 전달하는 구조로 되어 있다. 인터페이스 블록의 제어부(18)는 CPU(16)로부터 입력신호를 받아 데이터 메모리 제어신호, 명령어 메모리 제어신호, HLS 프로세서 제어신호 등과 같은 제어신호를 만들어 준다. 제어 레지스터(20)는 HLS 시작/정지 명령을 CPU의 제어 레지스터로부터 받아 HLS에 전달하고, HLS의 현재 상태를 CPU에 보내주는 역할을 한다. 데이터 레지스터(19)는 데이터 메모리(14)와 프로세서(11) 사이에서 데이터를 전달하여 데이터 선택부(17)는 프로세서(11)에서 CPU(16)로 데이터를 전달할 때 원하는 데이터 정보를 선택하여 16비트로 전달한다. 출력부(15)는 CPU(16)와 16비트 데이터를 전달하는 블록으로 데이터 메모리에서 오피코드를 전달받기도 한다.FIG. 2 is an interface block, which receives control signals from the CPU 16 to issue control commands such as processor enable, write, and read, and transfers data to 8/16 bits because the HLS uses 8 bits. When the register 20 receives data from the CPU 16, the 16-bit data is divided into 8 bits and 8 bits by using the LDS signal to the HLS. The controller 18 of the interface block receives an input signal from the CPU 16 and generates a control signal such as a data memory control signal, an instruction memory control signal, an HLS processor control signal, and the like. The control register 20 receives an HLS start / stop command from the CPU's control register and transmits the HLS command to the HLS, and sends the current state of the HLS to the CPU. The data register 19 transfers data between the data memory 14 and the processor 11, and the data selector 17 selects desired data information when transferring data from the processor 11 to the CPU 16. Pass in bits. The output unit 15 is a block for transmitting 16-bit data to the CPU 16 and may also receive an opcode from the data memory.

도 3은 프로세서 블록구성도로써, 명령어 해석부는 마스터 명령제어부(MR_CTR)(24), 명령어 해석 제어부(DEC_CTL)(25), 스택명령 해석부(DEC, STK)(26), 논리연산부(35)로 구성되어 있으며, 마스터 명령제어부 MCS, MCR 명령을 해석하는 블록으로 4스텝까지 수행이 가능하도록 하였다.FIG. 3 is a block diagram of a processor, wherein an instruction analyzer includes a master instruction controller (MR_CTR) 24, an instruction analysis controller (DEC_CTL) 25, a stack instruction analyzer (DEC, STK) 26, and a logic operator 35. The master command control unit is a block that interprets MCS and MCR commands.

DEC CTL블럭(25)은 입력된 명령을 해석할 것인지를 구분하여 BTI 명령이나 END명령이 입력되며, HLS 명령을 정지시키고, PLS, PLF, SET, RST, OUT 명령에 대해서는 다른 명령과 달리 NR의 값을 일정기간 동안 저장하여 명령 입력시 저장제어부를 통하여 HLS 동작상태를 특정시간 동안 잠시 멈추게 한다. 또한 리세트 되거나 IP(22)를 점프시켜야 할 때 이용된다. BTI 명령어는 오피코드 18로 정의되고, 이 값이 IR(32)를 통해 입력되면 HLS 동작상태를 정지하고, IP 값의 계수도 정지한다. 각 출력 값은 최종적으로 상태 제어부에 전달되어 HLS의 상태를 제어한다.The DEC CTL block 25 distinguishes whether or not to interpret the input command, and the BTI command or the END command is input, and stops the HLS command. The PLS, PLF, SET, RST, and OUT commands, unlike other commands, It saves the value for a certain period of time and stops the HLS operation state for a certain time through the storage controller when a command is input. It is also used when it is necessary to reset or jump the IP 22. The BTI instruction is defined as opcode 18, and when this value is input via IR 32, it stops operating the HLS and counts the IP value. Each output value is finally passed to the state controller to control the state of the HLS.

DEC_STK 블록은 LD, LDI, BRB, BRM, BRT, ANB, ORB 명령을 해석하는 블록으로 명령이 입력된 스택 A와 스택 B에 데이터를 저장시켜 브랜치에 연결된 명령을 하나의 조건하에서 동작하도록 한다. 같은 입력조건에서 여러 명령을 수행하고자 할 때 필요하며, LD, LDI, ANB, ORB 명령어 경우 논리 연산부 결과 값은 스택 A(33)에 저장하고, BRB, BRM, BRT 명령은 스택 B(34)에 저장하게 된다.The DEC_STK block is a block for interpreting LD, LDI, BRB, BRM, BRT, ANB, and ORB instructions. The DEC_STK block stores data in the stack A and the stack B in which the instruction is inputted so that the branch-connected instruction operates under one condition. It is required to execute several instructions under the same input condition.In case of LD, LDI, ANB, ORB instruction, the result of logical operation unit is stored in stack A (33), and BRB, BRM, BRT instruction is stored in stack B (34). Will be saved.

DEC_STK의 스탭은 8단계로 이루어져 가지를 트리식으로 배치할 때 8개까지 사용할 수 있다.The staff of DEC_STK consists of 8 steps and can use up to 8 branches when arranging branches.

논리 연산부(35)는 명령어 해석부에서 해석한 결과와 FR에 저장되어 있는 각 명령어의 오피코드를 입력받아 명령어를 논리 연산하여 결과를 NR과 스택에 저장하는 블록이다. 설계는 VHDL로 기술하여 회로 합성을 하여 설계하였다.The logic operator 35 is a block that receives the result interpreted by the instruction interpreter and the opcode of each instruction stored in the FR and logically operates the instruction to store the result in the NR and the stack. The design was designed by circuit synthesis using VHDL.

또한, 도 3의 프로세서 블록의 명령어 실행부는 노드 레지스터(36), 스택부(33),(34), 정지제어부(stop control block ; SCB)(31), 저장제어부, 동작상태제어부로 구성되어 있으며, 각 해당 레지스터에 해석된 출력값을 주거나 스택에 데이터를 저장하는 기능을 포함한다. 논리 연산부에 연산된 결과는 각 명령어의 종류에 따라 NR 혹은 2개의 스택에 저장한다. 특히 출력 명령시는 데이터 메모리(14)에 저장되어 실행을 완료한다. 엔드 명령이나 BTI 명령을 만나기 전까지 모든 명령어 수행단계는 연속적인 상(phase)를 거치는데 동작 상태 제어부가 각 상을 생성한다. 예를 들면 블록 명령 입력시는 저장제어부에서 상태 정지신호(phold)를 전달받아 멈춤신호(halt)를 생성하여 HLS 프로세서를 정지시키고, 인터페이스 블록을 거쳐 CPU가 동작하도록 하였다. 노드 레지스터(node register : NR)(36)는 모든 연산결과 값을 저장하고, 스택에 저장되거나 데이터 메모리(14)에 전달되는데, SET과 RST명령만을 NR을 거지치 않고 결과를 출력한다. 제어레지스터의 0비트에 의해 특정값을 강제입력하여 연산에 이용할 수도 있다. HLS프로세서는 3개의 스택(스택A, 스택B, 마스터 스택)을 가지고 있다. 스택 A(33)는 LD, LDI, ANB, ORB 명령의 결과를 저장 출력하고, 스택 B(34)는 BRT, BRB, BRM 명령을 처리한다. 마스터스택(MR_STACK)(29)은 마스터 명령 결과를 저장한다. 스택 A, B는 단위 스택으로 구성되어 있고, 마스터 스택은 4개의 단위 스택으로 이루어져 있다.In addition, the instruction execution unit of the processor block of FIG. 3 includes a node register 36, a stack unit 33, 34, a stop control block (SCB) 31, a storage control unit, and an operation state control unit. This includes the ability to give the interpreted output to each corresponding register or to store data on the stack. The result calculated in the logical operation unit is stored in NR or 2 stacks according to the type of each instruction. In particular, at the time of the output command, it is stored in the data memory 14 to complete execution. All instruction execution stages go through successive phases until an end instruction or BTI instruction is met, and the operation state controller generates each phase. For example, when a block command is input, the storage control unit receives a status stop signal (phold) to generate a stop signal (halt) to stop the HLS processor and to operate the CPU through an interface block. The node register (NR) 36 stores all operation result values and is stored on the stack or transferred to the data memory 14, and only the SET and RST instructions output the result without NR. The 0 bit of the control register can also be used to force a specific value. The HLS processor has three stacks (stack A, stack B and master stack). Stack A 33 stores and outputs the results of the LD, LDI, ANB, and ORB instructions, and stack B 34 processes the BRT, BRB, and BRM instructions. The master stack (MR_STACK) 29 stores the master command result. Stacks A and B consist of unit stacks, and the master stack consists of four unit stacks.

프로세서 블록의 정지제어부(31)는 제어 레지스터(21)의 입력을 받아 HLS의 상태 제어블럭에 정지 신호를 전달하거나, BTI 명령입력시 HLS를 멈추게 하는 역할을 한다. 제어레지스터의 비트별 기능을 도 4와 같다. CPU 제어레지스터를 통해 HLS를 동작시킬 때 제어레지스터는 18을 HLS에 전달하여 HLS 초기화(clear) 시킨 후, 80을 보내서 HLS 시작(START) 상태가 되도록 한다. 또한 HLS의 동작이 완료되면 HLS의 동작상태를 제어 레지스터의 6번째 비트를 통해 CPU에 전달한다. 이는 4MHz의 클럭에 동기하여 동작하도록 하였다.The stop control unit 31 of the processor block receives an input of the control register 21 and transmits a stop signal to the state control block of the HLS, or stops the HLS when a BTI command is input. Bit function of the control register is shown in FIG. When operating the HLS through the CPU control register, the control register passes 18 to the HLS to clear the HLS, and then sends 80 to the HLS START state. When the operation of the HLS is completed, the operating state of the HLS is transmitted to the CPU through the sixth bit of the control register. This allowed it to operate in synchronization with a clock of 4MHz.

프로세서 블록의 저장 제어부(STO_CTL)은 DEC_CTL에서 출력명령을 해석한 결과 신호를 입력받아 동작하고, 저장신호(STORE)가 입력되면, 그 스캔타임 동안 상태 정지(phase hold)가 출력되고, 데이터 메모리쓰기 신호를 보내면서 연산결과 값을 데이터 메모리에 저장시킨다. HLS는 3단계 파이프 라인 알고리듬에 따라 3개의 상(phase)을 가진다. phold0은 IR에 오피코드를 패치하고, DM에 오퍼랜드와 데이터를 패치하는 단계이고, 다음 클럭이 입력되면 phold1상으로 전달된다.The storage control unit STO_CTL of the processor block operates by receiving a signal as a result of interpreting an output command from DEC_CTL. When the storage signal STORE is input, a phase hold is output during the scan time, and a data memory write is performed. Sending a signal stores the result of the operation in the data memory. HLS has three phases according to a three-stage pipeline algorithm. phold0 is the step of patching the opcode to the IR, the operand and data to the DM, and transferred to phold1 when the next clock is input.

이 단계에서는 명령어 해석이 이루어지고, 논리연산부에 데이터와 해석된 값이 전달되어 FR에 저장된다. 마지막 클럭에 의해 phold2단계에서 NR 혹은 스택에 저장된다. 출력명령이 입력되면 저장제어부에 의해 DM에 결과값을 저장할 수 있다. 또한 종료 명령 혹은 BTI 명령이 입력되면, 정지제어부에서 정지신호(halt)를 출력하여 HLS를 정지시키고, CPU를 동작시킨다.In this step, the instruction is interpreted and the data and the interpreted value are transferred to the logic operation unit and stored in the FR. The last clock is stored in the NR or stack at phold2. When the output command is input, the storage controller may store the result value in the DM. When the end instruction or the BTI instruction is input, the stop controller outputs a stop signal (halt) to stop the HLS and operate the CPU.

[실시예]EXAMPLE

HLS 주문형 반도체 칩을 1.2μ CMOS 게이트어레이 방식으로 설계하여 칩을 제작하였다. 설계는 전단계 설계와 후단계 설계로 구분하여 진행되었고, 각 세부 블록별 회로 설계와 시뮬레이션을 통한 회로 검증을 하였다. 제작된 HLS 주문형 반도체 칩을 (주)포스콘에서 생산하고 있는 POSFA-3A PLC 시스템에 장착시켜 HLS 명령어 수행을 확인하기 위한 프로그램을 이용하여 동작시킨 후, 논리 분석기로 동작파형을 추출, 시뮬레이션 결과 파형과 비교하였다.The HLS custom semiconductor chip was designed in a 1.2μ CMOS gate array to fabricate the chip. The design was divided into pre-stage design and post-stage design, and the circuit verification was performed by circuit design and simulation for each detailed block. The manufactured HLS custom semiconductor chip is mounted on POSFA-3A PLC system manufactured by POSCON Co., Ltd. and operated by using the program to check the execution of HLS command. Then, the operation waveform is extracted by the logic analyzer and the simulation result waveform and Compared.

그 결과 CPU에서 제어레지스터(DB7:0)를 통해 HLS IP를 초기화시키고, 스타트 비트를 전달하여 HLS 시작 명령을 전달하였다. 명령어의 오피코드와 오퍼랜드를 명령어 메모리로부터 전달받아 IR에 LD 명령이 패치된면서 IP값이 계수되었다. 프로그램 수행을 종료하는 엔드 명령이 입력되면 SCB에 의해 HLS 동작이 정지되고, 상태 레지스터가 HLS 정지상태를 알려준다. CPU가 HLS 상태 레지스터를 리드하여 HLS로부터 주도권을 넘겨받아 동작을 시작하였다.As a result, the CPU initialized the HLS IP through the control register (DB7: 0) and passed the start bit to deliver the HLS start command. The IP value was counted as the LD instruction was patched to IR by receiving the opcode and operand of the instruction from the instruction memory. When an end instruction is entered to end program execution, the SCB stops HLS operation and the status register informs the HLS stop status. The CPU reads the HLS status register and takes over the initiative from the HLS and starts operation.

프로그램중 BTI 명령어가 있는 경우 역시 HLS가 멈추게 되고(halt) 상태 레지스터에 BTI 명령에 의한 스톱 비트를 세트시켜 HLS 동작정지와 CPU가 동작을 개시할 수 있게 한다.If there is a BTI instruction in the program, the HLS also halts and sets the stop bit by the BTI instruction in the status register, allowing the HLS operation stop and the CPU to start operation.

일예로 intel 80186을 사용하고 있는 PLC CPU의 경우 HLS 주문형 반도체 칩을 추가 장착하였을 경우, 명령어 처리 시간이 CPU에서 처리할 때 수 μsec이었던 것이 250 μsec로 단축되었으며, CPU의 처리 부담을 줄일 수 있었다.For example, in the case of the PLC CPU using the Intel 80186, when the HLS custom semiconductor chip is additionally installed, the instruction processing time was reduced to 250 μsec, which was several μsec when the CPU processed, and the CPU processing burden was reduced.

이상에서 설명한 바와 같은 본 발명은 명령어 처리 단계를 3단계의 파이프 라인으로 구성하여 명령어 인식, 해석, 실행이 한 클럭에 동시에 진행되게 하고, 명령어는 5비트의 오피코드와 14비트의 오퍼랜드로 구성하여 데이터는 1비트 동작으로 처리하는 회로를 주문형 반도체 회로로 설계하여 1개의 칩에 내장시킴으로써, 명령어 처리속도가 빠르고 사용자가 원하는 기능을 추가하여 설계하기가 용이한 구조를 가지게 되며, 총 144여종의 명령어 중에서 사용빈도가 가장 많은 21종의 명령어를 하드웨어 논리 연산기에서 처리하도록하여 주 프로세서의 부담을 줄이게 함으로써 명령어 처리속도를 고속화할 수 있게 되는 효과가 나타나게 된다.As described above, the present invention configures an instruction processing step into a pipeline of three stages so that the instruction recognition, interpretation, and execution proceed simultaneously on one clock, and the instruction consists of a 5-bit opcode and a 14-bit operand. By designing a circuit that processes 1 bit operation as a custom-made semiconductor circuit and embedding it in one chip, it has a structure that has high instruction processing speed and easy to design by adding functions desired by the user. Among them, 21 kinds of instructions, which are most frequently used, are processed by the hardware logic operator to reduce the burden on the main processor, thereby increasing the instruction processing speed.

특히, 본 발명 시스템의 하드웨어 논리 연산기는 1칩 주문형 반도체 회로로 제작되므로 저 소비전력과 사이즈 축소 효과도 얻을 수 있다.In particular, since the hardware logic calculator of the system of the present invention is made of a single-chip custom semiconductor circuit, low power consumption and size reduction effect can be obtained.

Claims (1)

산업용 설비를 제어하기 위한 피엘시 명령어의 처리속도를 향상 장치에 있어서, 피엘시의 CPU(16)와의 사이에서 제어신호 및 데이터 인터페이스를 위한 인터페이스 블록(15)과, 상기 인터페이스 블록으로부터 제어신호, 오피코드, 오퍼랜드 및 데이터를 받아들어 파이프라인을 통해 각 명령어를 패치, 해석 및 실행한 후, 그 결과를 저장, 출력하는 프로세서(11)와, 명령어의 오퍼랜드를 저장하는 데이터 어드레스 레지스터(13)를 포함하는 하드웨어 논리연산기(10)를 단일의 주문형 반도체 칩으로 설계하고, 상기 프로세서(11)에는 명령어 메모리(12)를 접속하여 5비트의 오피코드와 14비트의 오퍼랜드 명령어를 교환하게 구성하고, 상기 프로세서(11)에는 데이터 메모리(14)를 접속 구성하여 사용빈도가 높은 명령어의 하드웨어 연산처리를 통한 피엘시의 주프로세서의 부담을 줄여 명령어 처리속도를 향상시키는 것을 특징으로 하는 피엘시 명령어 고속처리 시스템.In the apparatus for improving the processing speed of the PID instruction for controlling the industrial equipment, the interface block 15 for the control signal and data interface with the CPU 16 of the PI, and the control signal, opi from the interface block A processor 11 for receiving code, operands and data, fetching, interpreting, and executing each instruction through a pipeline, and storing and outputting the result; and a data address register 13 for storing the operand of the instruction. The hardware logic operator 10 is designed as a single custom semiconductor chip, and the processor 11 is connected to the instruction memory 12 so as to exchange 5-bit opcodes and 14-bit operand instructions. (11) connects and configures the data memory (14), which is the main program of the PID through the hardware operation processing of frequently used instructions. Reduce the burden of standing Piel during high-speed instruction processing system which comprises improving instruction throughput.
KR1019960071106A 1996-12-24 1996-12-24 PI instruction high speed processing system KR100279511B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960071106A KR100279511B1 (en) 1996-12-24 1996-12-24 PI instruction high speed processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960071106A KR100279511B1 (en) 1996-12-24 1996-12-24 PI instruction high speed processing system

Publications (2)

Publication Number Publication Date
KR19980052162A true KR19980052162A (en) 1998-09-25
KR100279511B1 KR100279511B1 (en) 2001-02-01

Family

ID=66384365

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960071106A KR100279511B1 (en) 1996-12-24 1996-12-24 PI instruction high speed processing system

Country Status (1)

Country Link
KR (1) KR100279511B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101409070B1 (en) 2012-09-05 2014-06-18 엘에스산전 주식회사 Apparatus and method for data processing

Also Published As

Publication number Publication date
KR100279511B1 (en) 2001-02-01

Similar Documents

Publication Publication Date Title
US7003652B2 (en) Restarting translated instructions
US4674089A (en) In-circuit emulator
US7000094B2 (en) Storing stack operands in registers
US20020069402A1 (en) Scheduling control within a system having mixed hardware and software based instruction execution
US6591378B1 (en) Debug controller in a data processor and method therefor
US20020083302A1 (en) Hardware instruction translation within a processor pipeline
US4897787A (en) Data processing system
JPH035835A (en) Microprocessor
KR100210205B1 (en) Apparatus and method for providing a stall cache
CA2003004C (en) Apparatus and method for executing a conditional branch instruction
US5068821A (en) Bit processor with powers flow register switches control a function block processor for execution of the current command
KR100279511B1 (en) PI instruction high speed processing system
KR100374401B1 (en) Hardware device for executing programmable instructions based upon micro-instructions
EP0279953B1 (en) Computer system having mixed macrocode and microcode instruction execution
EP1177499B1 (en) Processor and method of executing instructions from several instruction sources
US6115807A (en) Static instruction decoder utilizing a circular queue to decode instructions and select instructions to be issued
US5361338A (en) Pipelined system for decomposing instruction into two decoding parts and either concurrently generating two operands addresses of merging decomposing decoding codes based upon the second operand
Yadav Microcontroller: features and applications
KR100639146B1 (en) Data processing system having a cartesian controller
Jelemensky et al. The MC68332 microcontroller
WO2024029174A1 (en) Processor for controlling pipeline processing based on jump instruction, and program storage medium
JPH0667896A (en) Single chip microcomputer
GB2367652A (en) Scheduling control within a system having mixed hardware and software based instruction execution
KR920002660B1 (en) Apparatus and method for block mode instruction
JPS6316350A (en) Microprocessor control system

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20041102

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee