Skip to content

JR-Wesley/RCHDC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Programmable HDC Accelerator

Requirements

  • A simulator
  • CocoTB

Arch

encoding

The basic encoding method.

Application

  1. Image Classification

  2. Language Recognition

  3. DNA Sequential Detection

  4. Gesture Recognition

两级量化

  1. 每个 sample,如一张图片、一句话,在累加后量化。
  2. 所有样本完成后,每个分类根据计数器的值二分量化。

Similarity

For binary representation, $x_i \in {0, 1}$, using Humming distance for similarity check.

Hardware Overhead

Parameter (Max):

  • dim: 1024
  • Sample size (# of vectors in a sample): 1024 (28*28=784)
  • Set size (# of samples in a class set): 1024
  • class (AM): 32

Sample encoding:

Class AM & footprint:

Similarity humming (DIM):

Sub-modules

  1. find the minimum of $n$ numbers

  2. pop count

Verification

Simulation

COCOTB is used for simulation which can give stimulus to testbench and access every signal inside the DUT using Python.

COCOTB is not a simulator. A simulator like iverilog, Verilator, VCS is needed.

For Iverilog, access [0] in array [0:0] raises an error. iverilog 编译 single element array 时报错,issue 此 PR 还未更新至 release,需要更新最新代码。

Diff test

读取 dut 转换为 tensor 与 reference model 对比。 HW encoded data is compared with SW golden model.

EDA flow

When synthesize with Vivado, there is an issue about the define primitive used for sequential register.

Log

smp_set.vcd: sample and set encoding. basic_train_predict.vcd: quantinization

About

A programmable hyperdimensional computing (HDC) accelerator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors