Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

realization of the following circuit

Status
Not open for further replies.

sun_ray

Advanced Member level 3
Advanced Member level 3
Joined
Oct 3, 2011
Messages
772
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
6,828
How can I realize the following circuit ?

out = In x 1600


What can be the RTL for it?
 

How can I realize the following circuit ?

out = In x 1600


What can be the RTL for it?
write the RTL such that input is shifted log2 1600 to the left ....append the remaining with ZEros.....enjoy!!
 

Hi! I think it'll be like this :)

module hard_mult_by_1600(In, Out);
input [7:0] In;
output [18:0] Out;

// Out = (64 + 512 + 1024) * In = (2^6 + 2^9 + 2^10) * In

wire [13:0] prt_mult_by_64 = In << 6;
wire [16:0] prt_mult_by_512 = In << 9;
wire [17:0] prt_mult_by_1024 = In << 10;

assign Out = prt_mult_by_64 + prt_mult_by_512 + prt_mult_by_1024;

endmodule
 
write the RTL such that input is shifted log2 1600 to the left ....append the remaining with ZEros.....enjoy!!

1600 is not a power of 2
 

Hi dll_fpga,

I am unable to understand your basic principal. Can you please elaborate?

Do you think Alosevskoy has provided the correct solution?
 

Hi Alosevskoy

You are correct that it was an input signal. Here In is an input signal. Can you suggest any other principal to solve the above problem because your principle may require big size adder.

Regards
 

adder will used less ressource than multiplier, the Alosevsko proposal seem interesting.

the other question is why to multiply by 1600 in hardware?, what do you do with the "out" signal?
 

I've never done this before but I think one can use smaller adder to calculate small portions of sum sequentially and keep the intermediate results in a dedicated register... but it'll take more time (in term of clock cycles) than pure comb logic as I've posted above.
 

The question was more to know thee way a multiplication can be done by any number rather than specifically by 1600. The 1600 was chosen to frame the question.
 

fix shift does not "consume" time.
 

What do you want to mean by your above sentence rca?
 

<<6 is shifter that mean, only move the bit position, so just need to rediret the bit 0 to position 6, to be added with the other shift....
 

Hi Alosevskoy

Your rtl code is correctly implementing multiplication by 1600 without multiplier. How do you say that you think think only a multiplier can solve this task?
 

The question was more to know thee way a multiplication can be done by any number rather than specifically by 1600. The 1600 was chosen to frame the question.

So you mean a constant multiplier? To make it a reasonable RTL question, you should mention bit lengths respectively ranges for all involved terms.

As long as you don't intend a bit serial multiplier, you can just write In*constant and leave the implementation to the synthesis tool.
 

fvm

I can allow as much bits as required for 1600 and for in and for out also. Where
is the problem? Can u please clarify?
 

I don't see a problem. To synthesize hardware, you need to define the bit widths.
 

What do you mean by "As long as you don't intend a bit serial multiplier,"? Do you want to mean that depending on the code style it can be a serial multiplier or other type of multiplier? How does the code look like then?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top