![]() |
|
|
|||||||
![]() |
VHDL - with-select construct question |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi all.
Is it possible/allowed to use more than one condition in the when clause of a with-select construct? In other words, can I say something like with S select Y <= I(0) when "00" and something else is true It doesnt even have to be a with-select..it could be a when -else construct too. What would be the syntax for that part? Im new to VHDL and im using notepad so I cant test it out. Any help is appreciated. Nick./ nick.kigs@gmail.com |
|
|
|
|
#2 |
|
Posts: n/a
|
schrieb:
> Hi all. > > Is it possible/allowed to use more than one condition in the when > clause of a with-select construct? In other words, can I say something > like > > with S select > Y <= I(0) when "00" and something else is true > > It doesnt even have to be a with-select..it could be a when -else > construct too. What would be the syntax for that part? Im new to VHDL > and im using notepad so I cant test it out. Any help is appreciated. > > Nick./ > Hi Nick, Not really sure what u want to do, because you just present one line of code, but maybe this is of some use for you: Y<= I(to_integer(S)) when condition else Y_default; Otherwise why don't you use processes, where you can nest nearly everything like this: process(S, other sigs) begin case S is when "00" <= if condition then Y<= I(0); else Y<= Y_default; end if; when others <= other stuff; end case; end process; backhus |
|
|
|
#3 |
|
Posts: n/a
|
HI,
schrieb: > Is it possible/allowed to use more than one condition in the when > clause of a with-select construct? In other words, can I say something > like > > with S select > Y <= I(0) when "00" and something else is true > > It doesnt even have to be a with-select..it could be a when -else > construct too. What would be the syntax for that part? Im new to VHDL > and im using notepad so I cant test it out. Any help is appreciated. The with-select allows only one signal to select the condition. You should use Y <= I(0) when S="00" else I(1) when T='0' else I(2) when ((int_sig=3 and bool_sig=True) or (counter>100)) else I(3); bye Thomas Thomas Stanka |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Dial-up Modem Question | w_tom | A+ Certification | 0 | 09-18-2005 09:12 PM |
| "Installing two drives" question - what next? | Jim | A+ Certification | 12 | 08-07-2005 01:19 PM |
| Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good | God | DVD Video | 3 | 04-25-2005 04:19 PM |
| Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good | Filthy Mcnasty | DVD Video | 0 | 04-25-2005 04:29 AM |
| Question for any Screen Select customers | Col's Cavern | DVD Video | 0 | 09-21-2004 08:26 PM |