Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Platform-independent core collection
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Platform-independent core collection
Commits
8b41c66b
Commit
8b41c66b
authored
13 years ago
by
Tomasz Wlostowski
Committed by
Tomasz Wlostowski
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gc_extend_pulse: bugfix output pulse should begin in the same cycle as the input pulse
parent
79ebbbd4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/common/gc_extend_pulse.vhd
+8
-6
8 additions, 6 deletions
modules/common/gc_extend_pulse.vhd
with
8 additions
and
6 deletions
modules/common/gc_extend_pulse.vhd
+
8
−
6
View file @
8b41c66b
...
...
@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN
-- Created : 2009-09-01
-- Last update: 2011-0
4-29
-- Last update: 2011-0
7-18
-- Platform : FPGA-generic
-- Standard : VHDL '93
-------------------------------------------------------------------------------
...
...
@@ -65,26 +65,28 @@ end gc_extend_pulse;
architecture
rtl
of
gc_extend_pulse
is
signal
cntr
:
unsigned
(
31
downto
0
);
signal
extended_int
:
std_logic
;
begin
-- rtl
extend
:
process
(
clk_i
,
rst_n_i
)
begin
-- process extend
if
rst_n_i
=
'0'
then
-- asynchronous reset (active low)
extended_
o
<=
'0'
;
extended_
int
<=
'0'
;
cntr
<=
(
others
=>
'0'
);
elsif
clk_i
'event
and
clk_i
=
'1'
then
-- rising clock edge
if
(
pulse_i
=
'1'
)
then
extended_
o
<=
'1'
;
cntr
<=
to_unsigned
(
g_width
,
cntr
'length
);
extended_
int
<=
'1'
;
cntr
<=
to_unsigned
(
g_width
-
2
,
cntr
'length
);
elsif
cntr
/=
to_unsigned
(
0
,
cntr
'length
)
then
cntr
<=
cntr
-
1
;
else
extended_
o
<=
'0'
;
extended_
int
<=
'0'
;
end
if
;
end
if
;
end
process
extend
;
extended_o
<=
pulse_i
or
extended_int
;
end
rtl
;
This diff is collapsed.
Click to expand it.
Preview
0%
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