Commit 18693fd1 authored by Maciej Lipinski's avatar Maciej Lipinski

periph_adc_v2: fix few minor bugs in the new AC/DC control

parent 87af1439
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
package fsi_adc_pkg is
type t_slv_8x12 is array (7 downto 0) of std_logic_vector(11 downto 0);
......@@ -58,7 +59,7 @@ package fsi_adc_pkg is
constant c_acdc_none : std_logic_vector(3 downto 0) := x"0";
constant c_acdc_ac : std_logic_vector(3 downto 0) := x"1";
constant c_acdc_dc : std_logic_vector(3 downto 0) := x"2";
constant c_acdc_pulse_width : unsigned(31 downto 0) := d"1500000";--x[10ns]=15ms
constant c_acdc_pulse_width : unsigned(31 downto 0) := x"0016E360";--x[10ns]=15ms
-- Flash update: (TODO)
-- Control CS, tx+rx x1, tx 2x4, tx 8x4, rx 2x4, rx 8x4
......
......@@ -90,7 +90,7 @@ architecture arch of fsi_control is
signal acdc_set_cmd: std_logic_vector(3 downto 0);
signal acdc_pulse_cnt : unsigned(31 downto 0);
type t_acdc_state is (ACDC_STATE_IDLE, ACDC_STATE_SET);
signal acdc_state : t_send;
signal acdc_state : t_acdc_state;
begin
-- Data for the backplane
status (11) <= trigger_i;
......@@ -416,7 +416,7 @@ begin
-- onec puse generated, set LOW the output and come back to waiting
if(acdc_pulse_cnt = d"0000000") then
if(acdc_pulse_cnt = x"00000000" ) then
acdc_state <= ACDC_STATE_IDLE;
afe_dc_o <= '0';
afe_ac_o <= '0';
......
......@@ -25,9 +25,9 @@ set_property IOSTANDARD LVCMOS33 [get_ports afe_tia_ctrl_o[2]]
set_property IOSTANDARD LVCMOS33 [get_ports afe_tia_ctrl_o[1]]
set_property PACKAGE_PIN M6 [get_ports afe_dc_o]
set_property PACKAGE_PIN N6 [get_ports afe_dc_o]
set_property IOSTANDARD LVCMOS33 [get_ports afe_dc_o]
set_property PACKAGE_PIN N6 [get_ports afe_ac_o]
set_property IOSTANDARD LVCMOS33 [get_ports afe_dc_o]
set_property IOSTANDARD LVCMOS33 [get_ports afe_ac_o]
set_property PACKAGE_PIN R12 [get_ports bp_sda_b]
set_property PACKAGE_PIN T12 [get_ports bp_scl_i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment