Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CTU CAN FD IP Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canbus
CTU CAN FD IP Core
Commits
5bbde199
Commit
5bbde199
authored
Jul 10, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '21-todo-research' into 'master'
Resolve "TODO research" Closes
#21
See merge request illeondr/CAN_FD_IP_Core!126
parents
803b17ef
5ec84007
Pipeline
#1545
failed with stages
in 44 minutes and 37 seconds
Changes
8
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
140 additions
and
372 deletions
+140
-372
src/CAN_Core/core_top.vhd
src/CAN_Core/core_top.vhd
+1
-2
src/CAN_Core/protocolControl.vhd
src/CAN_Core/protocolControl.vhd
+0
-1
test/feature/arbitration_feature_tb.vhd
test/feature/arbitration_feature_tb.vhd
+0
-3
test/lib/CANtestLib.vhd
test/lib/CANtestLib.vhd
+101
-18
test/lib/test_lib.tcl
test/lib/test_lib.tcl
+0
-335
test/reference/reference_env_setup.tcl
test/reference/reference_env_setup.tcl
+2
-9
test/sanity/sanity_test.vhd
test/sanity/sanity_test.vhd
+32
-2
test/testfw/test_sanity.py
test/testfw/test_sanity.py
+4
-2
No files found.
src/CAN_Core/core_top.vhd
View file @
5bbde199
...
@@ -902,8 +902,7 @@ begin
...
@@ -902,8 +902,7 @@ begin
sof_pulse
<=
sof_pulse_r
;
sof_pulse
<=
sof_pulse_r
;
bus_off_start
<=
bus_off_start_int
;
bus_off_start
<=
bus_off_start_int
;
-- Note TODO: signal for signalling the shifted bit Rate for interrupt
br_shifted
<=
br_shifted_int
;
br_shifted
<=
br_shifted_int
;
ssp_reset
<=
ssp_reset_int
;
ssp_reset
<=
ssp_reset_int
;
...
...
src/CAN_Core/protocolControl.vhd
View file @
5bbde199
...
@@ -2720,7 +2720,6 @@ begin
...
@@ -2720,7 +2720,6 @@ begin
PC_State
<=
overload
;
PC_State
<=
overload
;
else
else
PC_State
<=
sof
;
PC_State
<=
sof
;
-- TODO: is it really necessary to enable here?
crc_enable_r
<=
'1'
;
crc_enable_r
<=
'1'
;
end
if
;
end
if
;
FSM_preset
<=
'1'
;
FSM_preset
<=
'1'
;
...
...
test/feature/arbitration_feature_tb.vhd
View file @
5bbde199
...
@@ -345,9 +345,6 @@ package body Arbitration_feature is
...
@@ -345,9 +345,6 @@ package body Arbitration_feature is
read_alc
(
alc
,
ID_2
,
mem_bus
(
2
));
read_alc
(
alc
,
ID_2
,
mem_bus
(
2
));
end
if
;
end
if
;
-- TODO: Compare ALC value with expected value where node should
-- have lost arbitration!
------------------------------------------------------------------------
------------------------------------------------------------------------
-- If error frame is transmitted and collision not have appeared
-- If error frame is transmitted and collision not have appeared
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
test/lib/CANtestLib.vhd
View file @
5bbde199
...
@@ -495,6 +495,20 @@ package CANtestLib is
...
@@ -495,6 +495,20 @@ package CANtestLib is
constant
f100_MHZ
:
natural
:
=
10000
;
constant
f100_MHZ
:
natural
:
=
10000
;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- sanity test Stuff; must be in a package
----------------------------------------------------------------------------
----------------------------------------------------------------------------
constant
NODE_COUNT
:
natural
:
=
4
;
type
bus_matrix_type
is
array
(
1
to
NODE_COUNT
,
1
to
NODE_COUNT
)
of
real
;
type
anat_t
is
array
(
integer
range
<>
)
of
natural
;
subtype
anat_nc_t
is
anat_t
(
1
to
NODE_COUNT
);
subtype
epsilon_type
is
anat_nc_t
;
subtype
trv_del_type
is
anat_nc_t
;
subtype
timing_config_t
is
anat_t
(
1
to
10
);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
...
@@ -932,6 +946,31 @@ package CANtestLib is
...
@@ -932,6 +946,31 @@ package CANtestLib is
);
);
----------------------------------------------------------------------------
-- Print Bus timing configuration of CTU CAN FD Core.
-- (duration of bit phases, synchronisation jump width, baud-rate prescaler)
--
-- Arguments:
-- bus_timing Bus timing structure that will be printed in simulator.
-- ID Index of CTU CAN FD Core instance
-- mem_bus Avalon memory bus to execute the access on.
----------------------------------------------------------------------------
procedure
CAN_print_timing
(
constant
bus_timing
:
in
bit_time_config_type
);
----------------------------------------------------------------------------
-- Print Bus matrix from sanity test configuration.
--
-- Arguments:
-- bus_matrix Bus Matrix to be printed.
----------------------------------------------------------------------------
procedure
CAN_print_bus_matrix
(
constant
bus_matrix
:
in
bus_matrix_type
);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Turn on/off CTU_CAN_FD Core.
-- Turn on/off CTU_CAN_FD Core.
--
--
...
@@ -1565,23 +1604,6 @@ package CANtestLib is
...
@@ -1565,23 +1604,6 @@ package CANtestLib is
signal
mem_bus
:
inout
Avalon_mem_type
signal
mem_bus
:
inout
Avalon_mem_type
);
);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- sanity test Stuff; must be in a package
----------------------------------------------------------------------------
----------------------------------------------------------------------------
constant
NODE_COUNT
:
natural
:
=
4
;
type
bus_matrix_type
is
array
(
1
to
NODE_COUNT
,
1
to
NODE_COUNT
)
of
real
;
type
anat_t
is
array
(
integer
range
<>
)
of
natural
;
subtype
anat_nc_t
is
anat_t
(
1
to
NODE_COUNT
);
subtype
epsilon_type
is
anat_nc_t
;
subtype
trv_del_type
is
anat_nc_t
;
subtype
timing_config_t
is
anat_t
(
1
to
10
);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Component declarations
-- Component declarations
...
@@ -1816,7 +1838,7 @@ package body CANtestLib is
...
@@ -1816,7 +1838,7 @@ package body CANtestLib is
res_n
<=
'1'
;
res_n
<=
'1'
;
status
<=
running
;
status
<=
running
;
error_ctr
<=
0
;
error_ctr
<=
0
;
wait
for
250
ns
;
-- TODO: is it necessary?
wait
for
250
ns
;
end
procedure
;
end
procedure
;
...
@@ -2345,6 +2367,67 @@ package body CANtestLib is
...
@@ -2345,6 +2367,67 @@ package body CANtestLib is
end
procedure
;
end
procedure
;
procedure
CAN_print_timing
(
constant
bus_timing
:
in
bit_time_config_type
)
is
variable
msg
:
line
;
begin
write
(
msg
,
string
'
(
"Nominal Bit timing: "
));
-- Baud Rate Prescaler
write
(
msg
,
string
'
(
"BRP: "
&
integer
'image
(
bus_timing
.
tq_nbt
)
&
" "
));
-- Propagation segment
write
(
msg
,
string
'
(
"PROP: "
&
integer
'image
(
bus_timing
.
prop_nbt
)
&
" "
));
-- Phase 1 segment
write
(
msg
,
string
'
(
"PH1: "
&
integer
'image
(
bus_timing
.
ph1_nbt
)
&
" "
));
-- Phase 2 segment
write
(
msg
,
string
'
(
"PH2: "
&
integer
'image
(
bus_timing
.
ph2_nbt
)
&
" "
));
-- SJW
write
(
msg
,
string
'
(
"SJW: "
&
integer
'image
(
bus_timing
.
sjw_nbt
)
&
" "
));
write
(
msg
,
string
'
(
"Data Bit timing: "
));
-- Baud Rate Prescaler - FD
write
(
msg
,
string
'
(
"BRP: "
&
integer
'image
(
bus_timing
.
tq_dbt
)
&
" "
));
-- Propagation segment - FD
write
(
msg
,
string
'
(
"PROP: "
&
integer
'image
(
bus_timing
.
prop_dbt
)
&
" "
));
-- Phase 1 segment - FD
write
(
msg
,
string
'
(
"PH1: "
&
integer
'image
(
bus_timing
.
ph1_dbt
)
&
" "
));
-- Phase 2 segment - FD
write
(
msg
,
string
'
(
"PH2: "
&
integer
'image
(
bus_timing
.
ph2_dbt
)
&
" "
));
-- SJW - FD
write
(
msg
,
string
'
(
"SJW: "
&
integer
'image
(
bus_timing
.
sjw_dbt
)
&
" "
));
writeline
(
output
,
msg
);
end
procedure
;
procedure
CAN_print_bus_matrix
(
constant
bus_matrix
:
in
bus_matrix_type
)
is
variable
msg
:
line
;
begin
write
(
msg
,
string
'
(
"Bus matrix: "
));
writeline
(
output
,
msg
);
for
i
in
1
to
NODE_COUNT
loop
for
j
in
1
to
NODE_COUNT
loop
write
(
msg
,
string
'
(
real
'image
(
bus_matrix
(
i
,
j
))
&
" "
));
end
loop
;
writeline
(
output
,
msg
);
end
loop
;
end
procedure
;
procedure
CAN_turn_controller
(
procedure
CAN_turn_controller
(
constant
turn_on
:
in
boolean
;
constant
turn_on
:
in
boolean
;
constant
ID
:
in
natural
range
0
to
15
;
constant
ID
:
in
natural
range
0
to
15
;
...
...
test/lib/test_lib.tcl
View file @
5bbde199
...
@@ -118,73 +118,6 @@ proc run_simulation {} {
...
@@ -118,73 +118,6 @@ proc run_simulation {} {
run -all
run -all
}
}
################################################################################
# Obtains the test results from the simulator, by
# extracting the value of status signals into global variables TEST_RESULT
# and ERROR_COUNT
################################################################################
proc get_test_results
{}
{
global TEST_RESULT
global ERROR_COUNT
global TCOMP
set TEST_RESULT
[
exa
{
/can_test_wrapper/status
}]
set ERROR_COUNT
[
exa
{
/can_test_wrapper/errors
}]
}
################################################################################
# Obtains the test results from the simulator, by
# extracting the value of status signals into global variables
################################################################################
proc get_test_results_feature
{}
{
global TEST_RESULT
global ERROR_COUNT
global TCOMP
set TEST_RESULT
[
exa
{
/can_test_wrapper/status
}]
set ERROR_COUNT
[
exa
{
/can_test_wrapper/error_ctr
}]
}
################################################################################
# Prints help into command line
################################################################################
proc print_help
{}
{
puts
"CANTest framework has following commands available:"
puts
" help to print this help menu"
puts
" exit to exit the test framework"
puts
" test <test> to run the tests"
puts
" "
puts
"CANTest framework contains following types of tests:"
puts
" Unit tests"
puts
" Feature tests"
puts
" Sanity tests"
puts
" "
puts
"Unit tests can be used via following commands:"
puts
" test unit <test_name> To execute <test_name> unit test"
puts
" test unit all TO execute all existing unit tests"
puts
" "
puts
"Feature tests can be used via following commands:"
puts
" test feature start To start test environment of feature test"
puts
" test feature run To start feature test execution"
puts
" test feature print_config To print configuration of feature test"
puts
" "
puts
"Sanity tests can be used via following commands:"
puts
" test sanity start To start test environment of sanity test"
puts
" test sanity run To start sanity test execution"
puts
" test sanity start silent To start sanity test with only basic waveform "
puts
" This option is recomended to save harddisk space"
puts
" when running long sanity simulations (e.g more than 5 hours)"
puts
" "
puts
"Feature and sanity tests have separate configuration files (TCL) in "
puts
"their corresponding directories. See the CAN FD IP Core documentation"
puts
"to get the details about test configuration files"
puts
" "
}
################################################################################
################################################################################
# Executes first TCL script it finds in given directory.
# Executes first TCL script it finds in given directory.
...
@@ -251,274 +184,6 @@ proc exec_all_TCL_from_path {path} {
...
@@ -251,274 +184,6 @@ proc exec_all_TCL_from_path {path} {
################################################################################
################################################################################
# Feature tests routines
################################################################################
################################################################################
################################################################################
# Starts simulation of feature test environment
################################################################################
proc start_feature_FIFO
{}
{
global BASE_TEST
do
"
${BASE_TEST}
/feature/feature_env_setup.tcl"
}
################################################################################
# Runs the feature test simulation.
# Feature config script is executed and FEATURE_FIFO is loaded.
# In loop each config is executed and FEATURE_FIFO is sliced until all tests
# are executed
################################################################################
proc run_feature_FIFO
{}
{
global FEATURE_FIFO
global TCOMP
global TEST_RESULT
global ERROR_COUNT
global BASE_TEST
set feat_res
[]
#Run the config script which sets up the feature list
#
(
ORIGINAL Feature FIFO
)
do
"
${BASE_TEST}
/feature/feature_config.tcl"
#Iterate over FIFO entries
while
{
[
llength $FEATURE_FIFO
]
> 0
}
{
set actual
[
lindex $FEATURE_FIFO 0
]
set act_name
[
lindex $actual 0
]
set act_iter
[
lindex $actual 1
]
#Set the testbench stimulus
force $TCOMP/iterations $act_iter
set fmt_name
[
format
"%20s"
$act_name
]
force $TCOMP/test_name
"
${fmt_name}
"
#Run the testbench and fetch results
run_simulation
get_test_results_feature
#Erase the actual test from FIFO
set FEATURE_FIFO
[
lreplace $FEATURE_FIFO 0 0
]
#TODO: Here gather the result of the test!
lappend feat_res
[
list $act_name $act_iter $ERROR_COUNT $TEST_RESULT
]
}
puts
"Feature test run results:"
foreach actual $feat_res
{
puts $actual
}
}
proc show_feature_FIFO
{}
{
global BASE_TEST
global FEATURE_FIFO
do
"
${BASE_TEST}
/feature/feature_config.tcl"
puts $FEATURE_FIFO
}
################################################################################
################################################################################
# Sanity test routines
################################################################################
################################################################################
################################################################################
# Set the bus_matrix signal of sanity test environment
################################################################################
proc force_bm
{
a b c d e f g h i j k l m n o p
}
{
global TCOMP
force $TCOMP/bus_matrix
(
1,1
)
$a
force $TCOMP/bus_matrix
(
1,2
)
$b
force $TCOMP/bus_matrix
(
1,3
)
$c
force $TCOMP/bus_matrix
(
1,4
)
$d
force $TCOMP/bus_matrix
(
2,1
)
$e
force $TCOMP/bus_matrix
(
2,2
)
$f
force $TCOMP/bus_matrix
(
2,3
)
$g
force $TCOMP/bus_matrix
(
2,4
)
$h
force $TCOMP/bus_matrix
(
3,1
)
$i
force $TCOMP/bus_matrix
(
3,2
)
$j
force $TCOMP/bus_matrix
(
3,3
)
$k
force $TCOMP/bus_matrix
(
3,4
)
$l
force $TCOMP/bus_matrix
(
4,1
)
$m
force $TCOMP/bus_matrix
(
4,2
)
$n
force $TCOMP/bus_matrix
(
4,3
)
$o
force $TCOMP/bus_matrix
(
4,4
)
$p
}
################################################################################
# Start sanity test simulation
################################################################################
proc start_sanity
{}
{
global BASE_TEST
do
"
${BASE_TEST}
/sanity/sanity_env_setup.tcl"
}
################################################################################
# Run sanity test
# First SAN_CFG is loaded and each configuration is executed until all configs
# are exectued.
################################################################################
proc run_sanity
{}
{
global SAN_CFG
global TCOMP
global TEST_RESULT
global ERROR_COUNT
global BASE_TEST
set san_res
[]
#Run the config script which sets up the list with sanity
# configurations
do
"
${BASE_TEST}
/sanity/sanity_config.tcl"
#Iterate over the configurations
while
{
[
llength $SAN_CFG
]
> 0
}
{
set actual
[
lindex $SAN_CFG 0
]
##################################
#Aliases for configuration values
##################################
set topology
[
lindex $actual 0
]
#Bus lengths configuration
set l1
[
lindex $actual 1
]
set l2
[
lindex $actual 2
]
set l3
[
lindex $actual 3
]
set l4
[
lindex $actual 4
]
set l5
[
lindex $actual 5
]
set l6
[
lindex $actual 6
]
#Transciever delay
set del
[
list
[
lindex $actual 7
]
[
lindex $actual 8
]
\
[
lindex $actual 9
]
[
lindex $actual 10
]]
#Oscillator tollerance
set osc
[
list
[
lindex $actual 11
]
[
lindex $actual 12
]
\
[
lindex $actual 13
]
[
lindex $actual 14
]]
#Noise parameters
set nw_mean
[
lindex $actual 15
]
set nw_var
[
lindex $actual 16
]
set ng_mean
[
lindex $actual 17
]
set ng_var
[
lindex $actual 18
]
#Bit time config
set brp_nbt
[
lindex $actual 19
]
set brp_dbt
[
lindex $actual 20
]
set prop_nbt
[
lindex $actual 21
]
set ph1_nbt
[
lindex $actual 22
]
set ph2_nbt
[
lindex $actual 23
]
set sjw_nbt
[
lindex $actual 24
]
set prop_dbt
[
lindex $actual 25
]
set ph1_dbt
[
lindex $actual 26
]
set ph2_dbt
[
lindex $actual 27
]
set sjw_dbt
[
lindex $actual 28
]
#Name and iterations amount
set act_name
[
lindex $actual 29
]
set act_iter
[
lindex $actual 30
]
##################################
# Now force the values to the test
##################################
#Bus matrix based on topology
if
{
$topology ==
"bus"
}
{
force_bm 0 $l1
[
expr
"
${l1}
+
${l2}
"
]
[
expr
"
${l1}
+
${l2}
+
${l3}
"
]
\
$l1
0 $l2
[
expr
"
${l2}
+
${l3}
"
]
\
[
expr
"
${l1}
+
${l2}
"
]
$l2 0 $l3
\
[
expr
"
${l1}
+
${l2}
+
${l3}
"
]
[
expr
"
${l2}
+
${l3}
"
]
$l3
0
}
elseif
{
$topology ==
"star"
}
{
force_bm 0
[
expr
"
${l1}
+
${l2}
"
]
[
expr
"
${l1}
+
${l3}
"
]
[
expr
"
${l1}
+
${l4}
"
]
\
[
expr
"
${l1}
+
${l2}
"
]
0
[
expr
"
${l2}
+
${l3}
"
]
[
expr
"
${l2}
+
${l4}
"
]
\
[
expr
"
${l1}
+
${l3}
"
]
[
expr
"
${l2}
+
${l3}
"
]
0
[
expr
"
${l3}
+
${l4}
"
]
\
[
expr
"
${l1}
+
${l4}
"
]
[
expr
"
${l2}
+
${l4}
"
]
[
expr
"
${l3}
+
${l4}
"
]
0
}
elseif
{
$topology ==
"tree"
}
{
force_bm 0
[
expr
"
${l1}
+
${l2}
"
]
[
expr
"
${l1}
+
${l3}
+
${l5}
"
]
[
expr
"
${l1}
+
${l4}
+
${l5}
"
]
\
[
expr
"
${l1}
+
${l2}
"
]
0
[
expr
"
${l2}
+
${l3}
+
${l5}
"
]
[
expr
"
${l2}
+
${l4}
+
${l5}
"
]
\
[
expr
"
${l1}
+
${l3}
+
${l5}
"
]
[
expr
"
${l2}
+
${l3}
+
${l5}
"
]
0
[
expr
"
${l3}
+
${l4}
"
]
\
[
expr
"
${l1}
+
${l4}
+
${l5}
"
]
[
expr
"
${l2}
+
${l4}
+
${l5}
"
]
[
expr
"
${l3}
+
${l4}
"
]
0
}
elseif
{
$topology ==
"ring"
}
{
# TODO: Ring topology with fucking min functions
}
elseif
{
$topology ==
"custom"
}
{
force_bm 0 $l1 $l2 $l3
$l1
0 $l4 $l5
$l2
$l4
0 $l6
$l3
$l6
$l6
0
}
else
{
puts
"Invalid bus topology! Assuming bus topology..."
force_bm 0 $l1
[
expr
"
${l1}
+
${l2}
"
]
[
expr
"
${l1}
+
${l2}
+
${l3}
"
]
\
$l1
0 $l2
[
expr
"
${l2}
+
${l3}
"
]
\
[
expr
"
${l1}
+
${l2}
"
]
$l2 0 $l3
\
[
expr
"
${l1}
+
${l2}
+
${l3}
"
]
[
expr
"
${l2}
+
${l3}
"
]
$l3
0
}
#Set the testbench stimulus
force $TCOMP/iterations $act_iter
set fmt_name
[
format
"%-50s"
$act_name
]
force $TCOMP/i_st/test_desc
"
${fmt_name}
"
set fmt_topology
[
format
"%-50s"
$topology
]
force $TCOMP/topology
"
${fmt_topology}
"
#Transciever delays
set index 0
foreach elem $del
{
incr index
force $TCOMP/trv_del_v
(
$index
)
$elem
}
#Oscilator tolerances
set index 0
foreach elem $osc
{
incr index
force $TCOMP/epsilon_v
(
$index
)
$elem
}
#Noise parameters
force $TCOMP/nw_mean $nw_mean
force $TCOMP/nw_var $nw_var
force $TCOMP/ng_mean $ng_mean
force $TCOMP/ng_var $ng_var
#Bit time settings
force $TCOMP/timing_config.tq_nbt $brp_nbt
force $TCOMP/timing_config.tq_dbt $brp_dbt
force $TCOMP/timing_config.prop_nbt $prop_nbt
force $TCOMP/timing_config.ph1_nbt $ph1_nbt
force $TCOMP/timing_config.ph2_nbt $ph2_nbt
force $TCOMP/timing_config.sjw_nbt $sjw_nbt
force $TCOMP/timing_config.prop_dbt $prop_dbt
force $TCOMP/timing_config.ph1_dbt $ph1_dbt
force $TCOMP/timing_config.ph2_dbt $ph2_dbt
force $TCOMP/timing_config.sjw_dbt $sjw_dbt
#Run the testbench and fetch results
run_simulation
get_test_results_feature
#Erase the actual test from test config
set SAN_CFG
[
lreplace $SAN_CFG 0 0
]
#TODO: Here gather the result of the test!
lappend san_res
[
list $act_name
"Iterations:"
$act_iter
"Errors:"
$ERROR_COUNT
"Result:"
$TEST_RESULT
]
}
puts
"Sanity test run results:"
foreach actual $san_res
{
puts $actual
}
}
...
...
test/reference/reference_env_setup.tcl
View file @
5bbde199
...
@@ -44,15 +44,8 @@ global TCOMP
...
@@ -44,15 +44,8 @@ global TCOMP
################################################################################
################################################################################
#Add common waves for each test entity
#Add common waves for each test entity
#add_test_status_waves
add_test_status_waves
#add_system_waves
add_system_waves
#TODO: Will be replace by calls above. So far disabled to allow manual debug!
add wave $TCOMP/run
add wave $TCOMP/loop_ctr
add wave $TCOMP/iterations
add wave $TCOMP/errors
add wave $TCOMP/status
add wave -noupdate -divider -height 20
"System signals"
add wave -noupdate -divider -height 20
"System signals"
add wave -label
"Clock"
$TCOMP/clk_sys
add wave -label
"Clock"
$TCOMP/clk_sys
...
...
test/sanity/sanity_test.vhd
View file @
5bbde199
...
@@ -128,7 +128,6 @@ entity sanity_test is
...
@@ -128,7 +128,6 @@ entity sanity_test is
-- Amount of errors which appeared in the test
-- Amount of errors which appeared in the test
signal
errors
:
out
natural
signal
errors
:
out
natural
--TODO: Error log results
);
);
end
entity
;
end
entity
;
...
@@ -825,8 +824,39 @@ begin
...
@@ -825,8 +824,39 @@ begin
variable
step_done
:
boolean
:
=
false
;
variable
step_done
:
boolean
:
=
false
;
begin
begin
print_test_info
(
iterations
,
log_level
,
error_beh
,
error_tol
);
print_test_info
(
iterations
,
log_level
,
error_beh
,
error_tol
);
-- TODO: print sanity test params
------------------------------------------------------------------------
-- Print Test configuration
------------------------------------------------------------------------
log
(
"Sanity test configuration:"
,
info_l
,
log_level
);
log
(
"Clock jitters (ppm): "
&
integer
'image
(
epsilon_v
(
1
))
&
" "
&
integer
'image
(
epsilon_v
(
2
))
&
" "
&
integer
'image
(
epsilon_v
(
3
))
&
" "
&
integer
'image
(
epsilon_v
(
4
))
&
" "
,
info_l
,
log_level
);
log
(
"Transceiver delays (ns): "