Commit e1bfd7b0 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Port change: led_i2c_err_o is now led_syserr_o

The sys err port also activates on PMISSE errors from any channels,
which was an omission in the previous commits, since I was working mainly
on the RS-485 repeater.

Now, the interface is clearer and easier to use. Just connect led_syserr_o
to the ERR bicolor LED on the board.
parent 3a692ef1
......@@ -134,9 +134,7 @@ entity conv_common_gw is
-- I2C LED signals -- conect to a bicolor LED of choice
-- led_i2c_o pulses four times on I2C transfer
-- led_i2c_err_o is high when either SR.I2C_ERR = '1' or SR.I2C_WDTO = '1'
led_i2c_o : out std_logic;
led_i2c_err_o : out std_logic;
-- VME interface
vme_sysreset_n_i : in std_logic;
......@@ -185,6 +183,10 @@ entity conv_common_gw is
-- Thermometer line
thermometer_b : inout std_logic;
-- System error LED, active-high on system error
-- ERR bicolor LED should light red when led_syserr_o = '1'
led_syserr_o : out std_logic;
-- Bicolor LED signals
bicolor_led_state_i : in std_logic_vector(2*g_bicolor_led_columns*g_bicolor_led_lines-1 downto 0);
bicolor_led_col_o : out std_logic_vector(g_bicolor_led_columns-1 downto 0);
......@@ -295,6 +297,7 @@ architecture arch of conv_common_gw is
signal pmisse_bit : std_logic_vector(c_max_nr_chans-1 downto 0);
signal pmisse_bit_rst : std_logic_vector(c_max_nr_chans-1 downto 0);
signal pmisse_bit_rst_ld : std_logic;
signal pmisse_bits_or : std_logic;
signal pulse_cnt : t_pulse_cnt;
signal ch_pcr : t_ch_pcr;
signal ch_pcr_ld : std_logic_vector(c_max_nr_chans-1 downto 0);
......@@ -477,9 +480,6 @@ gen_pulse_chan_logic : for i in 0 to g_nr_chans-1 generate
-- Synchronize the asynchronous trigger input into the 20 MHz clock
-- domain before passing it to the glitch filter
--
-- Reset value is '1' to avoid pulses being counted by pulse counter on
-- startup, when the board is in TTL-BAR repetition mode.
cmp_trig_sync : gc_sync_ffs
generic map
(
......@@ -494,9 +494,6 @@ gen_pulse_chan_logic : for i in 0 to g_nr_chans-1 generate
);
-- Deglitch synchronized trigger signal
--
-- Reset value is '1' to avoid pulses being counted by pulse counter on
-- startup, when the board is in TTL-BAR repetition mode.
cmp_inp_glitch_filt : gc_glitch_filt
generic map
(
......@@ -838,9 +835,6 @@ end generate gen_pulse_timetag;
end if;
end process p_i2c_err_led;
-- Set the I2C err signal for the LED
led_i2c_err_o <= i2c_err_bit or i2c_wdto_bit;
--============================================================================
-- Instantiation and connection of the main Wishbone crossbar
--============================================================================
......@@ -940,6 +934,10 @@ end generate gen_line_unused_chans;
end if;
end process p_sr_pmisse_bit;
-- Create an OR of all PMISSE bits
pmisse_bits_or <= '0' when (pmisse_bit = (pmisse_bit'range => '0')) else
'1';
--------------------------------------------------------------------------------
-- Set the rest of the PMISSE bits to zero when g_nr_chans < c_max_nr_chans
gen_pmisse_unused_chans : if (g_nr_chans < c_max_nr_chans) generate
......@@ -1196,6 +1194,9 @@ end generate gen_latest_timestamp_unused_chans;
line_oen_o => bicolor_led_line_oen_o
);
-- Set the system error signal for the ERR LED
led_syserr_o <= i2c_err_bit or i2c_wdto_bit or pmisse_bits_or;
--============================================================================
-- Drive unused outputs with safe values
--============================================================================
......
......@@ -137,7 +137,6 @@ package conv_common_gw_pkg is
-- led_i2c_o pulses four times on I2C transfer
-- led_i2c_err_o is high when either SR.I2C_ERR = '1' or SR.I2C_WDTO = '1'
led_i2c_o : out std_logic;
led_i2c_err_o : out std_logic;
-- VME interface
vme_sysreset_n_i : in std_logic;
......@@ -186,6 +185,10 @@ package conv_common_gw_pkg is
-- Thermometer line
thermometer_b : inout std_logic;
-- System error LED, active-high on system error
-- ERR bicolor LED should light red when led_syserr_o = '1'
led_syserr_o : out std_logic;
-- Bicolor LED signals
bicolor_led_state_i : in std_logic_vector(2*g_bicolor_led_columns*g_bicolor_led_lines-1 downto 0);
bicolor_led_col_o : out std_logic_vector(g_bicolor_led_columns-1 downto 0);
......
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