From: Ryan <> Date: Tue, 30 Sep 2025 07:43:13 +0000 (-0500) Subject: Swap file endianness to little for simulated flash X-Git-Url: https://git.the-white-hart.net/?a=commitdiff_plain;h=b5272205450caf135c74ceeff05f9f1dc9dc9782;p=vhdl Swap file endianness to little for simulated flash --- diff --git a/libraries/simulated/dev_js28f128j3d75.vhd b/libraries/simulated/dev_js28f128j3d75.vhd index 5a0beb3..7296768 100644 --- a/libraries/simulated/dev_js28f128j3d75.vhd +++ b/libraries/simulated/dev_js28f128j3d75.vhd @@ -247,8 +247,8 @@ begin process (a, sts_ready) begin -- sts_ready is in the sensitivity list because flash_array is a variable and cannot be - array_word <= sparse_get(flash_array, to_integer(unsigned(a(a'high downto 1) & '0'))) & - sparse_get(flash_array, to_integer(unsigned(a(a'high downto 1) & '1'))) after T_OH; + array_word <= sparse_get(flash_array, to_integer(unsigned(a(a'high downto 1) & '1'))) & + sparse_get(flash_array, to_integer(unsigned(a(a'high downto 1) & '0'))) after T_OH; end process; @@ -571,8 +571,8 @@ begin if byte_n = '0' then sparse_set(flash_array, to_integer(unsigned(prog_addr)), prog_word(7 downto 0)); else - sparse_set(flash_array, to_integer(unsigned(prog_addr(prog_addr'high downto 1) & '0')), prog_word(15 downto 8)); - sparse_set(flash_array, to_integer(unsigned(prog_addr(prog_addr'high downto 1) & '1')), prog_word( 7 downto 0)); + sparse_set(flash_array, to_integer(unsigned(prog_addr(prog_addr'high downto 1) & '1')), prog_word(15 downto 8)); + sparse_set(flash_array, to_integer(unsigned(prog_addr(prog_addr'high downto 1) & '0')), prog_word( 7 downto 0)); end if; wsm_state_cur <= W_IDLE;