![]() |
|
|
|
#1 |
|
Hello,
I have a VHDL-beginner question: How do I compare an unsigned signal to a value, when I don´t know the width of this unsigned(the width depends on a parameter)? At the moment I do it like this: if to_integer(my_unsigned_value) = 1 then ... But I have know idea, what the synthesis makes out of this construct (I guess a comparator with 32 bits). Can anyone help? Thanks, Matthias Matthias Alles |
|
|
|
|
#2 |
|
Posts: n/a
|
Matthias Alles wrote:
> At the moment I do it like this: > > if to_integer(my_unsigned_value) = 1 then ... if my_unsigned_value = 1 then ... will also work for numeric_std. > But I have know idea, what the synthesis makes out of this construct (I > guess a comparator with 32 bits). Synthesis will use the correct width. Try it yourself and see. -- Mike Treseler Mike Treseler |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| compare database tool | mukesh09 | Software | 0 | 06-21-2009 06:50 AM |
| Compare Online DVD Rental Stores | nt | DVD Video | 3 | 11-20-2005 11:11 AM |
| Compare Online DVD Rental Stores | n.t. | DVD Video | 0 | 04-28-2005 01:50 PM |
| Compare sites | Dragon | DVD Video | 2 | 08-19-2004 03:31 AM |
| A+ 2003 Objectives prep - how does it compare to 2001 (old Transcenders) | Kael V. Dowdy | A+ Certification | 0 | 12-16-2003 05:00 AM |