]> git.the-white-hart.net Git - vhdl/commitdiff
Swap file endianness to little for simulated flash
authorRyan <>
Tue, 30 Sep 2025 07:43:13 +0000 (02:43 -0500)
committerRyan <>
Tue, 30 Sep 2025 07:43:13 +0000 (02:43 -0500)
libraries/simulated/dev_js28f128j3d75.vhd

index 5a0beb3ade19e2d9acd9fd0e68990f168eb551c7..7296768720d77d6d4f3d7f63e53dcb678d890780 100644 (file)
@@ -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;