You are on page 1of 2

Lab: Computer Aided Design

Amir Aminifar

1. My topic: Bubble Sort (smallest solution)

procedure bubbleSort( A : list of sortable items )


do
swapped = false
for each i in 1 to length(A) - 1 inclusive do:
if A[i-1] > A[i] then
swap( A[i-1], A[i] )
swapped = true
end if
end for
while swapped
end procedure

2. In the first step I wrote the behavioral model based on the above pseudo code and it was tested using the test case. You
have the code besides this document.
3. In the second step I wrote the designed the algorithm in two parts. First part is the structural model of data path and the
second part is the FSM which is responsible for control signal and is basically the controller. The control/flow graph, RTL
model and FSM are included in the attached documents.
After testing this design the design was synthesis using Leonardo spectrum and after it we used flextest to compute the test
coverage, fault coverage and ATPG effectiveness. Here is the result in the first try:
Then in order to improve this metrics I have increase the observability of design by adding one output pin, which is the
output of comparator. And this is the results:

As we can see these metrics are improved.

You might also like