Commit fc3cf2e2 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Add phases_moot to FIJI.pm to avoid excessive warnings in phase download

Since there is no way to supply a netlist in FIJI EE it cannot verify anything
related to the netlist, e.g. external port names. However, they are more
or less moot anyway during download because we rely on the design ID
to detect any mismatches between the (actually downloaded) netlist
and the configuration.
parent 3817aa3c
......@@ -185,6 +185,8 @@ logo_end
# returns true if the new value is allowed, or false otherwise.
# - phases_opt (optional) list of phases (subset of "setup", "instrument", "download")
# where no value must be present in input (e.g. ID is only necessary while downloading).
# - phases_moot (optional) list of phases (subset of "setup", "instrument", "download")
# where values present in the input are not validated at all.
# - depends_on (optional) specifies the key of another constant.
# The respective constant is only relevant (and thus required as input)
# if the value of the referenced constant is true.
......@@ -226,7 +228,8 @@ BEGIN {
help => "Select a net in the DUT which shall be used to clock the FIJI logic",
ini_name => "CLOCK_NET",
default => "",
phases_opt => [qw(setup download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
group => 'clock',
order => 10
},
......@@ -377,7 +380,8 @@ BEGIN {
help => "Specify the name of the external reset port in the wrapper.\nThis port name must not exist in the toplevel.",
ini_name => "RST_EXT_IN_NAME",
default => "s_fiji_reset_i",
phases_opt => ['setup', 'download'],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
type => "external_port",
group => 'reset_external',
depends_on => 'RST_EXT_EN',
......@@ -403,7 +407,8 @@ BEGIN {
depends_on => 'RST_DUT_OUT_EN',
type => 'net',
default => "",
phases_opt => [qw(setup download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
group => 'reset_from_dut',
order => 30,
},
......@@ -502,7 +507,8 @@ BEGIN {
help => "Select the net in the DUT which shall be used to trigger fault injection operations.",
ini_name => "TRIG_DUT_NAME",
default => "",
phases_opt => [qw(setup download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
depends_on => 'TRIG_DUT_EN',
type => 'net',
group => 'trigger',
......@@ -538,7 +544,8 @@ BEGIN {
ini_name => "TRIG_EXT_IN_NAME",
type => "external_port",
default => "s_fiji_trig_ext_i",
phases_opt => ['setup'],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
depends_on => 'TRIG_EXT_EN',
group => "trigger",
order => 60,
......@@ -559,7 +566,8 @@ BEGIN {
ini_name => "FD_1_NAME",
type => 'net',
default => "",
phases_opt => [qw(setup download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
depends_on => 'FD_1_EN',
group => 'fault_detect',
order => 20,
......@@ -592,7 +600,8 @@ BEGIN {
ini_name => "FD_2_NAME",
type => 'net',
default => "",
phases_opt => [qw(setup download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
depends_on => 'FD_2_EN',
group => 'fault_detect',
order => 50,
......@@ -615,7 +624,8 @@ BEGIN {
ini_name => "RX_IN_NAME",
type => "external_port",
default => "s_fiji_rx_i",
phases_opt => [qw(instrument download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
group => "general_control",
order => 11,
},
......@@ -625,7 +635,8 @@ BEGIN {
ini_name => "TX_OUT_NAME",
type => "external_port",
default => "s_fiji_tx_o",
phases_opt => [qw(instrument download)],
phases_opt => [qw(setup)],
phases_moot => [qw(download)],
group => "general_control",
order => 12,
},
......@@ -776,7 +787,8 @@ BEGIN {
default => "",
type => 'net',
help => "String representation of the instrumented net.",
phases_opt => [qw(setup download)], # Either FIU or net name is strongly recommended during download
phases_opt => [qw(setup)], # Either FIU or net name is strongly recommended during download
phases_moot => [qw(download)],
},
FIU_DRIVER_TYPE => {
ini_name => "DRIVER_TYPE",
......@@ -789,7 +801,8 @@ BEGIN {
default => "",
type => 'driver',
help => "String representation of a driver.",
phases_opt => [qw(setup download)], # Either FIU or net name is strongly recommended during download
phases_opt => [qw(setup)], # Either FIU or net name is strongly recommended during download
phases_moot => [qw(download)],
},
FIU_MODEL => {
ini_name => "FAULT_MODEL",
......
......@@ -735,6 +735,8 @@ sub _validate_hashmap {
@map_keys = grep { $_ ne $entry_key } @map_keys; # mark constant key as done
if (_disabled_via_dependency($map_ref, $consts_ref, $entry_key)) {
$logger->debug(sprintf("Key %s is disabled via %s. Skipping validation.", $entry_key, $map_ref->{$entry_key}->{'depends_on'}));
} elsif (scalar(grep { $_ eq $phase } @{$map_ref->{$entry_key}->{'phases_moot'}}) != 0) {
$logger->debug(sprintf("Key %s is irrelevant in phase %s. Skipping validation.", $entry_key, $phase));
} else {
my $rv = validate_value($map_ref, $nl_ref, $entry_key, \$consts_ref->{$entry_key}, undef, $consts_ref);
if (defined($rv)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment