Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 2cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
FMC DEL 1ns 2cha
Commits
a5678863
Commit
a5678863
authored
Aug 04, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed start-up issue in HeartBeat.vhd
parent
64047f39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
HeartBeat.vhd
hdl/svec/rtl/HeartBeat.vhd
+7
-4
HeartBeat_tb.vhd
hdl/svec/rtl/HeartBeat_tb.vhd
+12
-1
No files found.
hdl/svec/rtl/HeartBeat.vhd
View file @
a5678863
...
...
@@ -128,10 +128,13 @@ begin
if
rising_edge
(
Clk_ik
)
then
if
Reset_ir
=
'1'
then
HeartBeat_o
<=
'0'
;
elsif
PwmCounter_b
=
0
then
HeartBeat_o
<=
'1'
;
elsif
PwmCounter_b
=
PwmValue_bd
then
HeartBeat_o
<=
'0'
;
else
if
PwmCounter_b
=
0
then
HeartBeat_o
<=
'1'
;
end
if
;
if
PwmCounter_b
=
PwmValue_bd
then
HeartBeat_o
<=
'0'
;
end
if
;
end
if
;
end
if
;
end
process
;
...
...
hdl/svec/rtl/HeartBeat_tb.vhd
View file @
a5678863
...
...
@@ -15,6 +15,7 @@ architecture testbench of HeartBeat_tb is
end
procedure
;
signal
Clk_ik
,
Reset_ir
,
HeartBeat_o
:
std_logic
;
signal
HeartBeatPwmValue
:
time
:
=
0
ns
;
begin
...
...
@@ -39,10 +40,20 @@ begin
Reset_ir
<=
'1'
;
f_Tick
(
5
);
Reset_ir
<=
'0'
;
f_Tick
(
1
0
e3
);
f_Tick
(
1
e6
);
assert
false
report
"NONE. End of simulation."
severity
failure
;
wait
;
end
process
pTest
;
pRC
:
process
(
HeartBeat_o
)
is
variable
LastOn
:
time
:
=
0
ns
;
begin
if
rising_edge
(
HeartBeat_o
)
then
LastOn
:
=
now
;
else
HeartBeatPwmValue
<=
now
-
LastOn
;
end
if
;
end
process
;
end
architecture
;
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