Added preliminary DSP and FF integration rules for the Nexus arch.

Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
diff --git a/dsp_ff-plugin/Makefile b/dsp_ff-plugin/Makefile
index 8f90d46..3e59b3d 100644
--- a/dsp_ff-plugin/Makefile
+++ b/dsp_ff-plugin/Makefile
@@ -10,3 +10,7 @@
 SOURCES = dsp_ff.cc 
 
 include ../Makefile_plugin.common
+
+install:
+	install -D nexus-dsp_rules.txt $(DATA_DIR)/nexus/dsp_rules.txt
+
diff --git a/dsp_ff-plugin/dsp_ff.cc b/dsp_ff-plugin/dsp_ff.cc
index c556a73..6daf965 100644
--- a/dsp_ff-plugin/dsp_ff.cc
+++ b/dsp_ff-plugin/dsp_ff.cc
@@ -597,6 +597,7 @@
         }
 
         // Load rules
+        rewrite_filename(rulesFile);
         load_rules(rulesFile);
         if (log_force_debug) {
             dump_rules();
diff --git a/dsp_ff-plugin/nexus-dsp_rules.txt b/dsp_ff-plugin/nexus-dsp_rules.txt
new file mode 100644
index 0000000..642f847
--- /dev/null
+++ b/dsp_ff-plugin/nexus-dsp_rules.txt
@@ -0,0 +1,49 @@
+dsp MULT36X36 # 36x36 mode
+  port A
+    clk CLK 0
+    rst RSTA 0
+    ena CEA 1
+
+    set REGINPUTA=REGISTER
+    map GSR=GSR
+  endport
+  port B
+    clk CLK 0
+    rst RSTB 0
+    ena CEB 1
+
+    set REGINPUTB=REGISTER
+    map GSR=GSR
+  endport
+  port Z
+    clk CLK 0
+    rst RSTOUT 0
+    ena CEOUT 1
+
+    set REGOUTPUT=REGISTER
+    map GSR=GSR
+  endport
+enddsp
+
+ff FD1P3DX
+  clk CK
+  rst CD
+  ena SP
+  d   D
+  q   Q
+
+  match GSR
+  set RESETMODE=SYNC
+endff
+
+ff FD1P3IX
+  clk CK
+  rst CD
+  ena SP
+  d   D
+  q   Q
+
+  match GSR
+  set RESETMODE=ASYNC
+endff
+