Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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 4cha
Commits
0e98042e
Commit
0e98042e
authored
Feb 21, 2013
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hdl/include/random_pulse_gen.svh: burst generation
parent
043329c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
random_pulse_gen.svh
hdl/include/random_pulse_gen.svh
+17
-5
No files found.
hdl/include/random_pulse_gen.svh
View file @
0e98042e
...
...
@@ -8,21 +8,33 @@ module random_pulse_gen
parameter
real
g_pulse_width
=
30
ns
;
parameter
real
g_min_spacing
=
300
ns
;
parameter
real
g_max_spacing
=
600
ns
;
parameter
int
g_repetition
=
1
;
parameter
real
g_burst_spacing
=
50
ns
;
int
seed
=
1
;
initial
forever
if
(
enable_i
)
begin
int
i
;
real
delta
;
seed
=
$
urandom
(
seed
)
;
delta
=
$
dist_uniform
(
seed
,
g_min_spacing
-
g_pulse_width
,
g_max_spacing
-
g_pulse_width
)
;
pulse_o
=
1
;
#(
g_pulse_width
)
;
pulse_o
=
0
;
#(
delta
)
;
for
(
i
=
0
;
i
<
g_repetition
;
i
++
)
begin
pulse_o
=
1
;
#(
g_pulse_width
)
;
pulse_o
=
0
;
if
(
g_repetition
>
1
)
#(
g_burst_spacing
)
;
end
#(
delta
)
;
end
else
begin
pulse_o
<=
1'b0
;
@
(
posedge
enable_i
)
;
...
...
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