Second Week Assignment
Task 1
Introduction : What are the necessary steps and Verilog Script required
to effectively implement the architecture of an 4-bit ALU core,
illustrated in Figure 1 Specifically, discuss the integration of the three
key units, namely Arithmetic, Logic, and Comparator unit units,
alongside the coordination provided by a control unit.
Functionality : The ALU's operations are governed by four function
inputs (S3 to S0), which direct the 4-bit 2-to-1 multiplexers both
internally and externally within the logic blocks. It is required to
implement the ALU in behavioral method. The operations performed
by the ALU, based on the select inputs, are detailed in Table 1
Figure 1: Block Diagram
4 Bits
Register
CLK
Table 1: Operation Codes.
S0 S1 S2 S3 F
0 0 0 0 Add
0 0 0 1 Subtract
0 0 1 1 2's complement
1 0 0 0 A and B
1 0 0 1 A XOR B
1 0 1 0 A or B
1 0 1 1 B’ - 1’s Complement
1 1 0 0 A>B
1 1 0 1 A<B
1 1 1 0 A=B
Task 2
Write a documentation that covers the implementation and
explanation of several fundamental digital components
commonly used in circuit design. The components discussed
include subtractors, adders, multipliers, decoders,
multiplexers, SR Latch , Flip flop , Ring counter and more.
Each component is accompanied by a brief explanation of its
functionality, its role in digital design, and the corresponding
Verilog code for its implementation.