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.

Calculate Sum of (z[n])^2 in VHDL!

Status
Not open for further replies.

NorthZ

Newbie level 3
Joined
Sep 18, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
33
Hello! I want to calculate this Sum of (z[n])^2 in VHDL. If the signal z is represented in 2's complement with b bits.

Thank you! :)
 

hi,
considering value of n is known you can go for " for generate" loop,
 
Last edited by a moderator:

hi,
considering value of n is known you can go for " for generate" loop,

A for... generate is no use on it's own. You need to think about the base hardware.
But it could be done simply inside a for loop inside a process.

To the OP:

you will need n multipliers and n-1 adders for the adder tree. Or just use a parrallel add megafunction.
 

Hello! I want to calculate this Sum of (z[n])^2 in VHDL. If the signal z is represented in 2's complement with b bits.

Thank you! :)

- That's your goal, what is your question?
- If you want help in some area, ask a specific question.
- If you don't know how to start or what to do, then you should back up and do some basic research on your own first then go back to the previous bullet point

Kevin Jennings
 

Sorry i wrote wrong on the question. It is supposed to be like this.

"I want to calculate the Sum of (z[n])^2 in VHDL. If the signal z is
represented in 2's complement with b bits and I want to calculate the
power of groups of N samples!

Thank you!:)"
 

Sorry i wrote wrong on the question. It is supposed to be like this.

"I want to calculate the Sum of (z[n])^2 in VHDL. If the signal z is
represented in 2's complement with b bits and I want to calculate the
power of groups of N samples!

Thank you!:)"

As K-J already pointed out that is your goal, what is your question?
You know questions are those sentences starting with things like what/why/when/how/etc and end with a symbol like '?' :-D

Seriously ask a question, and please don't ask some generic...would someone do my work for me type of question. e.g. Would someone send me the code for _________ (fill in the blank)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top