You are on page 1of 6

Computer architecture and organization

Lab 08
Objective: In this lab we will learn that
 For Loops
 Conditional statement (if else case)
 Control statement
 Blocking and Non-blocking

Task1: 2*1 Mux using case statement


Code: Block Diagram:

Test bench Output:

Test Bench :
Task2: Cascade Mux (3*1)
Code:

Block Diagram:

Test Bench code:

Output:
Task3: Half adder using case statement
Code:

Block Diagram:

Test bench code:

Output:
Task4: D-flip flop using case statement
Code:

Block Diagram:

TestBenchfile:
Task5: comparator using always statement:
Code:

Block Diagram:

Conclusion: In the end of the lab


 Comparator using always statement
 Half adder begin case stamen
 Cascade mux (3*1)

You might also like