Skip to content
GitLab
Explore
Sign in
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
747d40e3
Commit
747d40e3
authored
10 years ago
by
Pepping
Browse files
Options
Downloads
Patches
Plain Diff
- Made chenged to fit in RadioHDL
parent
1d40edf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/unb1_fn_bf/tb/vhdl/tb_unb1_fn_bf.vhd
+12
-49
12 additions, 49 deletions
applications/unb1_fn_bf/tb/vhdl/tb_unb1_fn_bf.vhd
with
12 additions
and
49 deletions
applications/unb1_fn_bf/tb/vhdl/tb_unb1_fn_bf.vhd
+
12
−
49
View file @
747d40e3
...
@@ -25,15 +25,16 @@
...
@@ -25,15 +25,16 @@
-- that are used on hardware.
-- that are used on hardware.
LIBRARY
IEEE
,
common_lib
,
unb
_common
_lib
,
i2c_lib
,
bf_lib
;
LIBRARY
IEEE
,
common_lib
,
unb
1_board
_lib
,
i2c_lib
,
bf_lib
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
IEEE
.
numeric_std
.
ALL
;
USE
IEEE
.
numeric_std
.
ALL
;
USE
common_lib
.
common_pkg
.
ALL
;
USE
common_lib
.
common_pkg
.
ALL
;
USE
unb_common_lib
.
unb_common_pkg
.
ALL
;
USE
common_lib
.
tb_common_pkg
.
ALL
;
USE
common_lib
.
tb_common_pkg
.
ALL
;
USE
unb1_board_lib
.
unb1_board_pkg
.
ALL
;
USE
unb1_board_lib
.
unb1_board_peripherals_pkg
.
ALL
;
USE
bf_lib
.
bf_pkg
.
ALL
;
USE
bf_lib
.
bf_pkg
.
ALL
;
ENTITY
tb_fn_bf
IS
ENTITY
tb_
unb1_
fn_bf
IS
GENERIC
(
GENERIC
(
-- TYPE t_c_bf IS RECORD
-- TYPE t_c_bf IS RECORD
-- nof_signal_paths : POSITIVE; -- = 64
-- nof_signal_paths : POSITIVE; -- = 64
...
@@ -52,18 +53,18 @@ GENERIC(
...
@@ -52,18 +53,18 @@ GENERIC(
-- END RECORD;
-- END RECORD;
g_bf
:
t_c_bf
:
=
(
64
,
16
,
24
,
256
,
4
,
16
,
16
,
1
,
16
,
-5
,
8
,
56
,
2
)
g_bf
:
t_c_bf
:
=
(
64
,
16
,
24
,
256
,
4
,
16
,
16
,
1
,
16
,
-5
,
8
,
56
,
2
)
);
);
END
tb_fn_bf
;
END
tb_
unb1_
fn_bf
;
ARCHITECTURE
tb
OF
tb_fn_bf
IS
ARCHITECTURE
tb
OF
tb_
unb1_
fn_bf
IS
CONSTANT
c_sim
:
BOOLEAN
:
=
TRUE
;
CONSTANT
c_sim
:
BOOLEAN
:
=
TRUE
;
CONSTANT
c_unb_nr
:
NATURAL
:
=
0
;
-- UniBoard 0
CONSTANT
c_unb_nr
:
NATURAL
:
=
0
;
-- UniBoard 0
CONSTANT
c_node_nr
:
NATURAL
:
=
3
;
-- Front node 3
CONSTANT
c_node_nr
:
NATURAL
:
=
3
;
-- Front node 3
CONSTANT
c_id
:
STD_LOGIC_VECTOR
(
7
DOWNTO
0
)
:
=
TO_UVEC
(
c_unb_nr
,
c_unb_nof_uniboard_w
)
&
TO_UVEC
(
c_node_nr
,
c_unb_nof_chip_w
);
CONSTANT
c_id
:
STD_LOGIC_VECTOR
(
7
DOWNTO
0
)
:
=
TO_UVEC
(
c_unb_nr
,
c_unb
1_board
_nof_uniboard_w
)
&
TO_UVEC
(
c_node_nr
,
c_unb
1_board
_nof_chip_w
);
CONSTANT
c_version
:
STD_LOGIC_VECTOR
(
1
DOWNTO
0
)
:
=
"00"
;
CONSTANT
c_version
:
STD_LOGIC_VECTOR
(
1
DOWNTO
0
)
:
=
"00"
;
CONSTANT
c_fw_version
:
t_unb_fw_version
:
=
(
1
,
0
);
CONSTANT
c_fw_version
:
t_unb
1_board
_fw_version
:
=
(
1
,
0
);
CONSTANT
c_cable_delay
:
TIME
:
=
12
ns
;
CONSTANT
c_cable_delay
:
TIME
:
=
12
ns
;
CONSTANT
c_eth_clk_period
:
TIME
:
=
40
ns
;
-- 25 MHz XO on UniBoard
CONSTANT
c_eth_clk_period
:
TIME
:
=
40
ns
;
-- 25 MHz XO on UniBoard
...
@@ -83,9 +84,9 @@ ARCHITECTURE tb OF tb_fn_bf IS
...
@@ -83,9 +84,9 @@ ARCHITECTURE tb OF tb_fn_bf IS
SIGNAL
eth_txp
:
STD_LOGIC
;
SIGNAL
eth_txp
:
STD_LOGIC
;
SIGNAL
eth_rxp
:
STD_LOGIC
;
SIGNAL
eth_rxp
:
STD_LOGIC
;
SIGNAL
VERSION
:
STD_LOGIC_VECTOR
(
c_unb_aux
.
version_w
-1
DOWNTO
0
)
:
=
c_version
;
SIGNAL
VERSION
:
STD_LOGIC_VECTOR
(
c_unb
1_board
_aux
.
version_w
-1
DOWNTO
0
)
:
=
c_version
;
SIGNAL
ID
:
STD_LOGIC_VECTOR
(
c_unb_aux
.
id_w
-1
DOWNTO
0
)
:
=
c_id
;
SIGNAL
ID
:
STD_LOGIC_VECTOR
(
c_unb
1_board
_aux
.
id_w
-1
DOWNTO
0
)
:
=
c_id
;
SIGNAL
TESTIO
:
STD_LOGIC_VECTOR
(
c_unb_aux
.
testio_w
-1
DOWNTO
0
);
SIGNAL
TESTIO
:
STD_LOGIC_VECTOR
(
c_unb
1_board
_aux
.
testio_w
-1
DOWNTO
0
);
SIGNAL
sens_scl
:
STD_LOGIC
;
SIGNAL
sens_scl
:
STD_LOGIC
;
SIGNAL
sens_sda
:
STD_LOGIC
;
SIGNAL
sens_sda
:
STD_LOGIC
;
...
@@ -129,7 +130,7 @@ BEGIN
...
@@ -129,7 +130,7 @@ BEGIN
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- DUT
-- DUT
------------------------------------------------------------------------------
------------------------------------------------------------------------------
u_dut
:
ENTITY
work
.
fn_bf
u_dut
:
ENTITY
work
.
unb1_
fn_bf
GENERIC
MAP
(
GENERIC
MAP
(
g_sim
=>
c_sim
,
g_sim
=>
c_sim
,
g_sim_unb_nr
=>
c_unb_nr
,
g_sim_unb_nr
=>
c_unb_nr
,
...
@@ -157,43 +158,5 @@ BEGIN
...
@@ -157,43 +158,5 @@ BEGIN
ETH_SGIN
=>
eth_rxp
,
ETH_SGIN
=>
eth_rxp
,
ETH_SGOUT
=>
eth_txp
ETH_SGOUT
=>
eth_txp
);
);
------------------------------------------------------------------------------
-- UniBoard sensors
------------------------------------------------------------------------------
-- I2C slaves that are available for each FPGA
u_fpga_temp
:
ENTITY
i2c_lib
.
dev_max1618
GENERIC
MAP
(
g_address
=>
c_fpga_temp_address
)
PORT
MAP
(
scl
=>
sens_scl
,
sda
=>
sens_sda
,
temp
=>
c_fpga_temp
);
-- I2C slaves that are available only via FPGA back node 3
u_eth_temp
:
ENTITY
i2c_lib
.
dev_max1618
GENERIC
MAP
(
g_address
=>
c_eth_temp_address
)
PORT
MAP
(
scl
=>
sens_scl
,
sda
=>
sens_sda
,
temp
=>
c_eth_temp
);
u_power
:
ENTITY
i2c_lib
.
dev_ltc4260
GENERIC
MAP
(
g_address
=>
c_hot_swap_address
,
g_R_sense
=>
c_hot_swap_R_sense
)
PORT
MAP
(
scl
=>
sens_scl
,
sda
=>
sens_sda
,
ana_current_sense
=>
c_uniboard_current
,
ana_volt_source
=>
c_uniboard_supply
,
ana_volt_adin
=>
c_uniboard_adin
);
END
tb
;
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