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
8c0a8286
Commit
8c0a8286
authored
Aug 04, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed BYTE/WORD addressing mismatch
parent
32205e2e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
23 deletions
+35
-23
WbSlaveWrapper.vhd
hdl/ffpg/rtl/WbSlaveWrapper.vhd
+1
-1
Config.svh
hdl/ffpg/sim/testbench/Config.svh
+3
-3
TestbenchPackage.sv
hdl/ffpg/sim/testbench/TestbenchPackage.sv
+17
-17
Testbench.sv
hdl/svec/sim/testbench/Testbench.sv
+11
-0
sim
hdl/svec/sim/testbench/sim
+3
-2
No files found.
hdl/ffpg/rtl/WbSlaveWrapper.vhd
View file @
8c0a8286
...
...
@@ -72,7 +72,7 @@ begin
port
map
(
rst_n_i
=>
Reset_nr
,
clk_sys_i
=>
Clk_ik
,
wb_adr_i
=>
Wb_i
.
adr
(
1
3
downto
0
),
wb_adr_i
=>
Wb_i
.
adr
(
1
5
downto
2
),
-- CSR is 32-bit addressed, WB is byte addressed
wb_dat_i
=>
Wb_i
.
dat
,
wb_dat_o
=>
Wb_o
.
dat
,
wb_cyc_i
=>
Wb_i
.
cyc
,
...
...
hdl/ffpg/sim/testbench/Config.svh
View file @
8c0a8286
...
...
@@ -8,13 +8,13 @@
`define
WB_DATA_WIDTH 32
`define
WB_TAG_WIDTH 0
`define
FFPG_BASE_ADDR
('
h
2
0000
)
`define
FFPG_BASE_ADDR
('
h
1_
0000
)
// in bits
`define
STREAM_SIZE 65536
`define
STREAM_SIZE 65
_
536
`include
"ffpg_csr.svh"
`define
GET_WB_
WORD_ADDR
(
WB_BYTE_ADDR
)
(`
FFPG_BASE_ADDR
+
(
WB_BYTE_ADDR
/(`
WB_DATA_WIDTH
/
8
))
)
`define
GET_WB_
FFPG_ADDR
(
REG_ADDRESS
)
(`
FFPG_BASE_ADDR
+
REG_ADDRESS
)
`endif
//CONFIG_SVH
hdl/ffpg/sim/testbench/TestbenchPackage.sv
View file @
8c0a8286
...
...
@@ -107,8 +107,8 @@ package TestbenchPackage;
UniversalSubscriber
#(
.
T
(
Ad5600Transaction
))
TriggerDacSubscriber
;
UniversalSubscriber
#(
.
T
(
Ad5600Transaction
))
VcxoDacSubscriber
;
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)))
TriggerDacScoreboard
;
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)))
VcxoDacScoreboard
;
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)))
TriggerDacScoreboard
;
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)))
VcxoDacScoreboard
;
function
new
(
string
name
,
uvm_component
parent
)
;
super
.
new
(
name
,
parent
)
;
...
...
@@ -146,8 +146,8 @@ package TestbenchPackage;
TriggerDacSubscriber
=
UniversalSubscriber
#(
.
T
(
Ad5600Transaction
))
::
type_id
::
create
(
"TriggerDacSubscriber"
,
this
)
;
VcxoDacSubscriber
=
UniversalSubscriber
#(
.
T
(
Ad5600Transaction
))
::
type_id
::
create
(
"VcxoDacSubscriber"
,
this
)
;
TriggerDacScoreboard
=
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)))
::
type_id
::
create
(
"TriggerDacScoreboard"
,
this
)
;
VcxoDacScoreboard
=
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)))
::
type_id
::
create
(
"VcxoDacScoreboard"
,
this
)
;
TriggerDacScoreboard
=
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)))
::
type_id
::
create
(
"TriggerDacScoreboard"
,
this
)
;
VcxoDacScoreboard
=
DacScoreboard
#(
.
WbAddress
(
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)))
::
type_id
::
create
(
"VcxoDacScoreboard"
,
this
)
;
endfunction
function
void
connect_phase
(
uvm_phase
phase
)
;
...
...
@@ -224,7 +224,7 @@ package TestbenchPackage;
start_item
(
tx
)
;
assert
(
tx
.
randomize
())
;
tx
.
direction_e
=
WB_B3_DIR_READ
;
tx
.
address
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_STATUS
)
;
tx
.
address
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_STATUS
)
;
finish_item
(
tx
)
;
if
(
tx
.
response_e
==
WB_B3_RESPONSE_ACK_OK
&&
tx
.
data
[
WbStatusBit
]
==
0
)
begin
busy
=
0
;
...
...
@@ -279,10 +279,10 @@ package TestbenchPackage;
int
WbDelayAddress
;
case
(
ActiveOutput
)
CH1_SET:
WbDelayAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_CH1_DELAY_SET
)
;
CH1_RESET:
WbDelayAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_CH1_DELAY_RESET
)
;
CH2_SET:
WbDelayAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_CH2_DELAY_SET
)
;
CH2_RESET:
WbDelayAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_CH2_DELAY_RESET
)
;
CH1_SET:
WbDelayAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_CH1_DELAY_SET
)
;
CH1_RESET:
WbDelayAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_CH1_DELAY_RESET
)
;
CH2_SET:
WbDelayAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_CH2_DELAY_SET
)
;
CH2_RESET:
WbDelayAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_CH2_DELAY_RESET
)
;
endcase
repeat
(
RepeatCount
)
begin
...
...
@@ -292,7 +292,7 @@ package TestbenchPackage;
start_item
(
tx
)
;
assert
(
tx
.
randomize
())
;
tx
.
direction_e
=
WB_B3_DIR_READ
;
tx
.
address
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_STATUS
)
;
tx
.
address
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_STATUS
)
;
finish_item
(
tx
)
;
if
(
tx
.
response_e
==
WB_B3_RESPONSE_ACK_OK
&&
tx
.
data
[
`FFPG_STATUS_DELAY_CONFIGURATION_BUSY_OFFSET
]
==
0
)
begin
busy
=
0
;
...
...
@@ -358,8 +358,8 @@ package TestbenchPackage;
task
body
;
td_wb_tx
tx
;
int
SetMemBaseAddress
=
(
Channel
==
1
)
?
`GET_WB_
WORD_ADDR
(
`BASE_FFPG_CH1_SET_MEM
)
:
`GET_WB_WORD
_ADDR
(
`BASE_FFPG_CH2_SET_MEM
)
;
int
ResMemBaseAddress
=
(
Channel
==
1
)
?
`GET_WB_
WORD_ADDR
(
`BASE_FFPG_CH1_RES_MEM
)
:
`GET_WB_WORD
_ADDR
(
`BASE_FFPG_CH2_RES_MEM
)
;
int
SetMemBaseAddress
=
(
Channel
==
1
)
?
`GET_WB_
FFPG_ADDR
(
`BASE_FFPG_CH1_SET_MEM
)
:
`GET_WB_FFPG
_ADDR
(
`BASE_FFPG_CH2_SET_MEM
)
;
int
ResMemBaseAddress
=
(
Channel
==
1
)
?
`GET_WB_
FFPG_ADDR
(
`BASE_FFPG_CH1_RES_MEM
)
:
`GET_WB_FFPG
_ADDR
(
`BASE_FFPG_CH2_RES_MEM
)
;
int
OverflowInWords
=
getOverflowInWords
()
;
// configure overflow
...
...
@@ -367,7 +367,7 @@ package TestbenchPackage;
start_item
(
tx
)
;
assert
(
tx
.
randomize
())
;
tx
.
direction_e
=
WB_B3_DIR_WRITE
;
tx
.
address
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_OVERFLOW
)
;
tx
.
address
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_OVERFLOW
)
;
tx
.
data
=
Overflow
;
finish_item
(
tx
)
;
assert
(
tx
.
response_e
==
WB_B3_RESPONSE_ACK_OK
)
;
...
...
@@ -377,7 +377,7 @@ package TestbenchPackage;
start_item
(
tx
)
;
assert
(
tx
.
randomize
())
;
tx
.
direction_e
=
WB_B3_DIR_WRITE
;
tx
.
address
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_TRIGGER_LATENCY
)
;
tx
.
address
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_TRIGGER_LATENCY
)
;
tx
.
data
=
TriggerLatency
;
finish_item
(
tx
)
;
assert
(
tx
.
response_e
==
WB_B3_RESPONSE_ACK_OK
)
;
...
...
@@ -435,7 +435,7 @@ package TestbenchPackage;
start_item
(
tx
)
;
assert
(
tx
.
randomize
())
;
tx
.
direction_e
=
WB_B3_DIR_WRITE
;
tx
.
address
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_CONTROL
)
;
tx
.
address
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_CONTROL
)
;
tx
.
data
=
1
<<
Position
;
finish_item
(
tx
)
;
assert
(
tx
.
response_e
==
WB_B3_RESPONSE_ACK_OK
)
;
...
...
@@ -508,7 +508,7 @@ package TestbenchPackage;
// test trigger DAC
seq
=
SeqSetDac
::
type_id
::
create
(
"seq"
)
;
seq
.
Chip
=
Env_h
.
TriggerDacChip
;
seq
.
WbDacAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)
;
seq
.
WbDacAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_TRIGGER_THRESHOLD
)
;
seq
.
WbStatusBit
=
`FFPG_STATUS_DAC_TRIGGER_BUSY_OFFSET
;
assert
(
seq
.
randomize
())
;
seq
.
start
(
Env_h
.
WbAgent
.
seqr
)
;
...
...
@@ -516,7 +516,7 @@ package TestbenchPackage;
// test VCXO DAC
seq
=
SeqSetDac
::
type_id
::
create
(
"seq"
)
;
seq
.
Chip
=
Env_h
.
VcxoDacChip
;
seq
.
WbDacAddress
=
`GET_WB_
WORD
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)
;
seq
.
WbDacAddress
=
`GET_WB_
FFPG
_ADDR
(
`ADDR_FFPG_VCXO_VOLTAGE
)
;
seq
.
WbStatusBit
=
`FFPG_STATUS_DAC_VCXO_BUSY_OFFSET
;
assert
(
seq
.
randomize
())
;
seq
.
start
(
Env_h
.
WbAgent
.
seqr
)
;
...
...
hdl/svec/sim/testbench/Testbench.sv
View file @
8c0a8286
...
...
@@ -119,6 +119,17 @@ module Testbench;
acc
.
read
(
address
,
d
,
A32
|
SINGLE
|
D32
)
;
$
display
(
"[0x%x]: 0x%x
\n
"
,
address
,
d
[
31
:
0
])
;
address
=
'h2_0000
+
'h1_0000
+
`ADDR_FFPG_CONTROL
;
$
display
(
"Control reg. write:
\n
"
)
;
d
=
4
;
acc
.
write
(
address
,
d
,
A32
|
SINGLE
|
D32
)
;
$
display
(
"[0x%x]: 0x%x
\n
"
,
address
,
d
[
31
:
0
])
;
address
=
'h2_0000
+
'h1_0000
+
`ADDR_FFPG_STATUS
;
$
display
(
"FFPG Status reg.:
\n
"
)
;
acc
.
read
(
address
,
d
,
A32
|
SINGLE
|
D32
)
;
$
display
(
"[0x%x]: 0x%x
\n
"
,
address
,
d
[
31
:
0
])
;
// $display("Release FMC0/1 reset\n");
// acc.write('h120C, 'h3, A32|SINGLE|D32);
...
...
hdl/svec/sim/testbench/sim
View file @
8c0a8286
...
...
@@ -5,9 +5,10 @@ vsim -voptargs=+acc work.Testbench
# add wave -group Interface -r sim:/Testbench/LocalInterface/*
add wave -group DUT sim:/Testbench/cDut/cSvecTopFfpg/*
add wave -group Xbar sim:/Testbench/cDut/cSvecTopFfpg/cWbSdbCrossbar/*
add wave -group {Xbar SVEC} sim:/Testbench/cDut/cSvecTopFfpg/cWbSdbCrossbar/*
add wave -group {Xbar FFPG} sim:/Testbench/cDut/cSvecTopFfpg/cFmc0FfpgCore/cWbSdbCrossbar/*
add wave -group WbSlave sim:/Testbench/cDut/cSvecTopFfpg/cFmc0FfpgCore/cFfpgSlave/cWbSlaveWrapper/*
# add wave -group WbSlave -r sim:/Testbench/dut/cFfpgCore/cFfpgSlave/cWbSlaveWrapper/*
# add wave -group DacsController sim:/Testbench/dut/cFfpgCore/cFfpgSlave/cDacsController/*
# add wave -group DelayController -r sim:/Testbench/dut/cFfpgCore/cFfpgSlave/cDelayController/*
#
...
...
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