![]() |
|
|
|
#1 |
|
Not sure the best way to do this. Using Xilinx ISE 7.1. This is all in a
"clocked" if statement. I was intending to use a case statement where there might be some "don't care" bits in the "when" range. case expression(2 downto 0) when "0xx" perform this when "100" perform that etc How can I concatenate a number of when expressions. case expression(2 downto 0) when "000" perform this when "001" perform that when "010" perform this when "011" perform that etc Where "perform this" may be a long series of expressions. Is there a better way of doing it? Fred |
|
|
|
|
#2 |
|
Posts: n/a
|
Fred,
Use a '|' to separate case choices. For your first example: case expr(2 downto 0) is when "000" | "001" | "010" | "011" => > perform this > when "100" => > perform that In VHDL-2006 there is a _proposal_ for a case statement with a don't care, however, that will not do you any good on the short term. Cheers, Jim > I was intending to use a case statement where there might be some "don't > care" bits in the "when" range. > > case expression(2 downto 0) > when "0xx" > perform this > when "100" > perform that > etc > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ Jim Lewis Director of Training private.php?do=newpm&u= SynthWorks Design Inc. http://www.SynthWorks.com 1-503-590-4787 Expert VHDL Training for Hardware Design and Verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ Jim Lewis |
|
|
|
#3 |
|
Posts: n/a
|
"Jim Lewis" <> wrote in message news:... > Fred, > Use a '|' to separate case choices. > For your first example: > > case expr(2 downto 0) is > when "000" | "001" | "010" | "011" => > > perform this > > when "100" => > > perform that > > In VHDL-2006 there is a _proposal_ for a case statement > with a don't care, however, that will not do you any good > on the short term. > > Cheers, > Jim > > >> I was intending to use a case statement where there might be some "don't >> care" bits in the "when" range. >> >> case expression(2 downto 0) >> when "0xx" >> perform this >> when "100" >> perform that >> etc >> > Bit late I know but - many thanks. Fred |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cooler Master Gladiator 600 Case | Admin | Front Page News | 0 | 07-10-2009 10:52 AM |
| ThermalTake DH 102 Home Theater Case | Admin | Front Page News | 0 | 06-12-2009 08:22 AM |
| Lian Li Tyr PC-X500 Case Review | Admin | Front Page News | 0 | 07-11-2008 09:02 PM |
| Judge: File-swapping tools are legal | Citizen Bob | DVD Video | 140 | 11-08-2006 06:42 PM |
| Enermax Phoenix Case @ ThinkComputers.org | Silverstrand | Front Page News | 0 | 10-20-2006 12:28 PM |