Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vecs
FIJI Public
Commits
03d7eb98
Commit
03d7eb98
authored
Apr 11, 2017
by
Stefan Tauner
Browse files
Warn about a FIU count of 0 at settings load time
Also, do not repeat warnings as errors in GUIs and during instrumentation.
parent
0b1c29e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
bin/FIJI/Settings.pm
View file @
03d7eb98
...
@@ -305,7 +305,7 @@ sub read_settingsfile ($$$) {
...
@@ -305,7 +305,7 @@ sub read_settingsfile ($$$) {
if
(
defined
$dup
->
{
$fiu_ref
->
{'
FIU_NET_NAME
'}})
{
if
(
defined
$dup
->
{
$fiu_ref
->
{'
FIU_NET_NAME
'}})
{
my
$msg
=
"
More than one FIU attached to
"
.
$fiu_ref
->
{'
FIU_NET_NAME
'};
my
$msg
=
"
More than one FIU attached to
"
.
$fiu_ref
->
{'
FIU_NET_NAME
'};
$logger
->
error
(
$msg
);
$logger
->
warn
(
$msg
);
$warn
.=
$msg
;
$warn
.=
$msg
;
}
else
{
}
else
{
$dup
->
{
$fiu_ref
->
{'
FIU_NET_NAME
'}}
=
1
;
$dup
->
{
$fiu_ref
->
{'
FIU_NET_NAME
'}}
=
1
;
...
@@ -317,7 +317,9 @@ sub read_settingsfile ($$$) {
...
@@ -317,7 +317,9 @@ sub read_settingsfile ($$$) {
}
}
if
(
$fiu_num
==
0
)
{
if
(
$fiu_num
==
0
)
{
$logger
->
debug
("
Could not fetch any FIU blocks from config file
\"
$fiji_ini_file
\"
");
my
$msg
=
"
No FIU blocks in config file
\"
$fiji_ini_file
\"
. Synthesis would fail.
";
$logger
->
warn
(
$msg
);
$warn
.=
$msg
;
}
}
# FIU_NUM is optional in the Settings file... if it was set check that
# FIU_NUM is optional in the Settings file... if it was set check that
...
@@ -633,7 +635,6 @@ sub _validate_hashmap {
...
@@ -633,7 +635,6 @@ sub _validate_hashmap {
# The function deals with sanity checks for the values
# The function deals with sanity checks for the values
# themselves. It checks for the following conditions:
# themselves. It checks for the following conditions:
#
#
# - FIU_NUM: > 0
# - FIU_CFG_BITS: > 0
# - FIU_CFG_BITS: > 0
# - TIMER_WIDTH: > 0, <= 16
# - TIMER_WIDTH: > 0, <= 16
# - ID: > 0, < 2^15-1
# - ID: > 0, < 2^15-1
...
@@ -667,7 +668,7 @@ sub _sanitize_design {
...
@@ -667,7 +668,7 @@ sub _sanitize_design {
return
sprintf
("
ID is invalid (0x%04X).
",
$consts_ref
->
{
ID
});
return
sprintf
("
ID is invalid (0x%04X).
",
$consts_ref
->
{
ID
});
}
}
if
((
$consts_ref
->
{'
BAUDRATE
'}
<=
0
))
{
if
((
$consts_ref
->
{'
BAUDRATE
'}
<=
0
))
{
return
"
BAUDRATE
missing
is <= 0.
";
return
"
BAUDRATE is <= 0.
";
}
}
return
$consts_ref
;
return
$consts_ref
;
...
...
bin/fiji_ee_gui.pl
View file @
03d7eb98
...
@@ -267,9 +267,8 @@ sub main {
...
@@ -267,9 +267,8 @@ sub main {
my
$filename
=
$settings_filename
;
my
$filename
=
$settings_filename
;
my
(
$tmp_settings
,
$warn
)
=
FIJI::
Settings
->
new
('
download
',
$filename
);
my
(
$tmp_settings
,
$warn
)
=
FIJI::
Settings
->
new
('
download
',
$filename
);
if
(
defined
(
$warn
))
{
if
(
defined
(
$warn
))
{
my
$msg
=
"
Settings file
$filename
could not be loaded correctly.
";
my
$msg
=
"
Settings file
$filename
could not be loaded correctly.
\n
$warn
";
$msg
.=
"
\n
$warn
"
if
(
defined
(
$warn
));
$logger
->
error
(
$msg
)
if
!
$tmp_settings
;
$logger
->
error
(
$msg
);
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
image
=>
(
!
defined
(
$tmp_settings
)
?
Tk::FIJIUtils::
error_image
(
$self
->
{'
mw
'})
:
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'})),
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
image
=>
(
!
defined
(
$tmp_settings
)
?
Tk::FIJIUtils::
error_image
(
$self
->
{'
mw
'})
:
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'})),
-
wraplength
=>
"
200
",
-
wraplength
=>
"
200
",
-
text
=>
$msg
,
-
text
=>
$msg
,
...
...
bin/fiji_instrument.pl
View file @
03d7eb98
...
@@ -115,11 +115,8 @@ sub main {
...
@@ -115,11 +115,8 @@ sub main {
my
(
$settings_ref
,
$msg
)
=
FIJI::
Settings
->
new
("
setup
",
$options
->
{'
fiji_settings_file
'});
my
(
$settings_ref
,
$msg
)
=
FIJI::
Settings
->
new
("
setup
",
$options
->
{'
fiji_settings_file
'});
my
$netlist_filename
=
$options
->
{'
netlist_file
'};
my
$netlist_filename
=
$options
->
{'
netlist_file
'};
if
(
defined
$msg
)
{
$logger
->
error
(
$msg
);
}
if
(
!
ref
(
$settings_ref
))
{
if
(
!
ref
(
$settings_ref
))
{
$logger
->
error
(
$msg
);
return
1
;
return
1
;
}
}
$self
->
{'
settings
'}
=
$settings_ref
;
$self
->
{'
settings
'}
=
$settings_ref
;
...
...
bin/fiji_setup.pl
View file @
03d7eb98
...
@@ -135,10 +135,8 @@ sub main {
...
@@ -135,10 +135,8 @@ sub main {
# Start out with default settings
# Start out with default settings
#
#
my
(
$settings_ref
,
$msg
)
=
FIJI::
Settings
->
new
();
my
(
$settings_ref
,
$msg
)
=
FIJI::
Settings
->
new
();
if
(
defined
$msg
)
{
$logger
->
error
(
$msg
);
}
if
(
!
defined
(
$settings_ref
))
{
if
(
!
defined
(
$settings_ref
))
{
$logger
->
error
(
$msg
);
return
1
;
return
1
;
}
}
$self
->
{'
settings
'}
=
$settings_ref
;
$self
->
{'
settings
'}
=
$settings_ref
;
...
@@ -202,7 +200,7 @@ sub main {
...
@@ -202,7 +200,7 @@ sub main {
(
$tmp_settings
,
$warn
)
=
FIJI::
Settings
->
new
('
setup
',
$filename
);
(
$tmp_settings
,
$warn
)
=
FIJI::
Settings
->
new
('
setup
',
$filename
);
if
(
defined
(
$warn
))
{
if
(
defined
(
$warn
))
{
my
$msg
=
"
Settings file
$filename
could not be loaded correctly:
$warn
";
my
$msg
=
"
Settings file
$filename
could not be loaded correctly:
$warn
";
$logger
->
error
(
$msg
);
$logger
->
error
(
$msg
)
if
!
$tmp_settings
;
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
image
=>
(
!
defined
(
$tmp_settings
)
?
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
image
=>
(
!
defined
(
$tmp_settings
)
?
Tk::FIJIUtils::
error_image
(
$self
->
{'
mw
'})
:
Tk::FIJIUtils::
error_image
(
$self
->
{'
mw
'})
:
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'})
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'})
...
...
Write
Preview
Supports
Markdown
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