# US 2021/0287074 A1 · Neural network weight encoding

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0287074 A1
- Document ID: US20210287074A1
- Status: Published application
- Kind: A1
- Application number: 16/816,453
- Filed: 2020-03-12
- Published: 2021-09-16
- Earliest claimed: 2020-03-12
- Assignees: Semiconductor Components Industries, LLC
- Applicants: Semiconductor Components Industries, LLC
- Inventors: Ivo Leonardus COENEN
- Web page: https://patentgrep.com/patent/US20210287074A1

## CPC

- G06N 3/063: using electronic means
- G11C 11/54: using elements simulating biological cells, e.g. neuron
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G11C 7/1006: {Data managing, e.g. manipulating data before writing or reading out, data bus switches or control circuits therefor}
- G11C 8/08: Word line control circuits, e.g. drivers, boosters, pull-up circuits, pull-down circuits, precharging circuits, for word lines
- G11C 11/4063: Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing or timing
- G06N 3/048: Activation functions
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

According to an aspect, a neural network circuit for decoding weights of a neural network includes a weight memory configured to store encoded weights for the neural network, where the encoded weights includes an index weight word, and a decompression logic circuit configured to retrieve the encoded weights from the weight memory, decode the encoded weights using the index weight word to obtain a sequence of one or more non-pruned weight words and one or more pruned weight words, and provide the sequence of the non-pruned weight words and the pruned weight words to a plurality of input-weight multipliers.

## Claims

### Claim 1

A neural network circuit for decoding weights of a neural network, the neural network circuit comprising:
a weight memory configured to store encoded weights for the neural network, the encoded weights including an index weight word; and
a decompression logic circuit configured to:
retrieve the encoded weights from the weight memory;
decode the encoded weights using the index weight word to obtain a sequence of one or more non-pruned weight words and one or more pruned weight words, the pruned weight words including zero-value weight words, the non-pruned weight words including non-zero-value weight words; and
provide the sequence of the non-pruned weight words and the pruned weight words to a plurality of input-weight multipliers.

### Claim 2 (depends on 1)

The neural network circuit of claim 1, wherein the index weight word includes a plurality of bits, each bit having a first bit value or a second bit value, the first bit value indicating a pruned weight word in the sequence, the second bit value indicating a non-pruned weight word in the sequence.

### Claim 3 (depends on 1)

The neural network circuit of claim 1, wherein the decompression logic circuit is configured to decode the encoded weights within a single clock cycle.

### Claim 4 (depends on 1)

The neural network circuit of claim 1, wherein the decompression logic circuit includes a weight word decoder, the weight word decoder including:
a plurality of shifters;
a plurality of digital logic gates coupled to the plurality of shifters; and
an index word decoder coupled to the plurality of shifters and the plurality of digital logic gates, the index word decoder configured to control the plurality of shifters and the plurality of digital logic gates based on the index weight word.

### Claim 5 (depends on 4)

The neural network circuit of claim 4, wherein the plurality of shifters are connected in parallel to the index word decoder.

### Claim 6 (depends on 4)

The neural network circuit of claim 4, wherein each of the plurality of shifters is configured to receive the non-pruned weight words and a control signal from the index word decoder that controls a shift operation applied to the non-pruned weight words.

### Claim 7 (depends on 4)

The neural network circuit of claim 4, wherein each of the digital logic gates is configured to receive a control signal from the index word decoder that controls a Boolean operation executed by a respective digital logic gate.

### Claim 8 (depends on 4)

The neural network circuit of claim 4, wherein the plurality of digital logic gates include a first digital logic gate coupled to an output of a first shifter of the plurality of shifter, and a second digital logic gate coupled to an output of a second shifter of the plurality of shifters.

### Claim 9 (depends on 1)

The neural network circuit of claim 1, wherein the decompression logic circuit includes:
a first weight decoder configured to decode a first portion of the encoded weights;
a second weight decoder configured to decode a second portion of the encoded weights; and
a control logic circuit configured to control the first weight decoder and the second weight decoder.

### Claim 10 (depends on 9)

The neural network circuit of claim 9, wherein the first weight decoder is configured to receive a signal, from the control logic circuit, indicating a number of available weight words stored in a weight word buffer, the first weight decoder configured to determine a number of bits having a first bit value in the index weight word, and decode the first portion of the encoded weights in response to the number of available weight words stored in the weight word buffer being equal to or greater than the number of bits having the first bit value.

### Claim 11

A device comprising:
a neural network configured to receive a set of inputs and generate a set of outputs, the set of inputs including speech data, the set of outputs including one or more potential speech commands that correspond to the speech data;
a weight memory configured to store encoded weights for the neural network; and
an accelerator configured to execute the neural network, the accelerator including:
a decompression logic circuit configured to retrieve the encoded weights from the weight memory, and decode the encoded weights to obtain a sequence of one or more pruned weight words and one or more non-pruned weight words, the pruned weight words including zero-value weight words, the non-pruned weight words including non-zero-value weight words; and
a plurality of input-weight multipliers configured to receive the sequence of the pruned weight words and the non-pruned weight words.

### Claim 12 (depends on 11)

The device of claim 11, wherein the decompression logic circuit includes:
a weight word buffer configured to temporarily store the encoded weights, the encoded weights including a first index weight word and a second index weight word;
a first weight decoder configured to receive the encoded weights from the weight word buffer and generate a first group of decoded weight words using the first index weight word; and
a second weight decoder configured to receive a portion of the encoded weights from the first weight decoder and generate a second group of decoded weight words using the second index weight word.

### Claim 13 (depends on 12)

The device of claim 12, further comprising:
a control logic configured to control the first weight decoder and the second weight decoder;
a shifter configured to receive the first group of decoded weight words from the first weight decoder and the second group of decoded weight words from the second weight decoder; and
a plurality of weight registers coupled to the shifter, each weight register of the plurality of weight registers being configured to receive a separate decoded weight word from the shifter.

### Claim 14 (depends on 11)

The device of claim 11, wherein the encoded weights include an index weight word and one or more non-pruned weight words, the decompression logic circuit including a weight word decoder, the weight word decoder including:
a plurality of shifters;
a plurality of AND gates coupled to the plurality of shifters; and
an index word decoder coupled to the plurality of shifters and the plurality of AND gates, the index word decoder configured to control the plurality of shifters and the plurality of AND gates based on bit values of individual bits of the index weight word.

### Claim 15 (depends on 14)

The device of claim 14, wherein each of the plurality of shifters is configured to receive the non-pruned weight words and a first control signal from the index word decoder, each shifter being configured to execute a shift operation on the non-pruned weight words according to the first control signal.

### Claim 16 (depends on 15)

The device of claim 15, wherein each of the AND gates is configured to an output of a respective shifter and a second control signal from the index word decoder, each AND gate being configured to execute an AND operation on the output of a respective shifter and the second control signal.

### Claim 17 (depends on 11)

The device of claim 11, wherein the encoded weights include an index weight word followed by the non-pruned weight words, the encoded weights not including weight values for the pruned weight words, the index weight word including a plurality of bits, each bit having a first bit value or a second bit value, the first bit value indicating a pruned weight word in the sequence, the second bit value indicating a non-pruned weight word in the sequence

### Claim 18 (depends on 17)

The device of claim 17, wherein the pruned weight word is one of a most significant part or a least significant part of a respective encoded weight, wherein, when the pruned weight word is the most significant part, a sign of the least significant part is used to fill the most significant part.

### Claim 19

A method of decoding weights of a neural network, the method comprising:
retrieving encoded weights from a weight memory via a processor data bus, the encoded weights including an index weight word;
decoding the encoded weights using the index weight word to obtain a sequence of one or more pruned weight words and one or more non-pruned weight words, the pruned weight words including zero-value weight words, the non-pruned weight words including non-zero-value weight words; and
providing the sequence of the non-pruned weight words and the pruned weight words to a plurality of input-weight multipliers.

### Claim 20 (depends on 19)

The method of claim 19, wherein the index weight word includes a plurality of bits, each bit having a first bit value or a second bit value, the first bit value indicating a pruned weight word in the sequence, the second bit value indicating a non-pruned weight word in the sequence, the pruned weight word being decoded to zero in response to a bit within the index weight word having the first bit value.

### Claim 21 (depends on 19)

The method of claim 19, wherein the decoding includes controlling a plurality of shifters and a plurality of digital logic gates based on the index weight word.
