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
a4a7ec2c
Commit
a4a7ec2c
authored
Feb 08, 2018
by
Evangelia Gousiou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test bench added check for comparison of front and rear output; fixed rs485_fs input
parent
03a4b568
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
62 deletions
+131
-62
testbench.vhd
sim/testbench.vhd
+99
-52
testbench_pkg.vhd
sim/testbench_pkg.vhd
+32
-10
No files found.
sim/testbench.vhd
View file @
a4a7ec2c
This diff is collapsed.
Click to expand it.
sim/testbench_pkg.vhd
View file @
a4a7ec2c
...
...
@@ -245,22 +245,44 @@ end component conv_ttl_rs485;
ns_on
:
in
time
;
ns_off
:
in
time
);
procedure
settings_config
(
constant
glitch_filter_en
:
in
std_logic
;
constant
ttl_out_bar_en
:
in
std_logic
;
signal
sw_gp_n
:
out
std_logic_vector
(
7
downto
0
);
signal
sw_other
:
out
std_logic_vector
(
31
downto
0
);
signal
pcbrev
:
out
std_logic_vector
(
5
downto
0
);
signal
rtmm
:
out
std_logic_vector
(
2
downto
0
));
end
testbench_pkg
;
package
body
testbench_pkg
is
--==================================================================================================
-- Procedures
--==================================================================================================
procedure
settings_config
(
signal
sw_gp_n_in
:
out
std_logic_vector
(
7
downto
0
);
signal
sw_other_in
:
out
std_logic_vector
(
31
downto
0
);
signal
pcbrev
:
out
std_logic_vector
(
5
downto
0
);
signal
rtmm_in
:
out
std_logic_vector
(
2
downto
0
))
is
procedure
settings_config
(
constant
glitch_filter_en
:
in
std_logic
;
constant
ttl_out_bar_en
:
in
std_logic
;
signal
sw_gp_n
:
out
std_logic_vector
(
7
downto
0
);
signal
sw_other
:
out
std_logic_vector
(
31
downto
0
);
signal
pcbrev
:
out
std_logic_vector
(
5
downto
0
);
signal
rtmm
:
out
std_logic_vector
(
2
downto
0
))
is
begin
sw_gp_n_in
(
0
)
<=
'1'
;
-- disable glitch filter ?
sw_gp_n_in
(
1
)
<=
'1'
;
--
sw_gp_n_in
(
7
downto
2
)
<=
(
others
=>
'0'
);
sw_other_in
<=
(
others
=>
'0'
);
pcbrev
<=
"111100"
;
rtmm_in
<=
(
others
=>
'0'
);
sw_gp_n
(
7
)
<=
glitch_filter_en
;
if
glitch_filter_en
=
'1'
then
print_now
(
"Glitch filter enabled"
);
else
print_now
(
"Glitch filter disabled"
);
end
if
;
sw_gp_n
(
0
)
<=
ttl_out_bar_en
;
if
ttl_out_bar_en
=
'1'
then
print_now
(
"TTL output BAR enabled"
);
else
print_now
(
"TTL output BAR disabled"
);
end
if
;
sw_gp_n
(
6
downto
1
)
<=
(
others
=>
'0'
);
-- not used
sw_other
<=
(
others
=>
'0'
);
-- not used
pcbrev
<=
"111100"
;
-- not used
rtmm
<=
(
others
=>
'0'
);
-- not used
end
procedure
;
----------------------------------------------------------------------------------------------------
...
...
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