Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
46316a01
Commit
46316a01
authored
9 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
SVN copied tb_common_pulser.vhd to RadioHDL.
parent
4ad339fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/common/hdllib.cfg
+1
-1
1 addition, 1 deletion
libraries/base/common/hdllib.cfg
libraries/base/common/tb/vhdl/tb_common_pulser.vhd
+121
-0
121 additions, 0 deletions
libraries/base/common/tb/vhdl/tb_common_pulser.vhd
with
122 additions
and
1 deletion
libraries/base/common/hdllib.cfg
+
1
−
1
View file @
46316a01
...
@@ -191,7 +191,7 @@ test_bench_files =
...
@@ -191,7 +191,7 @@ test_bench_files =
$UNB/Firmware/modules/common/tb/vhdl/tb_common_paged_ram_crw_crw.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_paged_ram_crw_crw.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_paged_ram_ww_rr.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_paged_ram_ww_rr.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_pulse_extend.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_pulse_extend.vhd
$UNB/Firmware/modules/common/
tb/vhdl/tb_common_pulser.vhd
tb/vhdl/tb_common_pulser.vhd
tb/vhdl/tb_common_pulser_us_ms_s.vhd
tb/vhdl/tb_common_pulser_us_ms_s.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_reg_cross_domain.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_reg_cross_domain.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_reinterleave.vhd
$UNB/Firmware/modules/common/tb/vhdl/tb_common_reinterleave.vhd
...
...
This diff is collapsed.
Click to expand it.
libraries/base/common/tb/vhdl/tb_common_pulser.vhd
0 → 100644
+
121
−
0
View file @
46316a01
-------------------------------------------------------------------------------
--
-- Copyright (C) 2010
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-------------------------------------------------------------------------------
LIBRARY
IEEE
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
IEEE
.
numeric_std
.
ALL
;
USE
work
.
common_pkg
.
ALL
;
ENTITY
tb_common_pulser
IS
END
tb_common_pulser
;
ARCHITECTURE
tb
OF
tb_common_pulser
IS
CONSTANT
clk_period
:
TIME
:
=
40
ns
;
CONSTANT
c_reset_len
:
NATURAL
:
=
3
;
CONSTANT
c_pulse_us
:
NATURAL
:
=
25
;
CONSTANT
c_pulse_ms
:
NATURAL
:
=
1000
;
SIGNAL
rst
:
STD_LOGIC
;
SIGNAL
clk
:
STD_LOGIC
:
=
'0'
;
SIGNAL
pulse_us
:
STD_LOGIC
;
SIGNAL
pulse_ms_via_clk_en
:
STD_LOGIC
;
SIGNAL
pulse_ms_via_pulse_en
:
STD_LOGIC
;
SIGNAL
pulse_ms_clr
:
STD_LOGIC
;
BEGIN
-- as 3
-- run 7 ms
clk
<=
NOT
clk
AFTER
clk_period
/
2
;
p_pulse_clr
:
PROCESS
BEGIN
pulse_ms_clr
<=
'0'
;
FOR
I
IN
0
TO
1500
LOOP
WAIT
UNTIL
pulse_us
=
'1'
;
WAIT
UNTIL
rising_edge
(
clk
);
END
LOOP
;
WAIT
UNTIL
pulse_us
=
'1'
;
pulse_ms_clr
<=
'1'
;
WAIT
UNTIL
rising_edge
(
clk
);
pulse_ms_clr
<=
'0'
;
WAIT
;
END
PROCESS
;
u_reset
:
ENTITY
work
.
common_areset
GENERIC
MAP
(
g_rst_level
=>
'1'
,
-- power up default will be inferred in FPGA
g_delay_len
=>
c_reset_len
)
PORT
MAP
(
in_rst
=>
'0'
,
-- release reset after some clock cycles
clk
=>
clk
,
out_rst
=>
rst
);
u_pulse_us
:
ENTITY
work
.
common_pulser
GENERIC
MAP
(
g_pulse_period
=>
c_pulse_us
)
PORT
MAP
(
rst
=>
rst
,
clk
=>
clk
,
clken
=>
'1'
,
pulse_en
=>
'1'
,
pulse_clr
=>
'0'
,
pulse_out
=>
pulse_us
);
u_pulse_ms_via_clk_en
:
ENTITY
work
.
common_pulser
GENERIC
MAP
(
g_pulse_period
=>
c_pulse_ms
)
PORT
MAP
(
rst
=>
rst
,
clk
=>
clk
,
clken
=>
pulse_us
,
pulse_en
=>
'1'
,
pulse_clr
=>
pulse_ms_clr
,
pulse_out
=>
pulse_ms_via_clk_en
);
u_pulse_ms_via_pulse_en
:
ENTITY
work
.
common_pulser
GENERIC
MAP
(
g_pulse_period
=>
c_pulse_ms
)
PORT
MAP
(
rst
=>
rst
,
clk
=>
clk
,
clken
=>
'1'
,
pulse_en
=>
pulse_us
,
pulse_clr
=>
pulse_ms_clr
,
pulse_out
=>
pulse_ms_via_pulse_en
);
END
tb
;
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