BlackOps
Full Member level 5

- Joined
- Jan 1, 2005
- Messages
- 279
- Helped
- 14
- Reputation
- 28
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- AZERBAIJAN
- Activity points
- 2,496
Hello,
For example i want to declare a Red signal.. which is one of the RGB signals. Red signal will have 8 bits.. inside the code, i will assign different bits of this Red signal to the different signals... how is it better to declare the Red?
like this:
Red: IN STD_LOGIC_VECTOR (7 DOWNTO 0);
do i refer to different bits of this Red signal like.. Red(0) or Red[0] ???
or this:
TYPE Red IS ARRAY (7 DOWNTO 0) OF BIT;
do i refer to different bits of this Red signal like.. Red(0) or Red[0] ???
For example i want to declare a Red signal.. which is one of the RGB signals. Red signal will have 8 bits.. inside the code, i will assign different bits of this Red signal to the different signals... how is it better to declare the Red?
like this:
Red: IN STD_LOGIC_VECTOR (7 DOWNTO 0);
do i refer to different bits of this Red signal like.. Red(0) or Red[0] ???
or this:
TYPE Red IS ARRAY (7 DOWNTO 0) OF BIT;
do i refer to different bits of this Red signal like.. Red(0) or Red[0] ???