Rules | Recent posts | topic RSS | Search | Register  | Log in

How to find number of one's in a vector in single clock

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital)
Author Message
megastar007



Joined: 20 Feb 2007
Posts: 82
Helped: 5
Location: Munich


Post25 Aug 2008 16:22   How to find number of one's in a vector in single clock

can any one tell me the circuit for finding number of 1's in a vector ..say 8 bit vector in a Single clock cycle. output should be 4 bits(bcos all 8 bits can be one)
Back to top
Nir Dahan



Joined: 19 May 2008
Posts: 65
Helped: 6
Location: Munich, Germany


Post25 Aug 2008 16:24   Re: How to find number of one's in a vector in single clock

try this:
http://asicdigitaldesign.wordpress.com/2007/05/23/aclp-2-solution/

ND
Back to top
penrico



Joined: 28 Aug 2001
Posts: 225
Helped: 8
Location: Argentina


Post25 Aug 2008 18:10   Re: How to find number of one's in a vector in single clock

An easy way is use a parallel eeprom. You can use the address as input data, and then data will be the result. You must program the eeprom with some like this:

This is an example to count just 4 bits, but for more bits is the same

Address Data
A3 A2 A1 A0 D2 D1 D0
0 0 0 0---->0 0 0
0 0 0 1---->0 0 1
0 0 1 0---->0 0 1
0 0 1 1---->0 1 0
0 1 0 0---->0 0 1
0 1 0 1---->0 1 0
0 1 1 0---->0 1 0
0 1 1 1---->0 1 1
1 0 0 0---->0 0 1
1 0 0 1---->0 1 0
1 0 1 0---->0 1 0
1 0 1 1---->0 1 1
1 1 0 0---->0 1 0
1 1 0 1---->0 1 1
1 1 1 0---->0 1 1
1 1 1 1---->1 0 0
Back to top
avimit



Joined: 16 Nov 2005
Posts: 415
Helped: 68
Location: Fleet, UK


Post26 Aug 2008 9:54   Re: How to find number of one's in a vector in single clock

Add them all.
Kr,
Avi
Back to top
wkong_zhu



Joined: 13 Nov 2004
Posts: 163
Helped: 2


Post27 Aug 2008 4:52   How to find number of one's in a vector in single clock

tree adder.
Back to top
jbeniston



Joined: 05 May 2005
Posts: 85
Helped: 8


Post27 Aug 2008 12:57   How to find number of one's in a vector in single clock

Adder or LUT if the number of bits in the vector is small.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital)
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap