The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 4:21am
Pages: 1
Send Topic Print
Reduction and (Read 3230 times)
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

Reduction and
Apr 02nd, 2009, 9:03am
 
what is the definition of "reduction and"  (&)  in verilog ams?

thanks.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Reduction and
Reply #1 - Apr 3rd, 2009, 3:59am
 
It's a bitwise operator.  See section 4.2.9 of the Verilog-AMS LRM, version 2.3

Did you have a specific question about how it handles signed vs unsigned or unequal bit length arguments?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

Re: Reduction and
Reply #2 - Apr 3rd, 2009, 6:07am
 
Thanks.

Just a little confused with what "reduction" refers to?
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Reduction and
Reply #3 - Apr 3rd, 2009, 9:42pm
 
Reduction & is applied to one argument and returns the logical and of all the bits in that argument. So it always returns a single boolean value.

This contrasts to the bitwise & that applies to two bit vectors, and return a bit vector where each bit is the logical and of the corresponding bits in the arguments.

So if A is 2'b11 and B is 2'b01, then &A is 1, &B is 0, and A&B is 2'b10. The first two are reduction &, the last is bitwise &.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Reduction and
Reply #4 - Apr 6th, 2009, 5:33am
 
Oops, sorry, I was completely wrong.  I should have pointed you to

4.2.10 Reduction operators
The reduction operators can not be used inside the analog block and only have meaning when used in the digital context. Information on these operators can also be found in the IEEE std 1364-2005 Verilog HDL.

-- or you can just read Ken's post.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.