The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 2:33pm
Pages: 1
Send Topic Print
How to implement multiple assignment in the case statements? (Read 2545 times)
newic
Senior Member
****
Offline



Posts: 138

How to implement multiple assignment in the case statements?
May 04th, 2011, 7:15pm
 
How to implement multiple assignments in the case statement (as like LUT)?
there is a syntax error for multiple assignments.

the 'code' range from 0-3 for a simplified version (2bit)

case(code)
0:  c1=0, c0=0;
1:  c1=0, c0=1;
2:  c1=1, c0=0;
3:  c1=1, c0=1;
default: c1=0, c0=0;
endcase
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: How to implement multiple assignment in the case statements?
Reply #1 - May 5th, 2011, 12:11am
 
Put them in a begin/end block.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
newic
Senior Member
****
Offline



Posts: 138

Re: How to implement multiple assignment in the case statements?
Reply #2 - May 5th, 2011, 6:25am
 
you're right Smiley
Back to top
 
 
View Profile   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.