**6. C3S design tools**

### **6.1 TNN simulation tool and example applications (completed work)**

Along with the hardware framework consisting of microarchitecture model and *TNN7* custom macros, we also developed a software tool, called *TNNSim*, that follows the above TNN microarchitecture model and allows rapid application-specific design exploration (see **Figure 10**). This tool is based on PyTorch [57], which is a popular deep learning framework widely used in academia. Using PyTorch enables easy integration of standard DL benchmarks and fast parallel processing using its native computational libraries. The *TNNSim* toolflow and its major libraries of functions are illustrated in **Figure 10**. Combining design exploration on *TNNSim* with *TNN7* implementation, we demonstrate TNN designs for the following two classes of applications. **Tables 1** and **2** summarize ten TNN design points for these applications.

#### **Figure 10.**

*TNNSim flow consisting of libraries implementing the four major functionalities: Preprocessing, encoding, inference and continual learning. Each functionality is implemented as a separate class and can be instantiated in a modular fashion to design arbitrary TNNs. TNNSim has enabled online learning demonstration and application performance exploration in our prior works [11–13].*
