Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL RS485 - Gateware
Commits
e18f593d
Commit
e18f593d
authored
Mar 06, 2018
by
Denia Bouhired-Ferrag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP, changes for final release include re-organising channel i/o for db9 rtm
parent
4b63e998
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
197 additions
and
149 deletions
+197
-149
conv-common-gw
ip_cores/conv-common-gw
+1
-1
conv_ttl_rs485.xise
syn/Release/conv_ttl_rs485.xise
+161
-133
conv_ttl_rs485.vhd
top/conv_ttl_rs485.vhd
+35
-15
No files found.
conv-common-gw
@
e65f9b5f
Subproject commit
28160cad7c141a3bfa1d9b90d3a80c911364a725
Subproject commit
e65f9b5fe803086ff8f02f5dbc7bd1fa87f74cd3
syn/Release/conv_ttl_rs485.xise
View file @
e18f593d
This diff is collapsed.
Click to expand it.
top/conv_ttl_rs485.vhd
View file @
e18f593d
...
...
@@ -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"
1
0"
;
constant
c_gwvers
:
std_logic_vector
(
7
downto
0
)
:
=
x"
2
0"
;
--============================================================================
-- 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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment