wtr
Full Member level 5
- Joined
- May 1, 2014
- Messages
- 299
- Helped
- 29
- Reputation
- 58
- Reaction score
- 25
- Trophy points
- 1,308
- Activity points
- 4,108
Hello all,
I'm a bit of a purest & want symetry in my coding. Please tell me if there is a better way to do the decomposing of a signal
Regards,
Wes
I'm a bit of a purest & want symetry in my coding. Please tell me if there is a better way to do the decomposing of a signal
Code:
-- Recompose whole using parts
cid_reg <= (127 DOWNTO 120 => mid, -- Manufacturers
119 DOWNTO 114 => cid_r1, -- Reserved
113 DOWNTO 112 => cbx, -- Device/BGA
111 DOWNTO 104 => oid, -- OEM/Application ID
103 DOWNTO 56 => pnm, -- Product Name
55 DOWNTO 48 => prv, -- Product Revision
47 DOWNTO 16 => psn, -- Product Serial
15 DOWNTO 8 => mdt, -- Manufacturing date
7 DOWNTO 1 => crc, -- CRC7 Checksum
0 => cid_always -- always 1
)
-- Decompose whole to create parts
mid <= cid_reg(127 DOWNTO 120);
cid_r1 <= cid_reg(119 DOWNTO 114);
...
...
--There has got to be a better way
...
Regards,
Wes