]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-dad.git/blobdiff - hw/lx_dad_top.vhd
fixed FPGA buggs, added support for single shot measurement (fpga does 2 measurements...
[fpga/lx-cpu1/lx-dad.git] / hw / lx_dad_top.vhd
index bbb80b9f0e548afb5e4897d8c557730845936c18..7db18c547634aa3c232327d24f3df22f47962c9d 100644 (file)
@@ -163,14 +163,14 @@ mytest: clockgen
                phi_1   => phi1,
                phi_2   => phi2,
                ph_rst  => phi_rst,
-               LED     => LED_1,
+               --LED   => LED_1,
                sck_o   => sck_o,
                cnv_o   => cnv_o,
                mem_o   => sens_data_s,
                addr_o  => sens_adr_s,
                bls_o   => sens_i_bls_s,
                ce_o    => sens_mem_int_ce_s,
-               addr_i  => address_f_s(1 downto 0),
+               addr_i  => address_f_s(3 downto 0),
                data_i  => data_i_s,
                ce_i    => sensor_ce_s,
                bls_i   => i_bls_s,
@@ -185,6 +185,7 @@ memory_bus_sensormem: bus_sensor
                clk_i           => clk_50m,
                ce_i            => sens_mem_ce_s,
                reset_i         => reset_s,
+               --led           => LED_1,
                bls_i           => i_bls_s,
                address_i       => address_f_s(10 downto 0),
                data_i          => data_i_s,
@@ -356,14 +357,14 @@ memory_bus_wiring:
 
                        -- Each address is seen as 32-bit entry now
                        -- 0x0000 - 0x0FFF: Example memory
-                       -- 0x1000 - 0x1003: Sensor timing
+                       -- 0x1000 - 0x100F: Sensor timing
                        -- 0x1FFC - 0x1FFF: Measurement
                        -- 0x2000 - 0x3FFF: sensor memory
                        -- 0x4000 - 0x8FFF: Free space
 
                        if address_f_s < "0001000000000000" then                  -- Tumbl
                                example_ce_s           <= '1';
-                       elsif address_f_s(15 downto 2) = "00010000000000" then   -- Sensor timing
+                       elsif address_f_s(15 downto 4) = "000100000000" then   -- Sensor timing
                                sensor_ce_s            <= '1';
                        elsif address_f_s(15 downto 2) = "00011111111111" then    -- Measurement
                                meas_ce_s              <= '1';
@@ -378,9 +379,9 @@ memory_bus_wiring:
                                data_o_s               <= example_out_s;
                        elsif address_f_s(15 downto 2) = "00011111111111" then    -- Measurement
                                data_o_s               <= meas_out_s;
-                       elsif address_f_s(15 downto 2) = "00010000000000" then   -- Sensor timing
+                       elsif address_f_s(15 downto 4) = "000100000000" then   -- Sensor timing
                                data_o_s                   <= sensor_out_s;
-                       elsif address_f_s > "0000111111111111" and address_f_s < "0100000000000000" then  -- sensor data
+                       elsif address_f_s > "0001111111111111" and address_f_s < "0100000000000000" then  -- sensor data
                                data_o_s                       <= sens_mem_out_s;
                        end if;
                end if;