summaryrefslogtreecommitdiffstats
path: root/lab4/VGA_MOTOR/sanitycheck
diff options
context:
space:
mode:
Diffstat (limited to 'lab4/VGA_MOTOR/sanitycheck')
-rw-r--r--lab4/VGA_MOTOR/sanitycheck21
1 files changed, 21 insertions, 0 deletions
diff --git a/lab4/VGA_MOTOR/sanitycheck b/lab4/VGA_MOTOR/sanitycheck
new file mode 100644
index 0000000..acdcc99
--- /dev/null
+++ b/lab4/VGA_MOTOR/sanitycheck
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if sed 's/--.*//' < "$1" | grep -n \'event
+then
+ echo "ERROR in $1: Du använder nyckelordet 'event. Om du vill kolla efter en klockflank bör rising_edge användas istället. Om du vill använda 'event till något annat i syntetiserbar kod bör du antagligen tänka om."
+ exit 1
+fi
+
+if sed 's/--.*//' < "$1" | egrep -n 'rising_edge *\(.*\)' | egrep -v 'rising_edge *\( *clk *\)'
+then
+ echo "ERROR in $1: Du försöker klocka på något som antagligen inte är en riktigt klocka. Du bör enbart använda rising_edge(clk) i din syntetiserbara kod."
+ exit 1
+fi
+
+if sed 's/--.*//' < "$1" | egrep -n 'falling_edge'
+then
+ echo "ERROR in $1: Du använder nyckelordet falling_edge i filen $1. I den här kursen bör du inte behöva använda det nyckelordet."
+ exit 1
+fi
+
+