---
# System prepended metadata

title: '[SOC] Lab03'

---

# [SOC] Lab03
## Introduction
This Lab 3 primarily designs a FIR filter to implement the following function.

>  y[n]=Σ(h[i]∗x[n-i])


![image](https://hackmd.io/_uploads/SyEAPeIhJe.png)

Additionally, since the input and output data need to communicate with external components, such as memory, we need to use AXI-LITE and AXI-Stream as interfaces.



#### Design specification
* data_width: 32 bit
* tap_width:  32 bit
* data_Num: TBD –Based on the size of the data file
* tap_number: up to 32 
:::warning
* Only one Multiplier and one Adder can be used.
* Shift registers and Tap coefficient should be implemented with SRAM
:::

#### Configuration Register Address map
* addr 0x00: [2] ap_idle, [1] ap_done, [0] ap_start
* addr 0x10: data-length
* addr 0x14: number of taps (Max: 32)
* addr 0x80 ~ 0xFF: Tap parameters



## Block Diagram  
### Datapath – dataflow  
![image](https://hackmd.io/_uploads/ryys1EU3kx.png)




### Control signals  
![image](https://hackmd.io/_uploads/H1mmyWLhJl.png)
![image](https://hackmd.io/_uploads/Hkr1AnL21x.png)

## Describe the operation, e.g.  
##### How to receive data-in and tap parameters and place into SRAM  
##### How to access DataRAM and tapRAM to do the computation  
### How `ap_done` is generated.  
### ![53577](https://hackmd.io/_uploads/HyzcbWgTyx.jpg)


## Resource usage  
### Including FF, LUT, BRAM  

### Area
![image](https://hackmd.io/_uploads/Sk5_5KU2yg.png)

## Performance report  
### Latency & throughput (# of clocks to generate a Y output)  

## Timing Report  
### Synthesize the design with a maximum frequency  
### Report timing on the longest path, slack  
![image](https://hackmd.io/_uploads/SJ6svp83Jx.png)
![image](https://hackmd.io/_uploads/S1-KvpUhJe.png)



## Simulation Waveform, show  
### Coefficient program, and read back  
![image](https://hackmd.io/_uploads/rkJMuqU2yx.png)
#### read back
![image](https://hackmd.io/_uploads/SkO-h5I2Je.png)

### Data-in stream-in  
![image](https://hackmd.io/_uploads/HkE665Un1e.png)

### Data-out stream-out  
![image](https://hackmd.io/_uploads/B1nwZaUhke.png)

### RAM access control  
![image](https://hackmd.io/_uploads/ry6kLa83yl.png)
