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
47c50607
Commit
47c50607
authored
Aug 05, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make channel random in pulse generation tests
parent
587ad118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
FfpgFmcPackage.sv
hdl/ffpg/sim/testbench/FfpgFmcPackage.sv
+5
-1
TestbenchPackage.sv
hdl/ffpg/sim/testbench/TestbenchPackage.sv
+5
-9
No files found.
hdl/ffpg/sim/testbench/FfpgFmcPackage.sv
View file @
47c50607
...
...
@@ -48,11 +48,15 @@ package FfpgFmcPackage;
class
FfpgFmcPulseTransaction
extends
uvm_sequence_item
;
`uvm_object_utils
(
FfpgFmcPulseTransaction
)
int
Channel
;
int
BunchCount
;
rand
int
Channel
;
rand
int
StartBunch
;
rand
int
StopBunch
;
constraint
ChannelConstraint
{
Channel
inside
{
[
1
:
2
]
};
}
constraint
StartBunchConstrain
{
StartBunch
>=
0
;
StartBunch
<
BunchCount
;
...
...
hdl/ffpg/sim/testbench/TestbenchPackage.sv
View file @
47c50607
...
...
@@ -565,13 +565,8 @@ package TestbenchPackage;
uvm_analysis_port
#(
FfpgFmcPulseTransaction
)
GenerationPort
;
int
TriggerLatency
;
int
TriggerPeriodicity
;
rand
int
Channel
;
rand
int
RepeatCount
;
constraint
ChannelConstraint
{
Channel
inside
{
[
1
:
2
]
};
}
constraint
CountConstraint
{
RepeatCount
inside
{
[
1
:
20
]
};
}
...
...
@@ -581,7 +576,7 @@ package TestbenchPackage;
endfunction
function
string
convert2string
;
return
$
sformatf
(
"Generating %0d pulses
on channel %0d."
,
this
.
RepeatCount
,
this
.
Channel
)
;
return
$
sformatf
(
"Generating %0d pulses
."
,
this
.
RepeatCount
)
;
endfunction
task
body
;
...
...
@@ -589,15 +584,16 @@ package TestbenchPackage;
SeqSetChannel
SeqSet
;
SeqStartChannel
SeqStart
;
SeqGenerateBeamSignals
SeqGenerate
;
int
Channel
;
int
OverflowInWords
;
int
SetDataOffset
,
ResDataOffset
;
int
SetDataMask
,
ResDataMask
;
repeat
(
RepeatCount
)
begin
PulseTx
=
FfpgFmcPulseTransaction
::
type_id
::
create
(
"PulseTx"
)
;
PulseTx
.
Channel
=
this
.
Channel
;
PulseTx
.
BunchCount
=
this
.
TriggerPeriodicity
;
assert
(
PulseTx
.
randomize
())
;
Channel
=
PulseTx
.
Channel
;
GenerationPort
.
write
(
PulseTx
)
;
// configure channel
...
...
@@ -605,7 +601,7 @@ package TestbenchPackage;
SeqSet
.
TriggerLatency
=
this
.
TriggerLatency
;
SeqSet
.
TriggerPeriodicity
=
this
.
TriggerPeriodicity
;
assert
(
SeqSet
.
randomize
()
with
{
Overflow
==
TriggerPeriodicity
;}
)
;
SeqSet
.
Channel
=
this
.
Channel
;
SeqSet
.
Channel
=
Channel
;
OverflowInWords
=
SeqSet
.
getOverflowInWords
()
;
// clear Set and Res data
for
(
int
i
=
0
;
i
<
OverflowInWords
;
i
++
)
begin
...
...
@@ -624,7 +620,7 @@ package TestbenchPackage;
// start channel
SeqStart
=
SeqStartChannel
::
type_id
::
create
(
"SeqStart"
)
;
assert
(
SeqStart
.
randomize
())
;
SeqStart
.
Channel
=
this
.
Channel
;
SeqStart
.
Channel
=
Channel
;
SeqStart
.
start
(
WbSequencer
,
this
)
;
// generate FMC input signals
...
...
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