How to add COUNT valuegreenspun.com : LUSENET : ece342 : One Thread
COUNT holds the number of words to be transferred. How do we multiply the value in COUNT by 2 or add COUNT to itself in VHDL in order to get the number of bytes??
-- ADD (email@example.com), February 23, 1999
Just shift it left by one bit position. If you recall from Comp. Org., the LSL instruction is the same as MULT #2,
-- Julian C. Dunn (firstname.lastname@example.org), February 23, 1999.
Julian is correct, a left-shift by one bit is a multiplication by 2. However you don't even need to do this. You have 7 Count bits which correspond to ADDR(7 downto 1), so just connect them directly to those bits. (I.e Count doesn't drive ADDR(0).) Since you only do word operations, the implicit ADDR(0) is encoded in the fact that you always drive both /UDS and /LDS.
-- Robin Grindley (email@example.com), February 23, 1999.