Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Multi - cycle synchronous neuron datapath core m x q unsigned integer multiplier with synchronous output: Synapses will be modeled by combinational m x q

Multi-cycle synchronous neuron datapath core
m x q unsigned integer multiplier with synchronous output: Synapses will be modeled by
combinational m x q unsigned integer multipliers with each xi input of size m bits and each weight of
size q bits. You will implement a register with update control (in addition to clk control) at the output
of the multiplier such that a computed output will only be available on the rising edge of the clk if
update signal is ON. If update is OFF, the register will retain its previous value.
Code:
module MxQ_Multi(M,Q,P);
input[2:0]M;
input[1:0]Q;
output[4:0]P:
output control;
wire[2:0]X,Y,S;
wire carryout;
assign Y ={1'b0,M[2]&Q[0],M[1]&Q[0]};
assign X ={M[2]&Q[1],M[1]&Q[1],M[0]&Q[1]};
nbit_RCA M1(1'b0,Y,X,S,carryout);
defparam M1.n =3;
assign P ={carryout,S,M[0]&Q[0]};
endmodule
4-input n-bit adder: Generate an adder unit that can add four n-bit numbers as part of the neuron
function y. You will need to figure out how many bits you need to allow for the output for any n.
Code:
module nbit_RCA (carryin,X,Y,S,carryout);
parameter n=4;
input carryin;
input [n-1:0]X,Y;
output[n-1:0]S;
output carryout;
wire [n:0]C;
genvar i;
assign C[0]= carryin;
assign carryout = C[n];
generate
for(i=0; i=n-1; i=i+1)
begin: fulladder_RCA
full_adder M (C[i],X[i],Y[i],S[i],C[i+1]);
end
endgenerate
endmodule
Unsigned division by 2n: Generate a combinational divider function that divides an unsigned m-bit
input integer by a power of 2(2n) to generate a smaller unsigned integer. This is the second operation
in the neuron function y. How many bits is the smaller unsigned integer at the output?
Code:
module div_by_2n #(parameter m=4, parameter n=1)(M,Q);
input [m-1:0]M;
output [m-1-n:0]Q;
assign Q = M >> n;
endmodule
Develop a Verilog HDL testbench to do corner-case verification of 10 consecutive input xi patterns to
verify the basic functionality of datapath core e.g. weight and Prediction counters counting in the
right direction. Achieving a firing event.
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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

What obstacles interfere with eff ective listening?

Answered: 1 week ago