Commit e18f593d authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

WIP, changes for final release include re-organising channel i/o for db9 rtm

parent 4b63e998
conv-common-gw @ e65f9b5f
Subproject commit 28160cad7c141a3bfa1d9b90d3a80c911364a725
Subproject commit e65f9b5fe803086ff8f02f5dbc7bd1fa87f74cd3
This diff is collapsed.
......@@ -166,7 +166,7 @@ architecture arch of conv_ttl_rs485 is
constant c_board_id : std_logic_vector(31 downto 0) := x"54343835";
-- Gateware version
constant c_gwvers : std_logic_vector(7 downto 0) := x"10";
constant c_gwvers : std_logic_vector(7 downto 0) := x"20";
--============================================================================
-- Type declarations
......@@ -188,6 +188,7 @@ architecture arch of conv_ttl_rs485 is
signal inv_pulse_out : std_logic_vector(c_nr_inv_chans-1 downto 0);
signal pulse_ttl : std_logic_vector(c_nr_chans-1 downto 0);
signal pulse_rs485 : std_logic_vector(c_nr_chans-1 downto 0);
signal pulse_rs485_mapped : std_logic_vector(c_nr_chans-1 downto 0);
signal inhibit_first_pulse : std_logic;
signal inhibit_first_pulse_d0 : std_logic;
signal inhibit_cnt : unsigned(10 downto 0);
......@@ -272,12 +273,21 @@ begin
pulse_ttl <= not ttl_n_i when sw_ttl = '1' else
ttl_n_i and (not ttlbar_nosig);
-- Pulse input on RS-485 side valid only when failsafe not high
-- see Texas slyt257 for implementation details
gen_rs485_input : for i in 0 to c_nr_chans-1 generate
rs485_fs(i) <= rs485_n_i(i) nor rs485_fs_n_i(i);
pulse_rs485(i) <= (not rs485_n_i(i)) when rs485_fs(i) = '0' else '0';
pulse_rs485_mapped(i) <= (not rs485_n_i(i)) when rs485_fs(i) = '0' else '0';
pulse_rs485(0) <= pulse_rs485_mapped(0);
pulse_rs485(1) <= pulse_rs485_mapped(4) when rtmp_i = "101" else pulse_rs485_mapped(1);
pulse_rs485(2) <= pulse_rs485_mapped(2) when rtmp_i = "101" else pulse_rs485_mapped(2);
pulse_rs485(3) <= pulse_rs485_mapped(3) when rtmp_i = "101" else pulse_rs485_mapped(3);
pulse_rs485(4) <= pulse_rs485_mapped(1) when rtmp_i = "101" else pulse_rs485_mapped(4);
pulse_rs485(5) <= pulse_rs485_mapped(5) when rtmp_i = "101" else pulse_rs485_mapped(5);
end generate gen_rs485_input;
......@@ -335,7 +345,7 @@ begin
cmp_conv_common : conv_common_gw
generic map
(
-- Number of repeater channels
g_nr_chans => c_nr_chans,
g_board_id => c_board_id,
g_gwvers => c_gwvers,
......@@ -470,13 +480,10 @@ begin
bicolor_led_line_oen_o => bicolor_led_line_oen
);
--============================================================================
-- Channel output logic
--============================================================================
-- Front and rear panel outputs
ttl_o <= pulse_out when sw_ttl = '1' else
not pulse_out;
rs485_o (1 downto 0) <= pulse_out (1 downto 0);
-- rs485_o (1 downto 0) <= pulse_out (1 downto 0);
-- Channels 3 and 4 output copies of chans 1 and 2 respectively
-- depending on RTMP Id of RTM connected.
......@@ -485,9 +492,22 @@ begin
-- in these cases channel 3 copies channel 1
-- channel 4 copies channel 2
rs485_o (3 downto 2) <= pulse_out (1 downto 0) when rtmp_i = "101" or rtmp_i = "100"
else pulse_out (3 downto 2);
rs485_o (5 downto 4) <= pulse_out (5 downto 4);
-- rs485_o (3 downto 2) <= pulse_out (1 downto 0) when rtmp_i = "101" or rtmp_i = "100"
-- else pulse_out (3 downto 2);
-- rs485_o (5 downto 4) <= pulse_out (5 downto 4);
--============================================================================
-- Channel output logic
--============================================================================
-- Front and rear panel outputs
rs485_o(0) <= pulse_out(0);
rs485_o(1) <= pulse_out(0) when rtmp_i = "101" else pulse_out(1);
rs485_o(2) <= pulse_out(2);
rs485_o(3) <= pulse_out(3);
rs485_o(4) <= pulse_out(1) when rtmp_i = "101" else pulse_out(4);
rs485_o(5) <= pulse_out(1) when rtmp_i = "101" else pulse_out(5);
-- LED outputs
-- Boards earlier than v4 do not use -ve logic for LEDs.
......
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