![]() |
|
|
|
#1 |
|
If I have a bus --> xyz(31 downto 0) is there a way to assign another name
such that it references xyz(20 downto 10)? Thanks, Joel Weddick |
|
|
|
|
#2 |
|
Posts: n/a
|
Weddick wrote:
> If I have a bus --> xyz(31 downto 0) is there a way to assign another name > such that it references xyz(20 downto 10)? You could use an alias for this. The downside is that aliases are not visible in simulation. You could declare variables (or signals) for the fields. variable left_v : unsigned(10 downto 0); variable mid_v : unsigned(10 downto 0); variable left_v : unsigned( 9 downto 0); and use these to assign to the bus: bus <= left_v & mid_v & left_v; -- Mike Treseler Mike Treseler |
|
|
|
#3 |
|
Posts: n/a
|
Mike Treseler wrote:
> variable left_v : unsigned( 9 downto 0); _right_v_ > and use these to assign to the bus: > bus <= left_v & mid_v & left_v; _right_v_ Mike Treseler |
|
|
|
#4 |
|
Posts: n/a
|
Thanks Mike,
Looks like alias would do the trick if it would work in simulation also. Joel "Mike Treseler" <> wrote in message news:... > Weddick wrote: >> If I have a bus --> xyz(31 downto 0) is there a way to assign another >> name such that it references xyz(20 downto 10)? > > You could use an alias for this. > The downside is that aliases are not visible in simulation. > > You could declare variables (or signals) for the fields. > > variable left_v : unsigned(10 downto 0); > variable mid_v : unsigned(10 downto 0); > variable left_v : unsigned( 9 downto 0); > > and use these to assign to the bus: > > bus <= left_v & mid_v & left_v; > > -- Mike Treseler Weddick |
|
|
|
#5 |
|
Posts: n/a
|
Mike,
What exactly do you mean by: > You could use an alias for this. > The downside is that aliases are not visible in simulation. Since alias doesn't create new objects, tools are not able to display them in Waveforms? Thanks Srini Srinivasan Venkataramanan |
|
|
|
#6 |
|
Posts: n/a
|
Srinivasan Venkataramanan wrote:
> Since alias doesn't create new objects, tools are not able to display them > in Waveforms? Last time I tried this in modelsim, I could see the base variable but not the alias slice. Declared objects are always visible in sim. -- Mike Treseler Mike Treseler |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I am having trouble editing a signal in a sub program. | Haai | Hardware | 0 | 08-28-2007 02:58 PM |
| Need help on Modelsim VHDL syntax? ASAP:) | kaji | General Help Related Topics | 0 | 03-14-2007 10:43 PM |
| Need help on a Modelsim VHDL Syntax? ASAP:) | kaji | Software | 0 | 03-14-2007 10:43 PM |
| IMHO, Digital SECAM video is better than Analog NTSC video | Radium | DVD Video | 167 | 10-25-2006 04:16 AM |
| I LOVE FULLSCREEN | Lookingglass | DVD Video | 139 | 01-06-2004 02:13 AM |