Week 11 B
Week 11 B
Performance Optimization
http://classes.engineering.wustl.edu/ese461/
Project FAQ
• Correction
– typo in optical flow: Iy(i, j) = I1(i, j+1) – I1(i, j-1)
– I1(i, j+1) might not exist
• Mid-project report
– behavioral Verilog code and testbench
– show proof of working functional simulation
– ensure synthesizable codes
• Use of external memory
– instantiate in the test bench
– used for large data array or buffers
2
Arrays, Vectors, and Memories
3
Useful Verilog Features
• Display tasks
– $display, $displayb (h, o) in binary, hex, and octal
– $write, $strobe, $monitor
• File I/O tasks
– $fopen, $fclose
– $fdisplay, $fwrite, $fstrobe, $fmonitor
– $readmemb, $readmemh: read a text file into memory
4
Module Partitioning
5
Pipelining
6
Pipelining
7
Adding Structure
– design 2
8
32-Bit Arithmetic Shift Right
• Design 3
9
32-Bit Arithmetic Shift Right
10
32-Bit Arithmetic Shift Right
11
Horizontal Partitioning
12
32-Bit Priority Encoder
13
Priority-Encoded Logic vs Balanced Logic
14
Hierarchy
– least-efficient implementation
15
32-Bit Decoder
16
32-Bit Balanced-Tree Decoder
17
Performing Operations in Parallel
• Example
– linear search
18
Performing Operations in Parallel
• Example
– binary search
19
Performing Operations in Parallel
• Example
– parallel search
20
MUX for Conditional Assignment
• Example: counter
21
MUX for Conditional Assignment
• Example: counter
22
Replication
• Large fanout
– manual register duplication to reduce congestion
23
Resource Sharing
24
Resource Sharing
25
Questions?
Comments?
Discussion?
26