Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The aim of this task is to implement a Carry - Lookahead Adder ( CLA ) in SystemVerilog. The CLA is to add two n

The aim of this task is to implement a Carry-Lookahead Adder (CLA) in SystemVerilog. The CLA is to add two n bit numbers together. It consists of blocks for k columns each so that n =- k.
Except for the testbench, it is not allowed to use addition operators, comparison operators or similar, use only operators from Boolean algebra (Boolean reduction operators are allowed).
Note: You can also receive points for later parts of the task if you were unable to solve previous parts.
A CLA block for k columns is constructed as follows from the blocks RCA, GP and CARRY:
Implement the parameterized SystemVerilog module cla, which creates a CLA from several modules cla_block for the individual CLA blocks. To do this, again use a generate block.
Note: You can assemble several CLA blocks in a similar way to how they are assembled in a Ripple-CarryAdder full adder. However, you must suitably divide the n bits into blocks of length length k bits, so that each CLA block receives k bits each as A and B.
Note: If, for example, you want to divide A into blocks of length k, the lowest block is A[K-1:0], the next block A[2*K-1:K] and so on. You could also divide specific values here by e.g. the loop variable of the generate block.
Note: To test your code, you will have to design a testbench yourself in the next task. However, you can already compile your code now with the following command in order to test in with the empty testbench to check for correct syntax: Windows: ./sim.bat cla, otherwise: ./sim.sh cla'timescale 1ns /1ns
module cla
#( parameter K=4,
N=16)// you may assume here that N is a multiple of K, i.e.,K,2K,3K,4K,dots
( input logic [N-1:0]A,?? Operand A
input logic [N-1:0]B,// Operand B
input logic C_IN,// Carry-In
output logic N-1:0 SUM, // Sum
output logic C_OUT); // Carry-Out
localparam L = N / K; // L instances of cla_block needed
10
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

Explain the principles of data integrity.

Answered: 1 week ago