Skip to content

Commit

Permalink
Fix big-endian unaligned loads
Browse files Browse the repository at this point in the history
  • Loading branch information
atgreen committed Apr 11, 2013
1 parent 4422087 commit c083cbb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cores/MoxieLite/moxielite.vhd
Expand Up @@ -784,8 +784,10 @@ BEGIN

if data_byte_count="001" then

-- Aligned only byte
data_reg(7 downto 0) <= din(7 downto 0);
-- Aligned only
-- byte
-- BIG ENDIAN
data_reg(7 downto 0) <= din(15 downto 8);

else

Expand All @@ -796,7 +798,9 @@ BEGIN
else

-- Unaligned first or only byte
data_reg(7 downto 0) <= din(15 downto 8);
-- AG FIX data_reg(7 downto 0) <= din(15 downto 8);
-- BIG ENDIAN ONLY
data_reg(7 downto 0) <= din(7 downto 0);

end if;

Expand Down

0 comments on commit c083cbb

Please sign in to comment.