Compass DSL
1.2
Getting Started
Introduction
Installation
Build and Run Workflow
Tutorials
Language Basics
Functions
Variables
Types
Mask
Expression
Statement
Flexible/Multiple Width Vector
How-to Guides
How to Write a Basic Kernel
How to Use Subfunctions
How to Use a Pointer
How to Use DMA
How to Use Mask
How to Use RPC
How to Use Profiler
How to Debug with Python
How to Write the Operator Plugin
How to Use Macros
How to Use Inline Assembly
How to use AIFF
Explanation
About This Documentation
Zhouyi NPU Architecture
Compass DSL
Python Simulator (PySim)
Static and Dynamic Kernel
Reference
Builtin API
Script API
Compass DSL
»
Language Basics
View page source
Language Basics
Functions
Function Definition
Function Execution
Variables
Literal
Variable
Types
Conversion
Reinterpret
Mask
What is Mask
Example of Mask
How to Generate Mask
Expression
Var
Algebraic Operations
Function Call
Buffer Load
Statement
Return
Assignment
Allocate
Buffer Match
For
IfThenElse
Flexible/Multiple Width Vector
Background
Flexible width vector
Multiple width vector
How to use a flexible/multiple width vector
Example