unused bits in signals

T

Thomas

I have to talk to registers that are 8 bits, but some bits are totally
unsused in them;

I get tons of warning from the synthetizer, using Xilinx's tools

for example:

signal myregister : std_logic_vector(7 downto 0);

but I am only using bit 2 and 3, but I need to have it 'formatted' over 8
bits so that I can do: myregister <= my8bitdata and it ignores everything
but the bits 2 and 3?

in short I am trying to find a way to tell the tool: I care only about
these bits, don't warn me about the others, I know I'm not using them.
 
M

Mario Trams

Thomas said:
I have to talk to registers that are 8 bits, but some bits are totally
unsused in them;

I get tons of warning from the synthetizer, using Xilinx's tools

for example:

signal myregister : std_logic_vector(7 downto 0);

but I am only using bit 2 and 3, but I need to have it 'formatted' over 8
bits so that I can do: myregister <= my8bitdata and it ignores everything
but the bits 2 and 3?

Why not using

signal myregister: std_logic_vector(3 downto 2);
....
myregister <= my8bitdata(3 downto 2);

???

Regards,
Mario

--
----------------------------------------------------------------------
Digital Force / Mario Trams (e-mail address removed)-chemnitz.de
(e-mail address removed)
Chemnitz University of Technology http://www.tu-chemnitz.de/~mtr
Dept. of Computer Science Tel.: (+49) 371 531 1660
Chair of Computer Architecture Fax.: (+49) 371 531 1818
----------------------------------------------------------------------
 
M

Mario Trams

Thomas said:
I didn't realize you could do that!; for some reason, I was assuming that
things had to either start or end at 0; that's going to help, I have so
many warnings all over the place; is there a syntax to do something like
that : std_logic_vector(5 downto 4, 2 downto 1) /

I've never used it and I have never heard about it.
Check some documentation!

Regards,
Mario

--
----------------------------------------------------------------------
Digital Force / Mario Trams (e-mail address removed)-chemnitz.de
(e-mail address removed)
Chemnitz University of Technology http://www.tu-chemnitz.de/~mtr
Dept. of Computer Science Tel.: (+49) 371 531 1660
Chair of Computer Architecture Fax.: (+49) 371 531 1818
----------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top