SDC: Clock propagation should fail if PERIOD attribute is missing on wire

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
diff --git a/sdc-plugin/clocks.cc b/sdc-plugin/clocks.cc
index f119f92..95ebaad 100644
--- a/sdc-plugin/clocks.cc
+++ b/sdc-plugin/clocks.cc
@@ -50,11 +50,8 @@
 
 float Clock::Period(RTLIL::Wire* clock_wire) {
     if (!clock_wire->has_attribute(RTLIL::escape_id("PERIOD"))) {
-	log_warning(
-	    "PERIOD has not been specified on wire '%s'.\nDefault value 0 will "
-	    "be used\n",
-	    WireName(clock_wire).c_str());
-	return 0;
+	log_cmd_error("PERIOD has not been specified on wire '%s'.\n",
+	              WireName(clock_wire).c_str());
     }
     float period(0);
     std::string period_str;
diff --git a/sdc-plugin/tests/period_check/period_check.v b/sdc-plugin/tests/period_check/period_check.v
index e9fa734..77c1f9c 100644
--- a/sdc-plugin/tests/period_check/period_check.v
+++ b/sdc-plugin/tests/period_check/period_check.v
@@ -1,4 +1,4 @@
-module top((* CLOCK_SIGNAL = "yes", PERIOD = "bad_value", WAVEFORM = "0 5" *) input clk,
+module top((* CLOCK_SIGNAL = "yes", WAVEFORM = "0 5" *) input clk,
         input clk2,
 	input [1:0] in,
 	output [5:0] out );