tests: add clean processes step before the write_json step

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
diff --git a/params-plugin/tests/pll/pll.tcl b/params-plugin/tests/pll/pll.tcl
index 86eb1b1..796fdae 100644
--- a/params-plugin/tests/pll/pll.tcl
+++ b/params-plugin/tests/pll/pll.tcl
@@ -50,6 +50,9 @@
 setundef -zero -params
 stat
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "pll.json"]
 write_blif -attr -param -cname -conn [test_output_path "pll.eblif"]
diff --git a/sdc-plugin/tests/counter/counter.tcl b/sdc-plugin/tests/counter/counter.tcl
index b8cd19d..275c2f0 100644
--- a/sdc-plugin/tests/counter/counter.tcl
+++ b/sdc-plugin/tests/counter/counter.tcl
@@ -21,6 +21,9 @@
 puts $fh [get_clocks -include_generated_clocks]
 close $fh
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write out the SDC file after the clock propagation step
 write_sdc [test_output_path "counter.sdc"]
 write_json [test_output_path "counter.json"]
diff --git a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl
index beb58b3..a04e2f3 100644
--- a/sdc-plugin/tests/restore_from_json/restore_from_json.tcl
+++ b/sdc-plugin/tests/restore_from_json/restore_from_json.tcl
@@ -6,6 +6,10 @@
 synth_xilinx
 create_clock -period 10 clk
 propagate_clocks
+
+# Clean processes before writing JSON.
+yosys proc
+
 write_sdc [test_output_path "restore_from_json_1.sdc"]
 write_json [test_output_path "restore_from_json.json"]
 
diff --git a/xdc-plugin/tests/counter-dict/counter-dict.tcl b/xdc-plugin/tests/counter-dict/counter-dict.tcl
index 9b5809f..91d4624 100644
--- a/xdc-plugin/tests/counter-dict/counter-dict.tcl
+++ b/xdc-plugin/tests/counter-dict/counter-dict.tcl
@@ -12,5 +12,8 @@
 #Read the design constraints
 read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "counter-dict.json"]
diff --git a/xdc-plugin/tests/counter/counter.tcl b/xdc-plugin/tests/counter/counter.tcl
index 1eca366..0a3a62b 100644
--- a/xdc-plugin/tests/counter/counter.tcl
+++ b/xdc-plugin/tests/counter/counter.tcl
@@ -12,5 +12,8 @@
 #Read the design constraints
 read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "counter.json"]
diff --git a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl
index 65a07ab..7d99d29 100644
--- a/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl
+++ b/xdc-plugin/tests/io_loc_pairs/io_loc_pairs.tcl
@@ -18,6 +18,9 @@
 #Read the design constraints
 read_xdc -part_json [file dirname $::env(DESIGN_TOP)]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "io_loc_pairs.json"]
 write_blif -param [test_output_path "io_loc_pairs.eblif"]
diff --git a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl
index 5bdef63..3c5fcd5 100644
--- a/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl
+++ b/xdc-plugin/tests/minilitex_ddr_arty/minilitex_ddr_arty.tcl
@@ -12,5 +12,8 @@
 #Read the design constraints
 read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "minilitex_ddr_arty.json"]
diff --git a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl
index 7303563..506097a 100644
--- a/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl
+++ b/xdc-plugin/tests/package_pins-dict-space/package_pins-dict-space.tcl
@@ -11,5 +11,8 @@
 #Read the design constraints
 read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "package_pins-dict-space.json"]
diff --git a/xdc-plugin/tests/package_pins/package_pins.tcl b/xdc-plugin/tests/package_pins/package_pins.tcl
index 796b5ed..7f059e7 100644
--- a/xdc-plugin/tests/package_pins/package_pins.tcl
+++ b/xdc-plugin/tests/package_pins/package_pins.tcl
@@ -11,5 +11,8 @@
 #Read the design constraints
 read_xdc -part_json [file dirname [info script]]/../xc7a35tcsg324-1.json $::env(DESIGN_TOP).xdc
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "package_pins.json"]
diff --git a/xdc-plugin/tests/port_indexes/port_indexes.tcl b/xdc-plugin/tests/port_indexes/port_indexes.tcl
index ba7d15c..2472ffa 100644
--- a/xdc-plugin/tests/port_indexes/port_indexes.tcl
+++ b/xdc-plugin/tests/port_indexes/port_indexes.tcl
@@ -31,5 +31,8 @@
 }
 close $fp
 
+# Clean processes before writing JSON.
+yosys proc
+
 # Write the design in JSON format.
 write_json [test_output_path "port_indexes.json"]