The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> How to break in a "case ...endcase" statement ?? https://designers-guide.org/forum/YaBB.pl?num=1177111617 Message started by ZaraCattle on Apr 20th, 2007, 4:26pm |
Title: How to break in a "case ...endcase" statement ?? Post by ZaraCattle on Apr 20th, 2007, 4:26pm I'm using "always" block.In this block I use "begin ...and " and 2 "case ...endcase"..I don't know how to my program only can excute one of 2 "case ...endcase" everytime I excute this block....I mean when I excute a above "case...endcase",then it still excutes a under "case...endcase"...Please help me.....Thanks everybody very much... |
Title: Re: How to break in a "case ...endcase" statement Post by Saran on Apr 25th, 2007, 8:15am Please spell out this problem more clearly...Thanks! |
Title: Re: How to break in a "case ...endcase" statement Post by Geoffrey_Coram on Apr 25th, 2007, 10:49am You probably want: Code:
I think you probably mis-understood the syntax for case/endcase. |
Title: Re: How to break in a "case ...endcase" statement Post by ZaraCattle on Apr 27th, 2007, 1:32am This is my code Code:
Thanks for your helping.... |
Title: Re: How to break in a "case ...endcase" statement Post by Geoffrey_Coram on Apr 27th, 2007, 3:52am You could do something like: Code:
|
Title: Re: How to break in a "case ...endcase" statement Post by ZaraCattle on Apr 27th, 2007, 7:47am Thanks you Geoffrey-Coram.. I thought this way to solve my problem...I only want to know another way that is easier to solve my problem...It's like "break" or "exit" in C..Thanks for your ideas.... |
Title: Re: How to break in a "case ...endcase" statement Post by Geoffrey_Coram on Apr 30th, 2007, 4:21am It's not like break in C, because there's no enclosing loop to "break" out of, and even if there were, the "break" would apply to the case statement (the innermost construct). In a very contorted way, it might be like "continue" if you considered the simulator's timestep control loop as the enclosing loop (while time < end_time) or "return" if you considered the module execution as some sort of function. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |