Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VHDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Driscoll
VHDL
Commits
49d5d53a
Commit
49d5d53a
authored
8 months ago
by
Jack Driscoll
Browse files
Options
Downloads
Patches
Plain Diff
added a 12 bit input process that reads from the adc input csv test vector file
parent
d1f48939
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
MSF/MSF_decoder/tb/basic_msf_signal_tb.vhd
+19
-0
19 additions, 0 deletions
MSF/MSF_decoder/tb/basic_msf_signal_tb.vhd
with
19 additions
and
0 deletions
MSF/MSF_decoder/tb/basic_msf_signal_tb.vhd
+
19
−
0
View file @
49d5d53a
...
...
@@ -2,6 +2,7 @@ library ieee;
use
ieee
.
std_logic_1164
.
all
;
use
ieee
.
numeric_std
.
all
;
use
std
.
textio
.
all
;
use
ieee
.
std_logic_textio
.
all
;
entity
basic_msf_signal_tb
is
...
...
@@ -24,6 +25,7 @@ architecture basic_msf_signal of basic_msf_signal_tb is
signal
d_week_out
:
std_logic_vector
(
2
downto
0
)
:
=
(
others
=>
'0'
);
signal
hour_out
:
std_logic_vector
(
5
downto
0
)
:
=
(
others
=>
'0'
);
signal
minute_out
:
std_logic_vector
(
6
downto
0
)
:
=
(
others
=>
'0'
);
signal
h_filter_in_12bit
:
std_logic_vector
(
11
downto
0
)
:
=
(
others
=>
'0'
);
signal
msf_a_string
:
std_logic_vector
(
58
downto
0
)
:
=
(
others
=>
'0'
);
signal
msf_b_string
:
std_logic_vector
(
58
downto
0
)
:
=
(
others
=>
'0'
);
...
...
@@ -40,6 +42,7 @@ architecture basic_msf_signal of basic_msf_signal_tb is
--File variables--
file
f_TIME_DATA
:
text
;
file
f_12BIT_DATA
:
text
;
--Parity Check Function--
function
parity_check
(
vector
:
std_logic_vector
)
return
std_logic
is
...
...
@@ -222,6 +225,7 @@ architecture basic_msf_signal of basic_msf_signal_tb is
variable
int_conv
:
integer
;
file
f_SAMPLE_DATA
:
text
open
write_mode
is
"H:\MSF_Project\msf_sample.csv"
;
begin
wait
;
--
for
i
in
0
to
2000
loop
if
h_filter_in
=
'1'
then
int_conv
:
=
1
;
...
...
@@ -235,6 +239,21 @@ architecture basic_msf_signal of basic_msf_signal_tb is
end
process
SAMPLE_OUTPUT
;
--Send 12 bit MSF signal--
SEND_12BIT_DATA
:
process
variable
hex_val
:
std_logic_vector
(
11
downto
0
);
variable
new_line
:
line
;
begin
file_open
(
f_12BIT_DATA
,
"H:\MSF_Project\adc_msf_input.csv"
,
read_mode
);
while
not
endfile
(
f_12BIT_DATA
)
loop
wait
until
rising_edge
(
fast_clk
);
readline
(
f_12BIT_DATA
,
new_line
);
hread
(
new_line
,
hex_val
);
h_filter_in_12bit
<=
hex_val
;
end
loop
;
end
process
SEND_12BIT_DATA
;
--end;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment