Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The objective of this assignment is to implement a parameterized carry save multiplier and Design of Digital Systems: Lab Assign heavily test it using advanced
The objective of this assignment is to implement a parameterized carry save multiplier and Design of Digital Systems: Lab Assign
heavily test it using advanced techniques learned in VHDL
Background
Multiplication, which is required by many hardware systems, is heavily studied since it is
a very expensive operation that requires a large area and long critical path to implement.
Carrysave multiplication is one technique that optimizes the standard ripplecarry multi
plication by improving the critical path delay. Furthermore, in order to avoid any issues in
the design, the unit needs to be heavily tested using a large number of test vectors which
is usually generated using an external tool such as Matlab, Python, Magma, VHDL
provides the textio library to allow reading from files which holds these test vectors
I will need the design and the testbench file for vivado. Do not copy and paste from chat gpt please and thank you!
The design should look like FULLADDER COMPONENT
library ieee;
use ieee.stdlogicall;
entity fulladder is
port
add ports for fulladder as described in the pdf
;
end fulladder;
architecture dataflow of fulladder is
add signals here if needed
begin
write the architecture for fulladder based on Figure schematic
end dataflow;
CARRYSAVEMULT COMPONENT
library ieee;
use ieee.stdlogicall;
entity carrysavemult is
add generic n
generic ;
port
add ports for carrysavemult as described in the pdf
;
end carrysavemult;
architecture structural of carrysavemult is
add fulladder as component
variable array of nbit stdlogicvector
type arrd is array integer range of stdlogicvectorn downto
;
signal ab has dimensions n x n
signal ab : arrd to n;
fulladder signals, all have dimension n x n
signal FAa : arrd to n;
signal FAb : arrd to n;
signal FAcin : arrd to n;
signal FAsum : arrd to n;
signal FAcout : arrd to n;
begin
use nested forgenerate to assign values to ab Darray
genabrows: for i in to n generate
genabcols: for j in to n generate
write code here
end generate;
end generate;
Figure shows that we will use n x n full adders
use nested forgenerate to instantiate each fulladder component.
ports are mapped to each bit of the Darrays FAa FAb FAcin,
FAsum, FAcout
after instantiating the full adders, we need to assign values
for the inputs of the FAs.
use the three patterns from the pdf to complete this part
and assign values to each row.
First row:
Intermediate rows:
Last row:
finally, do the last steps to compute the product.
Product:
end structural;
MULT WRAPPER
library ieee;
use ieee.stdlogicall;
entity mult is
port
add ports for mult as described in the pdf
;
end mult;
architecture structural of mult is
add carrysavemult as a component
we don't need to the fulladder as component here
signals
signal areg : stdlogicvector downto ;
signal breg : stdlogicvector downto ;
signal ps : stdlogicvector downto ;
begin
instantiate carrysavemult create port map
regmult : processclk
begin
if risingedgeclk then
on the rising edge, make the signals equal
to the inputs and outputs carrysavemult
end if;
end process;
end structural;
after completing the design, write the simulation testbench.
make sure to add "create clock period name clk get ports clk to
your constraints file.
The testbench should look like library ieee;
use ieee.stdlogicall;
use ieee.stdlogictextio.all;
library std;
use stdtextio.all;
entity multtb is
end multtb;
architecture behavioral of multtb is
ADD "multxdat" AS A SIMULATION SOURCE FIRST
file variable to read data from
file MULTFILE : text OPEN READMODE is "multxdat";
create period constant
mult components
component mult is
add ports here
end component;
add signals
begin
instantiate mult component and complete the port map for it
generate the process for the clock similar to previous lab and
lab
variables for reading for MULTFILE
tb: process
variable curline : integer :;
variable vline : line;
variable vspace : character;
variable va : stdlogicvector downto ;
variable vb : stdlogicvector downto ;
variable vpexp : stdlogicvector downto ;
begin
useful functions
while not endfileFILE: keeps reading until reaching the end
of the file.
readlineFILE"VARIABLE": reads line at a time from file
and stores it in variable.
hreadVARIABLE "VARIABLE": reads from the st variable into
the nd variable in HEX format.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started