KR20240064470A - Task Manager, Neural processing device and Method for Processing task dependency thereof - Google Patents

Task Manager, Neural processing device and Method for Processing task dependency thereof Download PDF

Info

Publication number
KR20240064470A
KR20240064470A KR1020220146548A KR20220146548A KR20240064470A KR 20240064470 A KR20240064470 A KR 20240064470A KR 1020220146548 A KR1020220146548 A KR 1020220146548A KR 20220146548 A KR20220146548 A KR 20220146548A KR 20240064470 A KR20240064470 A KR 20240064470A
Authority
KR
South Korea
Prior art keywords
task
dependency
descriptor
memory
neural
Prior art date
Application number
KR1020220146548A
Other languages
Korean (ko)
Inventor
신원규
지미옥
김홍윤
김진석
Original Assignee
리벨리온 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 리벨리온 주식회사 filed Critical 리벨리온 주식회사
Priority to KR1020220146548A priority Critical patent/KR20240064470A/en
Priority to US18/493,703 priority patent/US12026548B2/en
Publication of KR20240064470A publication Critical patent/KR20240064470A/en

Links

Images

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • G06F9/4862Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Neurology (AREA)
  • Advance Control (AREA)

Abstract

본 발명은 태스크 매니저, 뉴럴 프로세싱 장치 및 그의 태스크 디펜던시 처리 방법을 개시한다. 상기 태스크 매니저는 서로 다른 제1 타입의 제1 태스크 및 제2 타입의 제2 태스크를 수신하는 태스크 버퍼, 상기 태스크 버퍼로부터 상기 제1 태스크에 대한 제1 태스크 디스크립터를 수신하는 제1_1 큐, 상기 태스크 버퍼로부터 상기 제2 태스크에 대한 제2 태스크 디스크립터를 수신하는 제1_2 큐, 상기 제1 및 상기 제2 태스크 디스크립터의 디펜던시를 체크하는 디펜던시 체커, 상기 디펜던시 체커로부터 상기 제1 태스크 디스크립터를 수신하는 제2_1 큐 및 상기 디펜던시 체커로부터 상기 제2 태스크 디스크립터를 수신하는 제2_2 큐를 포함하고, 상기 디펜던시 체커는 복수의 디펜던시 매트릭스를 포함하고, 상기 복수의 디펜던시 매트릭스 각각은, 상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 행과, 상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 열을 포함한다.The present invention discloses a task manager, a neural processing device, and a task dependency processing method thereof. The task manager includes a task buffer for receiving a first task of a different first type and a second task of a second type, a 1_1 queue for receiving a first task descriptor for the first task from the task buffer, and the task A 1_2 queue for receiving a second task descriptor for the second task from a buffer, a dependency checker for checking the dependencies of the first and second task descriptors, and the first task from the dependency checker. A 2_1 queue for receiving a descriptor and a 2_2 queue for receiving the second task descriptor from the dependency checker, wherein the dependency checker includes a plurality of dependency matrices, and the plurality of dependencies Each of the time matrices includes first and second rows corresponding to the first and second types, respectively, and first and second columns corresponding to the first and second types, respectively.

Description

태스크 매니저, 뉴럴 프로세싱 장치 및 이의 태스크 디펜던시 처리 방법{Task Manager, Neural processing device and Method for Processing task dependency thereof}Task Manager, Neural processing device and Method for Processing task dependency thereof}

본 발명은 태스크 매니저, 뉴럴 프로세싱 장치 및 이의 태스크 디펜던시 처리 방법에 관한 것이다. 구체적으로, 본 발명은 더미 디스크립터를 이용하여 전체적인 태스크의 디펜던시 세팅 및 디펜던시 체크의 효율성을 향상시킨 태스크 매니저, 뉴럴 프로세싱 장치 및 그의 태스크 디펜던시 처리 방법에 관한 것이다.The present invention relates to a task manager, a neural processing device, and a task dependency processing method thereof. Specifically, the present invention relates to a task manager, a neural processing device, and a task dependency processing method that improves the efficiency of overall task dependency setting and dependency checking by using a dummy descriptor.

지난 몇년간, 인공지능(Artificial Intelligence) 기술은 4차 산업혁명의 핵심 기술로 전세계적으로 가장 유망한 기술로 거론되고 있다. 이러한 인공지능 기술의 가장 큰 문제는 컴퓨팅 성능이다. 인간의 학습능력과 추론능력, 지각능력, 자연언어의 이행능력 등을 실현해내는 인공지능 기술은 많은 데이터를 빠르게 처리하는 것이 가장 중요하다.Over the past few years, artificial intelligence (AI) technology has been mentioned as the most promising technology worldwide as a core technology of the 4th Industrial Revolution. The biggest problem with these artificial intelligence technologies is computing performance. For artificial intelligence technology that realizes human learning, reasoning, perception, and natural language translation abilities, the most important thing is to quickly process a lot of data.

초기 인공지능의 딥러닝 학습과 추론에는 기성 컴퓨터의 중앙 처리 장치(CPU; Central processing unit)나 그래픽 처리 장치(GPU; Graphics Processing Unit)가 쓰였지만, 높은 워크 로드를 가지는 딥러닝 학습 및 추론의 작업에는 한계가 있어 구조적으로 딥러닝 작업에 특화된 신경망 처리 장치(NPU; Neural Processing Unit)가 각광받고 있다. The central processing unit (CPU) or graphics processing unit (GPU) of existing computers were used for deep learning learning and inference in early artificial intelligence, but deep learning learning and inference tasks with high workloads were used. Due to its limitations, the Neural Processing Unit (NPU), which is structurally specialized for deep learning tasks, is gaining attention.

이러한 신경망 처리 장치는 내부에 복수의 연산 장치를 가지고 있고, 각각의 연산 장치가 병렬적으로 동작하여 연산 효율을 높일 수 있다. 이때, 각각의 연산 장치로 태스크를 분배하고 관리하는 방식이 중요할 수 있다. 복수의 태스크는 서로 디펜던시를 가질 수 있고, 이러한 디펜던시를 세팅하고, 체크하는 것은 태스크의 수행에 있어서 필수적인 부분이다. This neural network processing device has a plurality of calculation units inside, and each calculation unit operates in parallel to increase calculation efficiency. At this time, the method of distributing and managing tasks to each computing device may be important. Multiple tasks may have dependencies on each other, and setting and checking these dependencies is an essential part of task performance.

특히 일대일이 아닌 다대일 혹은 일대다의 디펜던시에 대해서 디펜던시 세팅과 체킹을 수행하는 방법이 필요한 실정이다.In particular, there is a need for a method of performing dependency setting and checking for many-to-one or one-to-many dependencies rather than one-to-one.

등록특허공보 제10-2258566호Registered Patent Publication No. 10-2258566

본 발명의 과제는, 태스크 디펜던시를 효율적으로 처리하는 태스크 매니저를 제공하는 것이다.The object of the present invention is to provide a task manager that efficiently processes task dependencies.

본 발명의 다른 과제는, 태스크 디펜던시를 효율적으로 처리하는 뉴럴 프로세싱 장치를 제공하는 것이다.Another object of the present invention is to provide a neural processing device that efficiently processes task dependency.

본 발명의 또 다른 과제는, 태스크 디펜던시를 효율적으로 처리하는 뉴럴 프로세싱 장치의 태스크 디펜던시 처리 방법을 제공하는 것이다.Another object of the present invention is to provide a task dependency processing method for a neural processing device that efficiently processes task dependencies.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the objects mentioned above, and other objects and advantages of the present invention that are not mentioned can be understood by the following description and will be more clearly understood by the examples of the present invention. Additionally, it will be readily apparent that the objects and advantages of the present invention can be realized by the means and combinations thereof indicated in the patent claims.

상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 태스크 매니저는, 서로 다른 제1 타입의 제1 태스크 및 제2 타입의 제2 태스크를 수신하는 태스크 버퍼, 상기 태스크 버퍼로부터 상기 제1 태스크에 대한 제1 태스크 디스크립터를 수신하는 제1_1 큐, 상기 태스크 버퍼로부터 상기 제2 태스크에 대한 제2 태스크 디스크립터를 수신하는 제1_2 큐, 상기 제1 및 상기 제2 태스크 디스크립터의 디펜던시를 체크하는 디펜던시 체커, 상기 디펜던시 체커로부터 상기 제1 태스크 디스크립터를 수신하는 제2_1 큐 및 상기 디펜던시 체커로부터 상기 제2 태스크 디스크립터를 수신하는 제2_2 큐를 포함하고, 상기 디펜던시 체커는 복수의 디펜던시 매트릭스를 포함하고, 상기 복수의 디펜던시 매트릭스 각각은, 상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 행과, 상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 열을 포함한다.A task manager according to some embodiments of the present invention for solving the above problem includes a task buffer that receives a first task of a different first type and a second task of a second type, and a task buffer that receives a first task of a different first type and a second task of a second type from the task buffer to the first task. A 1_1 queue that receives the first task descriptor for the second task, a 1_2 queue that receives the second task descriptor for the second task from the task buffer, and a dependency that checks the dependencies of the first and second task descriptors. It includes a dependency checker, a 2_1 queue that receives the first task descriptor from the dependency checker, and a 2_2 queue that receives the second task descriptor from the dependency checker, and the dependency checker includes a plurality of and a dependency matrix, wherein each of the plurality of dependency matrices includes first and second rows corresponding to the first and second types, respectively, and first and second rows corresponding to the first and second types, respectively. Includes 1st and 2nd rows.

또한, 상기 복수의 디펜던시 매트릭스는, 제1 그룹과, 제2 그룹을 포함하고, 상기 제1 그룹은 상기 제1 태스크 디스크립터를 처리하고, 상기 제2 그룹은 제3 태스크 디스크립터를 처리하고, 상기 제3 태스크 디스크립터는 상기 제1 타입의 제3 태스크에 대한 디스크립터일 수 있다.In addition, the plurality of dependency matrices include a first group and a second group, the first group processes the first task descriptor, the second group processes the third task descriptor, The third task descriptor may be a descriptor for the third task of the first type.

또한, 상기 제1 및 제2 태스크는 각각 제3 태스크에 디펜던트하고, 상기 디펜던시 체커는 상기 제3 태스크에 대한 제3 태스크 디스크립터 및 제3 더미 세트 디스크립터를 수신하고, 상기 제3 태스크 디스크립터 및 상기 제3 더미 세트 디스크립터는 서로 다른 그룹의 상기 디펜던시 매트릭스로 할당될 수 있다.In addition, the first and second tasks are each dependent on a third task, the dependency checker receives a third task descriptor and a third dummy set descriptor for the third task, and the third task descriptor And the third dummy set descriptor may be allocated to the dependency matrices of different groups.

또한, 상기 태스크 버퍼, 상기 제1_1 큐, 상기 제1_2 큐, 상기 디펜던시 체커, 상기 제2_1 큐 및 상기 제2_2 큐를 포함하는 태스크 패시지와, 상기 제1 내지 제3 태스크 디스크립터 및 상기 제3 더미 세트 디스크립터를 체크 아웃시키는 던 패시지를 포함할 수 있다.In addition, a task passage including the task buffer, the 1_1 queue, the 1_2 queue, the dependency checker, the 2_1 queue, and the 2_2 queue, the first to third task descriptors, and the third It may contain a throw passage that checks out a dummy set descriptor.

또한, 상기 태스크 패시지는 상기 제1 내지 제3 태스크 디스크립터를 코어 글로벌로 전송할 수 있다.Additionally, the task passage may transmit the first to third task descriptors to the core global.

또한, 상기 태스크 패시지로부터 상기 제3 더미 세트 디스크립터를 수신하고, 상기 더미 세트 디스크립터를 상기 던 패시지로 전달하는 보이드 코어를 더 포함할 수 있다.In addition, it may further include a void core that receives the third dummy set descriptor from the task passage and transmits the dummy set descriptor to the dune passage.

또한, 상기 보이드 코어는 상기 더미 세트 디스크립터를 상기 던 패시지로 전송할 수 있다.Additionally, the void core may transmit the dummy set descriptor to the dark passage.

또한, 제4 태스크는 제5 및 제6 태스크에 각각 디펜던트하고, 상기 디펜던시 체커는 상기 제4 태스크에 대한 제4 태스크 디스크립터 및 제4 더미 체크 디스크립터를 수신하고, 상기 제4 태스크 디스크립터 및 제4 더미 체크 디스크립터는 서로 다른 그룹의 디펜던시 매트릭스로 할당될 수 있다.In addition, the fourth task is dependent on the fifth and sixth tasks, respectively, and the dependency checker receives a fourth task descriptor and a fourth dummy check descriptor for the fourth task, and the fourth task descriptor and The fourth dummy check descriptor may be assigned to dependency matrices of different groups.

또한, 상기 제4 더미 체크 디스크립터는 상기 디펜던시 체커 내에서 소각될 수 있다.Additionally, the fourth dummy check descriptor may be burned within the dependency checker.

상기 다른 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치는 적어도 하나의 뉴럴 프로세서, 상기 적어도 하나의 뉴럴 프로세서가 공유하는 공유 메모리, 상기 적어도 하나의 뉴럴 프로세서 및 상기 공유 메모리가 데이터를 교환하는 글로벌 인터커넥션, 상기 적어도 하나의 뉴럴 프로세서는 각각 태스크 매니저를 포함하고, 상기 태스크 매니저는, 복수의 디스크립터를 수신하고, 상기 복수의 디스크립터 사이의 디펜던시를 체크하여 뉴럴 코어로 전송하고, 상기 복수의 디스크립터는 태스크 디스크립터, 더미 체크 디스크립터 및 더미 세트 디스크립터를 포함하고, 상기 더미 체크 디스크립터는 태스크 매니저 내부에서 소각될 수 있다.A neural processing device according to some embodiments of the present invention for solving the above other problems includes at least one neural processor, a shared memory shared by the at least one neural processor, and the at least one neural processor and the shared memory store data. Exchange global interconnection, each of the at least one neural processor includes a task manager, the task manager receives a plurality of descriptors, checks dependencies between the plurality of descriptors, and transmits them to the neural core, The plurality of descriptors include a task descriptor, a dummy check descriptor, and a dummy set descriptor, and the dummy check descriptor may be burned within the task manager.

또한, 상기 더미 세트 디스크립터는 상기 태스크 디스크립터에 디펜던트한 후속 태스크 디스크립터가 2개 이상일 경우 상기 후속 태스크 디스크립터의 개수보다 1개 적게 수신될 수 있다.Additionally, if there are two or more subsequent task descriptors dependent on the task descriptor, the dummy set descriptor may be received one less than the number of subsequent task descriptors.

또한, 상기 더미 체크 디스크립터는 2개 이상의 상기 태스크 디스크립터가 하나의 후속 태스크 디스크립터에 디펜던트한 경우 상기 태스크 디스크립터의 개수보다 1개 적게 수신될 수 있다.Additionally, when two or more task descriptors depend on one subsequent task descriptor, one less dummy check descriptor may be received than the number of task descriptors.

또한, 상기 태스크 매니저는, 상기 복수의 디스크립터를 수신하여 디펜던시에 따라 상기 뉴럴 코어로 전달하는 태스크 패시지와, 상기 태스크 디스크립터 및 상기 더미 세트 디스크립터를 상기 뉴럴 코어에서 수신하고, 완료 여부를 커맨드 프로세서로 보고하는 던 패시지를 포함할 수 있다.In addition, the task manager receives a task passage that receives the plurality of descriptors and delivers them to the neural core according to dependency, the task descriptor and the dummy set descriptor from the neural core, and determines whether or not the command processor is complete. It may contain a dun passage reporting as .

또한, 상기 완료 여부는 상기 태스크 디스크립터의 완료 여부를 포함하고, 상기 더미 세트 디스크립터의 완료 여부를 포함하지 않을 수 있다.Additionally, the completion status may include completion of the task descriptor and may not include completion of the dummy set descriptor.

또한, 상기 던 패시지는, 상기 태스크 디스크립터 및 상기 더미 세트 디스크립터가 체크아웃되면 상기 태스크 패시지로 디펜던시 필드 업데이트 리퀘스트를 전달할 수 있다.Additionally, the dawn passage may transmit a dependency field update request to the task passage when the task descriptor and the dummy set descriptor are checked out.

또한, 상기 태스크 패시지는 상기 디펜던시 필드 업데이트 리퀘스트를 수신하고, 상기 복수의 디스크립터 사이의 디펜던시를 체크하는 디펜던시 체커를 포함할 수 있다.Additionally, the task passage may include a dependency checker that receives the dependency field update request and checks dependencies between the plurality of descriptors.

또한, 상기 디펜던시 체커는 복수의 그룹의 디펜던시 매트릭스를 포함할 수 있다.Additionally, the dependency checker may include a plurality of groups of dependency matrices.

상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 태스크 디펜던시 처리 방법은 디펜던시 세트 코드를 수신하고, 상기 디펜던시 세트 코드에 따라 디펜던시 매트릭스를 저장하고, 태스크 디스크립터의 디펜던시 체크 코드와 상기 디펜던시 매트릭스의 대응 로우를 비교하고, 상기 디펜던시 체크 코드와 상기 대응 로우가 동일하면 상기 대응 로우를 클리어하고, 상기 태스크 디스크립터를 전송하는 것을 포함한다.A task dependency processing method according to some embodiments of the present invention to solve the above problem includes receiving a dependency set code, storing a dependency matrix according to the dependency set code, and storing the dependency matrix of the task descriptor. Comparing a dependency check code with a corresponding row of the dependency matrix, clearing the corresponding row if the dependency check code and the corresponding row are the same, and transmitting the task descriptor.

또한, 상기 디펜던시 세트 코드를 수신하는 것은, 상기 태스크 디스크립터 및 더미 세트 디스크립터를 체크아웃하고, 상기 태스크 디스크립터에 대한 상기 디펜던시 세트 코드를 생성하는 것을 포함할 수 있다.Additionally, receiving the dependency set code may include checking out the task descriptor and a dummy set descriptor and generating the dependency set code for the task descriptor.

또한, 상기 태스크 디스크립터를 전송하는 것은, 더미 체크 디스크립터와 태스크 디스크립터를 식별하고, 상기 더미 체크 디스크립터를 소각하는 것을 포함할 수 있다.Additionally, transmitting the task descriptor may include identifying a dummy check descriptor and a task descriptor, and incinerating the dummy check descriptor.

본 발명의 태스크 매니저, 뉴럴 프로세싱 장치 및 그의 태스크 디펜던시 처리 방법은, 태스크 매니저가 커맨드 프로세서에 보고 없이 스스로 태스크 사이의 디펜던시를 체크하여 처리할 수 있도록 구성될 수 있으며, 서로 다른 디펜던시 매트릭스에서 제공되는 복수의 태스크 디스크립터에 대해서도 디펜던시를 설정할 수 있도록 구성되어 전체적인 태스크의 디펜던시 구성될 수 있다. The task manager, neural processing device, and task dependency processing method of the present invention can be configured so that the task manager can check and process dependencies between tasks on its own without reporting to the command processor, and can handle different dependencies. It is configured so that dependencies can be set for a plurality of task descriptors provided in the time matrix, so that dependencies of the overall task can be configured.

또한, 더미 디스크립터를 통해서 디펜던시가 복수로 설정되는 경우도 효과적으로 처리할 수 있다.Additionally, the case where multiple dependencies are set through a dummy descriptor can be effectively handled.

이에 따라, 커맨드 프로세서와 태스크 매니저 사이의 트래픽을 최소화하여 장치 전체의 처리 속도와 효율을 극대화할 수 있다.Accordingly, the processing speed and efficiency of the entire device can be maximized by minimizing traffic between the command processor and the task manager.

상술한 내용과 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다.In addition to the above-described content, specific effects of the present invention are described below while explaining specific details for carrying out the invention.

도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.
도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.
도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.
도 4는 도 3의 글로벌 인터커넥션을 세부적으로 설명하기 위한 구조도이다.
도 5는 도 1의 뉴럴 프로세싱 장치의 제어 신호의 흐름을 설명하기 위한 블록도이다.
도 6은 도 3의 뉴럴 프로세서를 세부적으로 설명하기 위한 블록도이다.
도 7은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 계층적 구조를 설명하기 위한 도면이다.
도 8은 도 6의 뉴럴 코어를 세부적으로 설명하기 위한 블록도이다.
도 9는 도 8의 LSU을 세부적으로 설명하기 위한 블록도이다.
도 10은 도 8의 프로세싱 유닛을 세부적으로 설명하기 위한 블록도이다.
도 11은 도 8의 L0 메모리를 세부적으로 설명하기 위한 블록도이다.
도 12는 도 11의 로컬 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.
도 13은 도 1의 뉴럴 프로세싱 장치의 데이터와 제어 신호의 흐름을 설명하기 위한 블록도이다.
도 14는 도 13의 커맨드 프로세서와 태스크 매니저의 관계를 설명하기 위한 블록도이다.
도 15는 도 8의 태스크 매니저의 구조를 세부적으로 설명하기 위한 블록도이다.
도 16은 도 15의 테이블 패시지를 세부적으로 설명하기 위한 블록도이다.
도 17은 도 15의 태스크 패시지를 세부적으로 설명하기 위한 블록도이다.
도 18은 도 17의 디펜던시 체커의 내부에 저장된 제1 디펜던시 매트릭스를 설명하기 위한 도면이다.
도 19는 도 15의 던 패시지를 세부적으로 설명하기 위한 블록도이다.
도 20은 도 19의 리포트 매니징 모듈을 세부적으로 설명하기 위한 블록도이다.
도 21은 도 15의 코어 글로벌과 태스크 프로세싱 유닛이 교환하는 데이터를 설명하기 위한 도면이다.
도 22는 제1 큐, 제2 큐 및 체크인 버퍼에 저장되는 태스크 디스크립터의 타입을 설명하기 위한 도면이다.
도 23은 도 22에 따른 태스크 디스크립터의 디펜던시를 체크하기 위한 예시적인 디펜던시 매트릭스를 설명하기 위한 도면이다.
도 24 내지 도 27은 제2 디펜던시 매트릭스의 동작을 설명하기 위한 예시도이다.
도 28은 복수의 태스크 디스크립터 사이의 디펜던시를 체크하기 위한 디펜던시 매트릭스의 예시도이다.
도 29는 각 그룹에 따른 레이턴시 감소 효과를 설명하기 위한 개념도이다.
도 30은 서로 다른 디펜던시 매트릭스에서 복수의 태스크 디스크립터와 디펜던시가 체크되는 하나의 태스크 디스크립터를 예시적으로 도시한다.
도 31은 더미 체크 디스크립터를 설명하기 위한 도면이다.
도 32는 디펜던시 체커에서 더미 체크 디스크립터가 소각되는 것을 설명하기 위한 도면이다.
도 33은 서로 다른 디펜던시 매트릭스에서 하나의 태스크 디스크립터와 디펜던시가 체크되는 복수의 태스크 디스크립터를 예시적으로 도시한다.
도 34는 더미 세트 디스크립터를 설명하기 위한 도면이다.
도 35는 도 15의 보이드 코어에서 수행되는 데이터 교환 과정을 설명하기 위한 도면이다.
도 36은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제1 큐, 제2 큐 및 체크인 버퍼를 설명하기 위한 도면이다.
도 37은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제1 큐, 제2 큐 및 체크인 버퍼를 설명하기 위한 도면이다.
도 38은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 구조를 세부적으로 설명하기 위한 블록도이다.
도 39는 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 커맨드 프로세서와 태스크 매니저의 계층적 구조를 설명하기 위한 도면이다.
도 40은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 커맨드 프로세서 및 태스크 매니저들의 계층 구조를 설명하기 위한 도면이다.
도 41은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성을 설명하기 위한 블록도이다.
도 42는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성의 예시를 나타낸 블록도이다.
도 43은 도 41의 A부분을 확대한 블록도이다.
도 44는 도 43의 제1 메모리 뱅크를 세부적으로 설명하기 위한 도면이다.
도 45는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.
도 46은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.
도 47은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.
도 48은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 태스크 디펜던시 세팅 방법을 설명하기 위한 순서도이다.
도 49는 도 48의 디펜던시 세트 코드를 수신하는 단계를 세부적으로 설명하기 위한 순서도이다.
도 50은 도 48의 태스크 디스크립터를 전송하는 단계를 세부적으로 설명하기 위한 순서도이다.
1 is a block diagram for explaining a neural processing system according to some embodiments of the present invention.
FIG. 2 is a block diagram for explaining the neural processing device of FIG. 1 in detail.
FIG. 3 is a block diagram for explaining the neural core SoC of FIG. 2 in detail.
FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.
FIG. 5 is a block diagram for explaining the flow of control signals of the neural processing device of FIG. 1.
FIG. 6 is a block diagram for explaining the neural processor of FIG. 3 in detail.
FIG. 7 is a diagram illustrating the hierarchical structure of a neural processing device according to some embodiments of the present invention.
FIG. 8 is a block diagram for explaining the neural core of FIG. 6 in detail.
FIG. 9 is a block diagram for explaining the LSU of FIG. 8 in detail.
FIG. 10 is a block diagram for explaining the processing unit of FIG. 8 in detail.
FIG. 11 is a block diagram for explaining the L0 memory of FIG. 8 in detail.
FIG. 12 is a block diagram for explaining the local memory bank of FIG. 11 in detail.
FIG. 13 is a block diagram for explaining the flow of data and control signals of the neural processing device of FIG. 1.
FIG. 14 is a block diagram for explaining the relationship between the command processor and task manager of FIG. 13.
FIG. 15 is a block diagram to explain in detail the structure of the task manager of FIG. 8.
FIG. 16 is a block diagram for explaining the table passage of FIG. 15 in detail.
FIG. 17 is a block diagram for explaining the task passage of FIG. 15 in detail.
FIG. 18 is a diagram for explaining the first dependency matrix stored inside the dependency checker of FIG. 17.
FIG. 19 is a block diagram for explaining the Dawn passage of FIG. 15 in detail.
FIG. 20 is a block diagram for explaining the report management module of FIG. 19 in detail.
FIG. 21 is a diagram illustrating data exchanged between the core global and the task processing unit of FIG. 15.
Figure 22 is a diagram for explaining the types of task descriptors stored in the first queue, second queue, and check-in buffer.
FIG. 23 is a diagram illustrating an exemplary dependency matrix for checking the dependency of the task descriptor according to FIG. 22.
Figures 24 to 27 are exemplary diagrams for explaining the operation of the second dependency matrix.
Figure 28 is an example diagram of a dependency matrix for checking dependencies between a plurality of task descriptors.
Figure 29 is a conceptual diagram to explain the latency reduction effect for each group.
Figure 30 exemplarily shows a plurality of task descriptors and one task descriptor whose dependency is checked in different dependency matrices.
Figure 31 is a diagram for explaining a dummy check descriptor.
Figure 32 is a diagram to explain that a dummy check descriptor is burned in the dependency checker.
Figure 33 exemplarily shows one task descriptor and a plurality of task descriptors whose dependencies are checked in different dependency matrices.
Figure 34 is a diagram for explaining a dummy set descriptor.
FIG. 35 is a diagram for explaining the data exchange process performed in the void core of FIG. 15.
FIG. 36 is a diagram illustrating a first queue, a second queue, and a check-in buffer of a neural processing device according to some embodiments of the present invention.
FIG. 37 is a diagram illustrating a first queue, a second queue, and a check-in buffer of a neural processing device according to some embodiments of the present invention.
Figure 38 is a block diagram for explaining in detail the structure of a neural processing device according to some embodiments of the present invention.
FIG. 39 is a diagram illustrating the hierarchical structure of a command processor and a task manager of a neural processing device according to some embodiments of the present invention.
FIG. 40 is a diagram illustrating the hierarchical structure of command processors and task managers of a neural processing device according to some embodiments of the present invention.
Figure 41 is a block diagram for explaining memory reorganization of a neural processing system according to some embodiments of the present invention.
Figure 42 is a block diagram showing an example of memory reorganization of a neural processing system according to some embodiments of the present invention.
Figure 43 is an enlarged block diagram of part A of Figure 41.
FIG. 44 is a diagram for explaining the first memory bank of FIG. 43 in detail.
Figure 45 is a block diagram to explain the software hierarchy of a neural processing device according to some embodiments of the present invention.
Figure 46 is a conceptual diagram to explain a deep learning operation performed by a neural processing device according to some embodiments of the present invention.
Figure 47 is a conceptual diagram for explaining learning and inference operations of a neural network of a neural processing device according to some embodiments of the present invention.
Figure 48 is a flowchart illustrating a method of setting task dependency of a neural processing device according to some embodiments of the present invention.
FIG. 49 is a flowchart illustrating in detail the step of receiving the dependency set code of FIG. 48.
FIG. 50 is a flowchart illustrating in detail the step of transmitting the task descriptor of FIG. 48.

본 명세서 및 특허청구범위에서 사용된 용어나 단어는 일반적이거나 사전적인 의미로 한정하여 해석되어서는 아니된다. 발명자가 그 자신의 발명을 최선의 방법으로 설명하기 위해 용어나 단어의 개념을 정의할 수 있다는 원칙에 따라, 본 발명의 기술적 사상과 부합하는 의미와 개념으로 해석되어야 한다. 또한, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명이 실현되는 하나의 실시예에 불과하고, 본 발명의 기술적 사상을 전부 대변하는 것이 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 및 응용 가능한 예들이 있을 수 있음을 이해하여야 한다.Terms or words used in this specification and patent claims should not be construed as limited to their general or dictionary meaning. According to the principle that the inventor can define the term or word concept in order to explain his or her invention in the best way, it should be interpreted with a meaning and concept consistent with the technical idea of the present invention. In addition, the embodiments described in this specification and the configurations shown in the drawings are only one embodiment of the present invention and do not completely represent the technical idea of the present invention, so they cannot be replaced at the time of filing the present application. It should be understood that there may be various equivalents, variations, and applicable examples.

본 명세서 및 특허청구범위에서 사용된 제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. '및/또는' 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B used in the present specification and claims may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be named a second component without departing from the scope of the present invention, and similarly, the second component may also be named a first component. The term 'and/or' includes any of a plurality of related stated items or a combination of a plurality of related stated items.

본 명세서 및 특허청구범위에서 사용된 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서 "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the specification and claims are merely used to describe specific embodiments and are not intended to limit the invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, terms such as "include" or "have" should be understood as not precluding the existence or addition possibility of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification. .

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해서 일반적으로 이해되는 것과 동일한 의미를 가지고 있다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by a person of ordinary skill in the technical field to which the present invention pertains.

일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Terms defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in the present application, should not be interpreted in an ideal or excessively formal sense. No.

또한, 본 발명의 각 실시예에 포함된 각 구성, 과정, 공정 또는 방법 등은 기술적으로 상호 간 모순되지 않는 범위 내에서 공유될 수 있다. Additionally, each configuration, process, process, or method included in each embodiment of the present invention may be shared within the scope of not being technically contradictory to each other.

이하, 도 1 내지 도 39를 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명한다.Hereinafter, a neural processing device according to some embodiments of the present invention will be described with reference to FIGS. 1 to 39.

도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.1 is a block diagram for explaining a neural processing system according to some embodiments of the present invention.

도 1을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 제1 뉴럴 프로세싱 장치(1), 제2 뉴럴 프로세싱 장치(2) 및 외부 인터페이스(3)를 포함할 수 있다.Referring to FIG. 1, a neural processing system (NPS) according to some embodiments of the present invention may include a first neural processing device 1, a second neural processing device 2, and an external interface 3. .

제1 뉴럴 프로세싱 장치(1)는 인공 신경망을 이용하여 연산을 수행하는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1)는 예를 들어, 딥 러닝(deep learning) 연산 작업을 수행하는 것에 특화된 장치일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first neural processing device 1 may be a device that performs calculations using an artificial neural network. For example, the first neural processing device 1 may be a device specialized for performing deep learning calculation tasks. However, this embodiment is not limited to this.

제2 뉴럴 프로세싱 장치(2)는 제1 뉴럴 프로세싱 장치(1)와 동일 내지 유사한 구성을 가지는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)는 서로 외부 인터페이스(3)를 통해서 연결되어 데이터 및 제어 신호를 공유할 수 있다.The second neural processing device 2 may be a device that has the same or similar configuration as the first neural processing device 1. The first neural processing device 1 and the second neural processing device 2 may be connected to each other through an external interface 3 and share data and control signals.

도 1에서는 2개의 뉴럴 프로세싱 장치를 도시하였지만, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)이 이에 제한되는 것은 아니다. 즉, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 3개 이상의 뉴럴 프로세싱 장치가 외부 인터페이스(3)를 통해서 서로 연결될 수도 있다. 또한, 반대로, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 하나의 뉴럴 프로세싱 장치만을 포함할 수도 있다.Although two neural processing devices are shown in FIG. 1, the neural processing system (NPS) according to some embodiments of the present invention is not limited thereto. That is, in the neural processing system (NPS) according to some embodiments of the present invention, three or more neural processing devices may be connected to each other through the external interface 3. Also, conversely, a neural processing system (NPS) according to some embodiments of the present invention may include only one neural processing device.

이때, 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)는 각각 뉴럴 프로세싱 장치가 아닌 다른 프로세싱 장치일 수도 있다. 즉, 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)는 각각 그래픽 프로세싱 장치(GPU, graphics processing unit), 중앙 처리 장치(CPU, central processing unit) 및 그 외의 다른 종류의 프로세싱 장치일 수도 있다. 이하에서는 편의상 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)가 뉴럴 프로세싱 장치인 것으로 설명한다.At this time, the first neural processing device 1 and the second neural processing device 2 may each be a processing device other than a neural processing device. That is, the first neural processing device 1 and the second neural processing device 2 are respectively a graphics processing unit (GPU, graphics processing unit), a central processing unit (CPU), and other types of processing devices. It may be. Hereinafter, for convenience, the first neural processing device 1 and the second neural processing device 2 will be described as neural processing devices.

도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.FIG. 2 is a block diagram for explaining the neural processing device of FIG. 1 in detail.

도 2를 참조하면, 제1 뉴럴 프로세싱 장치(1)는 뉴럴 코어 SoC(10), CPU(20), 오프 칩 메모리(30), 제1 비휘발성 메모리 인터페이스(40), 제1 휘발성 메모리 인터페이스(50), 제2 비휘발성 메모리 인터페이스(60), 제2 휘발성 메모리 인터페이스(70) 및 컨트롤 인터페이스(CIF)(80)를 포함할 수 있다.Referring to FIG. 2, the first neural processing device 1 includes a neural core SoC 10, a CPU 20, an off-chip memory 30, a first non-volatile memory interface 40, and a first volatile memory interface ( 50), a second non-volatile memory interface 60, a second volatile memory interface 70, and a control interface (CIF) 80.

뉴럴 코어 SoC(10)는 시스템 온 칩(System on Chip) 장치일 수 있다. 뉴럴 코어 SoC(10)는 인공지능 연산 유닛으로 가속기(Accelerator)일 수 있다. 뉴럴 코어 SoC(10)는 예를 들어, GPU(graphics processing unit), FPGA(field programmable gate array) 및 ASIC(application-specific integrated circuit) 중 어느 하나일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The Neural Core SoC 10 may be a System on Chip device. The neural core SoC (10) is an artificial intelligence calculation unit and may be an accelerator. The neural core SoC 10 may be, for example, one of a graphics processing unit (GPU), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). However, this embodiment is not limited to this.

뉴럴 코어 SoC(10)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 유닛들과 데이터를 교환할 수 있다. 또한, 뉴럴 코어 SoC(10)는 제1 비휘발성 메모리 인터페이스(40) 및 제1 휘발성 메모리 인터페이스(50)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The neural core SoC (10) can exchange data with other external computational units through the external interface (3). Additionally, the neural core SoC 10 may be connected to the non-volatile memory 31 and the volatile memory 32 through the first non-volatile memory interface 40 and the first volatile memory interface 50, respectively.

CPU(20)는 제1 뉴럴 프로세싱 장치(1)의 시스템을 통제하고 프로그램의 연산을 실행하는 제어장치일 수 있다. CPU(20)는 범용 연산 유닛으로서 딥러닝에 많이 사용되는 병렬 단순 연산을 수행하기에는 효율이 낮을 수 있다. 따라서, 뉴럴 코어 SoC(10)가 딥러닝 추론 및 학습 작업에 연산을 수행하여 높은 효율을 가질 수 있다.The CPU 20 may be a control device that controls the system of the first neural processing device 1 and executes program operations. The CPU 20 is a general-purpose calculation unit and may be inefficient in performing parallel simple calculations commonly used in deep learning. Accordingly, the neural core SoC 10 can achieve high efficiency by performing calculations on deep learning inference and learning tasks.

CPU(20)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 유닛들과 데이터를 교환할 수 있다. 또한, CPU(20)는 제2 비휘발성 메모리 인터페이스(60) 및 제2 휘발성 메모리 인터페이스(70)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The CPU 20 can exchange data with other external computational units through the external interface 3. Additionally, the CPU 20 may be connected to the non-volatile memory 31 and the volatile memory 32 through the second non-volatile memory interface 60 and the second volatile memory interface 70, respectively.

CPU(20)는 또한, 커맨드를 통해서 뉴럴 코어 SoC(10)에 태스크를 전달할 수 있다. 이때, CPU(20)는 뉴럴 코어 SoC(10)에 지시를 주는 일종의 호스트(Host)일 수 있다. 즉, 뉴럴 코어 SoC(10)는 CPU(20)의 지시에 따라서 딥러닝 작업 등 병렬 연산 작업을 효율적으로 수행할 수 있다.The CPU 20 may also transfer a task to the neural core SoC 10 through a command. At this time, the CPU 20 may be a type of host that gives instructions to the neural core SoC 10. In other words, the neural core SoC 10 can efficiently perform parallel computing tasks such as deep learning tasks according to instructions from the CPU 20.

오프 칩 메모리(30)는 뉴럴 코어 SoC(10)의 칩 외부에 배치된 메모리일 수 있다. 오프 칩 메모리(30)는 비휘발성 메모리(31) 및 휘발성 메모리(32)를 포함할 수 있다.The off-chip memory 30 may be memory placed outside the chip of the neural core SoC 10. Off-chip memory 30 may include non-volatile memory 31 and volatile memory 32.

비휘발성 메모리(31)는 전원이 공급되지 않아도 저장된 정보를 계속 유지하는 메모리일 수 있다. 비휘발성 메모리(31)는 예를 들어, ROM(Read-Only Memory), PROM(Programmable Read-Only Memory), EAROM(Erasable Alterable ROM), EPROM(Erasable Programmable Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory)(예를 들어, 낸드 플래시 메모리(NAND Flash memory), 노어 플래시 메모리(NOR Flash memory)), UVEPROM(Ultra-Violet Erasable Programmable Read-Only Memory), FeRAM(Ferroelectric Random Access Memory), MRAM(Magnetoresistive Random Access Memory), PRAM(Phase-change Random Access Memory), SONOS(silicon-oxide-nitride-oxide-silicon), RRAM(Resistive Random Access Memory), NRAM(Nanotube Random Access Memory), 마그네틱 컴퓨터 기억 장치(예를 들면, 하드 디스크, 디스켓 드라이브, 마그네틱 테이프), 광디스크 드라이브 및 3D 크로스포인트 메모리(3D XPoint memory) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The non-volatile memory 31 may be a memory that continues to retain stored information even when power is not supplied. The non-volatile memory 31 includes, for example, Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Alterable ROM (EAROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Memory (EEPROM). Read-Only Memory (e.g., NAND Flash memory, NOR Flash memory), UVEPROM (Ultra-Violet Erasable Programmable Read-Only Memory), FeRAM (Ferroelectric Random Access Memory), Magnetoresistive Random Access Memory (MRAM), Phase-change Random Access Memory (PRAM), silicon-oxide-nitride-oxide-silicon (SONOS), Resistive Random Access Memory (RRAM), Nanotube Random Access Memory (NRAM), magnetic computer memory It may include at least one of a device (eg, hard disk, diskette drive, magnetic tape), optical disk drive, and 3D XPoint memory. However, this embodiment is not limited to this.

휘발성 메모리(32)는 비휘발성 메모리(31)와 달리, 저장된 정보를 유지하기 위해서 전력을 지속적으로 필요로 하는 메모리일 수 있다. 휘발성 메모리(32)는 예를 들어, DRAM(Dynamic Random Access Memory), SRAM(Static Random Access Memory), SDRAM(Synchronous Dynamic Random Access Memory) 및 DDR SDRAM(Double Data Rate SDRAM) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.Unlike the non-volatile memory 31, the volatile memory 32 may be a memory that continuously requires power to maintain stored information. The volatile memory 32 may include, for example, at least one of Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Synchronous Dynamic Random Access Memory (SDRAM), and Double Data Rate SDRAM (DDR SDRAM). there is. However, this embodiment is not limited to this.

제1 비휘발성 메모리 인터페이스(40) 및 제2 비휘발성 메모리 인터페이스(60)는 각각 예를 들어, PATA(Parallel Advanced Technology Attachment), SCSI(Small Computer System Interface), SAS(Serial Attached SCSI), SATA(Serial Advanced Technology Attachment) 및 PCIe(PCI Express) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first non-volatile memory interface 40 and the second non-volatile memory interface 60 are, for example, Parallel Advanced Technology Attachment (PATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), and SATA ( It may include at least one of Serial Advanced Technology Attachment) and PCIe (PCI Express). However, this embodiment is not limited to this.

제1 휘발성 메모리 인터페이스(50) 및 제2 휘발성 메모리 인터페이스(70)는 각각 예를 들어, SDR(Single Data Rate), DDR(Double Data Rate), QDR(Quad Data Rate), 및 XDR(eXtreme Data Rate, Octal Data Rate) 중 적어도 하나일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first volatile memory interface 50 and the second volatile memory interface 70 may be configured to perform, for example, single data rate (SDR), double data rate (DDR), quad data rate (QDR), and eXtreme data rate (XDR), respectively. , Octal Data Rate). However, this embodiment is not limited to this.

컨트롤 인터페이스(80)는 CPU(20)와 뉴럴 코어 SoC(10) 사이의 제어 신호를 전달하기 위한 인터페이스일 수 있다. 컨트롤 인터페이스(80)는 CPU(20)의 커맨드를 전송하고, 이에 대한 뉴럴 코어 SoC(10)의 응답을 전송할 수 있다. 컨트롤 인터페이스(80)는 예를 들어, PCIe(PCI Express)일 수 있으나, 이에 제한되는 것은 아니다.The control interface 80 may be an interface for transmitting control signals between the CPU 20 and the neural core SoC 10. The control interface 80 may transmit a command from the CPU 20 and a response from the neural core SoC 10 thereto. The control interface 80 may be, for example, PCIe (PCI Express), but is not limited thereto.

도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.FIG. 3 is a block diagram for explaining the neural core SoC of FIG. 2 in detail.

도 2 및 도 3을 참조하면, 뉴럴 코어 SoC(10)는 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(Direct Memory Access)(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000), 커맨드 프로세서(7000) 및 글로벌 인터커넥션(6000)을 포함할 수 있다.2 and 3, the neural core SoC 10 includes at least one neural processor 1000, a shared memory 2000, a direct memory access (DMA) 3000, a non-volatile memory controller 4000, and a volatile memory controller 4000. It may include a memory controller 5000, a command processor 7000, and a global interconnection 6000.

뉴럴 프로세서(1000)는 연산 작업을 직접 수행하는 연산 유닛일 수 있다. 뉴럴 프로세서(1000)가 복수인 경우 연산 작업은 각각의 뉴럴 프로세서(1000)로 할당될 수 있다. 각각의 뉴럴 프로세서(1000)는 글로벌 인터커넥션(6000)을 통해서 서로 연결될 수 있다.The neural processor 1000 may be a computational unit that directly performs computational tasks. When there are multiple neural processors 1000, computational tasks may be assigned to each neural processor 1000. Each neural processor 1000 may be connected to each other through a global interconnection 6000.

공유 메모리(2000)는 여러 뉴럴 프로세서(1000)에 의해서 공유되는 메모리일 수 있다. 공유 메모리(2000)는 각각의 뉴럴 프로세서(1000)의 데이터를 저장할 수 있다. 또한, 공유 메모리(2000)는 오프 칩 메모리(30)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 뉴럴 프로세서(1000)로 전달할 수 있다. 반대로, 공유 메모리(2000)는 뉴럴 프로세서(1000)로부터 데이터를 수신하여 일시적으로 저장하고 도 2의 오프 칩 메모리(30)로 전달할 수도 있다. The shared memory 2000 may be memory shared by several neural processors 1000. The shared memory 2000 can store data of each neural processor 1000. Additionally, the shared memory 2000 can receive data from the off-chip memory 30, temporarily store it, and transmit it to each neural processor 1000. Conversely, the shared memory 2000 may receive data from the neural processor 1000, temporarily store it, and transfer it to the off-chip memory 30 of FIG. 2.

공유 메모리(2000)는 상대적으로 속도가 빠른 메모리가 필요할 수 있다. 이에 따라서, 공유 메모리(2000)는 예를 들어, SRAM을 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, 공유 메모리(2000)는 DRAM을 포함할 수도 있다.Shared memory 2000 may require relatively fast memory. Accordingly, the shared memory 2000 may include, for example, SRAM. However, this embodiment is not limited to this. That is, the shared memory 2000 may include DRAM.

공유 메모리(2000)는 SoC 레벨 즉, L2(level 2)에 해당하는 메모리일 수 있다. 따라서, 공유 메모리(2000)는 L2 공유 메모리라 정의할 수도 있다.The shared memory 2000 may be a memory corresponding to the SoC level, that is, level 2 (L2). Accordingly, the shared memory 2000 may be defined as L2 shared memory.

DMA(3000)는 CPU(20) 또는 뉴럴 프로세서(1000)가 데이터의 입출력을 제어할 필요없이 직접 데이터의 이동을 제어할 수 있다. 이에 따라서, DMA(3000)가 메모리 사이의 데이터 이동을 제어하여 CPU(20) 또는 뉴럴 프로세서(1000)의 인터럽트의 횟수를 최소화시킬 수 있다.The DMA 3000 can directly control the movement of data without the need for the CPU 20 or the neural processor 1000 to control input and output of data. Accordingly, the DMA 3000 can control data movement between memories to minimize the number of interrupts of the CPU 20 or the neural processor 1000.

DMA(3000)는 공유 메모리(2000)와 오프 칩 메모리(30) 사이의 데이터 이동을 제어할 수 있다. DMA(3000)의 권한을 통해서 비휘발성 메모리 컨트롤러(4000) 및 휘발성 메모리 컨트롤러(5000)가 데이터를 이동을 수행할 수 있다.The DMA (3000) can control data movement between the shared memory (2000) and the off-chip memory (30). The non-volatile memory controller 4000 and volatile memory controller 5000 can move data through the authority of the DMA (3000).

비휘발성 메모리 컨트롤러(4000)는 비휘발성 메모리(31)에 리드(read) 또는 라이트(write) 작업을 제어할 수 있다. 비휘발성 메모리 컨트롤러(4000)는 제1 비휘발성 메모리 인터페이스(40)를 통해서 비휘발성 메모리(31)를 제어할 수 있다.The non-volatile memory controller 4000 can control read or write operations on the non-volatile memory 31. The non-volatile memory controller 4000 can control the non-volatile memory 31 through the first non-volatile memory interface 40.

휘발성 메모리 컨트롤러(5000)는 휘발성 메모리(32)에 리드 또는 라이트 작업을 제어할 수 있다. 또한, 휘발성 메모리 컨트롤러(5000)는 휘발성 메모리(32)의 리프레쉬 작업을 수행할 수 있다. 휘발성 메모리 컨트롤러(5000)는 제1 휘발성 메모리 인터페이스(50)를 통해서 휘발성 메모리(32)를 제어할 수 있다.The volatile memory controller 5000 can control read or write operations on the volatile memory 32. Additionally, the volatile memory controller 5000 may perform a refresh operation on the volatile memory 32. The volatile memory controller 5000 can control the volatile memory 32 through the first volatile memory interface 50.

커맨드 프로세서(7000)는 컨트롤 인터페이스(80)와 연결될 수 있다. 커맨드 프로세서(7000)는 컨트롤 인터페이스(80)를 통해서 CPU(20)로부터 제어 신호를 수신할 수 있다. 커맨드 프로세서(7000)는 CPU(20)로부터 받은 제어 신호를 통해서 태스크를 생성하고, 이를 각각의 뉴럴 프로세서(1000)로 전달할 수 있다. 또한, 커맨드 프로세서(7000)는 각각의 뉴럴 프로세서(1000)로부터 태스크에 대한 완료 리포트를 수신할 수 있다.The command processor 7000 may be connected to the control interface 80. The command processor 7000 may receive a control signal from the CPU 20 through the control interface 80. The command processor 7000 can create a task through a control signal received from the CPU 20 and transmit it to each neural processor 1000. Additionally, the command processor 7000 may receive a completion report for the task from each neural processor 1000.

글로벌 인터커넥션(6000)은 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 커맨드 프로세서(7000) 및 휘발성 메모리 컨트롤러(5000)를 서로 연결할 수 있다. 또한, 외부 인터페이스(3)도 글로벌 인터커넥션(6000)에 연결될 수 있다. 글로벌 인터커넥션(6000)은 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000), 커맨드 프로세서(7000) 및 외부 인터페이스(3) 사이의 데이터가 이동하는 경로일 수 있다.The global interconnection 6000 connects at least one neural processor 1000, shared memory 2000, DMA 3000, non-volatile memory controller 4000, command processor 7000, and volatile memory controller 5000 to each other. You can. Additionally, the external interface 3 may also be connected to the global interconnection 6000. The global interconnection 6000 includes at least one neural processor 1000, a shared memory 2000, a DMA 3000, a non-volatile memory controller 4000, a volatile memory controller 5000, a command processor 7000, and an external interface. (3) It may be a path through which data moves.

글로벌 인터커넥션(6000)은 데이터뿐만 아니라 제어 신호 및 동기화를 위한 신호를 전송할 수 있다. 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 각각의 뉴럴 프로세서(1000)가 직접 동기화 신호를 전송하고 수신할 수 있다. 이에 따라서, 커맨드 프로세서(7000)에 의해서 발생하는 동기화 신호의 전송에 따른 레이턴시를 최소화할 수 있다. The global interconnection 6000 can transmit not only data but also control signals and signals for synchronization. In the neural processing device according to some embodiments of the present invention, each neural processor 1000 can directly transmit and receive a synchronization signal. Accordingly, latency due to transmission of the synchronization signal generated by the command processor 7000 can be minimized.

즉, 뉴럴 프로세서(1000)가 복수일 때, 어느 뉴럴 프로세서(1000)의 작업이 종료되어야 다음 뉴럴 프로세서(1000)가 새로운 작업을 시작할 수 있는 개별 작업의 디펜던시가 존재할 수 있다. 이러한 개별 작업의 종료와 시작은 동기화 신호를 통해서 확인할 수 있는데, 기존의 기술은 이러한 동기화 신호의 수신과 새로운 작업의 시작 지시는 모두 커맨드 프로세서(7000) 또는 호스트 즉, CPU(20)가 전담하여 수행하였다. That is, when there are multiple neural processors 1000, there may be a dependency of individual tasks in which the task of one neural processor 1000 must be completed before the next neural processor 1000 can start a new task. The end and start of these individual tasks can be confirmed through synchronization signals. In the existing technology, the command processor 7000 or the host, that is, the CPU 20, is in charge of both receiving these synchronization signals and instructing the start of new tasks. did.

그러나, 뉴럴 프로세서(1000)의 숫자가 늘어나고, 작업의 디펜던시가 복잡하게 설계되면 될수록 이러한 동기화 신호의 수는 기하급수적으로 늘어나서, 각각의 동기화 신호에 따른 레이턴시가 작업의 효율을 크게 낮출 수 있다.However, as the number of neural processors 1000 increases and the dependency of the task is designed more complexly, the number of these synchronization signals increases exponentially, and the latency according to each synchronization signal can significantly reduce the efficiency of the task. .

따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 커맨드 프로세서(7000) 대신 각각의 뉴럴 프로세서(1000)가 직접 동기화 신호의 일부를 작업의 디펜던시에 따라 다른 뉴럴 프로세서(1000)로 전송할 수 있다. 이 경우 커맨드 프로세서(7000)에 의해서 관리되는 방식에 비해서 병렬적으로 여러 뉴럴 프로세서(1000)가 동기화 작업을 수행할 수 있어 동기화에 따른 레이턴시를 최소화할 수 있다. Therefore, in the neural processing device according to some embodiments of the present invention, instead of the command processor 7000, each neural processor 1000 may directly transmit a part of the synchronization signal to another neural processor 1000 according to the dependency of the task. You can. In this case, compared to the method managed by the command processor 7000, multiple neural processors 1000 can perform synchronization tasks in parallel, thereby minimizing latency due to synchronization.

또한, 커맨드 프로세서(7000)가 작업 디펜던시에 따른 뉴럴 프로세서(1000)들의 작업 스케쥴링을 수행해야 하는데 이러한 스케쥴링의 오버헤드도 뉴럴 프로세서(1000)의 개수가 늘어나면 늘어날수록 크게 늘어날 수 있다. 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 스케쥴링 작업도 개별 뉴럴 프로세서(1000)에 의해서 일부 진행되어 그에 따른 스케쥴링 부담도 줄어들어 장치의 성능이 향상될 수 있다.In addition, the command processor 7000 must perform task scheduling of the neural processors 1000 according to task dependency, and the overhead of such scheduling may increase significantly as the number of neural processors 1000 increases. Accordingly, in the neural processing device according to some embodiments of the present invention, the scheduling task is partially performed by the individual neural processor 1000, thereby reducing the scheduling burden, thereby improving the performance of the device.

도 4는 도 3의 글로벌 인터커넥션을 세부적으로 설명하기 위한 구조도이다.FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.

도 4를 참조하면, 글로벌 인터커넥션(6000)은 데이터 채널(6100), 컨트롤 채널(6200) 및 L2 싱크 채널(6300)을 포함할 수 있다.Referring to FIG. 4, the global interconnection 6000 may include a data channel 6100, a control channel 6200, and an L2 sync channel 6300.

데이터 채널(6100)은 데이터를 전송하는 전용 채널일 수 있다. 데이터 채널(6100)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 외부 인터페이스(3)가 서로 데이터를 교환할 수 있다.The data channel 6100 may be a dedicated channel for transmitting data. Through the data channel 6100, at least one neural processor 1000, shared memory 2000, DMA 3000, non-volatile memory controller 4000, volatile memory controller 5000, and external interface 3 exchange data with each other. can be exchanged.

컨트롤 채널(6200)은 제어 신호를 전송하는 전용 채널일 수 있다. 컨트롤 채널(6200)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000), 커맨드 프로세서(7000) 및 외부 인터페이스(3)가 서로 제어 신호를 교환할 수 있다. 특히, 커맨드 프로세서(7000)는 각각의 뉴럴 프로세서(1000)로 여러가지 제어 신호를 전달할 수 있다.The control channel 6200 may be a dedicated channel that transmits control signals. At least one neural processor 1000, shared memory 2000, DMA 3000, non-volatile memory controller 4000, volatile memory controller 5000, command processor 7000, and external interface through the control channel 6200. (3) can exchange control signals with each other. In particular, the command processor 7000 can transmit various control signals to each neural processor 1000.

L2 싱크 채널(6300)은 동기화 신호를 전송하는 전용 채널일 수 있다. L2 싱크 채널(6300)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000), 커맨드 프로세서(7000) 및 외부 인터페이스(3)가 서로 동기화 신호를 교환할 수 있다.The L2 sync channel 6300 may be a dedicated channel that transmits a synchronization signal. Through the L2 sync channel 6300, at least one neural processor 1000, shared memory 2000, DMA 3000, non-volatile memory controller 4000, volatile memory controller 5000, command processor 7000, and external The interface 3 can exchange synchronization signals with each other.

L2 싱크 채널(6300)은 글로벌 인터커넥션(6000) 내부에 전용 채널로 설정되어 다른 채널과 겹치지 않고 동기화 신호를 빠르게 전송할 수 있다. 이에 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 새로운 와이어링 작업이 필요하지 않고 기존에 사용되는 글로벌 인터커넥션(6000)을 이용하여 동기화 작업을 원활하게 진행할 수 있다.The L2 sync channel 6300 is set as a dedicated channel within the global interconnection 6000 and can quickly transmit synchronization signals without overlapping with other channels. Accordingly, the neural processing device according to some embodiments of the present invention does not require new wiring work and can smoothly perform synchronization work using the existing global interconnection 6000.

도 5는 도 1의 뉴럴 프로세싱 장치의 제어 신호의 흐름을 설명하기 위한 블록도이다.FIG. 5 is a block diagram for explaining the flow of control signals of the neural processing device of FIG. 1.

도 5를 참조하면, CPU(20)는 컨트롤 인터페이스(80)를 통해서 커맨드 프로세서(7000)로 제어 신호를 전달할 수 있다. 이때, 제어 신호는 연산 작업이나 데이터 로드/스토어 작업 등 각각의 오퍼레이션을 수행하도록 지시하는 신호일 수 있다.Referring to FIG. 5, the CPU 20 may transmit a control signal to the command processor 7000 through the control interface 80. At this time, the control signal may be a signal instructing to perform each operation, such as a computation task or a data load/store task.

커맨드 프로세서(7000)는 제어 신호를 받아 컨트롤 채널(6200)을 통해서 적어도 하나의 뉴럴 프로세서(1000)에게 제어 신호를 전달할 수 있다. 각각의 제어 신호는 각각의 태스크로서 뉴럴 프로세서(1000)에 저장될 수 있다.The command processor 7000 may receive a control signal and transmit the control signal to at least one neural processor 1000 through the control channel 6200. Each control signal may be stored in the neural processor 1000 as each task.

도 6은 도 3의 뉴럴 프로세서를 세부적으로 설명하기 위한 블록도이다.FIG. 6 is a block diagram for explaining the neural processor of FIG. 3 in detail.

도 3 내지 도 6을 참조하면, 뉴럴 프로세서(1000)는 적어도 하나의 뉴럴 코어(100), 로컬 인터커넥션(200), L1 싱크 패스(300), L1 공유 메모리(400), 코어 글로벌(500), 태스크 매니저(600) 및 L1 LSU(700)를 포함할 수 있다.3 to 6, the neural processor 1000 includes at least one neural core 100, a local interconnection 200, an L1 sync path 300, an L1 shared memory 400, and a core global 500. , may include a task manager 600 and an L1 LSU 700.

적어도 하나의 뉴럴 코어(100)는 뉴럴 프로세서(1000)의 작업을 분담하여 수행할 수 있다. 뉴럴 코어(100)는 예를 들어, 8개일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 도 3 및 도 5에서는 여러 개의 뉴럴 코어(100)가 뉴럴 프로세서(1000)에 포함되는 것으로 도시하였지만, 본 실시예가 이에 제한되는 것은 아니다. 즉, 뉴럴 코어(100) 1개만으로 뉴럴 프로세서(1000)가 구성될 수 있다.At least one neural core 100 may share and perform the tasks of the neural processor 1000. For example, there may be eight neural cores 100. However, this embodiment is not limited to this. 3 and 5 show that several neural cores 100 are included in the neural processor 1000, but the present embodiment is not limited thereto. In other words, the neural processor 1000 can be configured with only one neural core 100.

뉴럴 코어(100)는 코어 글로벌(500)로부터 태스크 정보를 수신하고, 태스크 정보에 따른 태스크를 수행할 수 있다. 이때, 태스크는 제어 신호에 의해서 정의될 수 있고, 태스크는 메모리 오퍼레이션 중 어느 하나일 수 있다. 메모리 오퍼레이션은 예를 들어, 마이크로 DMA(μDMA), LP 마이크로 DMA(Low Priority μDMA), 스토어μDMA(STμDMA) 및 프리 프로세싱 작업 중 어느 하나일 수 있다.The neural core 100 may receive task information from the core global 500 and perform a task according to the task information. At this time, the task may be defined by a control signal, and the task may be any one of memory operations. The memory operation may be, for example, any one of micro DMA (μDMA), low priority μDMA (LP micro DMA), store μDMA (STμDMA), and pre-processing operations.

L1 공유 메모리(400)는 뉴럴 프로세서(1000) 내에서 각각의 뉴럴 코어(100)들이 공유하는 메모리일 수 있다. L1 공유 메모리(400)는 각각의 뉴럴 코어(100)의 데이터를 저장할 수 있다. 또한, L1 공유 메모리(400)는 도 4의 공유 메모리(2000)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 뉴럴 코어(100)로 전달할 수 있다. 반대로, L1 공유 메모리(400)는 뉴럴 코어(100)로부터 데이터를 수신하여 일시적으로 저장하고 도 3의 공유 메모리(2000)로 전달할 수도 있다. The L1 shared memory 400 may be a memory shared by each neural core 100 within the neural processor 1000. The L1 shared memory 400 can store data of each neural core 100. Additionally, the L1 shared memory 400 can receive data from the shared memory 2000 of FIG. 4, temporarily store it, and transmit it to each neural core 100. Conversely, the L1 shared memory 400 may receive data from the neural core 100, temporarily store it, and transfer it to the shared memory 2000 of FIG. 3.

L1 공유 메모리(400)는 뉴럴 프로세서 레벨, 즉, L1(level 1)에 해당하는 메모리일 수 있다. L2 공유 메모리 즉, 공유 메모리(2000)는 뉴럴 프로세서(1000)에 의해서 공유되고, L1 공유 메모리(400)는 뉴럴 코어(100)에 의해서 공유될 수 있다.The L1 shared memory 400 may be a memory corresponding to the neural processor level, that is, level 1 (L1). L2 shared memory, that is, shared memory 2000, may be shared by the neural processor 1000, and L1 shared memory 400 may be shared by the neural core 100.

L1 LSU(700)는 글로벌 인터커넥션(6000)을 통해서 외부에서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 수신할 수 있다. L1 LSU(700)는 L1 공유 메모리(400)로 수신한 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전송할 수 있다. 유사하게 L1 LSU(700)는 글로벌 인터커넥션(6000)을 통해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 외부로 전달 수 있다. 또한, L1 LSU(700)는 뉴럴 코어(100) 각각에 대해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전달하고, 수신할 수 있다.The L1 LSU 700 may receive at least one of data, control signals, and synchronization signals from the outside through the global interconnection 6000. The L1 LSU 700 may transmit at least one of the received data, control signal, and synchronization signal to the L1 shared memory 400. Similarly, the L1 LSU 700 can transmit at least one of data, control signals, and synchronization signals to the outside through the global interconnection 6000. Additionally, the L1 LSU 700 may transmit and receive at least one of data, control signals, and synchronization signals to each of the neural cores 100.

뉴럴 코어(100)는 코어 글로벌(500)로부터 태스크 정보를 수신하고, 태스크 정보에 따른 태스크를 수행할 수 있다. 이때, 태스크는 컴퓨테이션 작업(연산 작업) 또는 메모리 오퍼레이션과 관련된 작업일 수 있다. 태스크는 제어 신호에 의해서 정의될 수 있다. 태스크 정보는 태스크에 대한 정보로서, 태스크의 타입, 태스크의 형태, 태스크의 추가 정보 등에 대한 정보일 수 있다.The neural core 100 may receive task information from the core global 500 and perform a task according to the task information. At this time, the task may be a computation task (operation task) or a task related to memory operation. Tasks can be defined by control signals. Task information is information about a task and may be information about the type of task, the form of the task, additional information about the task, etc.

뉴럴 코어(100)는 태스크의 수행이 완료되는 완료 신호를 코어 글로벌(500)로 전달할 수 있다The neural core 100 may transmit a completion signal indicating completion of the task to the core global 500.

태스크 매니저(600)는 컨트롤 인터커넥션(CI)으로부터 태스크를 수신할 수 있다. 이때, 컨트롤 인터커넥션(CI)은 커맨드 프로세서(7000)로부터 태스크를 전달하는 전송 인터페이스의 총칭일 수 있다. 즉, 컨트롤 인터커넥션(CI)은 컨트롤 채널(6200) 및 로컬 인터커넥션(200)을 포함할 수 있다.The task manager 600 may receive a task from a control interconnection (CI). At this time, control interconnection (CI) may be a general term for a transmission interface that transmits tasks from the command processor 7000. That is, the control interconnection (CI) may include a control channel 6200 and a local interconnection 200.

태스크 매니저(600)는 태스크를 수신하여 태스크 정보를 생성하고, 코어 글로벌(500)로 전송할 수 있다. 또한, 태스크 매니저(600)는 코어 글로벌(500)을 통해서 완료 신호를 수신하고, 이에 따른 완료 리포트를 생성하여 컨트롤 인터커넥션(CI)을 통해서 커맨드 프로세서(7000)로 전달할 수 있다.The task manager 600 may receive a task, generate task information, and transmit it to the core global 500. Additionally, the task manager 600 may receive a completion signal through the core global 500, generate a completion report accordingly, and transmit it to the command processor 7000 through a control interconnection (CI).

코어 글로벌(500)은 뉴럴 코어(100) 내에 하드웨어 적으로 연결된 와이어 구조일 수 있다. 코어 글로벌(500)은 도시되지는 않았지만, 뉴럴 코어(100), L1 공유 메모리(400), L1 LSU(700) 및 태스크 매니저(600)를 모두 연결하는 구조일 수 있다. 이에 따라서, 로컬 인터커넥션(200) 및 L1 싱크 패스(300)도 코어 글로벌(500)에 포함될 수도 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. The core global 500 may be a wire structure connected in hardware to the neural core 100. Although not shown, the core global 500 may be a structure that connects the neural core 100, L1 shared memory 400, L1 LSU 700, and task manager 600. Accordingly, the local interconnection 200 and the L1 sync path 300 may also be included in the core global 500. However, this embodiment is not limited to this.

코어 글로벌(500)은 태스크 매니저(600)로부터 태스크 정보를 수신하여 뉴럴 코어(100)로 전달하고, 그에 대한 완료 신호를 뉴럴 코어(100)로부터 전달받을 수 있다. 이어서, 코어 글로벌(500)은 완료 신호를 태스크 매니저(600)로 전달할 수 있다.The core global 500 may receive task information from the task manager 600, transmit it to the neural core 100, and receive a completion signal for the task from the neural core 100. Subsequently, Core Global 500 may transmit a completion signal to the task manager 600.

로컬 인터커넥션(200)은 적어도 하나의 뉴럴 코어(100), L1 공유 메모리(400), 코어 글로벌(500), 태스크 매니저(600) 및 L1 LSU(700)를 서로 연결할 수 있다. 로컬 인터커넥션(200)은 적어도 하나의 뉴럴 코어(100), L1 공유 메모리(400), 코어 글로벌(500), 태스크 매니저(600) 및 L1 LSU(700) 사이의 데이터가 이동하는 경로일 수 있다. 로컬 인터커넥션(200)은 도 3의 글로벌 인터커넥션(6000)과 연결되어 데이터를 전송할 수 있다.The local interconnection 200 may connect at least one neural core 100, L1 shared memory 400, core global 500, task manager 600, and L1 LSU 700 to each other. The local interconnection 200 may be a path through which data moves between at least one neural core 100, L1 shared memory 400, core global 500, task manager 600, and L1 LSU 700. . The local interconnection 200 is connected to the global interconnection 6000 of FIG. 3 and can transmit data.

L1 싱크 패스(300)는 적어도 하나의 뉴럴 코어(100), L1 공유 메모리(400), 코어 글로벌(500), 태스크 매니저(600) 및 L1 LSU(700)를 서로 연결할 수 있다. L1 싱크 패스(300)는 적어도 하나의 뉴럴 코어(100), L1 공유 메모리(400), 코어 글로벌(500), 태스크 매니저(600) 및 L1 LSU(700)의 동기화 신호가 이동하는 경로일 수 있다. The L1 sync path 300 may connect at least one neural core 100, L1 shared memory 400, core global 500, task manager 600, and L1 LSU 700 to each other. The L1 sync path 300 may be a path along which synchronization signals of at least one neural core 100, L1 shared memory 400, core global 500, task manager 600, and L1 LSU 700 travel. .

L1 싱크 패스(300)는 로컬 인터커넥션(200)과 물리적으로 별도로 형성될 수 있다. 로컬 인터커넥션(200)의 경우 글로벌 인터커넥션(6000)과 달리 내부에 충분한 채널이 형성되지 않을 수 있다. 이러한 경우에는 L1 싱크 패스(300)가 별도의 형성되어 동기화 신호의 전송을 빠르고 지체없이 수행할 수 있다. L1 싱크 패스(300)는 글로벌 인터커넥션(6000)의 L2 싱크 채널(6300)에 비해서 한단계 낮은 레벨에서 수행되는 동기화에 사용될 수 있다.The L1 sync path 300 may be formed physically separately from the local interconnection 200. In the case of the local interconnection 200, unlike the global interconnection 6000, sufficient channels may not be formed internally. In this case, the L1 sync path 300 is formed separately so that transmission of the synchronization signal can be performed quickly and without delay. The L1 sync path 300 can be used for synchronization performed at a level one level lower than the L2 sync channel 6300 of the global interconnection 6000.

도 7은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 계층적 구조를 설명하기 위한 도면이다.FIG. 7 is a diagram illustrating the hierarchical structure of a neural processing device according to some embodiments of the present invention.

도 7을 참조하면, 뉴럴 코어 SoC(10)는 적어도 하나의 뉴럴 프로세서(1000)를 포함할 수 있다. 각각의 뉴럴 프로세서(1000)는 글로벌 인터커넥션(6000)을 통해서 서로 데이터를 전송할 수 있다. Referring to FIG. 7, the neural core SoC 10 may include at least one neural processor 1000. Each neural processor 1000 can transmit data to each other through the global interconnection 6000.

뉴럴 프로세서(1000)는 각각 적어도 하나의 뉴럴 코어(100)를 포함할 수 있다. 뉴럴 코어(100)는 딥러닝 연산 작업에 최적화된 프로세싱 단위 유닛일 수 있다. 뉴럴 코어(100)는 딥러닝 연산 작업의 하나의 오퍼레이션에 대응하는 프로세싱 단위 유닛일 수 있다. 즉, 딥러닝 연산 작업은 여러 오퍼레이션의 순차적 또는 병렬적 결합으로 표현 가능할 수 있다. 뉴럴 코어(100)는 각각 하나의 오퍼레이션을 처리할 수 있는 프로세싱 단위 유닛으로서 컴파일러 입장에서 스케쥴링에 고려할 수 있는 최소한의 연산 단위일 수 있다. Each neural processor 1000 may include at least one neural core 100. The neural core 100 may be a processing unit optimized for deep learning calculation tasks. The neural core 100 may be a processing unit corresponding to one operation of a deep learning calculation task. In other words, deep learning computational tasks can be expressed as a sequential or parallel combination of multiple operations. The neural core 100 is a processing unit that can each process one operation, and may be the minimum computational unit that can be considered for scheduling from a compiler's perspective.

본 실시예에 따른 뉴럴 프로세싱 장치는 컴파일러 스케쥴링 입장에서 고려되는 최소한의 연산 단위와 하드웨어 프로세싱 단위 유닛의 스케일을 동일하게 구성하여 빠르고 효율적인 스케쥴링 및 연산 작업의 수행을 도모할 수 있다.The neural processing device according to this embodiment can achieve fast and efficient scheduling and performance of calculation tasks by configuring the scale of the minimum calculation unit and hardware processing unit considered from a compiler scheduling perspective to be the same.

즉, 연산 작업에 비해서 하드웨어의 분할할 수 있는 프로세싱 단위 유닛이 지나치게 크다면 프로세싱 단위 유닛의 구동에서 연산 작업의 비효율이 발생할 수 있다. 반대로, 컴파일러의 스케쥴링 최소 단위인 오퍼레이션보다 더 작은 단위의 프로세싱 유닛을 매번 스케쥴링하는 것은 스케쥴링의 비효율이 발생할 수 있고, 하드웨어 설계 비용이 높아질 수 있어 적절하지 않다.In other words, if the processing unit that can be divided into hardware is too large compared to the computational task, inefficiency in the computational task may occur when driving the processing unit. Conversely, it is not appropriate to always schedule a processing unit smaller than the operation, which is the compiler's minimum scheduling unit, because scheduling inefficiencies may occur and hardware design costs may increase.

따라서, 본 실시예는 컴파일러의 스케쥴링 단위와 하드웨어 프로세싱 단위의 스케일을 유사하게 조율하여 빠른 연산 작업의 스케쥴링과 하드웨어 리소스의 낭비없이 효율적인 연산 작업 수행을 동시에 충족시킬 수 있다.Therefore, in this embodiment, the scale of the compiler's scheduling unit and the hardware processing unit can be similarly adjusted to simultaneously satisfy fast computational task scheduling and efficient computational task performance without wasting hardware resources.

도 8은 도 6의 뉴럴 코어를 세부적으로 설명하기 위한 블록도이다.FIG. 8 is a block diagram for explaining the neural core of FIG. 6 in detail.

도 8을 참조하면, 뉴럴 코어(100)는 LSU(Load/Store Unit)(110), L0 메모리(120), 웨이트 버퍼(130), 액티베이션 LSU(140), 액티베이션 버퍼(150) 및 프로세싱 유닛(160)을 포함할 수 있다.Referring to FIG. 8, the neural core 100 includes a Load/Store Unit (LSU) 110, an L0 memory 120, a weight buffer 130, an activation LSU 140, an activation buffer 150, and a processing unit ( 160) may be included.

LSU(110)는 로컬 인터커넥션(200) 및 L1 싱크 패스(300)를 통해서 외부에서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 수신할 수 있다. LSU(110)는 L0 메모리(120)로 수신한 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전송할 수 있다. 유사하게 LSU(110)는 로컬 인터커넥션(200) 및 L1 싱크 패스(300)를 통해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 외부로 전달 수 있다.The LSU 110 may receive at least one of data, control signals, and synchronization signals from the outside through the local interconnection 200 and the L1 sync path 300. The LSU 110 may transmit at least one of the received data, control signal, and synchronization signal to the L0 memory 120. Similarly, the LSU 110 may transmit at least one of data, a control signal, and a synchronization signal to the outside through the local interconnection 200 and the L1 sync path 300.

구체적으로, 마이크로 DMA 작업은 뉴럴 코어(100)가 공유 메모리(2000) 또는 오프 칩 메모리(30)에서 L0 메모리(120)로 프로그램 또는 데이터를 로드하는 작업일 수 있다. LP 마이크로 DMA 작업은 일반적인 마이크로 DMA 작업과 달리 현재 프로그램 또는 데이터가 아닌 이후에 사용할 프로그램 또는 데이터에 대한 로드 작업일 수 있다. 이러한 작업은 낮은 우선 순위를 가지고 있기에, 마이크로 DMA 작업과 달리 식별될 수 있다. ST 마이크로 DMA 작업은 뉴럴 코어(100)의 L0 메모리(120)에서 공유 메모리(2000) 또는 오프 칩 메모리(30)로 데이터를 저장하는 스토어 작업일 수 있다. 프리 프로세싱 작업은 CPU(20)에서 대량의 룩업 테이블과 같은 데이터를 미리 로드하는 작업을 포함할 수 있다.Specifically, the micro DMA task may be a task in which the neural core 100 loads a program or data from the shared memory 2000 or the off-chip memory 30 to the L0 memory 120. Unlike a typical micro DMA operation, the LP micro DMA operation may be a load operation for a program or data to be used later rather than the current program or data. Because these tasks have a low priority, they can be identified differently from micro DMA tasks. The ST Micro DMA operation may be a store operation that stores data from the L0 memory 120 of the neural core 100 to the shared memory 2000 or the off-chip memory 30. The preprocessing task may include preloading data, such as a large amount of lookup tables, in the CPU 20.

도 9는 도 8의 LSU을 세부적으로 설명하기 위한 블록도이다.FIG. 9 is a block diagram for explaining the LSU of FIG. 8 in detail.

도 9를 참조하면, LSU(110)는 로컬 메모리 로드 유닛(111a), 로컬 메모리 스토어 유닛(111b), 뉴럴 코어 로드 유닛(112a), 뉴럴 코어 스토어 유닛(112b), 로드 버퍼(LB), 스토어 버퍼(SB), 로드 엔진(113a), 스토어 엔진(113b) 및 변환 색인 버퍼(114)를 포함할 수 있다.Referring to FIG. 9, the LSU 110 includes a local memory load unit 111a, a local memory store unit 111b, a neural core load unit 112a, a neural core store unit 112b, a load buffer (LB), and a store. It may include a buffer (SB), a load engine 113a, a store engine 113b, and a conversion index buffer 114.

로컬 메모리 로드 유닛(111a)은 L0 메모리(120)에 대한 로드 인스트럭션을 페치(fetch)하고, 로드 인스트럭션을 이슈(issue)할 수 있다. 로컬 메모리 로드 유닛(111a)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(113a)으로 메모리 액세스 요청을 전송할 수 있다.The local memory load unit 111a may fetch a load instruction for the L0 memory 120 and issue the load instruction. When the local memory load unit 111a provides an issue load instruction to the load buffer LB, a memory access request can be sequentially transmitted to the load engine 113a according to the order in which the load buffer LB is input.

또한, 로컬 메모리 스토어 유닛(111b)은 L0 메모리(120)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 로컬 메모리 스토어 유닛(111b)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(113b)으로 메모리 액세스 요청을 전송할 수 있다.Additionally, the local memory store unit 111b may fetch a store instruction for the L0 memory 120 and issue the store instruction. When the local memory store unit 111b provides the issue store instruction to the store buffer SB, a memory access request can be sequentially transmitted to the store engine 113b according to the order in which the store buffer SB was input.

뉴럴 코어 로드 유닛(112a)은 뉴럴 코어(100)에 대한 로드 인스트럭션을 페치하고, 로드 인스트럭션을 이슈할 수 있다. 뉴럴 코어 로드 유닛(112a)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(113a)으로 메모리 액세스 요청을 전송할 수 있다.The neural core load unit 112a may fetch a load instruction for the neural core 100 and issue the load instruction. When the neural core load unit 112a provides an issue load instruction to the load buffer LB, a memory access request can be sequentially transmitted to the load engine 113a according to the order in which the load buffer LB is input.

또한, 뉴럴 코어 스토어 유닛(112b)은 뉴럴 코어(100)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 뉴럴 코어 스토어 유닛(112b)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(113b)으로 메모리 액세스 요청을 전송할 수 있다.Additionally, the neural core store unit 112b may fetch a store instruction for the neural core 100 and issue the store instruction. When the neural core store unit 112b provides the issue store instruction to the store buffer SB, a memory access request can be sequentially transmitted to the store engine 113b according to the order in which the store buffer SB was input.

로드 엔진(113a)은 메모리 액세스 요청을 수신하여 로컬 인터커넥션(200)을 통해서 데이터를 불러올 수 있다. 이때, 로드 엔진(113a)은 변환 색인 버퍼(114)에서 최근에 사용된 로지컬 어드레스와 피지컬 어드레스의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 로드 엔진(113a)의 로지컬 어드레스가 변환 색인 버퍼(114)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The load engine 113a may receive a memory access request and load data through the local interconnection 200. At this time, the load engine 113a can quickly find data using the conversion table of recently used logical addresses and physical addresses in the conversion index buffer 114. If the logical address of the load engine 113a is not in the translation index buffer 114, address translation information can be found in another memory.

스토어 엔진(113b)은 메모리 액세스 요청을 수신하여 로컬 인터커넥션(200)를 통해서 데이터를 불러올 수 있다. 이때, 스토어 엔진(113b)은 변환 색인 버퍼(114)에서 최근에 사용된 로지컬 어드레스와 피지컬 어드레스의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 스토어 엔진(113b)의 로지컬 어드레스가 변환 색인 버퍼(114)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The store engine 113b may receive a memory access request and load data through the local interconnection 200. At this time, the store engine 113b can quickly find data using the conversion table of recently used logical addresses and physical addresses in the conversion index buffer 114. If the logical address of the store engine 113b is not in the translation index buffer 114, address translation information can be found in another memory.

로드 엔진(113a) 및 스토어 엔진(113b)은 L1 싱크 패스(300)로 동기화 신호를 보낼 수 있다. 이때, 동기화 신호는 작업이 종료되었다는 의미를 가질 수 있다.The load engine 113a and the store engine 113b may send a synchronization signal to the L1 sync path 300. At this time, the synchronization signal may mean that the task has ended.

다시, 도 8을 참조하면, L0 메모리(120)는 뉴럴 코어(100) 내부에 위치한 메모리로서, 뉴럴 코어(100)가 작업에 필요한 모든 입력 데이터를 외부로부터 수신하여 임시로 저장할 수 있다. 또한, L0 메모리(120)는 뉴럴 코어(100)에 의해서 연산된 출력 데이터를 외부로 전송하기 위해서 일시적으로 저장할 수 있다. Referring again to FIG. 8, the L0 memory 120 is a memory located inside the neural core 100, and allows the neural core 100 to receive all input data required for work from the outside and temporarily store them. Additionally, the L0 memory 120 can temporarily store output data calculated by the neural core 100 in order to transmit it to the outside.

L0 메모리(120)는 액티베이션 LSU(140)에 의해서 인풋 액티베이션(Act_In)을 액티베이션 버퍼(150)로 전송하고, 아웃풋 액티베이션(Act_Out)을 수신할 수 있다. L0 메모리(120)는 액티베이션 LSU(140) 외에도, 프로세싱 유닛(160)과 직접 데이터를 송수신할 수 있다. 즉, L0 메모리(120)는 PE 어레이(163) 및 벡터 유닛(164) 각각과 데이터를 주고받을 수 있다. L0 메모리(120)는 뉴럴 코어 레벨에 해당하는 메모리일 수 있다. 이때, L0 메모리(120)는 뉴럴 코어의 전용(private) 메모리일 수 있다.The L0 memory 120 may transmit input activation (Act_In) to the activation buffer 150 and receive output activation (Act_Out) by the activation LSU 140. In addition to the activation LSU 140, the L0 memory 120 can directly transmit and receive data with the processing unit 160. That is, the L0 memory 120 can exchange data with each of the PE array 163 and the vector unit 164. The L0 memory 120 may be a memory corresponding to the neural core level. At this time, the L0 memory 120 may be a private memory of the neural core.

L0 메모리(120)는 데이터 패스(Data Path)를 통해 액티베이션이나 웨이트 같은 데이터를 전송할 수 있다. L0 메모리(120)는 별도의 전용 패스인 L0 싱크 패스(L0 Sync Path)를 통해서 동기화 신호를 주고받을 수 있다. L0 메모리(120)는 예를 들어, LSU(110), 웨이트 버퍼(130), 액티베이션 LSU(140) 및 프로세싱 유닛(160)과 L0 싱크 패스(L0 Sync Path)를 통해서 동기화 신호를 주고받을 수 있다.The L0 memory 120 can transmit data such as activation or weight through a data path. The L0 memory 120 can send and receive synchronization signals through the L0 Sync Path, which is a separate dedicated path. For example, the L0 memory 120 may exchange a synchronization signal with the LSU 110, the weight buffer 130, the activation LSU 140, and the processing unit 160 through an L0 Sync Path. .

웨이트 버퍼(130)는 웨이트(Weight)를 L0 메모리(120)로부터 수신할 수 있다. 웨이트 버퍼(130)는 웨이트(Weight)를 프로세싱 유닛(160)으로 전달할 수 있다. 웨이트 버퍼(130)는 웨이트(Weight)를 전달하기 전에 일시적으로 웨이트(Weight)를 저장할 수 있다.The weight buffer 130 may receive weight from the L0 memory 120. The weight buffer 130 may transmit weight to the processing unit 160. The weight buffer 130 may temporarily store the weight before transmitting the weight.

인풋 액티베이션(Act_In) 및 아웃풋 액티베이션(Act_Out)은 신경망 네트워크의 레이어의 입력값과 출력값을 의미할 수 있다. 이때, 신경망 네트워크의 레이어가 복수인 경우 이전 레이어의 출력값이 다음 레이어의 입력값이 되므로 이전 레이어의 아웃풋 액티베이션(Act_Out)이 다음 레이어의 인풋 액티베이션(Act_In)으로 활용될 수 있다.Input activation (Act_In) and output activation (Act_Out) may refer to the input and output values of the layer of the neural network network. At this time, when the neural network has multiple layers, the output value of the previous layer becomes the input value of the next layer, so the output activation (Act_Out) of the previous layer can be used as the input activation (Act_In) of the next layer.

웨이트(Weight)는 각 레이어에서 입력되는 입력 액티베이션(Act_In)과 곱해지는 파라미터를 의미할 수 있다. 웨이트(Weight)는 딥 러닝 학습 단계에서 조절되어 확정되고, 추론 단계에서는 고정된 값을 통해서 아웃풋 액티베이션(Act_Out)을 도출하기 위해서 사용될 수 있다.Weight may refer to a parameter multiplied by the input activation (Act_In) input from each layer. Weight is adjusted and confirmed in the deep learning learning stage, and can be used to derive output activation (Act_Out) through a fixed value in the inference stage.

액티베이션 LSU(140)은 L0 메모리(120)로부터 인풋 액티베이션(Act_In)을 액티베이션 버퍼(150)로 전달하고, 액티베이션 버퍼(150)로부터 아웃풋 액티베이션(Act_Out)을 상기 온 칩 버퍼로 전달할 수 있다. 즉, 액티베이션 LSU(140)은 액티베이션의 로드 작업과 스토어 작업을 모두 수행할 수 있다.The activation LSU 140 may transfer the input activation (Act_In) from the L0 memory 120 to the activation buffer 150 and the output activation (Act_Out) from the activation buffer 150 to the on-chip buffer. That is, the activation LSU 140 can perform both activation load and store operations.

액티베이션 버퍼(150)는 프로세싱 유닛(160)으로 인풋 액티베이션(Act_In)을 제공하고, 프로세싱 유닛(160)으로부터 아웃풋 액티베이션(Act_Out)을 수신할 수 있다. 액티베이션 버퍼(150)는 인풋 액티베이션(Act_In)과 아웃풋 액티베이션(Act_Out)을 일시적으로 저장할 수 있다.The activation buffer 150 may provide input activation (Act_In) to the processing unit 160 and receive output activation (Act_Out) from the processing unit 160. The activation buffer 150 can temporarily store input activation (Act_In) and output activation (Act_Out).

액티베이션 버퍼(150)는 연산량이 많은 프로세싱 유닛(160), 특히, PE 어레이(163)에 빠르게 액티베이션을 제공하고, 빠르게 액티베이션을 수신하여 뉴럴 코어(100)의 연산 속도를 높일 수 있다.The activation buffer 150 can quickly provide activation to the processing unit 160 with a large computational load, especially the PE array 163, and quickly receive activation to increase the computation speed of the neural core 100.

프로세싱 유닛(160)은 연산을 수행하는 모듈일 수 있다. 프로세싱 유닛(160)은 1차원 연산뿐만 아니라 2차원 매트릭스 연산 즉, 컨볼루션 연산을 수행할 수 있다. 프로세싱 유닛(160)은 인풋 액티베이션(Act_In)을 수신하여 웨이트와 곱한 뒤 이를 더하여 아웃풋 액티베이션(Act_Out)을 생성할 수 있다.The processing unit 160 may be a module that performs calculations. The processing unit 160 can perform not only one-dimensional operations but also two-dimensional matrix operations, that is, convolution operations. The processing unit 160 may receive the input activation (Act_In), multiply it by the weight, and add it to generate the output activation (Act_Out).

도 10은 도 8의 프로세싱 유닛을 세부적으로 설명하기 위한 블록도이다.FIG. 10 is a block diagram for explaining the processing unit of FIG. 8 in detail.

도 8 및 도 10을 참조하면, 프로세싱 유닛(160)은 PE 어레이(163), 벡터 유닛(164), 컬럼 레지스터(161) 및 로우 레지스터(162)를 포함할 수 있다.Referring to FIGS. 8 and 10 , the processing unit 160 may include a PE array 163, a vector unit 164, a column register 161, and a row register 162.

PE 어레이(163)는 인풋 액티베이션(Act_In) 및 웨이트(Weight)를 수신하여 곱셈을 수행할 수 있다. 이때, 인풋 액티베이션(Act_In)과 웨이트(Weight)는 각각 매트릭스 형태로 컨볼루션을 통해서 연산될 수 있다. 이를 통해서, PE 어레이(163)는 아웃풋 액티베이션(Act_Out)을 생성할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. PE 어레이(163)는 아웃풋 액티베이션(Act_Out)외의 다른 종류의 출력도 얼마든지 생성할 수 있다.The PE array 163 can perform multiplication by receiving input activation (Act_In) and weight (Weight). At this time, input activation (Act_In) and weight (Weight) can each be calculated through convolution in matrix form. Through this, the PE array 163 can generate output activation (Act_Out). However, this embodiment is not limited to this. The PE array 163 can generate any number of types of output other than output activation (Act_Out).

PE 어레이(163)는 적어도 하나의 프로세싱 엘리먼트(163_1)를 포함할 수 있다. 프로세싱 엘리먼트(163_1)는 서로 정렬되어 각각 하나의 인풋 액티베이션(Act_In)과 하나의 웨이트(Weight)에 대한 곱셈을 수행할 수 있다. The PE array 163 may include at least one processing element 163_1. The processing elements 163_1 are aligned with each other and can perform multiplication of one input activation (Act_In) and one weight (Weight), respectively.

PE 어레이(163)는 각각의 곱셈에 대한 값을 합한 부분합을 생성할 수 있다. 이러한 부분합은 아웃풋 액티베이션(Act_Out)으로 활용될 수 있다. PE 어레이(163)는 이차원 매트릭스 곱셈을 수행하므로 이차원 매트릭스 연산 유닛(2D matrix compute unit)으로 지칭될 수도 있다.The PE array 163 can generate a subtotal that sums the values for each multiplication. These partial sums can be used as output activation (Act_Out). Since the PE array 163 performs two-dimensional matrix multiplication, it may also be referred to as a two-dimensional matrix compute unit.

벡터 유닛(164)은 1차원 연산을 수행할 수 있다. 벡터 유닛(164)은 PE 어레이(163)와 함께 딥러닝 연산을 수행할 수 있다. 이를 통해서 프로세싱 유닛(160)은 필요한 연산에 특화될 수 있다. 즉, 뉴럴 코어(100)는 대량의 2차원 매트릭스 곱셈과 1차원 연산을 수행하는 연산 모듈이 각각 있어 효율적으로 딥러닝 작업을 수행할 수 있다.The vector unit 164 can perform one-dimensional operations. The vector unit 164 can perform deep learning calculations together with the PE array 163. Through this, the processing unit 160 can be specialized for necessary operations. In other words, the neural core 100 has calculation modules that perform large amounts of two-dimensional matrix multiplication and one-dimensional calculations, so it can efficiently perform deep learning tasks.

컬럼 레지스터(161)는 제1 입력(I1)을 수신할 수 있다. 컬럼 레지스터(161)는 제1 입력(I1)을 수신하고 이를 분할하여 PE 어레이(163)의 각 열(column)에 제공할 수 있다.The column register 161 may receive the first input (I1). The column register 161 may receive the first input (I1), divide it, and provide it to each column of the PE array 163.

로우 레지스터(162)는 제2 입력(I2)을 수신할 수 있다. 로우 레지스터(162)는 제2 입력(I2)을 수신하고 이를 분할하여 PE 어레이(163)의 각 행(row)에 제공할 수 있다.Low register 162 may receive a second input (I2). The row register 162 may receive the second input I2, divide it, and provide it to each row of the PE array 163.

제1 입력(I1)은 인풋 액티베이션(Act_In) 또는 웨이트(Weight)일 수 있다. 제2 입력(I2)은 인풋 액티베이션(Act_In) 또는 웨이트(Weight) 중 제1 입력(I1)이 아닌 값일 수 있다. 또는, 제1 입력(I1) 및 제2 입력(I2)은 인풋 액티베이션(Act_In) 및 웨이트(Weight) 외의 값이 될 수도 있다.The first input (I1) may be input activation (Act_In) or weight (Weight). The second input (I2) may be a value other than the first input (I1) among input activation (Act_In) or weight (Weight). Alternatively, the first input (I1) and the second input (I2) may be values other than input activation (Act_In) and weight (Weight).

도 11은 도 8의 L0 메모리를 세부적으로 설명하기 위한 블록도이다.FIG. 11 is a block diagram for explaining the L0 memory of FIG. 8 in detail.

도 11을 참조하면, L0 메모리(120)는 스케쥴러(121) 및 적어도 하나의 로컬 메모리 뱅크(122)를 포함할 수 있다.Referring to FIG. 11, the L0 memory 120 may include a scheduler 121 and at least one local memory bank 122.

데이터가 L0 메모리(120)로 저장될 때, 스케쥴러(121)는 로드 엔진(113a)으로부터 데이터를 수신할 수 있다. 이때, 데이터는 라운드 로빈(round robin) 방식으로 로컬 메모리 뱅크(122)를 할당 받을 수 있다. 이에 따라서, 데이터는 적어도 하나의 로컬 메모리 뱅크(122) 중 어느 하나에 저장될 수 있다.When data is stored in the L0 memory 120, the scheduler 121 may receive the data from the load engine 113a. At this time, data may be allocated to the local memory bank 122 in a round robin manner. Accordingly, data may be stored in any one of at least one local memory bank 122.

반대로, 데이터가 L0 메모리(120)에서 로드될 때, 스케쥴러(121)는 로컬 메모리 뱅크(122)로부터 데이터를 수신하여 스토어 엔진(113b)으로 전달될 수 있다. 스토어 엔진(113b)은 로컬 인터커넥션(200)을 통해서 외부로 데이터를 저장시킬 수 있다.Conversely, when data is loaded from the L0 memory 120, the scheduler 121 may receive data from the local memory bank 122 and transfer it to the store engine 113b. The store engine 113b can store data externally through the local interconnection 200.

도 12는 도 11의 로컬 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.FIG. 12 is a block diagram for explaining the local memory bank of FIG. 11 in detail.

도 12를 참조하면, 로컬 메모리 뱅크(122)는 로컬 메모리 뱅크 컨트롤러(122_1) 및 로컬 메모리 뱅크 셀 어레이(122_2)를 포함할 수 있다.Referring to FIG. 12, the local memory bank 122 may include a local memory bank controller 122_1 and a local memory bank cell array 122_2.

로컬 메모리 뱅크 컨트롤러(122_1)는 로컬 메모리 뱅크(122)에 저장되는 데이터의 어드레스를 통해서 리드 및 라이트 동작을 관리할 수 있다. 즉, 로컬 메모리 뱅크 컨트롤러(122_1)는 데이터의 입출력을 전체적으로 관리할 수 있다.The local memory bank controller 122_1 can manage read and write operations through the address of data stored in the local memory bank 122. That is, the local memory bank controller 122_1 can manage the overall input and output of data.

로컬 메모리 뱅크 셀 어레이(122_2)는 데이터가 직접 저장되는 셀이 행과 열을 맞춰 정렬된 구조일 수 있다. 로컬 메모리 뱅크 셀 어레이(122_2)는 로컬 메모리 뱅크 컨트롤러(122_1)에 의해서 제어될 수 있다.The local memory bank cell array 122_2 may have a structure in which cells in which data is directly stored are aligned in rows and columns. The local memory bank cell array 122_2 may be controlled by the local memory bank controller 122_1.

도 13은 도 1의 뉴럴 프로세싱 장치의 데이터와 제어 신호의 흐름을 설명하기 위한 블록도이고, 도 14는 도 13의 커맨드 프로세서와 태스크 매니저의 관계를 설명하기 위한 블록도이다.FIG. 13 is a block diagram for explaining the flow of data and control signals of the neural processing device of FIG. 1, and FIG. 14 is a block diagram for explaining the relationship between the command processor and task manager of FIG. 13.

도 13 및 도 14를 참조하면, 각각의 뉴럴 프로세서(1000)는 내부에 각각 태스크 매니저(600) 및 L1 LSU(700)를 포함할 수 있다. 태스크 매니저(600)들은 컨트롤 인터커넥션(CI)을 통해서 커맨드 프로세서(7000)와 제어 신호 및 그 응답을 교환할 수 있다.Referring to FIGS. 13 and 14 , each neural processor 1000 may include a task manager 600 and an L1 LSU 700 therein, respectively. Task managers 600 can exchange control signals and responses with the command processor 7000 through a control interconnection (CI).

이에 반해서, L1 LSU(700)는 데이터 인터커넥션 및 메모리(DIM)를 통해서 데이터를 교환할 수 있다. 데이터 인터커넥션 및 메모리(DIM)는 데이터를 전송하기 위한 인터커넥션과 데이터가 공유되는 메모리를 포함할 수 있다. 구체적으로, 데이터 인터커넥션 및 메모리(DIM)는 로컬 인터커넥션(200) 및 데이터 채널(6100)을 포함할 수 있다. 또한, 데이터 인터커넥션 및 메모리(DIM)는 L1 공유 메모리(400), 공유 메모리(2000) 및 휘발성 메모리(32)를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.In contrast, the L1 LSU 700 can exchange data through data interconnection and memory (DIM). Data interconnection and memory (DIM) may include an interconnection for transmitting data and a memory in which the data is shared. Specifically, data interconnection and memory (DIM) may include a local interconnection 200 and a data channel 6100. Additionally, data interconnection and memory (DIM) may include L1 shared memory 400, shared memory 2000, and volatile memory 32. However, this embodiment is not limited to this.

태스크 매니저(600)는 커맨드 프로세서(7000)에 의해서 제어될 수 있다. 즉, 커맨드 프로세서(7000)는 태스크 매니저(600)로 제어 신호를 통해 태스크를 전달하고, 태스크 매니저(600)는 태스크의 완료 리포트를 커맨드 프로세서(7000)로 전달할 수 있다. 태스크 매니저(600)는 뉴럴 코어(100)에 포함되어 뉴럴 프로세서(1000)에 적어도 하나의 태스크 매니저(600)가 포함될 수 있다. 또한, 뉴럴 프로세서(1000)가 복수인 경우 태스크 매니저(600)의 숫자는 더 많아질 수 있다. 이러한 복수의 태스크 매니저(600)는 모두 커맨드 프로세서(7000)에 의해서 제어될 수 있다.The task manager 600 may be controlled by the command processor 7000. That is, the command processor 7000 can transmit a task to the task manager 600 through a control signal, and the task manager 600 can transmit a task completion report to the command processor 7000. The task manager 600 may be included in the neural core 100 and at least one task manager 600 may be included in the neural processor 1000. Additionally, if there are multiple neural processors 1000, the number of task managers 600 may increase. All of these plurality of task managers 600 can be controlled by the command processor 7000.

도 15는 도 8의 태스크 매니저의 구조를 세부적으로 설명하기 위한 블록도이다.FIG. 15 is a block diagram to explain in detail the structure of the task manager of FIG. 8.

도 8, 도 9 및 도 15를 참조하면, 태스크 매니저(600)는 테이블 패시지(610), 태스크 패시지(620), 던 패시지(630) 및 보이드 코어(640)를 포함할 수 있다. Referring to FIGS. 8, 9, and 15, the task manager 600 may include a table passage 610, a task passage 620, a dark passage 630, and a void core 640.

테이블 패시지(610)는 피지컬 어드레스와 로지컬 어드레스의 매칭 테이블을 업데이트 시키는 테이블 업데이트 리퀘스트를 컨트롤 채널(6200)로부터 수신하여 코어 글로벌(500)로 전달할 수 있다. 이때, 테이블 업데이트 리퀘스트는 커맨드 프로세서(7000)로부터 컨트롤 채널(6200)을 통해서 전달될 수 있다.The table passage 610 may receive a table update request for updating a matching table of physical addresses and logical addresses from the control channel 6200 and transmit it to the core global 500. At this time, the table update request may be transmitted from the command processor 7000 through the control channel 6200.

태스크 패시지(620)는 태스크를 컨트롤 채널(6200)로부터 수신하고, 이에 따른 태스크 정보를 생성하여 코어 글로벌(500)로 전송할 수 있다. 이때, 태스크는 커맨드 프로세서(7000)로부터 컨트롤 채널(6200)을 통해서 전달될 수 있다. 코어 글로벌(500)은 태스크 정보를 뉴럴 코어(100)로 전달할 수 있다. 뉴럴 코어(100)는 전달된 태스크 정보에 따른 태스크를 수행할 수 있으며, 완료 신호를 코어 글로벌(500)로 전달할 수 있다.The task passage 620 may receive a task from the control channel 6200, generate task information accordingly, and transmit it to the core global 500. At this time, the task may be transmitted from the command processor 7000 through the control channel 6200. Core Global 500 may transmit task information to Neural Core 100. The neural core 100 can perform a task according to the delivered task information and transmit a completion signal to the core global 500.

코어 글로벌(500)은 완료 신호를 던 패시지(630)로 전달할 수 있다. 던 패시지(630)는 완료 신호를 수신하여 태스크의 완료 리포트(DNrp)를 생성할 수 있다. 던 패시지(630)는 완료 리포트(DNrp)를 컨트롤 채널(6200)을 통해서 커맨드 프로세서(7000)로 전송할 수 있다. Core Global 500 may transmit a completion signal to Dawn Passage 630. The Dawn Passage 630 may receive a completion signal and generate a task completion report (DNrp). The Dawn Passage 630 may transmit a completion report (DNrp) to the command processor 7000 through the control channel 6200.

또한, 테이블 패시지(610)의 테이블 업데이트 리퀘스트(TURQ)는 코어 글로벌(500)을 통해서 LSU(110)로 전달될 수 있다. 이때, LSU(110) 내부의 변환 색인 버퍼(114)의 테이블이 업데이트될 수 있다.Additionally, the table update request (TURQ) of the table passage 610 may be transmitted to the LSU 110 through the core global 500. At this time, the table of the conversion index buffer 114 within the LSU 110 may be updated.

보이드 코어(640)는 태스크를 뉴럴 코어(100)로 전달하지 않고 처리하여, 태스크에 대한 완료 신호를 생성할 수 있다. 즉, 보이드 코어(640)는 태스크를 가상으로 처리하여 완료 신호를 생성할 수 있다. 몇몇 실시예에서, 보이드 코어(640)는 디펜던시 매트릭스 사이의 디펜던시 세팅을 위한 더미 세트 태스크를 가상으로 처리할 수 있다. 더미 세트 태스크는 디펜던시 세팅을 위한 태스크로, 컴퓨테이션 또는 메모리 오퍼레이션을 위한 정보는 포함하지 않으며, 디펜던시 세팅을 위한 정보를 포함하도록 구성될 수 있다. 보이드 코어(640)는 디펜던시 세트를 위한 더미 세트 태스크에 대응하여 완료 신호를 생성할 수 있으며, 완료 신호에 대응하여 디펜던시 세팅이 수행되도록 한다.The void core 640 may process the task without transmitting it to the neural core 100 and generate a completion signal for the task. That is, the void core 640 can virtually process the task and generate a completion signal. In some embodiments, void core 640 may virtually process a dummy set task for setting dependencies between dependency matrices. The dummy set task is a task for dependency setting, does not include information for computation or memory operation, and may be configured to include information for dependency setting. The void core 640 may generate a completion signal in response to a dummy set task for the dependency set, and enable dependency setting to be performed in response to the completion signal.

도 16은 도 15의 테이블 패시지를 세부적으로 설명하기 위한 블록도이다.FIG. 16 is a block diagram for explaining the table passage of FIG. 15 in detail.

도 16을 참조하면, 테이블 패시지(610)는 테이블 버퍼(611) 및 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)를 포함할 수 있다.Referring to FIG. 16, the table passage 610 may include a table buffer 611 and first to mth update request queues 611a1 to 611am.

테이블 버퍼(611)는 피지컬 어드레스와 로지컬 어드레스가 매칭된 테이블 업데이트 리퀘스트(TURQ)가 커맨드 프로세서(7000)로부터 전송되어 저장될 수 있다. 코어 글로벌(500)이 이러한 테이블 업데이트 리퀘스트(TURQ)를 페칭하면 각각의 테이블 업데이트 리퀘스트(TURQ)가 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)에 저장될 수 있다.The table buffer 611 may store a table update request (TURQ) in which a physical address and a logical address are matched, transmitted from the command processor 7000. When the core global 500 fetches these table update requests (TURQ), each table update request (TURQ) may be stored in the first to mth update request queues 611a1 to 611am.

각각의 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)는 서로 다른 타입의 테이블 업데이트 리퀘스트(TURQ)가 저장될 수 있다. 예를 들어, 서로 다른 타입의 테이블 업데이트 리퀘스트(TURQ)눈 뉴럴 코어 TLB 업데이트 리퀘스트, 마이크로 DMA TLB 업데이트 리퀘스트, LP 마이크로 DMA TLB 업데이트 리퀘스트 및 ST 마이크로 DMA TLB 업데이트 리퀘스트 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 또는 각각의 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)는 서로 같은 타입의 테이블 업데이트 리퀘스트(TURQ)가 저장될 수도 있다.Each of the first to mth update request queues 611a1 to 611am may store different types of table update requests (TURQ). For example, different types of table update requests (TURQ) may include at least one of a neural core TLB update request, a micro DMA TLB update request, an LP micro DMA TLB update request, and an ST micro DMA TLB update request. However, this embodiment is not limited to this. Alternatively, the same type of table update request (TURQ) may be stored in each of the first to mth update request queues 611a1 to 611am.

또한, 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)는 각각 제너럴 큐 즉, 여러가지 타입의 리퀘스트를 모두 수용하는 큐일 수 있다. 이에 따라서, 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am) 각각이 타입과 무관하게 리퀘스트를 수용할 수 있다.Additionally, the first to mth update request queues 611a1 to 611am may each be general queues, that is, queues that accommodate various types of requests. Accordingly, each of the first to mth update request queues 611a1 to 611am can accept requests regardless of type.

각각의 제1 내지 제m 업데이트 리퀘스트 큐(611a1~611am)는 테이블 업데이트 리퀘스트(TURQ)를 코어 글로벌(500)로 전송할 수 있다.Each of the first to mth update request queues 611a1 to 611am may transmit a table update request (TURQ) to the core global 500.

도 17은 도 15의 태스크 패시지를 세부적으로 설명하기 위한 블록도이다.FIG. 17 is a block diagram for explaining the task passage of FIG. 15 in detail.

도 17을 참조하면, 태스크 패시지(620)는 태스크 버퍼(621), 제1 큐(Q1), 디펜던시 체커(DPc), 제2 큐(Q2) 및 런타임 핸들(RH)을 포함할 수 있다.Referring to FIG. 17, the task passage 620 may include a task buffer 621, a first queue (Q1), a dependency checker (DPc), a second queue (Q2), and a runtime handle (RH). .

태스크 버퍼(621)는 커맨드 프로세서(7000)로부터 전송된 제어 신호에 따른 태스크(Task)를 저장할 수 있다. 태스크 버퍼(621)는 코어 글로벌(500)의 태스크 페칭 동작에 의해서 태스크(Task)를 태스크 디스크립터 형태로 제1 큐(Q1)에 저장할 수 있다. 즉, 태스크 패시지(620)는 태스크(Task)에 대응하는 태스크 디스크립터를 생성하여 제1 큐(Q1)에 저장할 수 있다. The task buffer 621 may store a task according to a control signal transmitted from the command processor 7000. The task buffer 621 may store a task in the first queue Q1 in the form of a task descriptor by the task fetching operation of the core global 500. That is, the task passage 620 may create a task descriptor corresponding to the task and store it in the first queue Q1.

태스크 버퍼(621)는 태스크 디스크립터를 제1 큐(Q1)로 전송하고, 트랜스퍼 던 리포트(TRrp)를 생성할 수 있다. 태스크 버퍼(621)는 트랜스퍼 던 리포트(TRrp)를 던 패시지(630)로 전송할 수 있다. 트랜스퍼 던 리포트(TRrp)는 제1 큐(Q1)로 전송한 태스크에 대한 리포트일 수 있다.The task buffer 621 may transmit the task descriptor to the first queue (Q1) and generate a transfer report (TRrp). The task buffer 621 may transmit the transfer dawn report (TRrp) to the dawn passage 630. The transfer report (TRrp) may be a report on the task transmitted to the first queue (Q1).

제1 큐(Q1)는 태스크 디스크립터의 타입에 따라서 태스크 디스크립터를 나누어 저장할 수 있다. 도 17에서는 n개의 제1 큐(Q1)가 도시되어 있다. 이때, n는 자연수일 수 있다. 즉, 제1 큐(Q1)는 적어도 하나일 수 있다. The first queue Q1 may store task descriptors divided according to the type of task descriptor. In Figure 17, n first queues Q1 are shown. At this time, n may be a natural number. That is, there may be at least one first queue Q1.

이때, 제1 큐(Q1)는 제1_1 내지 제1_n 큐(Q1_1~Q1_n)를 포함할 수 있다. 제1_1 큐(Q1_1)는 제1 태스크 디스크립터(Tsk_d1)를 저장하고, 제1_2 큐(Q1_2)는 제2 태스크 디스크립터(Tsk_d2)를 저장할 수 있다. 제1_n 큐(Q1_n)는 제n 태스크 디스크립터(Tsk_dn)를 저장할 수 있다.At this time, the first queue (Q1) may include the 1_1th to 1_nth queues (Q1_1 to Q1_n). The 1_1 queue (Q1_1) may store the first task descriptor (Tsk_d1), and the 1_2 queue (Q1_2) may store the second task descriptor (Tsk_d2). The 1_nth queue (Q1_n) can store the nth task descriptor (Tsk_dn).

제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)는 서로 다른 타입일 수도 있고, 서로 동일한 타입일 수도 있다. 또는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn) 중 일부는 서로 동일한 타입이고, 일부는 서로 다른 타입일 수도 있다.The first to nth task descriptors (Tsk_d1 to Tsk_dn) may be of different types or may be of the same type. Alternatively, some of the first to nth task descriptors (Tsk_d1 to Tsk_dn) may be of the same type, and some may be of different types.

디펜던시 체커(DPc)는 디펜던시 매트릭스(DPmx)를 포함할 수 있다. 디펜던시 매트릭스(DPmx)에 정의된 디펜던시 세트 코드와 태스크 디스크립터에서 추출되는 체크 코드와의 비교를 통해 태스크 디스크립터에 대한 디펜던시가 체크될 수 있다. 디펜던시 매트릭스(DPmx)에 세팅된 디펜던시 세트 코드는 디펜던시 업데이트 요청(DFURQ)을 통해 업데이트될 수 있다. 디펜던시 업데이트 요청(DFURQ)은 특정 태스크 사이의 정의된 디펜던시에 따라 완료된 태스크가 발생함에 따라 디펜던시의 변동을 알려줄 수 있다. The dependency checker (DPc) may include a dependency matrix (DPmx). The dependency for the task descriptor can be checked by comparing the dependency set code defined in the dependency matrix (DPmx) with the check code extracted from the task descriptor. The dependency set code set in the dependency matrix (DPmx) can be updated through a dependency update request (DFURQ). A dependency update request (DFURQ) can notify changes in dependencies as completed tasks occur according to defined dependencies between specific tasks.

실시예에서, 각각의 태스크 디스크립터는 어떤 태스크에 대한 디펜던시가 있는지에 대한 디펜던시 정보를 포함할 수 있다. 즉, 특정 태스크 디스크립터는 이에 종속된 다른 태스크 디스크립터에 대한 정보인 디펜던시 정보를 포함할 수 있다. 특정 태스크 디스크립터가 완료됨에 따라 해당 태스크 디스크립터에 포함된 디펜던시 정보를 고려하여 디펜던시 업데이트 요청(DFURQ)이 생성되게 된다. 따라서, 디펜던시 업데이트 요청(DFURQ)은 태스크 디스크립터의 디펜던시 매트릭스에 대한 업데이트 리퀘스트를 포함할 수 있다.In an embodiment, each task descriptor may include dependency information about which task it has a dependency on. That is, a specific task descriptor may include dependency information, which is information about other task descriptors dependent on it. As a specific task descriptor is completed, a dependency update request (DFURQ) is generated considering the dependency information included in the task descriptor. Accordingly, the dependency update request (DFURQ) may include a request to update the dependency matrix of the task descriptor.

몇몇 실시예에서, 디펜던시 체커(DPc)에 포함된 디펜던시 매트릭스(DPmx)는 복수로 구성될 수 있다. 도 17을 참조하면, 디펜던시 매트릭스(DPmx)는 제1 디펜던시 매트릭스(DPmx_1) 내지 제m 디펜던시 매트릭스(DPmx_m)을 포함할 수 있다. 도 17에서, 제1_1 내지 제1_n 큐(Q1_1~Q1_n)와 제1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m)가 대응되는 것으로 도시되었으나, 본 발명의 실시예가 이에 한정되는 것은 아니다. 몇몇 실시예에서, 디펜던시 매트릭스(DPmx)의 개수인 m은 제1 큐(Q1)의 개수인 n과 상이할 수 있으며, 제1 디펜던시 매트릭스(DPmx_1) 내지 제m 디펜던시 매트릭스(DPmx_m)와 제1 큐(Q1)의 각각이 대응 관계가 형성되지는 않는다. 실시예에서, 디펜던시 매트릭스(DPmx)은 뉴럴 프로세싱 시스템의 효율적인 동작을 위해 미리 계산된 개수(m)로 구성될 수 있다. 이때, 각각의 디펜던시 매트릭스(DPmx)는 별도의 그룹에 속한 것으로 표현할 수도 있다.In some embodiments, the dependency matrix (DPmx) included in the dependency checker (DPc) may be composed of multiple dependency matrices (DPmx). Referring to FIG. 17, the dependency matrix DPmx may include a first dependency matrix DPmx_1 to an mth dependency matrix DPmx_m. In FIG. 17 , the 1_1st to 1_nth queues (Q1_1 to Q1_n) and the 1st to mth dependency matrices (DPmx_1 to DPmx_m) are shown as corresponding, but the embodiment of the present invention is not limited thereto. In some embodiments, m, which is the number of dependency matrices (DPmx), may be different from n, which is the number of first queues (Q1), and the first to mth dependency matrices (DPmx_1) to ( DPmx_m) and the first queue (Q1) do not correspond to each other. In an embodiment, the dependency matrix (DPmx) may be composed of a pre-calculated number (m) for efficient operation of the neural processing system. At this time, each dependency matrix (DPmx) may be expressed as belonging to a separate group.

또한, 제1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m) 각각은 독립적으로 동작할 수 있다. 실시예에서, 제1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m) 각각은 독립적으로 동작할 수 있으며, 디펜던시 매트릭스의 업데이트 또한 개별적으로 수행될 수 있다. 즉, 디펜던시 업데이트 요청(DFURQ)은 제1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m) 각각에 대응되는 제1 내지 제m 디펜던시 필드 업데이트 리퀘스트(DFURQ_1 ~ DFURQ_m)을 포함할 수 있다. 이하, 하나의 디펜던시 매트릭스의 구조 및 복수의 디펜던시 매트릭스가 독립적으로 동작하는 과정에 대해 더욱 상세히 설명하도록 한다. Additionally, each of the first to mth dependency matrices (DPmx_1 to DPmx_m) may operate independently. In an embodiment, each of the first to mth dependency matrices (DPmx_1 to DPmx_m) may operate independently, and updating of the dependency matrices may also be performed individually. That is, the dependency update request (DFURQ) may include the first to mth dependency field update requests (DFURQ_1 to DFURQ_m) corresponding to the first to mth dependency matrices (DPmx_1 to DPmx_m), respectively. . Hereinafter, the structure of one dependency matrix and the process by which multiple dependency matrices operate independently will be described in more detail.

도 18은 도 17의 디펜던시 체커의 내부에 저장된 제1 디펜던시 매트릭스를 설명하기 위한 도면이다.FIG. 18 is a diagram for explaining the first dependency matrix stored inside the dependency checker of FIG. 17.

도 18을 참조하면, 제1 디펜던시 체커(DPc1)는 도 17의 디펜던시 체커(DPc)의 일 실시예일 수 있다. 제1 디펜던시 체커(DPc1)는 내부에 제1 디펜던시 매트릭스(DPmx1)를 포함할 수 있다. 제1 디펜던시 매트릭스(DPmx1)는 정사각형 행렬일 수 있다. 제1 디펜던시 매트릭스(DPmx1)는 복수의 행과 복수의 열을 포함할 수 있고, 도 18에서는 예시적으로 4 X 4 매트릭스를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, 제1 디펜던시 매트릭스(DPmx1)의 행과 열의 개수는 5개 이상일 수도 있고, 3개 이하일 수도 있다. 이때, 제1 디펜던시 매트릭스(DPmx1)의 행과 열의 개수는 각각 n개일 수 있다. 즉, 제1 큐(Q1), 제2 큐(Q2) 및 던 패시지(630)의 체크인 버퍼의 개수와 제1 디펜던시 매트릭스(DPmx1)의 행과 열 각각의 개수가 모두 동일할 수 있다.Referring to FIG. 18, the first dependency checker DPc1 may be an example of the dependency checker DPc of FIG. 17. The first dependency checker (DPc1) may include a first dependency matrix (DPmx1) therein. The first dependency matrix (DPmx1) may be a square matrix. The first dependency matrix DPmx1 may include a plurality of rows and a plurality of columns, and may exemplarily include a 4 However, this embodiment is not limited to this. That is, the number of rows and columns of the first dependency matrix DPmx1 may be 5 or more or 3 or less. At this time, the number of rows and columns of the first dependency matrix DPmx1 may be n each. That is, the number of check-in buffers of the first queue (Q1), the second queue (Q2), and the dun passage 630 and the number of rows and columns of the first dependency matrix (DPmx1) may all be the same.

제1 디펜던시 매트릭스(DPmx1)의 각 열은 디펜던시 업데이트 요청(DFURQ)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)를 통해서 업데이트될 수 있다. 즉, 제1 디펜던시 체커(DPc1)는 디펜던시 업데이트 요청(DFURQ)을 통해서 디펜던시 세트 코드(DFURQ1~DFURQ4)를 생성할 수 있다.Each column of the first dependency matrix (DPmx1) can be updated through the first to fourth dependency set codes (DFURQ1 to DFURQ4) generated by the dependency update request (DFURQ). That is, the first dependency checker (DPc1) can generate dependency set codes (DFURQ1 to DFURQ4) through a dependency update request (DFURQ).

즉, 제1 디펜던시 매트릭스(DPmx1)의 제1 내지 제4 열은 각각 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)의 값과 동일하게 업데이트될 수 있다. That is, the first to fourth columns of the first dependency matrix DPmx1 may be updated to be the same as the values of the first to fourth dependency set codes DFURQ1 to DFURQ4, respectively.

예를 들어, 제1 디펜던시 매트릭스(DPmx1)의 디펜던시 세트 코드가 “1001”인 경우, e11은 1, e12는 0, e13은 0, e14는 1일 수 있다. 유사하게 다른 엘리먼트도 제2 내지 제4 디펜던시 세트 코드(DFURQ2~DFURQ4)에 의해서 업데이트될 수 있다.For example, if the dependency set code of the first dependency matrix (DPmx1) is “1001”, e11 may be 1, e12 may be 0, e13 may be 0, and e14 may be 1. Similarly, other elements may also be updated by the second to fourth dependency set codes (DFURQ2 to DFURQ4).

제1 디펜던시 매트릭스(DPmx1)는 이렇게 업데이트된 후에 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)와 비교될 수 있다. 즉, 제1 디펜던시 체커(DPc1)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 수신하고, 각각의 태스크 디스크립터에 따라 디펜던시 체크 코드를 생성할 수 있다. 디펜던시 체크 코드는 제1 디펜던시 매트릭스(DPmx1)의 각각의 행에 대응될 수 있다.After the first dependency matrix (DPmx1) is updated in this way, it can be compared with the first to fourth dependency check codes (chk1 to chk4). That is, the first dependency checker DPc1 may receive the first to nth task descriptors Tsk_d1 to Tsk_dn, and generate a dependency check code according to each task descriptor. The dependency check code may correspond to each row of the first dependency matrix (DPmx1).

즉, 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)는 각각 제1 디펜던시 매트릭스(DPmx1)의 제1 내지 제4 행에 대응될 수 있다. 예를 들어, 제1 디펜던시 체크 코드(chk1)는 제1 행이 대응 로우(row)고, 제4 디펜던시 체크 코드(chk4)는 제4 행이 대응 로우일 수 있다. 따라서, 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)는 각각 제1 디펜던시 매트릭스(DPmx1)의 제1 내지 제4 행과 비교될 수 있다. 제1 디펜던시 체커(DPc1)는 예를 들어, 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx1)의 제1 행(e11, e21, e31, e41)이 동일한 경우 제1 태스크 디스크립터(Tsk_d1)를 전송하여 체크인하고, 제1 디펜던시 매트릭스(DPmx1)의 제1 행을 클리어할 수 있다. 이때, 클리어란, 제1 디펜던시 매트릭스(DPmx1)의 제1 행의 데이터를 모두 제거하는 것을 의미할 수 있다. 체크인된 태스크 디스크립터는 제2 큐(Q2)로 전송될 수 있다.That is, the first to fourth dependency check codes (chk1 to chk4) may respectively correspond to the first to fourth rows of the first dependency matrix (DPmx1). For example, the first dependency check code (chk1) may have a first row as a corresponding row, and the fourth dependency check code (chk4) may have a fourth row as a corresponding row. Accordingly, the first to fourth dependency check codes (chk1 to chk4) may be compared with the first to fourth rows of the first dependency matrix (DPmx1), respectively. For example, the first dependency checker (DPc1) is operated when the first dependency check code (chk1) and the first rows (e11, e21, e31, e41) of the first dependency matrix (DPmx1) are the same. The first task descriptor (Tsk_d1) can be transmitted to check in, and the first row of the first dependency matrix (DPmx1) can be cleared. At this time, clear may mean removing all data in the first row of the first dependency matrix (DPmx1). The checked-in task descriptor may be transmitted to the second queue (Q2).

이때, 제1 디펜던시 매트릭스(DPmx1)의 제1 행의 데이터는 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)에 의해서 업데이트된 값일 수 있다. 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)의 각각의 디스크립터가 체크아웃될 때 제1 디펜던시 체커(DPc1)로 전달될 수 있다. 이에 따라서, 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)는 디펜던시 관계가 있는 다음 태스크 디스크립터가 무엇인지 제1 디펜던시 매트릭스(DPmx1)를 세팅할 수 있다.At this time, data in the first row of the first dependency matrix (DPmx1) may be a value updated by the first to fourth dependency set codes (DFURQ1 to DFURQ4). The first to fourth dependency set codes (DFURQ1 to DFURQ4) may be transmitted to the first dependency checker (DPc1) when each descriptor of the first to nth task descriptors (Tsk_d1 to Tsk_dn) is checked out. there is. Accordingly, the first to fourth dependency set codes (DFURQ1 to DFURQ4) can set the first dependency matrix (DPmx1) to determine the next task descriptor with a dependency relationship.

만일, 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx1)의 제1 행(e11, e21, e31, e41)이 동일하지 않은 경우, 제1 디펜던시 체커(DPc1)는 추가 업데이트에 의해서 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx1)의 제1 행(e11, e21, e31, e41)이 동일할 때까지 제1 태스크 디스크립터(Tsk_d1)를 제2 큐(Q2)에 전달하지 않을 수 있다.If the first dependency check code (chk1) and the first rows (e11, e21, e31, e41) of the first dependency matrix (DPmx1) are not the same, the first dependency checker (DPc1) The first task descriptor (Tsk_d1) until the first dependency check code (chk1) and the first row (e11, e21, e31, e41) of the first dependency matrix (DPmx1) are the same by additional update. may not be delivered to the second queue (Q2).

다시, 도 17을 참조하면, 디펜던시 체커(DPc)는 위의 방식에 따라, 순차적으로 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 제2 큐(Q2)로 전송할 수 있다. Referring again to FIG. 17, the dependency checker (DPc) may sequentially transmit the first to nth task descriptors (Tsk_d1 to Tsk_dn) to the second queue (Q2) according to the above method.

이때, 제2 큐(Q2)는 제2_1 내지 제2_n 큐(Q2_1~Q2_n)를 포함할 수 있다. 제2_1 큐(Q2_1)는 제1 태스크 디스크립터(Tsk_d1)를 저장하고, 제2_2 큐(Q2_2)는 제2 태스크 디스크립터(Tsk_d2)를 저장할 수 있다. 제2_n 큐(Q2_n)는 제n 태스크 디스크립터(Tsk_dn)를 저장할 수 있다. 제2 큐(Q2)의 개수는 제1 큐(Q1)의 개수와 동일할 수 있다.At this time, the second queue Q2 may include the 2_1st to 2_nth queues (Q2_1 to Q2_n). The 2_1 queue (Q2_1) may store the first task descriptor (Tsk_d1), and the 2_2 queue (Q2_2) may store the second task descriptor (Tsk_d2). The 2_nth queue (Q2_n) can store the nth task descriptor (Tsk_dn). The number of second queues Q2 may be the same as the number of first queues Q1.

제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)는 또한 대기 항목을 포함할 수 있다. 대기 항목은 소프트웨어에 의해서 지정된 항목일 수 있다. 대기 항목이 설정된 태스크 디스크립터는 미리 주어진 지시에 따라서 바로 전달되는 대신 특정 조건의 만족 여부에 따라서 일단 대기하였다가 순차적으로 전달될 수 있다.The first to nth task descriptors (Tsk_d1 to Tsk_dn) may also include a wait item. The waiting item may be an item specified by software. A task descriptor for which a wait item is set may wait depending on whether a specific condition is satisfied and then be delivered sequentially instead of being delivered immediately according to a pre-given instruction.

런타임 핸들(RH)은 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn) 각각 중 필요한 정보를 추출하여 제1 내지 제n 태스크 정보(Tsk_d1'~Tsk_dn')를 생성할 수 있다. 런타임 핸들(RH)은 제1 내지 제n 태스크 정보(Tsk_d1'~Tsk_dn')를 코어 글로벌(500)로 전달할 수 있다. 이때, 제1 내지 제n 태스크 정보(Tsk_d1'~Tsk_dn')는 각각 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)에 대응할 수 있다. 이때, 제1 내지 제n 태스크 정보(Tsk_d1'~Tsk_dn') 각각은 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)와 동일할 수도 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The runtime handle (RH) can generate first to nth task information (Tsk_d1' to Tsk_dn') by extracting necessary information from each of the first to nth task descriptors (Tsk_d1 to Tsk_dn). The runtime handle (RH) may transmit first to nth task information (Tsk_d1' to Tsk_dn') to the core global 500. At this time, the first to nth task information (Tsk_d1' to Tsk_dn') may correspond to the first to nth task descriptors (Tsk_d1 to Tsk_dn), respectively. At this time, each of the first to nth task information (Tsk_d1' to Tsk_dn') may be the same as the first to nth task descriptors (Tsk_d1 to Tsk_dn). However, this embodiment is not limited to this.

런타임 핸들(RH)은 체크인 데이터(ChI)를 던 패시지(630)로 전송할 수 있다. 체크인 데이터(ChI)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 포함할 수 있다. 체크인 데이터(ChI)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)에 대응하는 제1 내지 제n 태스크 정보(Tsk_d1'~Tsk_dn')가 동작으로 위해서 태스크 패시지(620)를 떠나 코어 글로벌(500)로 전달됨을 던 패시지(630)로 알려줄 수 있다.The runtime handle (RH) can transmit check-in data (ChI) to the Dawn passage 630. Check-in data (ChI) may include first to nth task descriptors (Tsk_d1 to Tsk_dn). The check-in data (ChI) is the first to nth task information (Tsk_d1' to Tsk_dn') corresponding to the first to nth task descriptors (Tsk_d1 to Tsk_dn) that leaves the task passage 620 and returns to the core global (500) for operation. ) can be informed by the Dungeon Passage (630).

도 18은 도 17의 제1 디펜던시 매트릭스 및 제2 디펜던시 매트릭스를 설명하기 위한 도면이다.FIG. 18 is a diagram for explaining the first dependency matrix and the second dependency matrix of FIG. 17.

도 18을 참조하면, 디펜던시 체커(DPc)는 적어도 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2)를 포함할 수 있다. 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각은 정사각형 행렬일 수 있다. 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각은 복수의 행과 복수의 열을 포함할 수 있고, 도 18에서는 예시적으로 4 X 4 매트릭스를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각의 행과 열의 개수는 5개 이상일 수도 있고, 3개 이하일 수도 있다. 이때, 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각의 행과 열의 개수는 각각 n개일 수 있다. 즉, 제1 큐(Q1), 제2 큐(Q2) 및 던 패시지(630)의 체크인 버퍼의 개수와 제1 디펜던시 매트릭스(DPmx_1)의 행과 열 각각의 개수가 모두 동일할 수 있다.Referring to FIG. 18, the dependency checker DPc may include at least a first dependency matrix DPmx_1 and a second dependency matrix DPmx_2. Each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be a square matrix. Each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may include a plurality of rows and a plurality of columns, and in FIG. 18, may exemplarily include a 4 x 4 matrix. However, this embodiment is not limited to this. That is, the number of rows and columns of each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be 5 or more or 3 or less. At this time, the number of rows and columns of each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be n. That is, the number of check-in buffers of the first queue Q1, the second queue Q2, and the dun passage 630 and the number of rows and columns of the first dependency matrix DPmx_1 may all be the same.

제1 디펜던시 매트릭스(DPmx_1)의 각 열은 제1 디펜던시 필드 업데이트 리퀘스트(DFURQ1)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)를 통해서 업데이트될 수 있다. 즉, 디펜던시 체커(DPc)는 제1 디펜던시 필드 업데이트 리퀘스트(DFURQ1)를 통해서 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)를 생성할 수 있다. 즉, 제1 디펜던시 매트릭스(DPmx_1)의 제1 내지 제4 열은 각각 제1 내지 제4 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)의 값과 동일하게 업데이트될 수 있다. 예를 들어, 제1 디펜던시 매트릭스(DPmx_1)가 “1001”인 경우, e11은 1, e12는 0, e13은 0, e14는 1일 수 있다. 유사하게 다른 엘리먼트도 제2 내지 제4 디펜던시 세트 코드(DFURQ1_2~DFURQ1_4)에 의해서 업데이트될 수 있다.Each column of the first dependency matrix (DPmx_1) can be updated through the first to fourth dependency set codes (DFURQ1_1 to DFURQ1_4) generated by the first dependency field update request (DFURQ1). That is, the dependency checker (DPc) can generate dependency set codes (DFURQ1_1 to DFURQ1_4) through the first dependency field update request (DFURQ1). That is, the first to fourth columns of the first dependency matrix (DPmx_1) may be updated to be the same as the values of the first to fourth dependency set codes (DFURQ1_1 to DFURQ1_4), respectively. For example, if the first dependency matrix (DPmx_1) is “1001”, e11 may be 1, e12 may be 0, e13 may be 0, and e14 may be 1. Similarly, other elements may also be updated by the second to fourth dependency set codes (DFURQ1_2 to DFURQ1_4).

제2 디펜던시 매트릭스(DPmx_2)의 각 열은 제2 디펜던시 필드 업데이트 리퀘스트(DFURQ2)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ2_1~DFURQ2_4)를 통해서 업데이트될 수 있다. 즉, 디펜던시 체커(DPc)는 제2 디펜던시 필드 업데이트 리퀘스트(DFURQ2)를 통해서 디펜던시 세트 코드(DFURQ2_1~DFURQ2_1)를 생성할 수 있다. 즉, 제2 디펜던시 매트릭스(DPmx_2)의 제1 내지 제4 열은 각각 제1 내지 제4 디펜던시 세트 코드(DFURQ2_1~DFURQ2_4)의 값과 동일하게 업데이트될 수 있다.Each column of the second dependency matrix (DPmx_2) can be updated through the first to fourth dependency set codes (DFURQ2_1 to DFURQ2_4) generated by the second dependency field update request (DFURQ2). That is, the dependency checker (DPc) can generate dependency set codes (DFURQ2_1 to DFURQ2_1) through the second dependency field update request (DFURQ2). That is, the first to fourth columns of the second dependency matrix (DPmx_2) may be updated to be the same as the values of the first to fourth dependency set codes (DFURQ2_1 to DFURQ2_4), respectively.

제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2)는 이렇게 업데이트된 후에 각각 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)와 비교될 수 있다. 디펜던시 체커(DPc)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 수신하고, 각각의 태스크 디스크립터에 따라 디펜던시 체크 코드를 생성할 수 있다. 디펜던시 체크 코드는 입력되는 디펜던시 매트릭스의 각 행에 대응될 수 있다. After the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) are updated in this way, they can be compared with the first to fourth dependency check codes (chk1 to chk4), respectively. The dependency checker (DPc) may receive the first to nth task descriptors (Tsk_d1 to Tsk_dn) and generate a dependency check code according to each task descriptor. The dependency check code may correspond to each row of the input dependency matrix.

예시적으로, 도 18에서, 제1 디펜던시 매트릭스(DPmx_1)는 제1 태스크 디스크립터(Tsk_d1)에 대응하여 생성된 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)가 입력될 수 있으며, 제2 디펜던시 매트릭스(DPmx_2)는 제3 태스크 디스크립터(Tsk_d3)에 대응하여 생성된 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)가 입력될 수 있다. 실시예에서, 태스크 디스크립터는 디펜던시 체크를 위해 입력되는 디펜던시 매트릭스가 커맨드 프로세서(7000)에서 미리 결정된 상태일 수 있다. 디펜던시 체커(DPc)는 태스크 디스크립터를 미리 결정된 디펜던시 매트릭스에 입력하여 디펜던시 체크가 수행되도록 할 수 있다. 다만, 본 발명의 실시예가 이에 한정되는 것은 아니며, 디펜던시 체커(DPc)는 태스크 디스크립터를 1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m) 중 어느 하나로 랜덤 또는 순서대로 배정하여 디펜던시 체크가 수행되도록 할 수 있다.Exemplarily, in FIG. 18, the first to fourth dependency check codes (chk1 to chk4) generated in response to the first task descriptor (Tsk_d1) may be input to the first dependency matrix (DPmx_1). , the first to fourth dependency check codes (chk1 to chk4) generated in response to the third task descriptor (Tsk_d3) may be input to the second dependency matrix (DPmx_2). In an embodiment, the task descriptor may have a dependency matrix input for dependency check predetermined in the command processor 7000. The dependency checker (DPc) can input a task descriptor into a predetermined dependency matrix to perform a dependency check. However, the embodiment of the present invention is not limited to this, and the dependency checker (DPc) checks the dependency by randomly or sequentially assigning the task descriptor to one of the 1st to mth dependency matrices (DPmx_1 to DPmx_m). can be performed.

예시적으로, 제1 디펜던시 매트릭스(DPmx_1)에서 디펜던시 체크가 수행되는 과정에 대해 설명하도록 한다. 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)는 각각 제1 디펜던시 매트릭스(DPmx_1)의 제1 내지 제4 행에 대응될 수 있다. 예를 들어, 제1 디펜던시 체크 코드(chk1)는 제1 행이 대응 로우(row)이고, 제4 디펜던시 체크 코드(chk4)는 제4 행이 대응 로우일 수 있다. 따라서, 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)는 각각 제1 디펜던시 매트릭스(DPmx_1)의 제1 내지 제4 행과 비교될 수 있다. 디펜던시 체커(DPc)는 예를 들어, 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx_1)의 제1 행(e11, e21, e31, e41)이 동일한 경우 제1 태스크 디스크립터(Tsk_d1)를 전송하여 체크인하고, 제1 디펜던시 매트릭스(DPmx_1)의 제1 행을 클리어할 수 있다. 이때, 클리어란, 제1 디펜던시 매트릭스(DPmx_1)의 제1 행의 데이터를 모두 제거하는 것을 의미할 수 있다. 체크인된 제1 태스크 디스크립터는 제2 큐(Q2)로 전송될 수 있다.As an example, a process in which a dependency check is performed in the first dependency matrix DPmx_1 will be described. The first to fourth dependency check codes (chk1 to chk4) may respectively correspond to the first to fourth rows of the first dependency matrix (DPmx_1). For example, the first dependency check code (chk1) may have a first row as a corresponding row, and the fourth dependency check code (chk4) may have a fourth row as a corresponding row. Accordingly, the first to fourth dependency check codes (chk1 to chk4) may be compared with the first to fourth rows of the first dependency matrix (DPmx_1), respectively. For example, the dependency checker (DPc) is the first dependency check code (chk1) when the first rows (e11, e21, e31, e41) of the first dependency matrix (DPmx_1) are the same. The task descriptor (Tsk_d1) can be transmitted to check in, and the first row of the first dependency matrix (DPmx_1) can be cleared. At this time, clear may mean removing all data in the first row of the first dependency matrix (DPmx_1). The checked-in first task descriptor may be transmitted to the second queue (Q2).

이때, 제1 디펜던시 매트릭스(DPmx_1)의 제1 행의 데이터는 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)에 의해서 업데이트된 값일 수 있다. 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)의 각각의 디스크립터가 체크아웃될 때 디펜던시 체커(DPc)로 전달될 수 있다. 이에 따라서, 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)는 디펜던시 관계가 있는 다음 태스크 디스크립터가 무엇인지 제1 디펜던시 매트릭스(DPmx_1)를 세팅할 수 있다.At this time, data in the first row of the first dependency matrix (DPmx_1) may be a value updated by the first to fourth dependency set codes (DFURQ1 to DFURQ4). The first to fourth dependency set codes (DFURQ1 to DFURQ4) may be transmitted to the dependency checker (DPc) when each descriptor of the first to nth task descriptors (Tsk_d1 to Tsk_dn) is checked out. Accordingly, the first to fourth dependency set codes (DFURQ1 to DFURQ4) can set the first dependency matrix (DPmx_1) to determine the next task descriptor with a dependency relationship.

만일, 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx_1)의 제1 행(e11, e21, e31, e41)이 동일하지 않은 경우, 디펜던시 체커(DPc)는 추가 업데이트에 의해서 제1 디펜던시 체크 코드(chk1)와 제1 디펜던시 매트릭스(DPmx_1)의 제1 행(e11, e21, e31, e41)이 동일할 때까지 제1 태스크 디스크립터(Tsk_d1)를 제2 큐(Q2)에 전달하지 않을 수 있다.If the first dependency check code (chk1) and the first row (e11, e21, e31, e41) of the first dependency matrix (DPmx_1) are not the same, the dependency checker (DPc) is added. By updating, the first task descriptor (Tsk_d1) is maintained until the first dependency check code (chk1) and the first rows (e11, e21, e31, e41) of the first dependency matrix (DPmx_1) are the same. 2 It may not be delivered to queue (Q2).

도 19는 도 15의 던 패시지를 세부적으로 설명하기 위한 블록도이다.FIG. 19 is a block diagram for explaining the Dawn passage of FIG. 15 in detail.

도 19를 참조하면, 던 패시지(630)는 체크인 버퍼(Cib), 디펜던시 세터(DPs), 타임아웃 모니터(ToM), 이벤트 모니터(EM) 및 리포트 매니징 모듈(631)을 포함할 수 있다.Referring to FIG. 19, the dawn passage 630 may include a check-in buffer (Cib), dependency setters (DPs), timeout monitor (ToM), event monitor (EM), and report management module 631. there is.

체크인 버퍼(Cib)는 체크인 데이터(ChI)를 수신할 수 있다. 체크인 버퍼(Cib)는 제1 내지 제n 체크인 버퍼(Cib_1~Cib_n)를 포함할 수 있다. 체크인 버퍼(Cib)는 체크인 데이터(ChI)에 저장된 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 저장할 수 있다. 제1 내지 제n 체크인 버퍼(Cib_1~Cib_n)는 각각 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 저장할 수 있다. 체크인 버퍼(Cib)는 이를 통해서 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)의 체크인을 수행할 수 있다. The check-in buffer (Cib) can receive check-in data (ChI). The check-in buffer (Cib) may include first to n-th check-in buffers (Cib_1 to Cib_n). The check-in buffer (Cib) may store the first to n-th task descriptors (Tsk_d1 to Tsk_dn) stored in the check-in data (ChI). The first to nth check-in buffers (Cib_1 to Cib_n) may store the first to nth task descriptors (Tsk_d1 to Tsk_dn), respectively. The check-in buffer (Cib) can perform check-in of the first to n-th task descriptors (Tsk_d1 to Tsk_dn) through this.

즉, 제1 체크인 버퍼(Cib_1)는 제1 태스크 디스크립터(Tsk_d1)를 저장하고, 제2 체크인 버퍼(Cib_2)는 제2 태스크 디스크립터(Tsk_d2)를 저장할 수 있다. 제n 체크인 버퍼(Cib_n)는 제n 태스크 디스크립터(Tsk_dn)를 저장할 수 있다. 체크인 버퍼(Cib)의 개수는 제1 큐(Q1)의 개수 및 제2 큐(Q2)의 개수와 동일할 수 있다.That is, the first check-in buffer (Cib_1) can store the first task descriptor (Tsk_d1), and the second check-in buffer (Cib_2) can store the second task descriptor (Tsk_d2). The nth check-in buffer (Cib_n) may store the nth task descriptor (Tsk_dn). The number of check-in buffers (Cib) may be equal to the number of first queues (Q1) and the number of second queues (Q2).

체크인 버퍼(Cib)는 코어 글로벌(500)로부터 완료 신호를 수신할 수 있다. 이때, 완료 신호는 제1 내지 제n 완료 신호(Tsk_d1d~Tsk_dnd)를 포함할 수 있다. 제1 내지 제n 완료 신호(Tsk_d1d~Tsk_dnd)는 각각 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn) 각각에 대한 완료 신호일 수 있다. 제1 내지 제n 완료 신호(Tsk_d1d~Tsk_dnd)는 각각 제1 내지 제n 체크인 버퍼(Cib_1~Cib_n)로 수신될 수 있다. 즉, 제1 체크인 버퍼(Cib_1)는 제1 완료 신호(Tsk_d1d)를 수신하고, 제2 체크인 버퍼(Cib_2)는 제2 완료 신호(Tsk_d2d)를 수신할 수 있다. 제n 체크인 버퍼(Cib_n)는 제n 완료 신호(Tsk_dnd)를 수신할 수 있다.The check-in buffer (Cib) may receive a completion signal from the core global 500. At this time, the completion signal may include the first to nth completion signals (Tsk_d1d to Tsk_dnd). The first to nth completion signals (Tsk_d1d to Tsk_dnd) may be completion signals for the first to nth task descriptors (Tsk_d1 to Tsk_dn), respectively. The first to nth completion signals (Tsk_d1d to Tsk_dnd) may be received into the first to nth check-in buffers (Cib_1 to Cib_n), respectively. That is, the first check-in buffer (Cib_1) may receive the first completion signal (Tsk_d1d), and the second check-in buffer (Cib_2) may receive the second completion signal (Tsk_d2d). The nth check-in buffer (Cib_n) may receive the nth completion signal (Tsk_dnd).

디펜던시 세터(DPs)는 체크인 버퍼(Cib)로부터 완료 신호를 수신하여 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있다. 어떤 태스크 디스크립터에 대응하는 태스크가 완료되었는지에 따라 디펜던시 세터(DPs)는 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있다. Dependency setters (DPs) may receive a completion signal from the check-in buffer (Cib) and generate a dependency update request (DFURQ). Depending on which task descriptor the task corresponding to has been completed, dependency setters (DPs) can generate a dependency update request (DFURQ).

디펜던시 세터(DPs)는 디펜던시 업데이트 요청(DFURQ)을 태스크 패시지(620)로 전송할 수 있다. Dependency setters (DPs) may transmit a dependency update request (DFURQ) to the task passage 620.

이때, 디펜던시 업데이트 요청(DFURQ)은 상술한 도 18의 디펜던시 세트 코드(DFURQ1~DFURQ4)에 대한 내용을 포함할 수 있다. 즉, 디펜던시 업데이트 요청(DFURQ)은 현재 체크아웃되는 태스크 디스크립터의 디펜던시 정보를 포함할 수 있다. 즉, 디펜던시 업데이트 요청(DFURQ)은 현재 체크아웃되는 태스크 디스크립터에 의해서 디펜던시의 제한이 없어져 실행될 수 있는 태스크 디스크립터가 무엇인지에 대한 정보를 포함할 수 있다. At this time, the dependency update request (DFURQ) may include content about the dependency set codes (DFURQ1 to DFURQ4) of FIG. 18 described above. That is, the dependency update request (DFURQ) may include dependency information of the task descriptor that is currently checked out. That is, the dependency update request (DFURQ) may include information about which task descriptor can be executed as the dependency limit is removed by the task descriptor currently checked out.

실시예에서, 태스크 디스크립터에 포함된 디펜던시 정보는 태스크 디스크립터와 종속 관계를 가지는 종속 태스크 디스크립터에 대한 정보 및 종속 태스크 디스크립터가 체크되는 디펜던시 매트릭스 정보를 포함할 수 있다. 따라서, 디펜던시 업데이트 요청(DFURQ)은 종속 태스크 디스크립터의 정보 및 종속 태스크 디스크립터의 디펜던시가 체크되는 디펜던시 매트릭스 정보를 포함할 수 있다. 예시적으로, 체크아웃되는 제1 태스크 디스크립터(Tsk_d1)에 제2 태스크 디스크립터(Tsk_d2)가 종속되는 관계이고, 제2 태스크 디스크립터(Tsk_d2)가 제3 디펜던시 매트릭스(DPmx_3)에 디펜던시 체크를 위해 입력되는 경우, 디펜던시 세터(DPs)는 제1 태스크 디스크립터(Tsk_d1)에 종속된 제2 태스크 디스크립터(Tsk_d2)의 디펜던시 체크를 위해 제3 디펜던시 매트릭스에 디펜던시 세트 코드를 전달하는 제3 디펜던시 필드 업데이트 리퀘스트(DFURQ3)를 구성할 수 있다. 제3 디펜던시 필드 업데이트 리퀘스트(DFURQ3)는 제3 디펜던시 매트릭스(DPmx_3)에 제공되어 제2 태스크 디스크립터(Tsk_d2)에 대한 디펜던시가 세팅될 수 있다. In an embodiment, the dependency information included in the task descriptor may include information about a dependent task descriptor that has a dependency relationship with the task descriptor and dependency matrix information in which the dependent task descriptor is checked. Accordingly, the dependency update request (DFURQ) may include dependent task descriptor information and dependency matrix information in which the dependency of the dependent task descriptor is checked. As an example, the second task descriptor (Tsk_d2) is dependent on the first task descriptor (Tsk_d1) to be checked out, and the second task descriptor (Tsk_d2) checks dependency on the third dependency matrix (DPmx_3). When input for, the dependency setter (DPs) provides a dependency set code in the third dependency matrix to check the dependency of the second task descriptor (Tsk_d2) dependent on the first task descriptor (Tsk_d1). A third dependency field update request (DFURQ3) that delivers can be configured. The third dependency field update request (DFURQ3) may be provided to the third dependency matrix (DPmx_3) to set the dependency on the second task descriptor (Tsk_d2).

디펜던시 세터(DPs)는 또한 완료 신호에 따라서, 각각의 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 체크아웃시킬 수 있다. 이에 따라서, 디펜던시 세터(DPs)는 어떤 태스크가 완료되어 체크아웃 되었는지에 대한 체크아웃 리포트(COrp)를 생성할 수 있다. 디펜던시 세터(DPs)는 체크아웃 리포트(COrp)를 리포트 매니징 모듈(631)로 전송할 수 있다.Dependency setters (DPs) may also check out each of the first to nth task descriptors (Tsk_d1 to Tsk_dn) according to the completion signal. Accordingly, dependency setters (DPs) can generate a checkout report (COrp) about which tasks have been completed and checked out. Dependency setters (DPs) can transmit the checkout report (COrp) to the report management module 631.

디펜던시 세터(DPs)가 디펜던시 업데이트 요청(DFURQ)을 태스크 패시지(620)에 전송함에 따라 태스크 패시지(620)의 디펜던시 체커(DPc)는 각각의 태스크 디스크립터의 디펜던시에 따른 순차적 전송이 가능할 수 있다.As the dependency setters (DPs) transmit a dependency update request (DFURQ) to the task passage 620, the dependency checker (DPc) of the task passage 620 updates the dependency checker (DPc) according to the dependency of each task descriptor. Sequential transmission may be possible.

본 실시예는 디펜던시에 따른 처리를 커맨드 프로세서(7000)가 전담하여 진행하지 않고, 태스크 매니저(600)가 디펜던시 체킹 및 세팅을 직접 수행할 수 있도록 하여 커맨드 프로세서(7000)와의 소통에 드는 오버헤드를 최소화시킬 수 있다. 이에 따라, 본 실시예에 따른 뉴럴 프로세싱 장치(1)의 성능 및 속도가 비약적으로 향상될 수 있다. In this embodiment, the command processor 7000 does not take full charge of processing according to dependencies, but allows the task manager 600 to directly perform dependency checking and setting, thereby improving communication with the command processor 7000. Overhead can be minimized. Accordingly, the performance and speed of the neural processing device 1 according to this embodiment can be dramatically improved.

타임아웃 모니터(ToM)는 체크인 버퍼(Cib)로부터 타임아웃 디텍션 신호(TOdec)를 수신할 수 있다. 타임아웃 디텍션 신호(TOdec)는 체크인 시점부터 체크아웃 시점까지의 시간이 미리 설정된 시간보다 넘어섰는지에 대한 신호일 수 있다. 타임아웃 모니터(ToM)는 타임아웃 디텍션 신호(TOdec)에 따라 타임아웃 리포트(TOrp)를 생성할 수 있다. 타임아웃 모니터(ToM)는 타임아웃 리포트(TOrp)를 리포트 매니징 모듈(631)로 전송할 수 있다.The timeout monitor (ToM) can receive a timeout detection signal (TOdec) from the check-in buffer (Cib). The timeout detection signal (TOdec) may be a signal indicating whether the time from check-in to check-out exceeds a preset time. The timeout monitor (ToM) can generate a timeout report (TOrp) according to the timeout detection signal (TOdec). The timeout monitor (ToM) can transmit a timeout report (TOrp) to the report management module 631.

타임아웃 모니터(ToM)는 각각의 태스크 디스크립터의 체크인 및 체크아웃을 판단하여 체크인된 태스크 디스크립터가 체크아웃되지 않는 오류를 커맨드 프로세서(7000)가 파악할 수 있게 할 수 있다. 이를 통해서, 데이터의 손실을 방지하고, 디펜던시에 따른 지연의 장기화를 차단할 수 있다.The timeout monitor (ToM) may determine the check-in and check-out of each task descriptor and enable the command processor 7000 to identify an error in which a checked-in task descriptor is not checked out. Through this, data loss can be prevented and prolonged delays due to dependency can be prevented.

본 실시예에서, 하드웨어 또는 소프트웨어의 에러, 로그 관련 이벤트 및 디스크립터 없이 수행되는 태스크 중 적어도 하나에 따른 이벤트가 발생할 수 있다. 본 발명의 실시예가 이에 한정되는 것은 아니다. 이벤트 모니터(EM)는 이러한 이벤트 발생 여부를 감지할 수 있으며, 이벤트 감지 신호에 따라 이벤트 리포트(Erp)를 생성할 수 있다. 생성된 이벤트 리포트(Erp)는 리포트 매니징 모듈(631)에 제공될 수 있다.In this embodiment, an event according to at least one of a hardware or software error, a log-related event, and a task performed without a descriptor may occur. The embodiments of the present invention are not limited thereto. An event monitor (EM) can detect whether such an event occurs and generate an event report (Erp) according to the event detection signal. The generated event report (Erp) may be provided to the report management module 631.

리포트 매니징 모듈(631)은 트랜스퍼 던 리포트(TRrp), 이벤트 리포트(Erp), 체크아웃 리포트(COrp) 및 타임아웃 리포트(TOrp) 중 적어도 하나를 수신하여 완료 리포트(DNrp)를 생성할 수 있다. 이때, 이벤트 리포트(Erp)는 뉴럴 프로세서(1000) 내부의 이벤트를 감지하여 생성될 수 있다. 이벤트는 예를 들어, 하드웨어 또는 소프트웨어의 에러, 로그 관련 이벤트 및 디스크립터 없이 수행되는 태스크 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The report management module 631 may generate a completion report (DNrp) by receiving at least one of a transfer report (TRrp), an event report (Erp), a checkout report (COrp), and a timeout report (TOrp). . At this time, an event report (Erp) may be generated by detecting an event inside the neural processor 1000. The event may include, for example, at least one of a hardware or software error, a log-related event, and a task performed without a descriptor. However, this embodiment is not limited to this.

완료 리포트(DNrp)는 태스크의 수행여부, 타임아웃 여부 등을 종합적으로 보고할 수 있게 작성될 수 있다. 리포트 매니징 모듈(631)은 완료 리포트(DNrp)를 커맨드 프로세서(7000)로 보고할 수 있다. A completion report (DNrp) can be written to comprehensively report whether a task has been performed, whether a timeout has occurred, etc. The report management module 631 may report a completion report (DNrp) to the command processor 7000.

도 20은 도 19의 리포트 매니징 모듈을 세부적으로 설명하기 위한 블록도이다.FIG. 20 is a block diagram for explaining the report management module of FIG. 19 in detail.

도 20을 참조하면, 리포트 매니징 모듈(631)은 트랜스퍼 던 리포트 큐(TQ), 이벤트 리포트 큐(EQ), 체크아웃 리포트 큐(CQ), 타임아웃 리포트 큐(TOQ) 및 리포팅 매니저(RM)를 포함할 수 있다.Referring to FIG. 20, the report management module 631 includes a transfer report queue (TQ), an event report queue (EQ), a checkout report queue (CQ), a timeout report queue (TOQ), and a reporting manager (RM). may include.

트랜스퍼 던 리포트 큐(TQ)는 트랜스퍼 던 리포트(TRrp)를 수신하고, 리포팅 매니저(RM)에게 전달할 수 있다. 이벤트 리포트 큐(EQ)는 이벤트 리포트(Erp)를 수신하고, 리포팅 매니저(RM)에게 전달할 수 있다. 체크아웃 리포트 큐(CQ)는 체크아웃 리포트(Corp)를 수신하고, 리포팅 매니저(RM)에게 전달할 수 있다. 또한, 타임아웃 리포트 큐(TOQ)는 타임아웃 리포트(Torp)를 수신하고, 리포팅 매니저(RM)에게 전달할 수 있다.The Transfer Dawn Report Queue (TQ) can receive the Transfer Dawn Report (TRrp) and deliver it to the Reporting Manager (RM). The event report queue (EQ) can receive the event report (Erp) and deliver it to the reporting manager (RM). The checkout report queue (CQ) can receive the checkout report (Corp) and deliver it to the reporting manager (RM). Additionally, the timeout report queue (TOQ) can receive the timeout report (Torp) and deliver it to the reporting manager (RM).

리포팅 매니저(RM)는 트랜스퍼 던 리포트(TRrp), 이벤트 리포트(Erp), 체크아웃 리포트(Corp) 및 타임아웃 리포트(Torp) 중 적어도 하나를 수신하고, 이를 통해서 완료 리포트(DNrp)를 생성할 수 있다. 리포팅 매니저(RM)는 완료 리포트(DNrp)를 커맨드 프로세서(7000)로 전달할 수 있다.The reporting manager (RM) can receive at least one of the transfer report (TRrp), event report (Erp), checkout report (Corp), and timeout report (Torp), and generate a completion report (DNrp) through this. there is. The reporting manager (RM) may transmit the completion report (DNrp) to the command processor 7000.

도 21은 도 15의 코어 글로벌과 태스크 프로세싱 유닛이 교환하는 데이터를 설명하기 위한 도면이다.FIG. 21 is a diagram illustrating data exchanged between the core global and the task processing unit of FIG. 15.

도 21을 참조하면, 코어 글로벌(500)은 테이블 업데이트 리퀘스트(TURQ)를 수신하여 뉴럴 코어(100)의 LSU(110)로 전달할 수 있다. 또한, 코어 글로벌(500)은 태스크 정보(Tsk_d')를 수신하여 뉴럴 코어(100)로 전달할 수 있다. Referring to FIG. 21, the core global 500 may receive a table update request (TURQ) and transmit it to the LSU 110 of the neural core 100. Additionally, the core global 500 may receive task information (Tsk_d') and transmit it to the neural core 100.

뉴럴 코어(100)는 태스크를 수행하고 완료 신호를 생성할 수 있다. 뉴럴 코어(100)는 완료 신호를 코어 글로벌(500)로 전달할 수 있다. 코어 글로벌(500)은 시그널 스케쥴러(sgn_sch)를 포함할 수 있다. 시그널 스케쥴러(sgn_sch)는 완료 신호를 수신하고, 완료 신호의 전송을 스케쥴링하여 던 패시지(630)로 전송할 수 있다.The neural core 100 may perform a task and generate a completion signal. The neural core 100 may transmit a completion signal to the core global 500. Core global 500 may include a signal scheduler (sgn_sch). The signal scheduler (sgn_sch) may receive a completion signal, schedule transmission of the completion signal, and transmit it to the Dawn passage 630.

도 22는 제1 큐, 제2 큐 및 체크인 버퍼에 저장되는 태스크 디스크립터의 타입을 설명하기 위한 도면이다.Figure 22 is a diagram for explaining the types of task descriptors stored in the first queue, second queue, and check-in buffer.

도 22를 참조하면, 제1 큐(Q1)의 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2 큐(Q2)의 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 체크인 버퍼(Cib)의 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 각각 특정한 타입의 태스크 디스크립터를 저장할 수 있다. 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 각기 서로 다른 타입의 태스크 디스크립터를 저장할 수 있다. Referring to FIG. 22, the 1_1st to 1_4th queues (Q1_1 to Q1_4) of the first queue (Q1), the 2_1st to 2_4th queues (Q2_1 to Q2_4) of the second queue (Q2), and the check-in buffer (Cib) The first to fourth check-in buffers (Cib_1 to Cib_4) may each store a specific type of task descriptor. The 1_1st to 1_4th queues (Q1_1 to Q1_4), the 2_1st to 2_4th queues (Q2_1 to Q2_4), and the 1st to 4th check-in buffers (Cib_1 to Cib_4) may each store different types of task descriptors.

예를 들어, 제1_1 큐(Q1_1), 제2_1 큐(Q2_1) 및 제1 체크인 버퍼(Cib_1)는 컴퓨테이션에 대한 태스크 디스크립터를 저장하고, 제1_2 큐(Q1_2), 제2_2 큐(Q2_2) 및 제2 체크인 버퍼(Cib_2)는 마이크로 DMA에 대한 태스크 디스크립터를 저장할 수 있다. 또한, 제1_3 큐(Q1_3), 제2_3 큐(Q2_3) 및 제3 체크인 버퍼(Cib_3)는 LP 마이크로 DMA에 대한 태스크 디스크립터를 저장하고, 제1_4 큐(Q1_4), 제2_4 큐(Q2_4) 및 제4 체크인 버퍼(Cib_4)는 ST 마이크로 DMA에 대한 태스크 디스크립터를 저장할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.For example, the 1_1 queue (Q1_1), the 2_1 queue (Q2_1), and the first check-in buffer (Cib_1) store the task descriptor for computation, and the 1_2 queue (Q1_2), the 2_2 queue (Q2_2), and The second check-in buffer (Cib_2) may store a task descriptor for micro DMA. In addition, the 1_3 queue (Q1_3), the 2_3 queue (Q2_3), and the third check-in buffer (Cib_3) store the task descriptor for LP micro DMA, and the 1_4 queue (Q1_4), the 2_4 queue (Q2_4), and the 4 Check-in buffer (Cib_4) can store a task descriptor for ST micro DMA. However, this embodiment is not limited to this.

도 23은 도 22에 따른 태스크 디스크립터의 디펜던시를 체크하기 위한 예시적인 디펜던시 매트릭스를 설명하기 위한 도면이다.FIG. 23 is a diagram illustrating an exemplary dependency matrix for checking the dependency of the task descriptor according to FIG. 22.

도 23을 참조하면, 디펜던시 체커(DPc)의 내부에 저장되는 디펜던시 매트릭스(DPmx)는 제1 내지 제4 열이 각각 태스크 디스크립터의 타입에 대응될 수 있다. 예를 들어, 디펜던시 매트릭스(DPmx)는 제1 내지 제4 열은 컴퓨테이션, 마이크로 DMA, LP 마이크로 DMA 및 ST 마이크로 DMA에 각각 대응될 수 있다. 또한, 디펜던시 매트릭스(DPmx)는 제1 내지 제4 행은 각각 컴퓨테이션, 마이크로 DMA, LP 마이크로 DMA 및 ST 마이크로 DMA에 대응될 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 태스크 디스크립터의 타입은 프리 프로세싱을 더 포함할 수도 있고, 컴퓨테이션이 세부적인 컴퓨테이션으로 분화되어 태스크 디스크립터의 타입으로 정의될 수 있다. Referring to FIG. 23, the first to fourth columns of the dependency matrix (DPmx) stored inside the dependency checker (DPc) may each correspond to the type of the task descriptor. For example, in the dependency matrix (DPmx), the first to fourth columns may correspond to computation, micro DMA, LP micro DMA, and ST micro DMA, respectively. Additionally, the first to fourth rows of the dependency matrix DPmx may correspond to computation, micro DMA, LP micro DMA, and ST micro DMA, respectively. However, this embodiment is not limited to this. The type of task descriptor may further include preprocessing, and computation may be divided into detailed computation and defined as the type of task descriptor.

디펜던시 매트릭스(DPmx)의 제1 열은 컴퓨테이션 세트 코드(COMP_s)에 의해서 업데이트될 수 있다. 디펜던시 매트릭스(DPmx)의 제2 열은 마이크로 DMA 세트 코드(μDMA_s)에 의해서 업데이트될 수 있다. 디펜던시 매트릭스(DPmx)의 제3 열은 마이크로 LP 마이크로 DMA 세트 코드(LPμDMA_s)에 의해서 업데이트될 수 있다. 디펜던시 매트릭스(DPmx)의 제4 열은 마이크로 ST 마이크로 DMA 세트 코드(STμDMA_s)에 의해서 업데이트될 수 있다.The first column of the dependency matrix (DPmx) may be updated by the computation set code (COMP_s). The second column of the dependency matrix (DPmx) can be updated by the micro DMA set code (μDMA_s). The third column of the dependency matrix (DPmx) can be updated by the micro LP micro DMA set code (LPμDMA_s). The fourth column of the dependency matrix (DPmx) can be updated by the micro ST micro DMA set code (STμDMA_s).

또한, 디펜던시 매트릭스(DPmx)의 제1 행은 컴퓨테이션 체크 코드(COMP_c)와 비교되고, 제2 행은 마이크로 DMA 세트 코드(μDMA_c)와 비교되고, 제3 행은 LP 마이크로 DMA 세트 코드(LPμDMA_c)와 비교되고, 제4 행은 ST 마이크로 DMA 세트 코드(STμDMA_c)와 비교될 수 있다. Additionally, the first row of the dependency matrix (DPmx) is compared with the computation check code (COMP_c), the second row is compared with the micro DMA set code (μDMA_c), and the third row is compared with the LP micro DMA set code ( LPμDMA_c), and the fourth row may be compared with the ST micro DMA set code (STμDMA_c).

따라서, 디펜던시 매트릭스(DPmx)는 제1 열이 CC, CU, CL, CS를 포함할 수 있다. 이때, CC는 컴퓨테이션에서 컴퓨테이션으로의 디펜던시를 의미하고, CU는 컴퓨테이션에서 마이크로 DMA로의 디펜던시를 의미할 수 있다. 유사하게, CL은 컴퓨테이션에서 LP 마이크로 DMA로의 디펜던시를 의미하고, CS는 컴퓨테이션에서 ST 마이크로 DMA로의 디펜던시를 의미할 수 있다. 즉, 각 열에 대응하는 타입의 태스크에서 각 항에 대응하는 타입의 태스크로의 디펜던시가 디펜던시 매트릭스(DPmx)의 각 엘리먼트를 의미할 수 있다.Accordingly, the dependency matrix (DPmx) may include CC, CU, CL, and CS in the first column. At this time, CC may mean dependency from computation to computation, and CU may mean dependency from computation to micro DMA. Similarly, CL may mean a dependency from computation to LP micro DMA, and CS may mean a dependency from computation to ST micro DMA. In other words, the dependency from the task of the type corresponding to each column to the task of the type corresponding to each column may refer to each element of the dependency matrix (DPmx).

도 27 내지 도 30은 제2 디펜던시 매트릭스의 동작을 설명하기 위한 예시도이다.Figures 27 to 30 are exemplary diagrams for explaining the operation of the second dependency matrix.

도 23 및 도 24를 참조하면, 제2 디펜던시 매트릭스(DPmx2)의 다른 엘리먼트는 모두 “0”이고, UC에 “1”이 기록된 경우(“1”을 표시 신호로 정의할 때), 마이크로 DMA 태스크 디스크립터(Tsk_d_u)에서 컴퓨테이션 태스크 디스크립터(Tsk_d_c)로 디펜던시가 설정됨을 의미할 수 있다.Referring to FIGS. 23 and 24, when all other elements of the second dependency matrix (DPmx2) are “0” and “1” is recorded in UC (when “1” is defined as a display signal), This may mean that the dependency is set from the micro DMA task descriptor (Tsk_d_u) to the computation task descriptor (Tsk_d_c).

도 23 및 도 25를 참조하면, 제2 디펜던시 매트릭스(DPmx2)의 다른 엘리먼트는 모두 “0”이고, UC 및 LC에 “1”이 기록된 경우(“1”을 표시 신호로 정의할 때), 마이크로 DMA 태스크 디스크립터(Tsk_d_u) 및 LP 마이크로 DMA 태스크 디스크립터(TSK_D_L)에서 컴퓨테이션 태스크 디스크립터(Tsk_d_c)로 디펜던시가 설정됨을 의미할 수 있다. 이는, 컴퓨테이션 태스크 디스크립터(Tsk_d_c)가 전달되기 위해서는 마이크로 DMA 태스크 디스크립터(Tsk_d_u) 및 LP 마이크로 DMA 태스크 디스크립터(TSK_D_L) 모두가 체크아웃되어야 함을 의미할 수 있다.Referring to FIGS. 23 and 25, when all other elements of the second dependency matrix (DPmx2) are “0” and “1” is recorded in UC and LC (when “1” is defined as the display signal) ), this may mean that the dependency is set from the micro DMA task descriptor (Tsk_d_u) and LP micro DMA task descriptor (TSK_D_L) to the computation task descriptor (Tsk_d_c). This may mean that in order for the computation task descriptor (Tsk_d_c) to be delivered, both the micro DMA task descriptor (Tsk_d_u) and the LP micro DMA task descriptor (TSK_D_L) must be checked out.

도 23 및 도 26을 참조하면, 제2 디펜던시 매트릭스(DPmx2)의 다른 엘리먼트는 모두 “0”이고, CS, CL 및 CU에 “1”이 기록된 경우(“1”을 표시 신호로 정의할 때), 컴퓨테이션 태스크 디스크립터(Tsk_d_c)에서 마이크로 DMA 태스크 디스크립터(Tsk_d_u), LP 마이크로 DMA 태스크 디스크립터(Tsk_d_l) 및 ST 마이크로 DMA 태스크 디스크립터(Tsk_d_s)로 디펜던시가 설정됨을 의미할 수 있다. 이는, 마이크로 DMA 태스크 디스크립터(Tsk_d_u), LP 마이크로 DMA 태스크 디스크립터(Tsk_d_l) 및 ST 마이크로 DMA 태스크 디스크립터(Tsk_d_s)가 각각 전달되기 위해서는 컴퓨테이션 태스크 디스크립터(Tsk_d_c)가 체크아웃되어야 함을 의미할 수 있다.Referring to FIGS. 23 and 26, when all other elements of the second dependency matrix (DPmx2) are “0” and “1” is recorded in CS, CL, and CU (“1” is defined as the display signal This may mean that the dependency is set from the computation task descriptor (Tsk_d_c) to the micro DMA task descriptor (Tsk_d_u), LP micro DMA task descriptor (Tsk_d_l), and ST micro DMA task descriptor (Tsk_d_s). This may mean that the computation task descriptor (Tsk_d_c) must be checked out in order for the micro DMA task descriptor (Tsk_d_u), LP micro DMA task descriptor (Tsk_d_l), and ST micro DMA task descriptor (Tsk_d_s) to be transmitted, respectively.

도 23 및 도 27을 참조하면, 제2 디펜던시 매트릭스(DPmx2)의 모든 엘리먼트가 “1”인 경우(“1”을 표시 신호로 정의할 때), 4가지 타입을 모두 포함하는 1차 태스크 디스크립터(Tsk_d_1) 모두로부터 4가지 타입을 모두 포함하는 2차 태스크 디스크립터(Tsk_d_2) 각각으로 디펜던시가 설정됨을 의미할 수 있다. 즉, 2차 태스크 디스크립터(Tsk_d_2) 각각이 전달되기 위해서는 1차 태스크 디스크립터(Tsk_d_1) 모두가 체크아웃되어야 함을 의미할 수 있다.Referring to FIGS. 23 and 27, when all elements of the second dependency matrix (DPmx2) are “1” (when “1” is defined as a display signal), the primary task including all four types This may mean that dependencies are set from all of the descriptors (Tsk_d_1) to each of the secondary task descriptors (Tsk_d_2) that include all four types. In other words, this may mean that in order for each secondary task descriptor (Tsk_d_2) to be transmitted, all primary task descriptors (Tsk_d_1) must be checked out.

본 실시예는 이를 통해서 태스크 매니저(600)가 커맨드 프로세서(7000)와의 추가적인 데이터 교환 없이 빠르게 각각의 태스크들의 디펜던시를 체크하여 처리할 수 있다. 이를 통해서 태스크 처리의 속도가 향상되고, 태스크 사이의 순차적인 처리가 원활하게 수행될 수 있다.In this embodiment, the task manager 600 can quickly check and process the dependency of each task without additional data exchange with the command processor 7000. Through this, the speed of task processing is improved, and sequential processing between tasks can be performed smoothly.

도 28은 도 17의 제1 디펜던시 매트릭스 및 제2 디펜던시 매트릭스를 설명하기 위한 도면이다.FIG. 28 is a diagram for explaining the first dependency matrix and the second dependency matrix of FIG. 17.

도 18을 참조하면, 디펜던시 체커(DPc)는 적어도 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2)를 포함할 수 있다. 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각은 정사각형 행렬일 수 있다. 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각은 복수의 행과 복수의 열을 포함할 수 있고, 도 28에서는 예시적으로 4 X 4 매트릭스를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각의 행과 열의 개수는 5개 이상일 수도 있고, 3개 이하일 수도 있다. 이때, 제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2) 각각의 행과 열의 개수는 각각 n개일 수 있다. 즉, 제1 큐(Q1), 제2 큐(Q2) 및 던 패시지(630)의 체크인 버퍼의 개수와 제1 디펜던시 매트릭스(DPmx_1)의 행과 열 각각의 개수가 모두 동일할 수 있다.Referring to FIG. 18, the dependency checker DPc may include at least a first dependency matrix DPmx_1 and a second dependency matrix DPmx_2. Each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be a square matrix. Each of the first dependency matrix DPmx_1 and the second dependency matrix DPmx_2 may include a plurality of rows and a plurality of columns, and in FIG. 28, may exemplarily include a 4 x 4 matrix. However, this embodiment is not limited to this. That is, the number of rows and columns of each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be 5 or more or 3 or less. At this time, the number of rows and columns of each of the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) may be n. That is, the number of check-in buffers of the first queue Q1, the second queue Q2, and the dun passage 630 and the number of rows and columns of the first dependency matrix DPmx_1 may all be the same.

제1 디펜던시 매트릭스(DPmx_1)의 각 열은 제1 디펜던시 필드 업데이트 리퀘스트(DFURQ1)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)를 통해서 업데이트될 수 있다. 즉, 디펜던시 체커(DPc)는 제1 디펜던시 필드 업데이트 리퀘스트(DFURQ1)를 통해서 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)를 생성할 수 있다. 즉, 제1 디펜던시 매트릭스(DPmx_1)의 제1 내지 제4 열은 각각 제1 내지 제4 디펜던시 세트 코드(DFURQ1_1~DFURQ1_4)의 값과 동일하게 업데이트될 수 있다. 예를 들어, 제1 디펜던시 매트릭스(DPmx_1)의 제1 열이 “1001”인 경우, e11은 1, e12는 0, e13은 0, e14는 1일 수 있다. 유사하게 다른 엘리먼트도 제2 내지 제4 디펜던시 세트 코드(DFURQ1_2~DFURQ1_4)에 의해서 업데이트될 수 있다.Each column of the first dependency matrix (DPmx_1) can be updated through the first to fourth dependency set codes (DFURQ1_1 to DFURQ1_4) generated by the first dependency field update request (DFURQ1). That is, the dependency checker (DPc) can generate dependency set codes (DFURQ1_1 to DFURQ1_4) through the first dependency field update request (DFURQ1). That is, the first to fourth columns of the first dependency matrix (DPmx_1) may be updated to be the same as the values of the first to fourth dependency set codes (DFURQ1_1 to DFURQ1_4), respectively. For example, if the first column of the first dependency matrix (DPmx_1) is “1001”, e11 may be 1, e12 may be 0, e13 may be 0, and e14 may be 1. Similarly, other elements may also be updated by the second to fourth dependency set codes (DFURQ1_2 to DFURQ1_4).

제2 디펜던시 매트릭스(DPmx_2)의 각 열은 제2 디펜던시 필드 업데이트 리퀘스트(DFURQ2)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ2_1~DFURQ2_4)를 통해서 업데이트될 수 있다. 즉, 디펜던시 체커(DPc)는 제2 디펜던시 필드 업데이트 리퀘스트(DFURQ2)를 통해서 디펜던시 세트 코드(DFURQ2_1~DFURQ2_1)를 생성할 수 있다. 즉, 제2 디펜던시 매트릭스(DPmx_2)의 제1 내지 제4 열은 각각 제1 내지 제4 디펜던시 세트 코드(DFURQ2_1~DFURQ2_4)의 값과 동일하게 업데이트될 수 있다.Each column of the second dependency matrix (DPmx_2) can be updated through the first to fourth dependency set codes (DFURQ2_1 to DFURQ2_4) generated by the second dependency field update request (DFURQ2). That is, the dependency checker (DPc) can generate dependency set codes (DFURQ2_1 to DFURQ2_1) through the second dependency field update request (DFURQ2). That is, the first to fourth columns of the second dependency matrix (DPmx_2) may be updated to be the same as the values of the first to fourth dependency set codes (DFURQ2_1 to DFURQ2_4), respectively.

제1 디펜던시 매트릭스(DPmx_1) 및 제2 디펜던시 매트릭스(DPmx_2)는 이렇게 업데이트된 후에 각각 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)와 비교될 수 있다. 디펜던시 체커(DPc)는 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 수신하고, 각각의 태스크 디스크립터에 따라 디펜던시 체크 코드를 생성할 수 있다. 디펜던시 체크 코드는 입력되는 디펜던시 매트릭스의 각 행에 대응될 수 있다. After the first dependency matrix (DPmx_1) and the second dependency matrix (DPmx_2) are updated in this way, they can be compared with the first to fourth dependency check codes (chk1 to chk4), respectively. The dependency checker (DPc) may receive the first to nth task descriptors (Tsk_d1 to Tsk_dn) and generate a dependency check code according to each task descriptor. The dependency check code may correspond to each row of the input dependency matrix.

예시적으로, 도 28에서, 제1 디펜던시 매트릭스(DPmx_1)는 제1 태스크 디스크립터(Tsk_d1)에 대응하여 생성된 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)가 입력될 수 있으며, 제2 디펜던시 매트릭스(DPmx_2)는 제3 태스크 디스크립터(Tsk_d3)에 대응하여 생성된 제1 내지 제4 디펜던시 체크 코드(chk1~chk4)가 입력될 수 있다. 실시예에서, 태스크 디스크립터는 디펜던시 체크를 위해 입력되는 디펜던시 매트릭스가 커맨드 프로세서(CP)에서 미리 결정된 상태일 수 있다. 디펜던시 체커(DPc)는 태스크 디스크립터를 미리 결정된 디펜던시 매트릭스에 입력하여 디펜던시 체크가 수행되도록 할 수 있다. 다만, 본 발명의 실시예가 이에 한정되는 것은 아니며, 디펜던시 체커(DPc)는 태스크 디스크립터를 1 내지 제m 디펜던시 매트릭스(DPmx_1 ~ DPmx_m) 중 어느 하나로 랜덤 또는 순서대로 배정하여 디펜던시 체크가 수행되도록 할 수 있다.Exemplarily, in FIG. 28, the first to fourth dependency check codes (chk1 to chk4) generated in response to the first task descriptor (Tsk_d1) may be input to the first dependency matrix (DPmx_1). , the first to fourth dependency check codes (chk1 to chk4) generated in response to the third task descriptor (Tsk_d3) may be input to the second dependency matrix (DPmx_2). In an embodiment, the task descriptor may have a dependency matrix input for dependency check predetermined in the command processor (CP). The dependency checker (DPc) can input a task descriptor into a predetermined dependency matrix to perform a dependency check. However, the embodiment of the present invention is not limited to this, and the dependency checker (DPc) checks the dependency by randomly or sequentially assigning the task descriptor to one of the 1st to mth dependency matrices (DPmx_1 to DPmx_m). can be performed.

도 29는 각 그룹에 따른 레이턴시 감소 효과를 설명하기 위한 개념도이다.Figure 29 is a conceptual diagram to explain the latency reduction effect for each group.

도 29를 참조하면, 디펜던시 매트릭스가 1개일 경우에는 동일한 종류의 디펜던시에 대해서는 추가적인 레이턴시가 발생할 수 있다. 즉, 예를 들어, LPuDMA에서 COMP로의 디펜던시가 존재하는 경우에는 디펜던시 매트릭스가 1개일 때는 첫번째 LPuDMA가 완료되어 세트되고, 첫번째 COMP가 전달되어 디펜던시 매트릭스가 클리어된 후에 두번째 LPuDMA가 세트될 수 있다. Referring to FIG. 29, when there is only one dependency matrix, additional latency may occur for the same type of dependency. That is, for example, when there is a dependency from LPuDMA to COMP, when there is one dependency matrix, the first LPuDMA is completed and set, and after the first COMP is delivered and the dependency matrix is cleared, the second LPuDMA is set. It can be set.

이에 반해서, 디펜던시 매트릭스가 여러 그룹이 있는 경우에는 첫번째 COMP가 전달됨을 기다릴 필요없이 바로 두번째 그룹에 LPuDMA가 완료되어 세트될 수 있다. 또한, 첫번째 LPuDMA가 완료되어 세트됨을 기다릴 필요도 없다. 따라서, 체크 및 세트에 따른 레이턴시를 최소화할 수 있어 장치 전체의 속도를 비약적으로 상승시킬 수 있다.On the other hand, if there are multiple groups of dependency matrices, LPuDMA can be completed and set in the second group immediately without having to wait for the first COMP to be delivered. Additionally, there is no need to wait for the first LPuDMA to complete and be set. Therefore, latency due to check and set can be minimized, dramatically increasing the speed of the entire device.

도 30은 서로 다른 디펜던시 매트릭스에서 복수의 태스크 디스크립터와 디펜던시가 체크되는 하나의 태스크 디스크립터를 예시적으로 도시한다.FIG. 30 exemplarily illustrates a plurality of task descriptors and one task descriptor whose dependency is checked in different dependency matrices.

도 30을 참조하면, 제1 디펜던시 매트릭스(DPmx1)의 LPuDMA1에서 제3 디펜던시 매트릭스(DPmx3)의 COMP9로 디펜던시가 형성되어 있고, 제2 디펜던시 매트릭스(DPmx2)에서 제3 디펜던시 매트릭스(DPmx3)의 COMP9로 디펜던시가 형성될 수 있다. 이에 따라서, 서로 다른 그룹의 2개의 태스크 디스크립터에서 다른 그룹의 1개의 태스크 디스크립터에 대한 디펜던시가 형성된 상태이다.Referring to FIG. 30, a dependency is formed from LPuDMA1 of the first dependency matrix (DPmx1) to COMP9 of the third dependency matrix (DPmx3), and the third dependency matrix (DPmx2) Dependency can be formed with COMP9 of the dependency matrix (DPmx3). Accordingly, a dependency is formed between two task descriptors of different groups and one task descriptor of another group.

도 31은 더미 체크 디스크립터를 설명하기 위한 도면이다.Figure 31 is a diagram for explaining a dummy check descriptor.

도 31을 참조하면, 제3 디펜던시 매트릭스(DPmx3)의 COMP9는 COMP6 및 LPuDMA1과 각각 디펜던시가 형성되어 있으므로, COMP6 및 LPuDMA1가 각각 체크아웃되어야 COMP가 전송되어 수행될 수 있다.Referring to FIG. 31, since COMP9 of the third dependency matrix DPmx3 has a dependency with COMP6 and LPuDMA1, COMP6 and LPuDMA1 must be checked out respectively for COMP to be transmitted and performed.

이에 따라서, LPuDMA1에 대해서 COMP9의 디펜던시 체크 코드가 수행되면 COMP6에 대해서 디펜던시 체크 코드가 또 수행되기 어려우므로 더미 체크 디스크립터에 의해서 생성된 디펜던시 더미 체크 코드가 추가로 제3 디펜던시 매트릭스(DPmx3)에 생성될 수 있다.Accordingly, if the dependency check code of COMP9 is performed for LPuDMA1, it is difficult to perform the dependency check code for COMP6 again, so the dependency dummy check code generated by the dummy check descriptor is additionally added to the third dependency. It can be created in the time matrix (DPmx3).

이때, 더미 체크 디스크립터는 대응되는 태스크 디스크립터보다 먼저 체크될 수 있다. 이를 통해서, 최종적으로 태스크 디스크립터가 체크되어야 태스크 디스크립터에 대응되는 태스크가 전송되어 수행될 수 있다. At this time, the dummy check descriptor may be checked before the corresponding task descriptor. Through this, the task descriptor must be finally checked before the task corresponding to the task descriptor can be transmitted and performed.

구체적으로, 제3 디펜던시 매트릭스(DPmx3)보다 앞서서 제2 디펜던시 매트릭스(DPmx2)에 COMP6에 대한 COMP9의 디펜던시 형성이 처리될 수 있다. 이때, COMP9의 디펜던시는 더미 체크 코드를 통해서 처리될 수 있다. 이때, 더미 체크 디스크립터는 1개 이상일 수 있다. 즉, 디펜던시가 복수로 설정된 경우 후속하는 태스크 디스크립터 스스로를 제외한 나머지 디펜던시는 모두 더미 체크 디스크립터로 처리될 수 있다. 예를 들어, 3개의 디펜던시는 2개의 더미 체크 디스크립터를 필요로 할 수 있다. 본 실시예는, 복수의 그룹을 통해서 서로 다른 그룹간의 다대일(多對一) 디펜던시가 자유롭게 처리될 수 있다.Specifically, the dependency formation of COMP9 with respect to COMP6 may be processed in the second dependency matrix (DPmx2) before the third dependency matrix (DPmx3). At this time, the dependency of COMP9 can be processed through a dummy check code. At this time, there may be one or more dummy check descriptors. That is, when multiple dependencies are set, all dependencies other than the subsequent task descriptor itself can be treated as dummy check descriptors. For example, 3 dependencies may require 2 dummy check descriptors. In this embodiment, many-to-one dependencies between different groups can be freely processed through a plurality of groups.

도 32는 디펜던시 체커에서 더미 체크 디스크립터가 소각되는 것을 설명하기 위한 도면이다.Figure 32 is a diagram to explain that a dummy check descriptor is burned in the dependency checker.

도 32를 참조하면, 예를 들어, 디펜던시 체커(DPc)에는 제2 더미 체크 디스크립터(DC_Tsk_d2)가 수신될 수 있다. 더미 체크 디스크립터는 필요한 경우에만 커맨드 프로세서(7000)에 의해서 생성되어 수신될 수 있기에 모든 태스크 디스크립터가 아닌 일부 태스크 디스크립터에 대응하여 디펜던시 체커(DPc)에 수신될 수 있다.Referring to FIG. 32, for example, the second dummy check descriptor (DC_Tsk_d2) may be received in the dependency checker (DPc). Since the dummy check descriptor can be generated and received by the command processor 7000 only when necessary, it can be received by the dependency checker (DPc) in response to some task descriptors, not all task descriptors.

디펜던시 체커(DPc)는 수신된 디스크립터 중에서 태스크 디스크립터와 더미 체크 디스크립터를 식별할 수 있다. 또한, 더미 세트 디스크립터와 더미 체크 디스크립터도 식별할 수 있다. 이때, 태스크 디스크립터 및 더미 세트 디스크립터는 디펜던시 체커(DPc)를 통과하여 체크아웃되어야 하지만, 더미 체크 디스크립터는 그럴 필요가 없기 때문에 식별될 수 있다.The dependency checker (DPc) can identify a task descriptor and a dummy check descriptor among the received descriptors. Additionally, dummy set descriptors and dummy check descriptors can also be identified. At this time, the task descriptor and the dummy set descriptor must be checked out by passing the dependency checker (DPc), but the dummy check descriptor does not need to be checked out and can be identified.

제2 더미 체크 디스크립터(DC_Tsk_d2)는 디펜던시 체크가 종료되면 디펜던시 체커(DPc) 내부에서 소각(Burnt out)될 수 있다. 즉, 제2 더미 체크 디스크립터(DC_Tsk_d2)는 코어 글로벌(500)로 전송될 필요도 없고, 체크아웃될 필요도 없으므로 디펜던시 체커(DPc)에 의해서 소각될 수 있다.The second dummy check descriptor (DC_Tsk_d2) may be burned out within the dependency checker (DPc) when the dependency check is completed. That is, since the second dummy check descriptor (DC_Tsk_d2) does not need to be transmitted to the core global 500 or checked out, it can be burned by the dependency checker (DPc).

도 33은 서로 다른 디펜던시 매트릭스에서 하나의 태스크 디스크립터와 디펜던시가 체크되는 복수의 태스크 디스크립터를 예시적으로 도시한다.Figure 33 exemplarily shows one task descriptor and a plurality of task descriptors whose dependencies are checked in different dependency matrices.

실시예에서, 하나의 태스크 디스크립터는 복수의 태스크 디스크립터 사이에 디펜던시가 설정되되, 복수의 태스크 디스크립터는 서로 다른 디펜던시 매트릭스에서 디펜던시가 체크되도록 구성될 수 있다. In an embodiment, one task descriptor may be configured to have dependencies between a plurality of task descriptors, and the plurality of task descriptors may be configured to have dependencies checked in different dependency matrices.

도 33을 참조하면, 제1 디펜던시 매트릭스(DPmx_1)에서 디펜던시가 체크되는 제3 컴퓨테이션 태스크 디스크립터(COMP3)은 제2 디펜던시 매트릭스(DPmx_2)에서 디펜던시가 체크되는 제2 마이크로 DMA 태스크 디스크립터(uDMA2)와 제3 디펜던시 매트릭스(DPmx_3)에서 디펜던시가 체크되는 제3 LP 마이크로 DMA 태스크 디스크립터(LPuDMA3)에 각각 디펜던시 관계가 설정될 수 있다. Referring to FIG. 33, the third computation task descriptor (COMP3) whose dependency is checked in the first dependency matrix (DPmx_1) is the second computation task descriptor (COMP3) whose dependency is checked in the second dependency matrix (DPmx_2). A dependency relationship may be established in the micro DMA task descriptor (uDMA2) and the third LP micro DMA task descriptor (LPuDMA3) whose dependency is checked in the third dependency matrix (DPmx_3).

다만, 하나의 태스크 디스크립터가 체크아웃됨에 따라 생성되는 디펜던시 업데이트 요청(DFURQ)은 하나의 디펜던시 매트릭스에 대응하여 생성될 수 있다. 즉, 하나의 디펜던시 업데이트 요청(DFURQ)은 두개의 디펜던시 매트릭스를 동시에 업데이트할 수는 없다. However, a dependency update request (DFURQ) generated as one task descriptor is checked out may be generated in response to one dependency matrix. In other words, one dependency update request (DFURQ) cannot update two dependency matrices simultaneously.

예시적으로, 제3 컴퓨테이션 태스크 디스크립터(COMP3)이 체크아웃됨에 따라 제3 디펜던시 업데이트 요청(DFURQ)만 생성되어 제3 디펜던시 매트릭스(DPmx_3)만 업데이트되어 제3 마이크로 DMA 태스크 디스크립터(uDMA3)에 대한 디펜던시 세팅이 수행될 수 있다. 즉, 제2 디펜던시 매트릭스(DPmx_2)에 대한 업데이트, 제2 LP 마이크로 DMA 태스크 디스크립터(LPuDMA2)에 대한 디펜던시 세팅이 필요하나 이는 제3 컴퓨테이션 태스크 디스크립터(COMP3)의 체크아웃에 대응하여 수행되지 않는다. As an example, as the third computation task descriptor (COMP3) is checked out, only the third dependency update request (DFURQ) is generated and only the third dependency matrix (DPmx_3) is updated to update the third micro DMA task descriptor ( Dependency setting for uDMA3) can be performed. That is, an update to the second dependency matrix (DPmx_2) and a dependency setting to the second LP micro DMA task descriptor (LPuDMA2) are required, but this is done in response to the checkout of the third computation task descriptor (COMP3). not performed

본 발명의 실시예에서, 특정 태스크 디스크립터가 서로 다른 디펜던시 매트릭스에서 디펜던시가 체크되는 복수의 태스크 디스크립터 사이에 디펜던시를 형성한 경우, 커맨드 프로세서(CP)는 다른 디펜던시 매트릭스에서도 디펜던시 세팅이 수행될 수 있도록 특정 태스크 디스크립터에 대응하는 더미 세트 디스크립터를 구성할 수 있다. 즉, 더미 세트 디스크립터를 통해 나머지 디펜던시 매트릭스에 대한 디펜던시 세팅을 진행하게 된다.In an embodiment of the present invention, when a specific task descriptor forms a dependency between a plurality of task descriptors whose dependencies are checked in different dependency matrices, the command processor (CP) A dummy set descriptor corresponding to a specific task descriptor can be configured so that dependency setting can be performed. In other words, dependency settings for the remaining dependency matrices are performed through the dummy set descriptor.

도 34는 더미 세트 디스크립터를 설명하기 위한 도면이다.Figure 34 is a diagram for explaining a dummy set descriptor.

도 34를 참조하면, 도 33의 제3 컴퓨테이션 태스크 디스크립터(COMP3)이 체크아웃됨에 따라 제3 디펜던시 업데이트 요청(DFURQ)이 생성되어 제3 디펜던시 매트릭스(DPmx_3)만 업데이트되어 제3 마이크로 DMA 태스크 디스크립터(uDMA3)에 대한 디펜던시 세팅이 수행될 수 있다. 제3 컴퓨테이션 태스크 디스크립터(COMP3)에 대응하여 생성된 제3 디펜던시 업데이트 요청(DFURQ)에 따라 제3 디펜던시 매트릭스(DPmx_3)의 다른 엘리먼트는 모두 “0”이고, CU은 “1”이 기록되도록 업데이트될 수 있다.Referring to FIG. 34, as the third computation task descriptor (COMP3) of FIG. 33 is checked out, a third dependency update request (DFURQ) is generated, and only the third dependency matrix (DPmx_3) is updated to update the third dependency update request (DFURQ). Dependency setting for the micro DMA task descriptor (uDMA3) may be performed. According to the third dependency update request (DFURQ) generated in response to the third computation task descriptor (COMP3), all other elements of the third dependency matrix (DPmx_3) are “0”, and CU is “1”. This can be updated to record.

제2 디펜던시 매트릭스(DPmx_2)에 대한 업데이트, 즉, 제2 LP 마이크로 DMA 태스크 디스크립터(LPuDMA2)에 대한 디펜던시 세팅은 제3 컴퓨테이션 태스크 디스크립터(COMP3)의 더미 세트 디스크립터(Dummy set COMP3)에 의해 수행될 수 있다. 더미 세트 디스크립터(Dummy set COMP3)에 대응하여 생성된 제2 디펜던시 필드 업데이트 리퀘스트(DFURQ2)에 따라 제2 디펜던시 매트릭스(DPmx_2)의 다른 엘리먼트는 모두 “0”이고, CL은 “1”이 기록되도록 업데이트될 수 있다.The update to the second dependency matrix (DPmx_2), that is, the dependency setting for the second LP micro DMA task descriptor (LPuDMA2), is performed in the dummy set descriptor (Dummy set COMP3) of the third computation task descriptor (COMP3). It can be performed by . According to the second dependency field update request (DFURQ2) generated in response to the dummy set descriptor (Dummy set COMP3), all other elements of the second dependency matrix (DPmx_2) are “0”, and CL is “1”. This can be updated to record.

이러한, 더미 세트 디스크립터는 특정 디펜던시 매트릭스에서 디펜던시가 체크되는 태스크 디스크립터에 대한 디펜던시 세팅을 위한 정보만을 포함하도록 구성될 수 있다. 즉, 더미 세트 디스크립터는 실제 컴퓨테이션 또는 오퍼레이션이 수행되지 않도록 구성될 수 있으며, 디펜던시 필드 업데이트 리퀘스트의 생성을 위한 체크아웃 과정만이 수행되도록 구성될 수 있다. 즉, 더미 세트 디스크립터는 태스크 프로세싱 유닛(190)으로 제공되지 않고, 보이드 코어(640)에서 완료 신호가 생성될 수 있으며, 던 패시지(630)의 디펜던시 세터(DPs)는 보이드 코어(640)에서 생성된 완료 신호에 대응하여 디펜던시 필드 업데이트 리퀘스트를 생성할 수 있다.This dummy set descriptor may be configured to include only information for dependency setting for the task descriptor whose dependency is checked in a specific dependency matrix. That is, the dummy set descriptor may be configured so that no actual computation or operation is performed, and only a checkout process for generating a dependency field update request may be performed. That is, the dummy set descriptor is not provided to the task processing unit 190, a completion signal may be generated in the void core 640, and the dependency setters (DPs) of the dawn passage 630 are generated in the void core 640. A dependency field update request can be generated in response to the completion signal generated in .

도 35는 도 15의 보이드 코어에서 수행되는 데이터 교환 과정을 설명하기 위한 도면이다.FIG. 35 is a diagram for explaining the data exchange process performed in the void core of FIG. 15.

도 35에서, 태스크 패시지(620)에서 출력되는 태스크 디스크립터(DS_Tsk_d)는 디펜던시 체크가 수행된 태스크 디스크립터로, 특정 태스크 디스크립터의 더미 세트 디스크립터에 해당한다. 이러나, 더미 세트 디스크립터(DS_Tsk_d)는 뉴럴 코어(100)로 제공되지 않고, 보이드 코어(640)로 제공되게 된다. 즉, 더미 세트 디스크립터(DS_Tsk_d)는 코어 글로벌(500)로 제공되지 않으며 보이드 코어(640)를 통해 완료 신호(DS_tsk_dd)이 생성되게 된다. In FIG. 35, the task descriptor DS_Tsk_d output from the task passage 620 is a task descriptor on which a dependency check has been performed and corresponds to a dummy set descriptor of a specific task descriptor. However, the dummy set descriptor (DS_Tsk_d) is not provided to the neural core 100, but to the void core 640. That is, the dummy set descriptor (DS_Tsk_d) is not provided to the core global 500, and the completion signal (DS_tsk_dd) is generated through the void core 640.

실시예에서, 실제 연산 또는 오퍼레이션이 수행되는 태스크 디스크립터를 리얼 태스크 디스크립터로 정의하며, 실제 연산 또는 오퍼레이션이 수행되지 않는 태스크 디스크립터를 더미 태스크 디스크립터로 정의한다. 또한, 더미 태스크 디스크립터에서 특정 디펜던시 매트릭스의 업데이트를 세팅하기 위해 구성되는 태스크 디스크립터를 더미 세트 디스크립터로 정의한다.In an embodiment, a task descriptor on which an actual operation or operation is performed is defined as a real task descriptor, and a task descriptor on which an actual operation or operation is not performed is defined as a dummy task descriptor. Additionally, the task descriptor configured to set the update of a specific dependency matrix in the dummy task descriptor is defined as a dummy set descriptor.

몇몇 실시예에서, 태스크 패시지(620)는 태스크 디스크립터의 종류를 식별할 수 있으며, 태스크 디스크립터가 리얼 태스크 디스크립터인 경우, 즉, 실제 연산 또는 오퍼레이션과 관련된 정보를 포함하는 경우 해당 태스크 디스크립터가 코어 글로벌(500)로 제공되도록 처리할 수 있다. 또한, 태스크 패시지(620)는 태스크 디스크립터가 더미 세트 디스크립터인 경우, 해당 태스크 디스크립터가 보이드 코어(640)로 제공되도록 처리할 수 있다. 몇몇 실시예에서, 태스크 디스크립터의 종류 판단은 런타임 핸들(RH)에서 수행될 수 있으나, 이에 한정되는 것은 아니며, 디펜던시 체커(DPc)에서도 수행될 수 있다.In some embodiments, the task passage 620 may identify the type of task descriptor, and if the task descriptor is a real task descriptor, that is, if it contains information related to an actual operation or operation, the task descriptor is a core global ( 500). Additionally, when the task descriptor is a dummy set descriptor, the task passage 620 may process the task descriptor to be provided to the void core 640. In some embodiments, determination of the type of task descriptor may be performed in the runtime handle (RH), but is not limited to this, and may also be performed in the dependency checker (DPc).

몇몇 실시예에서, 디펜던시 체크가 수행된 더미 세트 디스크립터(DS_Tsk_d)는 제2 큐로 전달될 수 있다. 런타임 핸들(RH)은 제2 큐에 대기중인 더미 세트 디스크립터(DS_Tsk_d)를 식별하여 보이드 코어(640)로 제공할 수 있다. 몇몇 실시예에서, 디펜던시 체커(DPc)는 디펜던시 체크와 함께 태스크 디스크립터의 종류도 식별할 수 있다. 디펜던시 체커(DPc)는 더미 세트 디스크립터(DS_Tsk_d)를 제2 큐 및 런타임 핸들(RH)을 거치지 않고 보이드 코어(640)로 전달할 수도 있다.In some embodiments, the dummy set descriptor (DS_Tsk_d) on which the dependency check was performed may be transmitted to the second queue. The runtime handle (RH) may identify the dummy set descriptor (DS_Tsk_d) waiting in the second queue and provide it to the void core 640. In some embodiments, the dependency checker (DPc) may also identify the type of task descriptor along with the dependency check. The dependency checker (DPc) may transmit the dummy set descriptor (DS_Tsk_d) to the void core 640 without going through the second queue and runtime handle (RH).

보이드 코어(640)는 태스크 패시지(620)로부터 디펜던시 체크가 수행된 더미 세트 디스크립터(DS_Tsk_d)를 전달받을 수 있다. 태스크 패시지(620)는 보이드 코어(640)에 더미 세트 디스크립터(DS_Tsk_d)를 제공하면서, 더미 세트 디스크립터(DS_Tsk_d)에 대응하는 체크인 데이터(ChI)를 던 패시지(630)로 전달할 수 있다. 구체적으로, 태스크 패시지(620)의 디펜던시 체커(DPc)는 더미 세트 디스크립터(DS_Tsk_d)에 대응하는 체크인 데이터(ChI)를 던 패시지(630)의 체크인 버퍼(Cib)에 전달할 수 있다. 체크인 버퍼(Cib)는 제공된 체크인 데이터(ChI)에 따른 테스크의 완료 신호를 대기하게 된다.The void core 640 may receive a dummy set descriptor (DS_Tsk_d) on which a dependency check has been performed from the task passage 620. The task passage 620 may provide a dummy set descriptor (DS_Tsk_d) to the void core 640 and transmit check-in data (ChI) corresponding to the dummy set descriptor (DS_Tsk_d) to the dune passage 630. Specifically, the dependency checker (DPc) of the task passage 620 may transmit check-in data (ChI) corresponding to the dummy set descriptor (DS_Tsk_d) to the check-in buffer (Cib) of the dummy passage 630. The check-in buffer (Cib) waits for a task completion signal according to the provided check-in data (ChI).

보이드 코어(640)는 제공된 더미 세트 디스크립터(DS_Tsk_d)에 대응하여 완료 신호(DS_tsk_dd)를 생성할 수 있다. 보이드 코어(640)는 생성된 완료 신호(DS_tsk_dd)를 던 패시지(172)로 전달할 수 있다. 실시예에서, 보이드 코어(640)는 시그널 스케쥴러(sgn_sch)를 포함할 수 있다. 시그널 스케쥴러(sgn_sch)는 완료 신호(DS_tsk_dd)를 수신하고, 완료 신호(DS_tsk_dd)의 전송을 스케쥴링하여 던 패시지(630)로 전송할 수 있다. 즉, 시그널 스케쥴러(sgn_sch)는 생성된 완료 신호가 던 패시지(630)로 전달되는 타이밍을 제어할 수 있다. The void core 640 may generate a completion signal (DS_tsk_dd) in response to the provided dummy set descriptor (DS_Tsk_d). The void core 640 may transmit the generated completion signal DS_tsk_dd to the Dawn passage 172. In an embodiment, void core 640 may include a signal scheduler (sgn_sch). The signal scheduler (sgn_sch) may receive the completion signal (DS_tsk_dd), schedule transmission of the completion signal (DS_tsk_dd), and transmit it to the dawn passage 630. That is, the signal scheduler (sgn_sch) can control the timing at which the generated completion signal is delivered to the Dawn passage 630.

또한, 보이드 코어(640)는 실제 연산 또는 오퍼레이션을 수행하지 않으므로, 테이블 업데이트 리퀘스트(TURQ)는 뉴럴 코어(100)의 LSU(110)로 전달하지 않고 삭제할 수 있다. Additionally, since the void core 640 does not perform actual calculations or operations, the table update request (TURQ) can be deleted without being transmitted to the LSU 110 of the neural core 100.

던 패시지(172)의 체크인 버퍼(Cib)는 보이드 코어(640)로부터 완료 신호를 수신할 수 있으며, 디펜던시 세터(DPs)는 체크인 버퍼(Cib)로부터 완료 신호를 수신하여 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있다. 더미 세트 디스크립터(DS_Tsk_d)는 더미 세트 디스크립터(DS_Tsk_d)와 종속 관계를 가지는 종속 태스크 디스크립터에 대한 정보 및 종속 태스크 디스크립터가 체크되는 디펜던시 매트릭스 정보를 포함할 수 있다. 디펜던시 세터(DPs)는 완료 신호에 대응하여, 더미 세트 디스크립터(DS_Tsk_d)의 디펜던시 정보를 포함하는 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있으며, 생성된 디펜던시 업데이트 요청(DFURQ)을 해당 디펜던시 매트릭스로 전달하여 디펜던시 필드의 디펜던시 정보가 업데이트되도록 한다. The check-in buffer (Cib) of the Dawn passage 172 may receive a completion signal from the void core 640, and the dependency setters (DPs) may receive a completion signal from the check-in buffer (Cib) and request a dependency update. (DFURQ) can be created. The dummy set descriptor (DS_Tsk_d) may include information about a dependent task descriptor that has a dependency relationship with the dummy set descriptor (DS_Tsk_d) and dependency matrix information in which the dependent task descriptor is checked. Dependency setters (DPs) may generate a dependency update request (DFURQ) containing the dependency information of the dummy set descriptor (DS_Tsk_d) in response to the completion signal, and the generated dependency update request ( DFURQ) is passed to the corresponding dependency matrix so that the dependency information in the dependency field is updated.

즉, 더미 세트 디스크립터를 통해, 태스크 연산 및/또는 오퍼레이션의 중복을 발생시키지 않으면서 복수의 디펜던시 매트릭스에 대한 디펜던시 세팅이 진행될 수 있게 된다.That is, through the dummy set descriptor, dependency settings for a plurality of dependency matrices can be performed without causing duplication of task calculations and/or operations.

본 실시예는 이를 통해서 태스크 매니저(600)가 커맨드 프로세서(7000)와의 추가적인 데이터 교환 없이 빠르게 각각의 태스크들의 디펜던시를 체크하여 처리할 수 있다. 뿐만 아니라, 본 실시예는 서로 다른 디펜던시 매트릭스에서 제공되는 복수의 태스크 디스크립터에 대해서도 디펜던시를 설정할 수 있도록 구성되어 전체적인 태스크의 디펜던시 구성될 수 있다. 이를 통해서 태스크 처리의 속도가 더욱 향상되고, 태스크 사이의 병렬적인 처리가 더욱 원활하게 수행될 수 있으며, 커맨드 프로세서와 태스크 매니저 사이의 트래픽을 최소화하여 장치 전체의 처리 속도와 효율을 극대화할 수 있다.In this embodiment, the task manager 600 can quickly check and process the dependency of each task without additional data exchange with the command processor 7000. In addition, this embodiment is configured so that dependencies can be set for a plurality of task descriptors provided in different dependency matrices, so that the dependency of the entire task can be configured. Through this, the speed of task processing can be further improved, parallel processing between tasks can be performed more smoothly, and traffic between the command processor and task manager can be minimized to maximize the processing speed and efficiency of the entire device.

도 36은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제1 큐, 제2 큐 및 체크인 버퍼를 설명하기 위한 도면이다.FIG. 36 is a diagram illustrating a first queue, a second queue, and a check-in buffer of a neural processing device according to some embodiments of the present invention.

도 36을 참조하면, 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 각각 특정한 타입의 태스크 디스크립터를 저장할 수 있다. 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 서로 동일한 타입의 태스크 디스크립터를 저장할 수 있다. Referring to FIG. 36, the 1_1st to 1_4th queues (Q1_1 to Q1_4), the 2_1st to 2_4th queues (Q2_1 to Q2_4), and the 1st to 4th check-in buffers (Cib_1 to Cib_4) each have a specific type of task descriptor. You can save it. The 1_1st to 1_4th queues (Q1_1 to Q1_4), the 2_1st to 2_4th queues (Q2_1 to Q2_4), and the 1st to 4th check-in buffers (Cib_1 to Cib_4) may store task descriptors of the same type.

예를 들어, 제1_1 큐(Q1_1), 제2_1 큐(Q2_1) 및 제1 체크인 버퍼(Cib_1)는 제1 컴퓨테이션에 대한 태스크 디스크립터를 저장하고, 제1_2 큐(Q1_2), 제2_2 큐(Q2_2) 및 제2 체크인 버퍼(Cib_2)는 제2 컴퓨테이션에 대한 태스크 디스크립터를 저장할 수 있다. 또한, 제1_3 큐(Q1_3), 제2_3 큐(Q2_3) 및 제3 체크인 버퍼(Cib_3)는 제3 컴퓨테이션에 대한 태스크 디스크립터를 저장하고, 제1_4 큐(Q1_4), 제2_4 큐(Q2_4) 및 제4 체크인 버퍼(Cib_4)는 제4 컴퓨테이션에 대한 태스크 디스크립터를 저장할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.For example, the 1_1 queue (Q1_1), the 2_1 queue (Q2_1), and the 1st check-in buffer (Cib_1) store the task descriptor for the first computation, and the 1_2 queue (Q1_2) and the 2_2 queue (Q2_2) ) and the second check-in buffer (Cib_2) may store a task descriptor for the second computation. In addition, the 1_3 queue (Q1_3), the 2_3 queue (Q2_3), and the third check-in buffer (Cib_3) store the task descriptor for the third computation, and the 1_4 queue (Q1_4), the 2_4 queue (Q2_4), and The fourth check-in buffer (Cib_4) may store a task descriptor for the fourth computation. However, this embodiment is not limited to this.

이때, 제1 내지 제4 컴퓨테이션은 완전히 동일한 컴퓨테이션일 수도 있고, 서로 동일한 타입이지만 세부적으로 다른 종류의 컴퓨테이션일 수도 있다.At this time, the first to fourth computations may be completely the same computation, or may be computations of the same type but different in detail.

도 37은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제1 큐, 제2 큐 및 체크인 버퍼를 설명하기 위한 도면이다.FIG. 37 is a diagram illustrating a first queue, a second queue, and a check-in buffer of a neural processing device according to some embodiments of the present invention.

도 37을 참조하면, 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 각각 여러 타입의 태스크 디스크립터를 저장할 수 있다. 제1_1 내지 제1_4 큐(Q1_1~Q1_4), 제2_1 내지 제2_4 큐(Q2_1~Q2_4) 및 제1 내지 제4 체크인 버퍼(Cib_1~Cib_4)는 서로 다른 타입의 태스크 디스크립터를 저장할 수도 있고, 서로 같은 타입의 태스크 디스크립터를 저장할 수도 있다. Referring to FIG. 37, the 1_1st to 1_4th queues (Q1_1 to Q1_4), the 2_1st to 2_4th queues (Q2_1 to Q2_4), and the 1st to 4th check-in buffers (Cib_1 to Cib_4) each contain several types of task descriptors. You can save it. The 1_1st to 1_4th queues (Q1_1 to Q1_4), the 2_1st to 2_4th queues (Q2_1 to Q2_4), and the 1st to 4th check-in buffers (Cib_1 to Cib_4) may store different types of task descriptors, and may store the same task descriptors. You can also store the type's task descriptor.

도 38은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 구조를 세부적으로 설명하기 위한 블록도이다.Figure 38 is a block diagram to explain in detail the structure of a neural processing device according to some embodiments of the present invention.

도 38을 참조하면, 뉴럴 코어(101)는 뉴럴 코어(100)와 달리 CGRA 구조일 수 있다. 뉴럴 코어(101)는 인스트럭션 메모리(111_1), CGRA L0 메모리(111_2), PE 어레이(111_3) 및 LSU(Load/Store Unit)(111_4)을 포함할 수 있다.Referring to FIG. 38, the neural core 101, unlike the neural core 100, may have a CGRA structure. The neural core 101 may include an instruction memory 111_1, a CGRA L0 memory 111_2, a PE array 111_3, and a Load/Store Unit (LSU) 111_4.

인스트럭션 메모리(111_1)는 인스트럭션을 수신하여 저장할 수 있다. 인스트럭션 메모리(111_1)는 인스트럭션을 내부에 순차적으로 저장하고, 저장된 인스트럭션을 PE 어레이(111_3)로 제공할 수 있다. 이때, 인스트럭션은 각 PE 어레이(111_3)에 포함된 프로세싱 엘리먼트(111_3a)의 동작을 지시할 수 있다.The instruction memory 111_1 can receive and store instructions. The instruction memory 111_1 may sequentially store instructions internally and provide the stored instructions to the PE array 111_3. At this time, the instruction may direct the operation of the processing element 111_3a included in each PE array 111_3.

CGRA L0 메모리(111_2)는 뉴럴 코어(101) 내부에 위치한 메모리로서, 뉴럴 코어(101)가 작업에 필요한 모든 입력 데이터를 외부로부터 수신하여 임시로 저장할 수 있다. 또한, CGRA L0 메모리(111_2)는 뉴럴 코어(101)에 의해서 연산된 출력 데이터를 외부로 전송하기 위해서 일시적으로 저장할 수 있다. CGRA L0 메모리(111_2)는 뉴럴 코어(101)의 캐시 메모리 역할을 수행할 수 있다.The CGRA L0 memory 111_2 is a memory located inside the neural core 101, and allows the neural core 101 to receive all input data required for work from the outside and temporarily store them. Additionally, the CGRA L0 memory 111_2 can temporarily store output data calculated by the neural core 101 in order to transmit it to the outside. The CGRA L0 memory 111_2 may serve as a cache memory for the neural core 101.

CGRA L0 메모리(111_2)는 PE 어레이(111_3)와 데이터를 송수신할 수 있다. CGRA L0 메모리(111_2)는 L1 보다 낮은 L0(level 0)에 해당하는 메모리일 수 있다. 이때, L0 메모리는 공유되지 않는 뉴럴 코어(101)의 전용(private) 메모리일 수 있다. CGRA L0 메모리(111_2)는 액티베이션이나 웨이트 같은 데이터와 프로그램 등을 PE 어레이(111_3)로 전송할 수 있다. The CGRA L0 memory 111_2 can transmit and receive data with the PE array 111_3. The CGRA L0 memory 111_2 may be a memory corresponding to L0 (level 0), which is lower than L1. At this time, the L0 memory may be a private memory of the neural core 101 that is not shared. The CGRA L0 memory (111_2) can transmit data such as activation or weight and programs to the PE array (111_3).

PE 어레이(111_3)는 연산을 수행하는 모듈일 수 있다. PE 어레이(111_3)는 1차원 연산뿐만 아니라 2차원 이상의 매트릭스/텐서 연산도 수행할 수 있다. PE 어레이(111_3)는 내부에 복수의 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)를 포함할 수 있다.The PE array 111_3 may be a module that performs calculations. The PE array 111_3 can perform not only one-dimensional operations but also two-dimensional or more matrix/tensor operations. The PE array 111_3 may include a plurality of processing elements 111_3a and a specific processing element 111_3b therein.

프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 행과 열로 정렬될 수 있다. 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 m 열로 정렬될 수 있다. 또한, 프로세싱 엘리먼트(111_3a)는 n 행으로 정렬되고, 특정 프로세싱 엘리먼트(111_3b)는 l행으로 정렬될 수 있다. 이에 따라서, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 (n+l)행과 m열로 정렬될 수 있다.The processing element 111_3a and the specific processing element 111_3b may be arranged in rows and columns. The processing element 111_3a and the specific processing element 111_3b may be arranged in m columns. Additionally, the processing element 111_3a may be arranged in n rows, and the specific processing element 111_3b may be arranged in l rows. Accordingly, the processing element 111_3a and the specific processing element 111_3b may be arranged in (n+l) rows and m columns.

LSU(111_4)는 로컬 인터커넥션(200)을 통해서 외부에서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 수신할 수 있다. LSU(111_4)은 CGRA L0 메모리(111_2)로 수신한 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전송할 수 있다. 유사하게 LSU(111_4)는 로컬 인터커넥션(200)을 통해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 외부로 전달 수 있다. The LSU 111_4 may receive at least one of data, control signals, and synchronization signals from the outside through the local interconnection 200. The LSU 111_4 may transmit at least one of the received data, control signal, and synchronization signal to the CGRA L0 memory 111_2. Similarly, the LSU 111_4 may transmit at least one of data, a control signal, and a synchronization signal to the outside through the local interconnection 200.

뉴럴 코어(101)는 CGRA(Coarse Grained Reconfigurable Architecture) 구조를 가질 수 있다. 이에 따라서, 뉴럴 코어(101)는 PE 어레이(111_3)의 각각의 프로세싱 엘리먼트(111_3a)와 특정 프로세싱 엘리먼트(111_3b)가 각각 CGRA L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4) 중 적어도 하나와 연결될 수 있다. 즉, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 CGRA L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4)의 전부와 연결되어야 하는 것은 아니고 일부와 연결될 수도 있다.The neural core 101 may have a Coarse Grained Reconfigurable Architecture (CGRA) structure. Accordingly, the neural core 101 configures each processing element 111_3a and the specific processing element 111_3b of the PE array 111_3 at least one of the CGRA L0 memory 111_2, the instruction memory 111_1, and the LSU 111_4. It can be connected to one. That is, the processing element 111_3a and the specific processing element 111_3b do not have to be connected to all of the CGRA L0 memory 111_2, the instruction memory 111_1, and the LSU 111_4, but may be connected to some of them.

또한, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 서로 다른 종류의 프로세싱 소자일 수 있다. 이에 따라서, CGRA L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4) 중 프로세싱 엘리먼트(111_3a)와 연결되는 소자와 특정 프로세싱 엘리먼트(111_3b)와 연결되는 소자는 서로 다를 수 있다.Additionally, the processing element 111_3a and the specific processing element 111_3b may be different types of processing elements. Accordingly, among the CGRA L0 memory 111_2, the instruction memory 111_1, and the LSU 111_4, the element connected to the processing element 111_3a and the element connected to the specific processing element 111_3b may be different from each other.

CGRA 구조를 가지는 본 발명의 뉴럴 코어(101)는 높은 수준의 병렬 연산이 가능하고, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b) 사이의 직접적인 데이터 교환이 가능하므로 전력 소모가 낮을 수 있다. 또한, 2개 이상의 종류의 프로세싱 엘리먼트(111_3a)를 포함하여 다양한 연산 작업에 따른 최적화도 가능할 수 있다.The neural core 101 of the present invention with a CGRA structure is capable of high-level parallel operations and direct data exchange between the processing element 111_3a and the specific processing element 111_3b, so power consumption can be low. Additionally, optimization according to various computational tasks may be possible by including two or more types of processing elements 111_3a.

예를 들어, 프로세싱 엘리먼트(111_3a)가 2차원 연산을 수행하는 프로세싱 엘리먼트인 경우 특정 프로세싱 엘리먼트(111_3b)는 1차원 연산을 수행하는 프로세싱 엘리먼트일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.For example, if the processing element 111_3a is a processing element that performs a two-dimensional operation, the specific processing element 111_3b may be a processing element that performs a one-dimensional operation. However, this embodiment is not limited to this.

도 39는 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 커맨드 프로세서와 태스크 매니저의 계층적 구조를 설명하기 위한 도면이고, 도 33은 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 커맨드 프로세서 및 태스크 매니저들의 계층 구조를 설명하기 위한 도면이다.FIG. 39 is a diagram illustrating the hierarchical structure of a command processor and a task manager of a neural processing device according to some embodiments of the present invention, and FIG. 33 is a diagram illustrating a command processor and a task manager of a neural processing device according to some embodiments of the present invention. This is a diagram to explain the hierarchy of managers.

도 39를 참조하면, 태스크 매니저(600)의 수가 많아지면 커맨드 프로세서(7000)가 모든 태스크 매니저(600)를 관리하기 어려울 수 있다. 이에 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치(1)는 마스터 태스크 매니저(600M)가 복수의 태스크 매니저(600)를 관리하고, 커맨드 프로세서(7000)가 마스터 태스크 매니저(600M)를 관리하는 하이라키 구조를 가질 수 있다.Referring to FIG. 39, if the number of task managers 600 increases, it may be difficult for the command processor 7000 to manage all task managers 600. Accordingly, in the neural processing device 1 according to some embodiments of the present invention, the master task manager 600M manages a plurality of task managers 600, and the command processor 7000 manages the master task manager 600M. You can have a hi-key structure to manage.

또한, 도 40을 참조하면, 마스터 태스크 매니저(600M)의 아래 레벨도 여러가지로 세분화될 수 있다. 예를 들어 제1 서브 태스크 매니저(600s1)과 제2 서브 태스크 매니저(600s2)가 각각의 계층을 이룰 수 있다. 즉, 하나의 제1 서브 태스크 매니저(600s1)가 적어도 하나의 제2 서브 태스크 매니저(600s2)를 관리하고, 하나의 마스터 태스크 매니저(600M)가 적어도 하나의 제1 서브 태스크 매니저(600s1)를 관리할 수 있다. 추가적으로, 제2 서브 태스크 매니저(600s2)의 하위에도 여러 개의 계층이 추가될 수 있다.Additionally, referring to FIG. 40, levels below the master task manager 600M may also be subdivided into various ways. For example, the first sub-task manager 600s1 and the second sub-task manager 600s2 may form separate layers. That is, one first sub-task manager 600s1 manages at least one second sub-task manager 600s2, and one master task manager 600M manages at least one first sub-task manager 600s1. can do. Additionally, multiple layers may be added below the second sub-task manager 600s2.

즉, 도 39 및 도 40에서는 태스크 매니저(600), 마스터 태스크 매니저(600M) 및 커맨드 프로세서(7000)의 3개 레벨이 도시되었지만, 레벨의 개수는 4개 이상일 수 있다. 즉, 태스크 매니저(600)의 개수에 따라 하이라키 구조의 뎁스는 얼마든지 달라질 수 있다.That is, although three levels of the task manager 600, the master task manager 600M, and the command processor 7000 are shown in FIGS. 39 and 40, the number of levels may be four or more. In other words, the depth of the hi-key structure may vary depending on the number of task managers 600.

도 41은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성을 설명하기 위한 블록도이다.Figure 41 is a block diagram for explaining memory reorganization of a neural processing system according to some embodiments of the present invention.

도 41을 참조하면, 뉴럴 코어 SoC(10)은 제1 내지 제8 프로세싱 유닛(160a~160h) 및 온 칩 메모리(OCM)를 포함할 수 있다. 도 41에서는 예시적으로 8개의 프로세싱 유닛을 도시하였으나, 이는 예시에 불과하고 프로세싱 유닛의 개수는 얼마든지 달라질 수 있다. Referring to FIG. 41, the neural core SoC 10 may include first to eighth processing units 160a to 160h and an on-chip memory (OCM). 41 shows eight processing units as an example, but this is only an example and the number of processing units may vary.

온 칩 메모리(OCM)는 제1 내지 제8 L0 메모리(120a~120h) 및 공유 메모리(2000)를 포함할 수 있다.The on-chip memory (OCM) may include first to eighth L0 memories 120a to 120h and a shared memory 2000.

제1 내지 제8 L0 메모리(120a~120h)는 각각 제1 내지 제8 프로세싱 유닛(160a~160h)의 전용 메모리로 사용될 수 있다. 즉, 제1 내지 제8 프로세싱 유닛(160a~160h)와 제1 내지 제8 L0 메모리(120a~120h)는 서로 1:1로 대응될 수 있다.The first to eighth L0 memories 120a to 120h may be used as dedicated memories for the first to eighth processing units 160a to 160h, respectively. That is, the first to eighth processing units 160a to 160h and the first to eighth L0 memories 120a to 120h may correspond to each other 1:1.

공유 메모리(2000)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 포함할 수 있다. 제1 내지 제8 메모리 유닛(2100a~2100h)은 제1 내지 제8 프로세싱 유닛(160a~160h) 및 제1 내지 제8 L0 메모리(120a~120h)에 각각 대응할 수 있다. 즉, 메모리 유닛의 개수는 프로세싱 유닛 및 L0 메모리의 개수와 동일한 8개일 수 있다. The shared memory 2000 may include first to eighth memory units 2100a to 2100h. The first to eighth memory units 2100a to 2100h may correspond to the first to eighth processing units 160a to 160h and the first to eighth L0 memories 120a to 120h, respectively. That is, the number of memory units may be 8, which is the same as the number of processing units and L0 memories.

공유 메모리(2000)는 2가지 종류의 온 칩 메모리 형식 중 어느 하나로 동작할 수 있다. 즉, 공유 메모리(2000)는 L0 메모리 형식 또는 글로벌 메모리 형식 중 어느 하나로 동작할 수 있다. 즉, 공유 메모리(2000)는 하나의 하드웨어로 2가지의 논리적인(logical) 메모리를 구현할 수 있다.Shared memory 2000 may operate in either of two types of on-chip memory formats. That is, the shared memory 2000 may operate in either an L0 memory format or a global memory format. In other words, the shared memory 2000 can implement two logical memories with one hardware.

공유 메모리(2000)가 L0 메모리 형식으로 구현되는 경우, 공유 메모리(2000)는 제1 내지 제8 L0 메모리(120a~120h)와 같이 제1 내지 제8 프로세싱 유닛(160a~160h) 각각의 전용 메모리(private memory)로 동작할 수 있다. L0 메모리는 글로벌 메모리에 비해서 상대적으로 고속의 클럭으로 동작할 수 있고, 공유 메모리(2000)도 L0 메모리 형식으로 동작할 때 상대적으로 더 빠른 클럭을 사용할 수 있다.When the shared memory 2000 is implemented in an L0 memory format, the shared memory 2000 is a dedicated memory for each of the first to eighth processing units 160a to 160h, such as the first to eighth L0 memories 120a to 120h. It can operate with (private memory). The L0 memory can operate at a relatively high clock speed compared to the global memory, and the shared memory 2000 can also use a relatively faster clock when operating in the L0 memory format.

공유 메모리(2000)가 글로벌 메모리 형식으로 구현되는 경우, 공유 메모리(2000)는 제1 프로세싱 유닛(100a) 및 제2 프로세싱 유닛(100b)가 서로 같이 사용하는 공용 메모리(common memory)로 동작할 수 있다. 이때, 공유 메모리(2000)는 제1 내지 제8 프로세싱 유닛(160a~160h)뿐만 아니라 제1 내지 제8 L0 메모리(120a~120h)에 의해서도 공유될 수 있다.When the shared memory 2000 is implemented in a global memory format, the shared memory 2000 can operate as a common memory that the first processing unit 100a and the second processing unit 100b use together. there is. At this time, the shared memory 2000 may be shared not only by the first to eighth processing units 160a to 160h but also to the first to eighth L0 memories 120a to 120h.

글로벌 메모리는 일반적으로 L0 메모리에 비해서 낮은 클럭을 사용할 수 있으나, 이에 제한되는 것은 아니다. 공유 메모리(2000)가 글로벌 메모리 형식으로 동작할 때는, 제1 내지 제8 프로세싱 유닛(160a~160h)가 공유 메모리(2000)를 공유할 수 있다. 이때, 공유 메모리(2000)는 도 2의 휘발성 메모리(32)와 글로벌 인터커넥션(6000)을 통해서 연결되고, 휘발성 메모리(32)의 버퍼로 동작할 수도 있다.Global memory can generally use a lower clock than L0 memory, but is not limited to this. When the shared memory 2000 operates in a global memory format, the first to eighth processing units 160a to 160h may share the shared memory 2000. At this time, the shared memory 2000 is connected to the volatile memory 32 of FIG. 2 through the global interconnection 6000, and may operate as a buffer of the volatile memory 32.

공유 메모리(2000)는 적어도 일부가 L0 메모리 형식으로 동작하고, 나머지가 글로벌 메모리 형식으로 동작할 수 있다. 즉, 공유 메모리(2000) 전체가 L0 메모리 형식으로 동작할 수도 있고, 공유 메모리(2000) 전체가 글로벌 메모리 형식으로 동작할 수도 있다. 또는, 공유 메모리(2000)의 일부가 L0 메모리 형식으로 동작하고, 나머지 일부가 글로벌 메모리 형식으로 동작할 수 있다.At least part of the shared memory 2000 may operate in an L0 memory format, and the remainder may operate in a global memory format. That is, the entire shared memory 2000 may operate in an L0 memory format, or the entire shared memory 2000 may operate in a global memory format. Alternatively, part of the shared memory 2000 may operate in the L0 memory format, and the remaining part may operate in the global memory format.

도 42는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성의 예시를 나타낸 블록도이다.Figure 42 is a block diagram showing an example of memory reorganization of a neural processing system according to some embodiments of the present invention.

도 41 및 도 42를 참조하면, 제1, 제3, 제5 및 제7 프로세싱 유닛(100a, 100c, 100e, 100g) 각각의 제1, 제3, 제5 및 제7 전용 영역(AE1, AE3, AE5, AE7)은 각각 제1, 제3, 제5 및 제7 L0 메모리(120a, 120c, 120e, 120g)만을 포함할 수 있다. 또한, 제2, 제4, 제6 및 제8 프로세싱 유닛(100b, 100d, 100f, 100h) 각각의 제2, 제4, 제6 및 제8 전용 영역(AE2, AE4, AE6, AE8)은 각각 제2, 제4, 제6 및 제8 L0 메모리(120b, 120d, 120f, 120h)를 포함할 수 있다. 또한, 제2, 제4, 제6 및 제8 전용 영역(AE2, AE4, AE6, AE8)은 제2, 제4, 제6 및 제8 메모리 유닛(2100b, 2100d, 2100f, 2100h)을 포함할 수 있다. 공유 메모리(2000)의 제1, 제3, 제5 및 제7 메모리 유닛(2100a, 2100c, 2100e, 2100g)은 공용 영역(AC)으로 활용될 수 있다.41 and 42, the first, third, fifth, and seventh processing units (100a, 100c, 100e, and 100g) each have first, third, fifth, and seventh dedicated areas (AE1, AE3). , AE5, and AE7) may include only the first, third, fifth, and seventh L0 memories 120a, 120c, 120e, and 120g, respectively. In addition, the second, fourth, sixth, and eighth dedicated areas (AE2, AE4, AE6, and AE8) of the second, fourth, sixth, and eighth processing units (100b, 100d, 100f, and 100h) are respectively It may include second, fourth, sixth, and eighth L0 memories (120b, 120d, 120f, 120h). Additionally, the second, fourth, sixth, and eighth dedicated areas (AE2, AE4, AE6, and AE8) will include the second, fourth, sixth, and eighth memory units (2100b, 2100d, 2100f, 2100h). You can. The first, third, fifth, and seventh memory units 2100a, 2100c, 2100e, and 2100g of the shared memory 2000 may be used as a common area (AC).

공용 영역(AC)은 제1 내지 제8 프로세싱 유닛(160a~160h)에 의해서 공유되는 메모리일 수 있다. 제2 전용 영역(AE2)은 제2 L0 메모리(120b)와 제2 메모리 유닛(2100b)을 포함할 수 있다. 제2 전용 영역(AE2)은 하드웨어적으로 분리된 제2 L0 메모리(120b)와 제2 메모리 유닛(210b)이 같은 방식으로 동작하여 논리적으로 하나의 L0 메모리로 동작하는 영역일 수 있다. 제4, 제6 및 제8 전용 영역(AE4, AE6, AE8)도 제2 전용 영역(AE2)과 같은 방식으로 동작할 수 있다.The common area AC may be a memory shared by the first to eighth processing units 160a to 160h. The second dedicated area AE2 may include a second L0 memory 120b and a second memory unit 2100b. The second dedicated area AE2 may be an area in which the hardware-separated second L0 memory 120b and the second memory unit 210b operate in the same manner and logically operate as one L0 memory. The fourth, sixth, and eighth dedicated areas (AE4, AE6, and AE8) may also operate in the same manner as the second dedicated area (AE2).

본 실시예에 따른 공유 메모리(2000)는 각 뉴럴 코어에 대응하는 영역을 최적화된 비율의 논리적인 L0 메모리와 논리적인 글로벌 메모리로 전환하여 사용할 수 있다. 공유 메모리(2000)는 이러한 비율의 조정을 런 타임(Run time)에서 수행할 수 있다. The shared memory 2000 according to this embodiment can be used by converting the area corresponding to each neural core into logical L0 memory and logical global memory at an optimized ratio. The shared memory 2000 can adjust this ratio at run time.

즉, 각 뉴럴 코어는 서로 동일한 작업을 하는 경우도 있지만, 서로 상이한 작업을 하는 경우도 있을 수 있다. 이 경우 각 뉴럴 코어가 하는 작업에 필요한 L0 메모리의 용량과 글로벌 메모리의 용량은 매번 다를 수밖에 없다. 이에 따라서, 기존의 온 칩 메모리와 같이 L0 메모리와 공유 메모리의 구성 비율이 고정적으로 설정되는 경우에는 각 뉴럴 코어에게 할당되는 연산 작업에 따른 비효율이 발생할 수 있다. In other words, each neural core may perform the same tasks, but may also perform different tasks. In this case, the capacity of L0 memory and the capacity of global memory required for the work performed by each neural core are bound to be different each time. Accordingly, if the composition ratio of L0 memory and shared memory is set fixedly, as in the existing on-chip memory, inefficiencies may occur due to the computational tasks assigned to each neural core.

따라서, 본 실시예에 따른 뉴럴 프로세싱 장치의 공유 메모리(2000)는 런 타임 중에 연산 작업에 따라서 최적의 L0 메모리 및 글로벌 메모리의 비율을 설정할 수 있고, 연산의 효율성 및 속도를 향상시킬 수 있다.Accordingly, the shared memory 2000 of the neural processing device according to this embodiment can set the optimal ratio of L0 memory and global memory according to the computational task during run time and improve computational efficiency and speed.

도 43은 도 41의 A부분을 확대한 블록도이다.Figure 43 is an enlarged block diagram of part A of Figure 41.

도 41 및 도 43을 참조하면, 공유 메모리(2000)는 제1 L0 메모리 컨트롤러(122_1a), 제2 L0 메모리 컨트롤러(122_1b), 제5 L0 메모리 컨트롤러(122_1e), 제6 L0 메모리 컨트롤러(122_1f), 제1 내지 제8 메모리 유닛(2100a~2100h) 및 글로벌 컨트롤러(2200)를 포함할 수 있다. 도시되지 않은 다른 L0 메모리 컨트롤러도 본 실시예에 포함될 수 있으나 편의상 설명을 생략한다.41 and 43, the shared memory 2000 includes a first L0 memory controller 122_1a, a second L0 memory controller 122_1b, a fifth L0 memory controller 122_1e, and a sixth L0 memory controller 122_1f. , may include first to eighth memory units 2100a to 2100h and a global controller 2200. Other L0 memory controllers not shown may also be included in this embodiment, but descriptions are omitted for convenience.

제1 L0 메모리 컨트롤러(122_1a)는 제1 L0 메모리(120a)를 제어할 수 있다. 또한, 제1 L0 메모리 컨트롤러(122_1a)는 제1 메모리 유닛(2100a)을 제어할 수 있다. 구체적으로, 제1 메모리 유닛(2100a)이 논리적인 L0 메모리 형식으로 구현될 때, 제1 L0 메모리 컨트롤러(122_1a)에 의한 제어가 제1 메모리 유닛(2100a)에 수행될 수 있다.The first L0 memory controller 122_1a can control the first L0 memory 120a. Additionally, the first L0 memory controller 122_1a may control the first memory unit 2100a. Specifically, when the first memory unit 2100a is implemented in a logical L0 memory format, control by the first L0 memory controller 122_1a may be performed on the first memory unit 2100a.

제2 L0 메모리 컨트롤러(122_1b)는 제2 L0 메모리(120b)를 제어할 수 있다. 또한, 제2 L0 메모리 컨트롤러(122_1b)는 제2 메모리 유닛(2100b)을 제어할 수 있다. 즉, 제2 메모리 유닛(2100b)이 논리적인 L0 메모리 형식으로 구현될 때, 제1 L0 메모리 컨트롤러(122_1a)에 의한 제어가 제2 메모리 유닛(2100b)에 수행될 수 있다.The second L0 memory controller 122_1b can control the second L0 memory 120b. Additionally, the second L0 memory controller 122_1b may control the second memory unit 2100b. That is, when the second memory unit 2100b is implemented in a logical L0 memory format, control by the first L0 memory controller 122_1a can be performed on the second memory unit 2100b.

제5 L0 메모리 컨트롤러(122_1e)는 제5 L0 메모리(120e)를 제어할 수 있다. 또한, 제5 L0 메모리 컨트롤러(122_1e)는 제5 메모리 유닛(2100e)을 제어할 수 있다. 즉, 제5 메모리 유닛(2100e)이 논리적인 L0 메모리 형식으로 구현될 때, 제5 L0 메모리 컨트롤러(122_1e)에 의한 제어가 제5 메모리 유닛(2100e)에 수행될 수 있다.The fifth L0 memory controller 122_1e can control the fifth L0 memory 120e. Additionally, the fifth L0 memory controller 122_1e can control the fifth memory unit 2100e. That is, when the fifth memory unit 2100e is implemented in a logical L0 memory format, control by the fifth L0 memory controller 122_1e can be performed on the fifth memory unit 2100e.

제6 L0 메모리 컨트롤러(122_1f)는 제6 L0 메모리(120f)를 제어할 수 있다. 또한, 제6 L0 메모리 컨트롤러(122_1f)는 제6 메모리 유닛(2100f)을 제어할 수 있다. 즉, 제6 메모리 유닛(2100f)이 논리적인 L0 메모리 형식으로 구현될 때, 제6 L0 메모리 컨트롤러(122_1f)에 의한 제어가 제6 메모리 유닛(2100f)에 수행될 수 있다.The sixth L0 memory controller 122_1f can control the sixth L0 memory 120f. Additionally, the sixth L0 memory controller 122_1f can control the sixth memory unit 2100f. That is, when the sixth memory unit 2100f is implemented in a logical L0 memory format, control by the sixth L0 memory controller 122_1f can be performed on the sixth memory unit 2100f.

글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 모두 제어할 수 있다. 구체적으로, 글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)이 각각 논리적으로 글로벌 메모리 형식으로 동작할 때(즉, 논리적으로 L0 메모리 형식으로 동작하지 않을 때), 제1 메모리 유닛(2100a) 내지 제8 메모리 유닛(2100h)을 제어할 수 있다.The global controller 2200 can control all of the first to eighth memory units 2100a to 2100h. Specifically, when the first to eighth memory units 2100a to 2100h each logically operate in the global memory format (i.e., do not logically operate in the L0 memory format), the global controller 2200 operates the first memory The units 2100a to 8th memory units 2100h can be controlled.

즉, 제1 내지 제8 메모리 유닛(2100a~2100h)은 논리적으로 어떤 형식의 메모리로 구현되느냐에 따라서 제1 내지 제8 L0 메모리 컨트롤러(122_1a~122_1h)에 의해 각각 제어되거나 글로벌 컨트롤러(2200)에 의해서 제어될 수 있다. That is, the first to eighth memory units 2100a to 2100h are controlled by the first to eighth L0 memory controllers 122_1a to 122_1h, respectively, or by the global controller 2200, depending on what type of memory they are logically implemented as. It can be controlled by

제1, 제2, 제5 및 제6 L0 메모리 컨트롤러(122_1a, 122_1b, 122_1e, 122_1f)를 포함하는 L0 메모리 컨트롤러가 각각 제1 내지 제8 메모리 유닛(2100a~2100h)을 제어하는 경우, 제1 내지 제8 L0 메모리 컨트롤러(122_1a~141h)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 제1 내지 제8 L0 메모리(120a~120h)와 동일하게 제어하므로, 제1 내지 제8 프로세싱 유닛(160a~160h)의 전용 메모리로 제어할 수 있다. 이에 따라서, 제1 내지 제8 메모리 유닛(2100a~2100h)은 제1 내지 제8 프로세싱 유닛(160a~160h)의 클럭 주파수와 대응하는 클럭 주파수로 동작할 수 있다.When L0 memory controllers including the first, second, fifth, and sixth L0 memory controllers 122_1a, 122_1b, 122_1e, and 122_1f control the first to eighth memory units 2100a to 2100h, respectively, the first Since the first to eighth L0 memory controllers 122_1a to 141h control the first to eighth memory units 2100a to 2100h in the same manner as the first to eighth L0 memories 120a to 120h, the first to eighth processing units It can be controlled with a dedicated memory of (160a~160h). Accordingly, the first to eighth memory units 2100a to 2100h may operate at a clock frequency corresponding to the clock frequency of the first to eighth processing units 160a to 160h.

제1 L0 메모리 컨트롤러(122_1a), 제2 L0 메모리 컨트롤러(122_1b), 제5 L0 메모리 컨트롤러(122_1e) 및 제6 L0 메모리 컨트롤러(122_1f)를 포함하는 L0 메모리 컨트롤러는 각각 도 7의 LSU(110)을 포함할 수 있다. The L0 memory controllers including the first L0 memory controller 122_1a, the second L0 memory controller 122_1b, the fifth L0 memory controller 122_1e, and the sixth L0 memory controller 122_1f are respectively the LSU 110 of FIG. 7. may include.

글로벌 컨트롤러(2200)가 제1 내지 제8 메모리 유닛(2100a~2100h) 중 적어도 하나를 각각 제어하는 경우, 글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 각각 제1 내지 제8 프로세싱 유닛(160a~160h)의 글로벌 메모리로 제어할 수 있다. 이에 따라서, 제1 내지 제8 메모리 유닛(2100a~2100h) 중 적어도 하나는 각각 제1 내지 제8 프로세싱 유닛(160a~160h)의 클럭 주파수와는 무관한 클럭 주파수로 동작할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.When the global controller 2200 controls at least one of the first to eighth memory units 2100a to 2100h, the global controller 2200 controls the first to eighth memory units 2100a to 2100h, respectively. It can be controlled by the global memory of the 8th processing unit (160a ~ 160h). Accordingly, at least one of the first to eighth memory units 2100a to 2100h may operate at a clock frequency that is unrelated to the clock frequency of the first to eighth processing units 160a to 160h. However, this embodiment is not limited to this.

글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 도 3의 글로벌 인터커넥션(6000)과 연결할 수 있다. 제1 내지 제8 메모리 유닛(2100a~2100h)은 글로벌 컨트롤러(2200)에 의해서 도 1의 오프 칩 메모리(30)와 데이터를 교환하거나, 제1 내지 제8 L0 메모리(120a~120h) 와 각각 데이터를 교환할 수 있다.The global controller 2200 may connect the first to eighth memory units 2100a to 2100h with the global interconnection 6000 of FIG. 3. The first to eighth memory units 2100a to 2100h exchange data with the off-chip memory 30 of FIG. 1 by the global controller 2200, or exchange data with the first to eighth L0 memories 120a to 120h, respectively. can be exchanged.

제1 내지 제8 메모리 유닛(2100a~2100h)은 각각 적어도 하나의 메모리 뱅크를 포함할 수 있다. 제1 메모리 유닛(2100a)은 적어도 하나의 제1 메모리 뱅크(2110a)를 포함할 수 있다. 제1 메모리 뱅크(2110a)는 제1 메모리 유닛(2100a)을 특정한 크기로 나눈 영역일 수 있다. 각각의 제1 메모리 뱅크(2110a)는 모두 동일한 크기의 메모리 소자일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 도 43에서는 4개의 메모리 뱅크가 하나의 메모리 유닛에 포함되는 것으로 도시되었다. The first to eighth memory units 2100a to 2100h may each include at least one memory bank. The first memory unit 2100a may include at least one first memory bank 2110a. The first memory bank 2110a may be an area divided by dividing the first memory unit 2100a into a specific size. Each first memory bank 2110a may be a memory element of the same size. However, this embodiment is not limited to this. In Figure 43, four memory banks are shown as being included in one memory unit.

유사하게 제2, 제5 및 제6 메모리 유닛(2100b, 2100e, 2100f)는 각각 적어도 하나의 제2, 제5 및 제6 메모리 뱅크(2110b, 2110e, 2110f)를 포함할 수 있다.Similarly, the second, fifth, and sixth memory units 2100b, 2100e, and 2100f may each include at least one second, fifth, and sixth memory bank 2110b, 2110e, and 2110f.

이하 제1 메모리 뱅크(2110a) 및 제5 메모리 뱅크(2110e)를 기준으로 설명하고, 이는 제2 및 제6 메모리 뱅크(2110b, 2110f)를 포함한 다른 메모리 뱅크와 동일할 수 있다.Hereinafter, the description will be made based on the first memory bank 2110a and the fifth memory bank 2110e, which may be the same as other memory banks including the second and sixth memory banks 2110b and 2110f.

제1 메모리 뱅크(2110a)는 각각 논리적으로 L0 메모리 형식으로 동작하거나 논리적으로 글로벌 메모리 형식으로 동작할 수 있다. 이때, 제1 메모리 뱅크(2110a)는 제1 메모리 유닛(2100a) 내의 다른 메모리 뱅크와 독립적으로 동작할 수도 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first memory bank 2110a may logically operate in an L0 memory format or logically in a global memory format. At this time, the first memory bank 2110a may operate independently from other memory banks in the first memory unit 2100a. However, this embodiment is not limited to this.

각 메모리 뱅크별로 독립적으로 동작하는 경우, 제1 메모리 유닛(2100a)은 제1 L0 메모리(120a)와 동일한 방식으로 동작하는 제1 영역과, 제1 L0 메모리(120a)와 다른 방식으로 동작하는 제2 영역을 포함할 수 있다. 이때, 제1 영역과 제2 영역이 반드시 병존하는 것은 아니고 어느 하나의 영역이 전체 제1 메모리 유닛(2100a)의 전체를 차지할 수도 있다.When operating independently for each memory bank, the first memory unit 2100a has a first area that operates in the same manner as the first L0 memory 120a and a second area that operates in a different manner from the first L0 memory 120a. Can include 2 areas. At this time, the first area and the second area do not necessarily coexist, and one area may occupy the entire first memory unit 2100a.

마찬가지로, 제2 메모리 유닛(2100b)은 제2 L0 메모리(120b)와 동일한 방식으로 동작하는 제3 영역과, 제2 L0 메모리(120b)와 다른 방식으로 동작하는 제4 영역을 포함할 수 있다. 이때, 제3 영역과 제4 영역이 반드시 병존하는 것은 아니고 어느 하나의 영역이 전체 제1 메모리 유닛(2100a)의 전체를 차지할 수도 있다.Likewise, the second memory unit 2100b may include a third area that operates in the same manner as the second L0 memory 120b and a fourth area that operates in a different manner from the second L0 memory 120b. At this time, the third area and the fourth area do not necessarily coexist, and one area may occupy the entire first memory unit 2100a.

이때, 제1 영역과 제2 영역의 비율은 제3 영역과 제4 영역의 비율과 상이할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 따라서, 제1 영역과 제2 영역의 비율은 제3 영역과 제4 영역의 비율과 동일할 수도 있다. 즉, 각 메모리 유닛에서의 메모리 구성 비율을 얼마든지 달라질 수 있다.At this time, the ratio of the first area to the second area may be different from the ratio of the third area to the fourth area. However, this embodiment is not limited to this. Accordingly, the ratio of the first area to the second area may be the same as the ratio of the third area to the fourth area. That is, the memory configuration ratio in each memory unit can vary as much as desired.

일반적으로 기존의 시스템 온 칩의 경우에는 고속의 L0 메모리를 제외한 온 칩 메모리를 고밀도 저전력 SRAM으로 구성하는 경우가 많았다. 이는 필요한 용량 대비 칩의 면적과 사용 전력에서 SRAM이 높은 효율을 가지기 때문이다. 그러나, 기존의 온 칩 메모리는 미리 결정된 L0 메모리의 용량보다 더 많은 데이터가 빠르게 필요한 작업의 경우에는 처리 속도가 크게 느려질 수밖에 없었고, 글로벌 메모리의 필요가 크지 않은 경우에도 남아있는 글로벌 메모리를 활용할 방안이 전혀 없어 비효율이 발생하였다.In general, in the case of existing system-on-chip, the on-chip memory, excluding high-speed L0 memory, is often composed of high-density, low-power SRAM. This is because SRAM has high efficiency in terms of chip area and power usage compared to the required capacity. However, the processing speed of the existing on-chip memory inevitably slowed down significantly in the case of tasks that required more data quickly than the predetermined capacity of the L0 memory, and even when the need for global memory was not large, there was no way to utilize the remaining global memory. There was no use at all, resulting in inefficiency.

이에 반해서, 본 발명의 몇몇 실시예에 따른 공유 메모리(2000)는 경우에 따라서 각각 2개의 컨트롤러 중 어느 하나에 의해서 선택적으로 제어될 수 있다. 이때, 공유 메모리(2000)가 전체적으로 2개의 컨트롤러 중 정해진 어느 하나에 의해서만 제어되는 것은 아니고, 메모리 유닛 단위 또는 메모리 뱅크 단위로 독립적으로 제어될 수 있다.In contrast, the shared memory 2000 according to some embodiments of the present invention may be selectively controlled by one of two controllers, depending on the case. At this time, the shared memory 2000 is not controlled as a whole by only one of the two controllers, but can be independently controlled on a memory unit basis or a memory bank basis.

이를 통해서, 본 실시예에 따른 공유 메모리(2000)는 연산 작업에 따른 최적의 메모리 구성 비율을 런 타임 중에 획득하여 더 빠르고 효율적인 연산작업을 수행할 수 있다. 인공지능에 특화된 프로세싱 유닛의 경우 특정 어플리케이션 단위로 L0 메모리와 글로벌 메모리의 필요한 크기가 달라질 수 있다. 나아가, 동일한 어플리케이션이라도 딥러닝 네트워크를 사용하는 경우 각 층(layer) 별로 L0 메모리와 글로벌 메모리의 필요한 크기가 달라질 수 있다. 본 실시예에 따른 공유 메모리(2000)는 각 층에 따른 연산 단계의 변화에도 메모리의 구성 비율이 런 타임 중에 변화될 수 있어 빠르고 효율적인 딥러닝 작업이 가능할 수 있다.Through this, the shared memory 2000 according to this embodiment can obtain the optimal memory configuration ratio according to the computational task during run time and perform faster and more efficient computational tasks. In the case of processing units specialized in artificial intelligence, the required sizes of L0 memory and global memory may vary for each specific application. Furthermore, even for the same application, when using a deep learning network, the required sizes of L0 memory and global memory for each layer may vary. The shared memory 2000 according to this embodiment can enable fast and efficient deep learning work because the memory composition ratio can be changed during run time despite changes in the calculation steps for each layer.

도 44는 도 43의 제1 메모리 뱅크를 세부적으로 설명하기 위한 도면이다. FIG. 44 is a diagram for explaining the first memory bank of FIG. 43 in detail.

도 44는 제1 메모리 뱅크(2110a)에 대해서 도시하였지만, 다른 메모리 뱅크도 제1 메모리 뱅크(2110a)와 동일한 구조일 수 있다.Although FIG. 44 illustrates the first memory bank 2110a, other memory banks may also have the same structure as the first memory bank 2110a.

도 44를 참조하면, 제1 메모리 뱅크(2110a)는 셀 어레이(Ca), 뱅크 컨트롤러(Bc), 제1 경로 유닛(P1) 및 제2 경로 유닛(P2)을 포함할 수 있다.Referring to FIG. 44, the first memory bank 2110a may include a cell array (Ca), a bank controller (Bc), a first path unit (P1), and a second path unit (P2).

셀 어레이(Ca)는 내부에 복수의 메모리 소자(Cell)를 포함할 수 있다. 셀 어레이(Ca)는 복수의 메모리 소자가 격자 구조로 정렬되어 배치될 수 있다. 셀 어레이(Ca)는 예를 들어, SRAM(Static Random Access Memory) 셀 어레이일 수 있다.The cell array (Ca) may include a plurality of memory elements (Cells) therein. The cell array Ca may have a plurality of memory elements arranged in a lattice structure. The cell array (Ca) may be, for example, a Static Random Access Memory (SRAM) cell array.

뱅크 컨트롤러(Bc)는 셀 어레이(Ca)를 제어할 수 있다. 뱅크 컨트롤러(Bc)는 셀 어레이(Ca)가 L0 메모리 형식으로 동작할지, 아니면 글로벌 메모리 형식으로 동작할 지를 결정하고 그에 따라 셀 어레이(Ca)를 제어할 수 있다. The bank controller (Bc) can control the cell array (Ca). The bank controller Bc may determine whether the cell array Ca will operate in an L0 memory format or a global memory format and control the cell array Ca accordingly.

구체적으로, 뱅크 컨트롤러(Bc)는 런 타임 중에 제1 경로 유닛(P1) 방향으로 데이터를 송수신할지, 제2 경로 유닛(P2) 방향으로 데이터를 송수신할지를 결정할 수 있다. 뱅크 컨트롤러(Bc)는 경로 컨트롤 신호(Spc)에 따라 데이터의 송수신 방향을 결정할 수 있다.Specifically, the bank controller (Bc) can determine whether to transmit and receive data in the first path unit (P1) direction or the second path unit (P2) direction during run time. The bank controller (Bc) can determine the direction of data transmission and reception according to the path control signal (Spc).

경로 컨트롤 신호(Spc)는 미리 설계된 장치 드라이버나 컴파일러에 의해서 생성될 수 있다. 경로 컨트롤 신호(Spc)는 연산 작업의 특성에 따라서 생성될 수 있다. 또는, 경로 컨트롤 신호(Spc)는 사용자로부터 수신된 입력에 의해서 생성될 수 있다. 즉, 사용자가 가장 최적의 메모리 구성 비율을 선택하기 위해서 경로 컨트롤 신호(Spc)에 대한 입력을 직접 인가할 수 있다.The path control signal (Spc) can be generated by a pre-designed device driver or compiler. A path control signal (Spc) can be generated according to the characteristics of the computational task. Alternatively, the path control signal (Spc) may be generated by input received from the user. In other words, the user can directly apply the input to the path control signal (Spc) in order to select the most optimal memory configuration ratio.

뱅크 컨트롤러(Bc)는 경로 컨트롤 신호(Spc)를 통해서 셀 어레이(Ca)에 저장된 데이터들의 송수신되는 경로를 결정할 수 있다. 뱅크 컨트롤러(Bc)가 데이터들이 송수신되는 경로를 결정하는 것에 따라 데이터들의 교환 인터페이스가 달라질 수 있다. 즉, 뱅크 컨트롤러(Bc)가 제1 경로 유닛(P1)과 데이터를 교환하는 경우 제1 인터페이스를 이용할 수 있고, 제2 경로 유닛(P2)과 데이터를 교환하는 경우 제2 인터페이스를 이용할 수 있다. 이때, 제1 인터페이스와 제2 인터페이스는 서로 다를 수 있다.The bank controller (Bc) can determine a path for transmitting and receiving data stored in the cell array (Ca) through the path control signal (Spc). The data exchange interface may vary depending on how the bank controller (Bc) determines the path through which data is transmitted and received. That is, the bank controller Bc can use the first interface when exchanging data with the first path unit P1, and can use the second interface when exchanging data with the second path unit P2. At this time, the first interface and the second interface may be different from each other.

또한, 데이터가 저장되는 어드레스 체계도 달라질 수 있다. 즉, 특정 인터페이스를 선택하면 그에 대응하는 어드레스 체계로 리드 및 라이트 동작이 수행될 수 있다.Additionally, the address system in which data is stored may also vary. That is, when a specific interface is selected, read and write operations can be performed using the corresponding address system.

뱅크 컨트롤러(Bc)는 특정 클럭 주파수로 동작할 수 있다. 예를 들어, 셀 어레이(Ca)가 SRAM 셀 어레이인 경우에는 일반적인 SRAM의 동작 클럭 주파수로 뱅크 컨트롤러(Bc)가 동작할 수 있다. The bank controller (Bc) can operate at a specific clock frequency. For example, when the cell array Ca is an SRAM cell array, the bank controller Bc can operate at a typical SRAM operating clock frequency.

제1 경로 유닛(P1)은 뱅크 컨트롤러(Bc)와 연결될 수 있다. 제1 경로 유닛(P1)은 셀 어레이(Ca)의 데이터를 제1 프로세싱 유닛(100a)과 직접 교환할 수 있다. 이때, “직접”이란 글로벌 인터커넥션(6000)을 거치지 않고 서로 교환됨을 의미할 수 있다. 즉, 제1 프로세싱 유닛(100a)은 제1 L0 메모리(120a)와 직접 데이터를 교환할 수 있고, 제1 프로세싱 유닛(100a)은 공유 메모리(2000)가 논리적으로 L0 메모리 형식으로 구현되었을 때 제1 경로 유닛(P1)을 통해서 데이터를 교환할 수 있다. 제1 경로 유닛(P1)은 도 43의 제1 L0 메모리 컨트롤러(122_1a) 및 제2 L0 메모리 컨트롤러(122_1b)를 포함한 L0 메모리 컨트롤러를 포함할 수 있다.The first path unit (P1) may be connected to the bank controller (Bc). The first path unit P1 may directly exchange data of the cell array Ca with the first processing unit 100a. At this time, “directly” may mean that they are exchanged without going through the global interconnection (6000). That is, the first processing unit 100a can directly exchange data with the first L0 memory 120a, and the first processing unit 100a can first process the first processing unit 100a when the shared memory 2000 is logically implemented in the L0 memory format. 1 Data can be exchanged through the path unit (P1). The first path unit P1 may include an L0 memory controller including the first L0 memory controller 122_1a and the second L0 memory controller 122_1b of FIG. 43 .

제1 경로 유닛(P1)은 멀티 사이클 싱크 패스(Multi-Cycle Sync-Path)를 구성할 수 있다. 즉, 제1 경로 유닛(P1)의 동작 클럭 주파수는 제1 프로세싱 유닛(100a)의 동작 클럭 주파수와 동일할 수 있다. 제1 L0 메모리(120a)는 제1 프로세싱 유닛(100a)의 동작과 같은 속도로 빠르게 데이터를 교환하기 위해서 제1 프로세싱 유닛(100a)의 동작 클럭 주파수와 동일한 클럭 주파수로 빠르게 데이터를 교환할 수 있다. 제1 경로 유닛(P1)도 동일하게 제1 프로세싱 유닛(100a)의 동작 클럭 주파수와 동일한 클럭 주파수로 동작할 수 있다.The first path unit (P1) may configure a multi-cycle sync path. That is, the operating clock frequency of the first path unit P1 may be the same as the operating clock frequency of the first processing unit 100a. The first L0 memory 120a can quickly exchange data at the same clock frequency as the operating clock frequency of the first processing unit 100a in order to quickly exchange data at the same speed as the operation of the first processing unit 100a. . The first path unit P1 may also operate at the same clock frequency as the operating clock frequency of the first processing unit 100a.

이때, 제1 경로 유닛(P1)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수의 배수(倍數)일 수 있다. 이 경우, 뱅크 컨트롤러(Bc)와 제1 경로 유닛(P1) 사이에 클럭의 동기화를 위한 CDC(Clock Domain Crossing) 작업이 따로 필요하지 않고, 이에 따라서 데이터 전송의 지연(delay)이 발생하지 않을 수 있다. 이에 따라서, 더 빠르고 효율적인 데이터 교환이 가능할 수 있다.At this time, the operating clock frequency of the first path unit (P1) may be a multiple of the operating clock frequency of the bank controller (Bc). In this case, a separate CDC (Clock Domain Crossing) operation for clock synchronization between the bank controller (Bc) and the first path unit (P1) is not required, and accordingly, a delay in data transmission may not occur. there is. Accordingly, faster and more efficient data exchange may be possible.

도 44에서는 예시적으로, 제1 경로 유닛(P1)의 동작 클럭 주파수는 1.5GHz일 수 있다. 이는 뱅크 컨트롤러(Bc)의 750MHz의 2배의 주파수일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니고 뱅크 컨트롤러(Bc)의 클럭 주파수의 정수배로 제1 경로 유닛(P1)이 동작하는 경우라면 얼마든지 가능할 수 있다.In FIG. 44 , as an example, the operating clock frequency of the first path unit P1 may be 1.5 GHz. This may be twice the frequency of 750 MHz of the bank controller (Bc). However, this embodiment is not limited to this, and it may be possible as long as the first path unit (P1) operates at an integer multiple of the clock frequency of the bank controller (Bc).

제2 경로 유닛(P2)은 뱅크 컨트롤러(Bc)와 연결될 수 있다. 제2 경로 유닛(P2)은 셀 어레이(Ca)의 데이터를 제1 프로세싱 유닛(100a)과 직접 교환하지 않고, 글로벌 인터커넥션(6000)를 통해서 교환할 수 있다. 즉, 제1 프로세싱 유닛(100a)은 글로벌 인터커넥션(6000) 및 제2 경로 유닛(P2)을 통해서 셀 어레이(Ca)와 데이터를 교환할 수 있다. 이때, 셀 어레이(Ca)는 단순히 제1 프로세싱 유닛(100a)뿐만 아니라 다른 뉴럴 코어와도 데이터를 교환할 수 있다. The second path unit (P2) may be connected to the bank controller (Bc). The second path unit P2 may exchange data of the cell array Ca through the global interconnection 6000 instead of directly exchanging it with the first processing unit 100a. That is, the first processing unit 100a can exchange data with the cell array Ca through the global interconnection 6000 and the second path unit P2. At this time, the cell array Ca can exchange data not only with the first processing unit 100a but also with other neural cores.

즉, 제2 경로 유닛(P2)은 제1 메모리 뱅크(2110a)가 논리적으로 글로벌 메모리 형식으로 구현되었을 때 셀 어레이(Ca)와 모든 뉴럴 코어와의 데이터 교환 경로일 수 있다. 제2 경로 유닛(P2)은 도 43의 글로벌 컨트롤러(2200)를 포함할 수 있다.That is, the second path unit P2 may be a data exchange path between the cell array Ca and all neural cores when the first memory bank 2110a is logically implemented in a global memory format. The second path unit P2 may include the global controller 2200 of FIG. 43.

제2 경로 유닛(P2)은 어싱크 패스(Async-Path)를 구성할 수 있다. 제2 경로 유닛(P2)의 동작 클럭 주파수는 글로벌 인터커넥션(6000)의 동작 클럭 주파수와 동일할 수 있다. 제2 경로 유닛(P2)도 동일하게 글로벌 인터커넥션(6000)의 동작 클럭 주파수와 동일한 클럭 주파수로 동작할 수 있다.The second path unit (P2) may configure an Async-Path. The operating clock frequency of the second path unit P2 may be the same as the operating clock frequency of the global interconnection 6000. The second path unit P2 may also operate at the same clock frequency as the operating clock frequency of the global interconnection 6000.

이때, 제2 경로 유닛(P2)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수와 서로 동기화되지 않을 수 있다. 이 경우, 뱅크 컨트롤러(Bc)와 제2 경로 유닛(P2) 사이에 클럭의 동기화를 위한 CDC(Clock Domain Crossing) 작업이 필요할 수 있다. 뱅크 컨트롤러(Bc)의 동작 클럭 주파수와 제2 경로 유닛(P2)의 동작 클럭 주파수를 서로 동기화 시키지 않는 경우에는 클럭 도메인의 설계의 자유도가 높아질 수 있다. 따라서, 하드웨어 설계의 난이도가 낮아져 더욱 용이하게 하드웨어 동작을 도출할 수 있다.At this time, the operating clock frequency of the second path unit (P2) may not be synchronized with the operating clock frequency of the bank controller (Bc). In this case, a Clock Domain Crossing (CDC) operation may be required to synchronize clocks between the bank controller (Bc) and the second path unit (P2). If the operating clock frequency of the bank controller (Bc) and the operating clock frequency of the second path unit (P2) are not synchronized with each other, the degree of freedom in designing the clock domain may increase. Accordingly, the difficulty of hardware design is lowered and hardware operations can be derived more easily.

뱅크 컨트롤러(Bc)는 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우와 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우에 서로 다른 어드레스 체계를 이용할 수 있다. 즉, 뱅크 컨트롤러(Bc)는 제1 경로 유닛(P1)을 통해서는 제1 어드레스 체계를 이용하고, 제2 경로 유닛(P2)을 통해서는 제2 어드레스 체계를 이용할 수 있다. 이때, 제1 어드레스 체계와 제2 어드레스 체계는 서로 다를 수 있다.The bank controller Bc may use different address systems when exchanging data through the first path unit P1 and when exchanging data through the second path unit P2. That is, the bank controller Bc can use the first address system through the first path unit P1 and the second address system through the second path unit P2. At this time, the first address system and the second address system may be different from each other.

뱅크 컨트롤러(Bc)는 반드시 메모리 뱅크별로 존재할 필요는 없다. 즉, 뱅크 컨트롤러(Bc)는 스케쥴링을 위한 부분이 아니라 신호를 전달하는 역할을 하므로, 2개의 포트를 가지는 각각의 메모리 뱅크에 필수적인 부분은 아니다. 따라서, 하나의 뱅크 컨트롤러(Bc)가 여러 메모리 뱅크를 제어할 수 있다. 여러 메모리 뱅크는 뱅크 컨트롤러(Bc)에 의해 제어되더라도 독립적으로 동작할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The bank controller (Bc) does not necessarily need to exist for each memory bank. In other words, the bank controller (Bc) is not a part for scheduling but serves to transmit signals, so it is not an essential part for each memory bank with two ports. Therefore, one bank controller (Bc) can control multiple memory banks. Multiple memory banks can operate independently although controlled by the bank controller (Bc). However, this embodiment is not limited to this.

물론, 뱅크 컨트롤러(Bc)는 각 메모리 뱅크별로 존재할 수도 있다. 이 경우, 뱅크 컨트롤러(Bc)가 각각의 메모리 뱅크를 개별적으로 제어할 수 있다.Of course, a bank controller (Bc) may exist for each memory bank. In this case, the bank controller Bc can individually control each memory bank.

도 43 및 도 44를 참조하면, 제1 메모리 유닛(210a)이 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우 제1 어드레스 체계를 사용하고, 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우 제2 어드레스 체계를 사용할 수 있다. 유사하게, 제2 메모리 유닛(210b)이 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우 제3 어드레스 체계를 사용하고, 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우 제2 어드레스 체계를 사용할 수 있다. 이때, 제1 어드레스 체계와 제3 어드레스 체계는 서로 동일할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.Referring to FIGS. 43 and 44, when the first memory unit 210a exchanges data through the first path unit (P1), the first address system is used and data is exchanged through the second path unit (P2). In case of exchange, a second address system can be used. Similarly, when the second memory unit 210b exchanges data through the first path unit P1, a third address system is used, and when data is exchanged through the second path unit P2, the second address system is used. You can use the system. At this time, the first address system and the third address system may be the same. However, this embodiment is not limited to this.

제1 어드레스 체계와 제3 어드레스 체계는 각각 제1 프로세싱 유닛(100a) 및 제2 프로세싱 유닛(100b)에 각각 전용으로 사용될 수 있다. 제2 어드레스 체계는 제1 프로세싱 유닛(100a) 및 제2 프로세싱 유닛(100b)에 공용으로 적용될 수 있다.The first address system and the third address system may be used exclusively for the first processing unit 100a and the second processing unit 100b, respectively. The second address system may be commonly applied to the first processing unit 100a and the second processing unit 100b.

도 44에서는 예시적으로, 제2 경로 유닛(P2)의 동작 클럭 주파수는 1GHz로 동작할 수 있다. 이는 뱅크 컨트롤러(Bc)의 750MHz의 동작 클럭 주파수와 동기화 되지 않은 주파수일 수 있다. 즉, 제2 경로 유닛(P2)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수에 전혀 종속되지 않고 자유롭게 설정될 수 있다.In Figure 44, as an example, the operating clock frequency of the second path unit (P2) may operate at 1 GHz. This may be a frequency that is not synchronized with the 750 MHz operating clock frequency of the bank controller (Bc). That is, the operating clock frequency of the second path unit (P2) can be freely set without being at all dependent on the operating clock frequency of the bank controller (Bc).

일반적인 글로벌 메모리는 느린 SRAM(예를 들어, 750MHz)과 그보다 빠른 글로벌 인터커넥션(예를 들어, 1GHz)를 이용하여 CDC 작업에 따른 지연이 발생할 수밖에 없었다. 이에 반해서, 본 발명의 몇몇 실시예들에 따른 공유 메모리(2000)는 제2 경로 유닛(P2) 외에도 제1 경로 유닛(P1)을 이용할 여지가 있어 CDC 작업에 따른 지연을 회피할 수 있다. Typical global memory uses slow SRAM (e.g., 750 MHz) and faster global interconnection (e.g., 1 GHz), which inevitably causes delays due to CDC operations. In contrast, the shared memory 2000 according to some embodiments of the present invention has room to use the first path unit (P1) in addition to the second path unit (P2), thereby avoiding delays due to the CDC task.

또한, 일반적인 글로벌 메모리는 복수의 뉴럴 코어가 하나의 글로벌 인터커넥션(6000)를 이용하므로 데이터 전송량이 동시에 발생하였을 때 전체적인 처리 속도의 저하가 쉽게 발생할 수 있다. 이에 반해서, 본 발명의 몇몇 실시예들에 따른 공유 메모리(2000)는 제2 경로 유닛(P2) 외에도 제1 경로 유닛(P1)을 이용할 여지가 있어 글로벌 컨트롤러(2200)에 몰리는 데이터 처리량을 적절하게 분산하는 효과도 얻을 수 있다.In addition, since a typical global memory uses a single global interconnection 6000 for multiple neural cores, a decrease in overall processing speed can easily occur when data transmission occurs simultaneously. On the other hand, the shared memory 2000 according to some embodiments of the present invention has room to use the first path unit (P1) in addition to the second path unit (P2), thereby appropriately reducing the data processing load on the global controller 2200. A dispersing effect can also be achieved.

도 45는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.Figure 45 is a block diagram illustrating the software hierarchy of a neural processing device according to some embodiments of the present invention.

도 45를 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조는 DL 프레임워크(10000), 컴파일러 스택(20000) 및 백엔드 모듈(30000)을 포함할 수 있다.Referring to FIG. 45, the software layer structure of a neural processing device according to some embodiments of the present invention may include a DL framework 10000, a compiler stack 20000, and a backend module 30000.

DL 프레임워크(10000)는 사용자가 사용하는 딥러닝 모델 네트워크에 대한 프레임워크를 의미할 수 있다. 예를 들어, 텐서플로우나 파이토치와 같은 프로그램을 이용하여 학습이 완료된 뉴럴 네트워크가 생성될 수 있다.The DL framework (10000) may refer to a framework for a deep learning model network used by users. For example, a fully trained neural network can be created using programs such as TensorFlow or PyTorch.

컴파일러 스택(20000)은 어댑테이션 레이어(21000), 컴퓨트 라이브러리(22000), 프론트엔드 컴파일러(23000), 백엔드 컴파일러(24000) 및 런타임 드라이버(25000)를 포함할 수 있다.The compiler stack 20000 may include an adaptation layer 21000, a compute library 22000, a front-end compiler 23000, a back-end compiler 24000, and a runtime driver 25000.

어댑테이션 레이어(21000)는 DL 프레임워크(10000)에 접하는 레이어일 수 있다. 어댑테이션 레이어(21000)는 DL 프레임워크(10000)에서 생성된 유저의 신경망 모델을 양자화시키고 그래프 수정을 할 수 있다. 또한, 어댑테이션 레이어(21000)는 모델의 타입을 필요한 타입으로 변환시킬 수 있다.The adaptation layer (21000) may be a layer in contact with the DL framework (10000). The adaptation layer (21000) can quantize the user's neural network model created in the DL framework (10000) and modify the graph. Additionally, the adaptation layer 21000 can convert the model type into a required type.

프론트엔드 컴파일러(23000)는 어댑테이션 레이어(21000)에서 전달받은 다양한 신경망 모델 및 그래프를 일정한 중간 표현(intermediate representation, IR)으로 변환해줄 수 있다. 변환된 IR은 추후 백엔드 컴파일러(24000)에서 다루기 쉬운 미리 설정된 표현일 수 있다. The front-end compiler (23000) can convert various neural network models and graphs received from the adaptation layer (21000) into a certain intermediate representation (IR). The converted IR may be a preset expression that is easy to handle later in the backend compiler 24000.

이러한, 프론트엔드 컴파일러(23000)의 IR은 그래프 차원에서 미리 할 수 있는 최적화가 수행될 수 있다. 또한, 프론트엔드 컴파일러(23000)는 하드웨어에 최적화된 레이아웃으로 변환시키는 작업을 통해서 최종적으로 IR을 생성할 수 있다.The IR of the front-end compiler 23000 can be optimized in advance at the graph level. Additionally, the front-end compiler 23000 can ultimately generate the IR by converting it into a hardware-optimized layout.

벡엔드 컴파일러(24000)는 프론트엔드 컴파일러(23000)에서 변환된 IR을 최적화하고 바이너리 파일로 변환하여 런타임 드라이버가 사용할 수 있게 한다. 백엔드 컴파일러(24000)는 하드웨어의 세부 사항에 맞는 스케일로 잡(job)을 분할하여 최적화된 코드를 생성할 수 있다. The backend compiler (24000) optimizes the IR converted from the frontend compiler (23000) and converts it into a binary file so that the runtime driver can use it. The back-end compiler (24000) can generate optimized code by dividing the job at a scale that matches the details of the hardware.

컴퓨트 라이브러리(22000)는 여러가지 오퍼레이션 중에 하드웨어에 적합한 형태로 설계된 템플릿 오퍼레이션을 저장할 수 있다. 컴퓨트 라이브러리(22000)는 하드웨어가 필요한 여러 템플릿 오퍼레이션을 벡엔드 컴파일러(24000)에 제공하여 최적화된 코드가 생성될 수 있게 한다.The compute library 22000 can store template operations designed in a form suitable for hardware among various operations. The compute library 22000 provides several template operations that require hardware to the backend compiler 24000, allowing optimized code to be generated.

런타임 드라이버(25000)는 구동 중에 계속해서 모니터링을 수행하여 본 발명의 몇몇 실시예들에 따른 뉴럴 네트워크 장치의 구동을 수행할 수 있다. 구체적으로, 뉴럴 네트워크 장치의 인터페이스의 실행을 담당할 수 있다.The runtime driver 25000 may continuously perform monitoring while driving to drive the neural network device according to some embodiments of the present invention. Specifically, it may be responsible for executing the interface of the neural network device.

백엔드 모듈(30000)는 ASIC(Application Specific Integrated Circuit)(31000), FPGA(Field programmable gate array)(32000) 및 C-model(33000)을 포함할 수 있다. ASIC(31000)은 미리 결정된 설계 방식에 따라 결정되는 하드웨어 칩을 의미할 수 있다. FPGA(32000)는 프로그래밍이 가능한 하드웨어 칩일 수 있다. C-model(33000)은 소프트웨어 상에 하드웨어를 모사하여 구현한 모델을 의미할 수 있다.The backend module 30000 may include an application specific integrated circuit (ASIC) 31000, a field programmable gate array (FPGA) 32000, and a C-model (33000). ASIC (31000) may refer to a hardware chip determined according to a predetermined design method. FPGA 32000 may be a programmable hardware chip. C-model (33000) may refer to a model implemented by simulating hardware in software.

백엔드 모듈(30000)은 컴파일러 스택(20000)을 통해서 생성된 바이너리 코드를 이용하여 다양한 작업을 수행하고 결과를 도출할 수 있다.The backend module 30000 can perform various tasks and derive results using binary code generated through the compiler stack 20000.

도 46은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.Figure 46 is a conceptual diagram to explain a deep learning operation performed by a neural processing device according to some embodiments of the present invention.

도 46을 참조하면, 인공신경망 모델(40000)은, 기계학습 모델의 일 예로서, 기계학습(Machine Learning) 기술과 인지과학에서, 생물학적 신경망의 구조에 기초하여 구현된 통계학적 학습 알고리즘 또는 그 알고리즘을 실행하는 구조이다.Referring to FIG. 46, the artificial neural network model 40000 is an example of a machine learning model, and in machine learning technology and cognitive science, a statistical learning algorithm implemented based on the structure of a biological neural network or an algorithm thereof. It is a structure that executes .

인공신경망 모델(40000)은, 생물학적 신경망에서와 같이 시냅스의 결합으로 네트워크를 형성한 인공 뉴런인 노드(Node)들이 시냅스의 웨이트를 반복적으로 조정하여, 특정 입력에 대응한 올바른 출력과 추론된 출력 사이의 오차가 감소되도록 학습함으로써, 문제 해결 능력을 가지는 기계학습 모델을 나타낼 수 있다. 예를 들어, 인공신경망 모델(40000)은 기계 학습, 딥러닝 등의 인공지능 학습법에 사용되는 임의의 확률 모델, 뉴럴 네트워크 모델 등을 포함할 수 있다.In the artificial neural network model (40000), as in a biological neural network, nodes, which are artificial neurons that form a network through the combination of synapses, repeatedly adjust the weight of the synapse, creating a gap between the correct output corresponding to a specific input and the inferred output. By learning to reduce the error of , a machine learning model with problem-solving capabilities can be expressed. For example, the artificial neural network model 40000 may include random probability models, neural network models, etc. used in artificial intelligence learning methods such as machine learning and deep learning.

본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 이러한 인공신경망 모델(40000)의 형태를 구현하여 연산을 수행할 수 있다. 예를 들어, 인공신경망 모델(40000)은 입력 영상을 수신하고, 입력 영상에 포함된 대상의 적어도 일부에 대한 정보를 출력할 수 있다.A neural processing device according to some embodiments of the present invention may perform calculations by implementing this type of artificial neural network model (40000). For example, the artificial neural network model 40000 may receive an input image and output information about at least a portion of the object included in the input image.

인공신경망 모델(40000)은 다층의 노드들과 이들 사이의 연결로 구성된 다층 퍼셉트론(MLP: multilayer perceptron)으로 구현된다. 본 실시예에 따른 인공신경망 모델(40000)은 MLP를 포함하는 다양한 인공신경망 모델 구조들 중의 하나를 이용하여 구현될 수 있다. 도 46에 도시된 바와 같이, 인공신경망 모델(40000)은, 외부로부터 입력 신호 또는 데이터(40100)를 수신하는 입력층(41000), 입력 데이터에 대응한 출력 신호 또는 데이터(40200)를 출력하는 출력층(44000), 입력층(41000)과 출력층(44000) 사이에 위치하며 입력층(41000)으로부터 신호를 받아 특성을 추출하여 출력층(44000)으로 전달하는 n개(여기서, n은 양의 정수)의 은닉층(42000 내지 43000)으로 구성된다. 여기서, 출력층(44000)은 은닉층(42000 내지 43000)으로부터 신호를 받아 외부로 출력한다.The artificial neural network model (40000) is implemented as a multilayer perceptron (MLP) consisting of multiple layers of nodes and connections between them. The artificial neural network model 40000 according to this embodiment can be implemented using one of various artificial neural network model structures including MLP. As shown in FIG. 46, the artificial neural network model 40000 includes an input layer 41000 that receives an input signal or data 40100 from the outside, and an output layer that outputs an output signal or data 40200 corresponding to the input data. (44000), located between the input layer 41000 and the output layer 44000, receives n signals from the input layer 41000, extracts the characteristics, and transmits them to the output layer 44000 (where n is a positive integer). It consists of a hidden layer (42000 to 43000). Here, the output layer 44000 receives signals from the hidden layers 42000 to 43000 and outputs them to the outside.

인공신경망 모델(40000)의 학습 방법에는, 교사 신호(정답)의 입력에 의해서 문제의 해결에 최적화되도록 학습하는 지도 학습(Supervised Learning) 방법과, 교사 신호를 필요로 하지 않는 비지도 학습(Unsupervised Learning) 방법이 있다. The learning methods of the artificial neural network model (40000) include supervised learning, which learns to optimize problem solving by inputting teacher signals (correct answers), and unsupervised learning, which does not require teacher signals. ) There is a way.

뉴럴 프로세싱 장치는 인공신경망 모델(40000)을 학습시키기 위한 학습 데이터를 시뮬레이션을 통해 직접 생성할 수 있다. 이와 같이, 인공신경망 모델(40000)의 입력층(41000)과 출력층(44000)에 복수의 입력변수와 대응되는 복수의 출력변수가 각각 매칭되고, 입력층(41000), 은닉층(42000 내지 43000) 및 출력층(44000)에 포함된 노드들 사이의 시냅스 값이 조정됨으로써, 특정 입력에 대응한 올바른 출력이 추출될 수 있도록 학습될 수 있다. 이러한 학습 과정을 통해, 인공신경망 모델(40000)의 입력변수에 숨겨져 있는 특성을 파악할 수 있고, 입력변수에 기초하여 계산된 출력변수와 목표 출력 간의 오차가 줄어들도록 인공신경망 모델(40000)의 노드들 사이의 시냅스 값(또는 웨이트)을 조정할 수 있다.The neural processing device can directly generate learning data for training the artificial neural network model (40000) through simulation. In this way, a plurality of input variables and a plurality of output variables corresponding to the input layer 41000 and the output layer 44000 of the artificial neural network model 40000 are matched, respectively, and the input layer 41000, hidden layers 42000 to 43000, and By adjusting the synapse values between nodes included in the output layer 44000, learning can be done so that the correct output corresponding to a specific input can be extracted. Through this learning process, the characteristics hidden in the input variables of the artificial neural network model (40000) can be identified, and the nodes of the artificial neural network model (40000) can be used to reduce the error between the output variables calculated based on the input variables and the target output. You can adjust the synapse value (or weight) between them.

도 47은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.Figure 47 is a conceptual diagram for explaining learning and inference operations of a neural network of a neural processing device according to some embodiments of the present invention.

도 47을 참조하면, 학습 과정(Training Phase)에서는 다수의 학습 자료(TD)들이 인공신경망 모델(NN)로 포워딩되고, 다시 백워딩되는 과정을 거칠 수 있다. 이를 통해서 인공신경망 모델(NN)의 각 노드의 웨이트와 바이어스들이 조율되고 이를 통해서 점점 더욱 정확한 결과를 도출할 수 있게 학습이 수행될 수 있다. 이렇게 학습 과정(Training Phase)을 통해서 인공신경망 모델(NN)은 학습된 신경망 모델(NN_T)로 변환될 수 있다. Referring to FIG. 47, in the training phase, a number of learning data (TD) may be forwarded to the artificial neural network model (NN) and then forwarded back again. Through this, the weights and biases of each node of the artificial neural network model (NN) are adjusted, and through this, learning can be performed to produce increasingly accurate results. Through this learning process (Training Phase), the artificial neural network model (NN) can be converted into a learned neural network model (NN_T).

추론 과정(Inference Phase)에서는 새로운 데이터(ND)가 다시 학습된 신경망 모델(NN_T)로 입력될 수 있다. 학습된 신경망 모델(NN_T)은 새로운 데이터(ND)를 입력으로 하여 이미 학습된 웨이트와 바이어스를 통해서 결과 데이터(RD)를 도출할 수 있다. 이러한 결과 데이터(RD)는 학습 과정(Training Phase)에서 어떤 학습 자료(TD)로 학습하였는지와, 얼마나 많은 학습 자료(TD)를 이용하였는지가 중요할 수 있다.In the inference phase, new data (ND) can be input back into the learned neural network model (NN_T). The learned neural network model (NN_T) can take new data (ND) as input and derive result data (RD) through already learned weights and biases. This result data (RD) may be important in terms of which learning materials (TD) were used in the training process (Training Phase) and how much learning materials (TD) were used.

이하, 도 48 내지 도 50을 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 태스크 디펜던시 세팅 방법을 설명한다. 상술한 실시예와 중복되는 부분은 생략하거나, 간략히 한다. 본 실시예에 따른 태스크 디펜던시 세팅 방법의 설명을 위해 도 1 내지 도 47 및 전술한 관련된 설명이 참조될 수 잇다. Hereinafter, with reference to FIGS. 48 to 50, a method of setting task dependency of a neural processing device according to some embodiments of the present invention will be described. Parts that overlap with the above-described embodiments are omitted or simplified. For description of the task dependency setting method according to this embodiment, FIGS. 1 to 47 and the above-described related description may be referred to.

도 48은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 태스크 디펜던시 세팅 방법을 설명하기 위한 순서도이고, 도 49는 도 48의 디펜던시 세트 코드를 수신하는 단계를 세부적으로 설명하기 위한 순서도이다. 도 50은 도 48의 태스크 디스크립터를 전송하는 단계를 세부적으로 설명하기 위한 순서도이다.FIG. 48 is a flowchart for explaining a method of setting task dependencies of a neural processing device according to some embodiments of the present invention, and FIG. 49 is a flowchart for explaining in detail the step of receiving the dependency set code of FIG. 48. This is a flowchart. FIG. 50 is a flowchart illustrating in detail the step of transmitting the task descriptor of FIG. 48.

도 48을 참조하면, 디펜던시 세트 코드를 수신한다(S100).Referring to FIG. 48, a dependency set code is received (S100).

세부적으로, 도 49를 참조하면, 태스크 디스크립터를 체크아웃한다(S110). 이어서, In detail, referring to FIG. 49, the task descriptor is checked out (S110). next,

구체적으로, 도 19를 참조하면, 디펜던시 세터(DPs)는 또한 완료 신호에 따라서, 각각의 제1 내지 제n 태스크 디스크립터(Tsk_d1~Tsk_dn)를 체크아웃시킬 수 있다. 이에 따라서, 디펜던시 세터(DPs)는 어떤 태스크가 완료되어 체크아웃되었는지에 대한 체크아웃 리포트(COrp)를 생성할 수 있다.Specifically, referring to FIG. 19, the dependency setters (DPs) may also check out each of the first to nth task descriptors (Tsk_d1 to Tsk_dn) according to the completion signal. Accordingly, dependency setters (DPs) can generate a checkout report (COrp) about which tasks have been completed and checked out.

다시, 도 49를 참조하면, 디펜던시 세트 코드를 생성한다(S120).Again, referring to FIG. 49, a dependency set code is generated (S120).

구체적으로, 도 17 및 도 19를 참조하면, 디펜던시 세터(DPs)는 체크인 버퍼(Cib)로부터 완료 신호를 수신하여 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있다. 즉, 어떤 태스크 디스크립터에 대응하는 태스크가 완료되었는지에 따라 디펜던시 세터(DPs)가 디펜던시 업데이트 요청(DFURQ)을 생성할 수 있다. Specifically, referring to FIGS. 17 and 19, dependency setters (DPs) may receive a completion signal from the check-in buffer (Cib) and generate a dependency update request (DFURQ). That is, dependency setters (DPs) can generate a dependency update request (DFURQ) depending on which task corresponding to the task descriptor has been completed.

이때, 디펜던시 업데이트 요청(DFURQ)은 상술한 디펜던시 세트 코드에 대한 내용을 포함할 수 있다. 즉, 디펜던시 업데이트 요청(DFURQ)은 현재 체크아웃되는 태스크 디스크립터의 디펜던시 정보를 포함할 수 있다. 즉, 디펜던시 업데이트 요청(DFURQ)은 현재 체크아웃되는 태스크 디스크립터에 의해서 디펜던시의 제한이 없어져 실행될 수 있는 태스크 디스크립터가 무엇인지에 대한 정보를 포함할 수 있다.At this time, the dependency update request (DFURQ) may include content about the above-described dependency set code. That is, the dependency update request (DFURQ) may include dependency information of the task descriptor that is currently checked out. That is, the dependency update request (DFURQ) may include information about which task descriptor can be executed as the dependency limit is removed by the task descriptor currently checked out.

디펜던시 체커(DPc)는 디펜던시 업데이트 요청(DFURQ)을 통해서 디펜던시 세트 코드(DFURQ1~DFURQ4)를 생성할 수 있다.The dependency checker (DPc) can generate dependency set codes (DFURQ1 to DFURQ4) through a dependency update request (DFURQ).

다시, 도 49를 참조하면, 디펜던시 세트 코드를 전송한다(S130).Again, referring to FIG. 49, the dependency set code is transmitted (S130).

구체적으로, 도 19를 참조하면, 디펜던시 세터(DPs)는 디펜던시 업데이트 요청(DFURQ)을 태스크 패시지(620)로 전송할 수 있다.Specifically, referring to FIG. 19 , dependency setters (DPs) may transmit a dependency update request (DFURQ) to the task passage 620.

다시, 도 49를 참조하면, 디펜던시 세트 코드를 수신한다(S140).Again, referring to FIG. 49, the dependency set code is received (S140).

구체적으로, 도 17을 참조하면, 디펜던시 체커(DPc)는 디펜던시 업데이트 요청(DFURQ)을 수신할 수 있다. 디펜던시 업데이트 요청(DFURQ)은 특정 태스크 사이의 정의된 디펜던시에 따라 완료된 태스크가 발생함에 따라 디펜던시의 변동을 알려줄 수 있다.Specifically, referring to FIG. 17, the dependency checker (DPc) may receive a dependency update request (DFURQ). A dependency update request (DFURQ) can notify changes in dependencies as completed tasks occur according to defined dependencies between specific tasks.

다시, 도 48을 참조하면, 디펜던시 세트 코드에 따라 디펜던시 매트릭스를 저장한다(S200).Again, referring to FIG. 48, the dependency matrix is stored according to the dependency set code (S200).

구체적으로, 도 18을 참조하면, 제1 디펜던시 매트릭스(DPmx1)의 각 열은 디펜던시 업데이트 요청(DFURQ)에 의해서 생성된 제1 내지 제4 디펜던시 세트 코드(DFURQ1~DFURQ4)를 통해서 업데이트될 수 있다.Specifically, referring to FIG. 18, each column of the first dependency matrix (DPmx1) contains the first to fourth dependency set codes (DFURQ1 to DFURQ4) generated by the dependency update request (DFURQ). It can be updated through

다시, 도 48을 참조하면, 디펜던시 체크 코드와 디펜던시 매트릭스의 대응 로우가 동일한지를 판단한다(S300). 만약 동일한 경우 디펜던시 매트릭스의 대응 로우를 클리어하고(S400), 태스크 디스크립터를 전송한다(S500). 그렇지 않은 경우 다시 S100 및 S200 단계를 기다린다.Again, referring to FIG. 48, it is determined whether the dependency check code and the corresponding row of the dependency matrix are the same (S300). If the same, the corresponding row of the dependency matrix is cleared (S400) and the task descriptor is transmitted (S500). If not, wait for steps S100 and S200 again.

세부적으로, 도 50을 참조하면, 더미 체크 디스크립터와 태스크 디스크립터를 식별한다(S510). 이어서, 더미 체크 디스크립터를 소각한다(S520)In detail, referring to FIG. 50, a dummy check descriptor and a task descriptor are identified (S510). Next, the dummy check descriptor is burned (S520)

구체적으로, 도 32를 참조하면, 디펜던시 체커(DPc)는 수신된 디스크립터 중에서 태스크 디스크립터와 더미 체크 디스크립터를 식별할 수 있다. 또한, 더미 세트 디스크립터와 더미 체크 디스크립터도 식별할 수 있다. 이때, 태스크 디스크립터 및 더미 세트 디스크립터는 디펜던시 체커(DPc)를 통과하여 체크아웃되어야 하지만, 더미 체크 디스크립터는 그럴 필요가 없기 때문에 식별될 수 있다.Specifically, referring to FIG. 32, the dependency checker (DPc) can identify a task descriptor and a dummy check descriptor among received descriptors. Additionally, dummy set descriptors and dummy check descriptors can also be identified. At this time, the task descriptor and the dummy set descriptor must be checked out by passing the dependency checker (DPc), but the dummy check descriptor does not need to be checked out and can be identified.

제2 더미 체크 디스크립터(DC_Tsk_d2)는 디펜던시 체크가 종료되면 디펜던시 체커(DPc) 내부에서 소각(Burnt out)될 수 있다. 즉, 제2 더미 체크 디스크립터(DC_Tsk_d2)는 코어 글로벌(500)로 전송될 필요도 없고, 체크아웃될 필요도 없으므로 디펜던시 체커(DPc)에 의해서 소각될 수 있다.The second dummy check descriptor (DC_Tsk_d2) may be burned out within the dependency checker (DPc) when the dependency check is completed. That is, since the second dummy check descriptor (DC_Tsk_d2) does not need to be transmitted to the core global 500 or checked out, it can be burned by the dependency checker (DPc).

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely an illustrative explanation of the technical idea of the present embodiment, and those skilled in the art will be able to make various modifications and variations without departing from the essential characteristics of the present embodiment. Accordingly, the present embodiments are not intended to limit the technical idea of the present embodiment, but rather to explain it, and the scope of the technical idea of the present embodiment is not limited by these examples. The scope of protection of this embodiment should be interpreted in accordance with the claims below, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of rights of this embodiment.

Claims (20)

서로 다른 제1 타입의 제1 태스크 및 제2 타입의 제2 태스크를 수신하는 태스크 버퍼;
상기 태스크 버퍼로부터 상기 제1 태스크에 대한 제1 태스크 디스크립터를 수신하는 제1_1 큐;
상기 태스크 버퍼로부터 상기 제2 태스크에 대한 제2 태스크 디스크립터를 수신하는 제1_2 큐;
상기 제1 및 상기 제2 태스크 디스크립터의 디펜던시를 체크하는 디펜던시 체커;
상기 디펜던시 체커로부터 상기 제1 태스크 디스크립터를 수신하는 제2_1 큐; 및
상기 디펜던시 체커로부터 상기 제2 태스크 디스크립터를 수신하는 제2_2 큐를 포함하고,
상기 디펜던시 체커는 복수의 디펜던시 매트릭스를 포함하고,
상기 복수의 디펜던시 매트릭스 각각은,
상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 행과,
상기 제1 및 제2 타입에 각각 대응하는 제1 및 제2 열을 포함하는,
태스크 매니저.
a task buffer receiving a first task of a different first type and a second task of a second type;
A 1_1 queue that receives a first task descriptor for the first task from the task buffer;
A 1_2 queue that receives a second task descriptor for the second task from the task buffer;
a dependency checker that checks dependencies of the first and second task descriptors;
A 2_1 queue that receives the first task descriptor from the dependency checker; and
It includes a 2_2 queue that receives the second task descriptor from the dependency checker,
The dependency checker includes a plurality of dependency matrices,
Each of the plurality of dependency matrices is:
First and second rows corresponding to the first and second types, respectively,
Comprising first and second rows corresponding to the first and second types, respectively,
Task manager.
제1 항에 있어서,
상기 복수의 디펜던시 매트릭스는,
제1 그룹과,
제2 그룹을 포함하고,
상기 제1 그룹은 상기 제1 태스크 디스크립터를 처리하고,
상기 제2 그룹은 제3 태스크 디스크립터를 처리하고, 상기 제3 태스크 디스크립터는 상기 제1 타입의 제3 태스크에 대한 디스크립터인,
태스크 매니저.
According to claim 1,
The plurality of dependency matrices are:
With the first group,
comprising a second group,
The first group processes the first task descriptor,
The second group processes a third task descriptor, and the third task descriptor is a descriptor for a third task of the first type,
Task manager.
제1 항에 있어서,
상기 제1 및 제2 태스크는 각각 제3 태스크에 디펜던트하고,
상기 디펜던시 체커는 상기 제3 태스크에 대한 제3 태스크 디스크립터 및 제3 더미 세트 디스크립터를 수신하고,
상기 제3 태스크 디스크립터 및 상기 제3 더미 세트 디스크립터는 서로 다른 그룹의 상기 디펜던시 매트릭스로 할당되는,
태스크 매니저.
According to claim 1,
The first and second tasks are each dependent on the third task,
The dependency checker receives a third task descriptor and a third dummy set descriptor for the third task,
The third task descriptor and the third dummy set descriptor are allocated to the dependency matrices of different groups,
Task manager.
제3 항에 있어서,
상기 태스크 버퍼, 상기 제1_1 큐, 상기 제1_2 큐, 상기 디펜던시 체커, 상기 제2_1 큐 및 상기 제2_2 큐를 포함하는 태스크 패시지와,
상기 제1 내지 제3 태스크 디스크립터 및 상기 제3 더미 세트 디스크립터를 체크 아웃시키는 던 패시지를 포함하는,
태스크 매니저.
According to clause 3,
A task passage including the task buffer, the 1_1 queue, the 1_2 queue, the dependency checker, the 2_1 queue, and the 2_2 queue,
Containing a dun passage that checks out the first to third task descriptors and the third dummy set descriptor,
Task manager.
제4 항에 있어서,
상기 태스크 패시지는 상기 제1 내지 제3 태스크 디스크립터를 코어 글로벌로 전송하는,
태스크 매니저.
According to clause 4,
The task passage transmits the first to third task descriptors to the core global,
Task manager.
제4 항에 있어서,
상기 태스크 패시지로부터 상기 제3 더미 세트 디스크립터를 수신하고, 상기 더미 세트 디스크립터를 상기 던 패시지로 전달하는 보이드 코어를 더 포함하는,
태스크 매니저.
According to clause 4,
Further comprising a void core that receives the third dummy set descriptor from the task passage and transmits the dummy set descriptor to the dune passage,
Task manager.
제6 항에 있어서,
상기 보이드 코어는 상기 더미 세트 디스크립터를 상기 던 패시지로 전송하는,
태스크 매니저.
According to clause 6,
The void core transmits the dummy set descriptor to the dune passage,
Task manager.
제4 항에 있어서,
제4 태스크는 제5 및 제6 태스크에 각각 디펜던트하고,
상기 디펜던시 체커는 상기 제4 태스크에 대한 제4 태스크 디스크립터 및 제4 더미 체크 디스크립터를 수신하고,
상기 제4 태스크 디스크립터 및 제4 더미 체크 디스크립터는 서로 다른 그룹의 디펜던시 매트릭스로 할당되는,
태스크 매니저.
According to clause 4,
The fourth task is dependent on the fifth and sixth tasks, respectively,
The dependency checker receives a fourth task descriptor and a fourth dummy check descriptor for the fourth task,
The fourth task descriptor and the fourth dummy check descriptor are allocated to dependency matrices of different groups,
Task manager.
제8 항에 있어서,
상기 제4 더미 체크 디스크립터는 상기 디펜던시 체커 내에서 소각되는,
태스크 매니저.
According to clause 8,
The fourth dummy check descriptor is incinerated within the dependency checker,
Task manager.
적어도 하나의 뉴럴 프로세서;
상기 적어도 하나의 뉴럴 프로세서가 공유하는 공유 메모리;
상기 적어도 하나의 뉴럴 프로세서 및 상기 공유 메모리가 데이터를 교환하는 글로벌 인터커넥션;
상기 적어도 하나의 뉴럴 프로세서는 각각 태스크 매니저를 포함하고,
상기 태스크 매니저는, 복수의 디스크립터를 수신하고, 상기 복수의 디스크립터 사이의 디펜던시를 체크하여 뉴럴 코어로 전송하고,
상기 복수의 디스크립터는 태스크 디스크립터, 더미 체크 디스크립터 및 더미 세트 디스크립터를 포함하고,
상기 더미 체크 디스크립터는 태스크 매니저 내부에서 소각되는,
뉴럴 프로세싱 장치.
at least one neural processor;
a shared memory shared by the at least one neural processor;
a global interconnection through which the at least one neural processor and the shared memory exchange data;
The at least one neural processor each includes a task manager,
The task manager receives a plurality of descriptors, checks dependencies between the plurality of descriptors, and transmits them to the neural core,
The plurality of descriptors include a task descriptor, a dummy check descriptor, and a dummy set descriptor,
The dummy check descriptor is burned inside the task manager,
Neural processing device.
제10 항에 있어서,
상기 더미 세트 디스크립터는 상기 태스크 디스크립터에 디펜던트한 후속 태스크 디스크립터가 2개 이상일 경우 상기 후속 태스크 디스크립터의 개수보다 1개 적게 수신되는,
뉴럴 프로세싱 장치.
According to claim 10,
When there are two or more subsequent task descriptors dependent on the task descriptor, the dummy set descriptor is received one less than the number of subsequent task descriptors.
Neural processing device.
제10 항에 있어서,
상기 더미 체크 디스크립터는 2개 이상의 상기 태스크 디스크립터가 하나의 후속 태스크 디스크립터에 디펜던트한 경우 상기 태스크 디스크립터의 개수보다 1개 적게 수신되는,
뉴럴 프로세싱 장치.
According to claim 10,
When two or more of the task descriptors depend on one subsequent task descriptor, one less dummy check descriptor is received than the number of task descriptors.
Neural processing device.
제10 항에 있어서,
상기 태스크 매니저는,
상기 복수의 디스크립터를 수신하여 디펜던시에 따라 상기 뉴럴 코어로 전달하는 태스크 패시지와,
상기 태스크 디스크립터 및 상기 더미 세트 디스크립터를 상기 뉴럴 코어에서 수신하고, 완료 여부를 커맨드 프로세서로 보고하는 던 패시지를 포함하는,
뉴럴 프로세싱 장치.
According to claim 10,
The task manager is,
A task passage that receives the plurality of descriptors and transmits them to the neural core according to dependency,
Comprising a Dawn passage that receives the task descriptor and the dummy set descriptor from the neural core and reports completion to the command processor,
Neural processing device.
제13 항에 있어서,
상기 완료 여부는 상기 태스크 디스크립터의 완료 여부를 포함하고, 상기 더미 세트 디스크립터의 완료 여부를 포함하지 않는,
뉴럴 프로세싱 장치.
According to claim 13,
The completion status includes whether the task descriptor is completed and does not include whether the dummy set descriptor is completed.
Neural processing device.
제14 항에 있어서,
상기 던 패시지는, 상기 태스크 디스크립터 및 상기 더미 세트 디스크립터가 체크아웃되면 상기 태스크 패시지로 디펜던시 필드 업데이트 리퀘스트를 전달하는,
뉴럴 프로세싱 장치.
According to claim 14,
The Dawn passage transmits a dependency field update request to the task passage when the task descriptor and the dummy set descriptor are checked out.
Neural processing device.
제15 항에 있어서,
상기 태스크 패시지는 상기 디펜던시 필드 업데이트 리퀘스트를 수신하고, 상기 복수의 디스크립터 사이의 디펜던시를 체크하는 디펜던시 체커를 포함하는,
뉴럴 프로세싱 장치.
According to claim 15,
The task passage includes a dependency checker that receives the dependency field update request and checks dependencies between the plurality of descriptors,
Neural processing device.
제16 항에 있어서,
상기 디펜던시 체커는 복수의 그룹의 디펜던시 매트릭스를 포함하는,
뉴럴 프로세싱 장치.
According to claim 16,
The dependency checker includes a plurality of groups of dependency matrices,
Neural processing device.
디펜던시 세트 코드를 수신하고,
상기 디펜던시 세트 코드에 따라 디펜던시 매트릭스를 저장하고,
태스크 디스크립터의 디펜던시 체크 코드와 상기 디펜던시 매트릭스의 대응 로우를 비교하고,
상기 디펜던시 체크 코드와 상기 대응 로우가 동일하면 상기 대응 로우를 클리어하고,
상기 태스크 디스크립터를 전송하는 것을 포함하는,
뉴럴 프로세싱 장치의 태스크 디펜던시 처리 방법.
Receive a dependency set code,
Store the dependency matrix according to the dependency set code,
Compare the dependency check code of the task descriptor with the corresponding row of the dependency matrix,
If the dependency check code and the corresponding row are the same, the corresponding row is cleared,
Including transmitting the task descriptor,
How to handle task dependency in a neural processing device.
제18 항에 있어서,
상기 디펜던시 세트 코드를 수신하는 것은,
상기 태스크 디스크립터 및 더미 세트 디스크립터를 체크아웃하고,
상기 태스크 디스크립터에 대한 상기 디펜던시 세트 코드를 생성하는 것을 포함하는,
뉴럴 프로세싱 장치의 태스크 디펜던시 처리 방법.
According to clause 18,
Receiving the dependency set code is,
Check out the task descriptor and dummy set descriptor,
Including generating the dependency set code for the task descriptor,
How to handle task dependency in a neural processing device.
제18 항에 있어서,
상기 태스크 디스크립터를 전송하는 것은,
더미 체크 디스크립터와 태스크 디스크립터를 식별하고,
상기 더미 체크 디스크립터를 소각하는 것을 포함하는,
뉴럴 프로세싱 장치의 태스크 디펜던시 처리 방법.
According to clause 18,
Transmitting the task descriptor involves:
Identify the dummy check descriptor and task descriptor,
Including burning the dummy check descriptor,
How to handle task dependency in a neural processing device.
KR1020220146548A 2022-11-04 2022-11-04 Task Manager, Neural processing device and Method for Processing task dependency thereof KR20240064470A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020220146548A KR20240064470A (en) 2022-11-04 2022-11-04 Task Manager, Neural processing device and Method for Processing task dependency thereof
US18/493,703 US12026548B2 (en) 2022-11-04 2023-10-24 Task manager, processing device, and method for checking task dependencies thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220146548A KR20240064470A (en) 2022-11-04 2022-11-04 Task Manager, Neural processing device and Method for Processing task dependency thereof

Publications (1)

Publication Number Publication Date
KR20240064470A true KR20240064470A (en) 2024-05-13

Family

ID=91073424

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220146548A KR20240064470A (en) 2022-11-04 2022-11-04 Task Manager, Neural processing device and Method for Processing task dependency thereof

Country Status (1)

Country Link
KR (1) KR20240064470A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102258566B1 (en) 2021-03-22 2021-06-01 리벨리온 주식회사 Processing element, method of operation thereof, and accelerator including the same

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102258566B1 (en) 2021-03-22 2021-06-01 리벨리온 주식회사 Processing element, method of operation thereof, and accelerator including the same

Similar Documents

Publication Publication Date Title
KR102480300B1 (en) Neural processing device and Method for job scheduling thereof
KR102480287B1 (en) DAG modification module, processing device including same and DAG modification method of processing device
KR20230102224A (en) Neural processing device and Method for synchronization thereof
KR20240064470A (en) Task Manager, Neural processing device and Method for Processing task dependency thereof
KR20240064424A (en) Task Manager, Neural processing device and Method for Setting task dependency thereof
US12026548B2 (en) Task manager, processing device, and method for checking task dependencies thereof
KR20240064468A (en) Task Manager, Neural processing device and Method for Checking task dependency thereof
KR20240064460A (en) Neural processing device and Method for Managing task thereof
KR20240064469A (en) Task Manager and Method for Checking task dependency thereof
KR20240064427A (en) Neural Processor and Method for Monitoring task thereof
KR20240064467A (en) Task Manager, Neural processing device and Method for Managing task thereof
US20240152391A1 (en) Processing device and method for managing tasks thereof
KR102622420B1 (en) Neural processing device and Method for dynamic frequency scaling thereof
US11775437B1 (en) Neural processing device
US12061973B2 (en) Neural processing device and transaction tracking method thereof
EP4206918A1 (en) Neural processing device and transaction tracking method thereof
KR102548582B1 (en) Neural processor and instruction fetch method thereof
US20230214635A1 (en) Neural processing device and transaction tracking method thereof
US12039334B2 (en) Processor and method for assigning config ID for core included in the same
US11966358B1 (en) Neural processor
KR102506622B1 (en) Method for measuring performance of neural processing device and Device for measuring performance
US12061983B2 (en) Neural core, neural processor, and data processing method thereof
KR102607437B1 (en) Neural processor, neural processing device including the same, and method for determining data communication mode of neural processing device
US11861401B2 (en) Neural processing device and method for job scheduling thereof
US20240211757A1 (en) Neural core, neural processor, and data processing method thereof

Legal Events

Date Code Title Description
E902 Notification of reason for refusal