Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a quick test of the std_logic_arith package

  • Loading branch information...
commit 30e879caa0ea756257636e19b5e85b15db946065 1 parent 6b949c5
@nickg nickg authored
View
5 lib/synopsys/Makefile.am
@@ -5,7 +5,10 @@ nvc = $(top_builddir)/src/nvc
synopsysdir = $(pkgdatadir)/ieee
ieee = ../ieee/ieee
synopsys_DATA = $(ieee)/IEEE.STD_LOGIC_ARITH $(ieee)/IEEE.STD_LOGIC_ARITH-body \
- $(ieee)/IEEE.STD_LOGIC_SIGNED $(ieee)/IEEE.STD_LOGIC_UNSIGNED
+ $(ieee)/_IEEE.STD_LOGIC_ARITH-body.bc $(ieee)/IEEE.STD_LOGIC_SIGNED \
+ $(ieee)/IEEE.STD_LOGIC_SIGNED-body $(ieee)/_IEEE.STD_LOGIC_SIGNED-body.bc \
+ $(ieee)/IEEE.STD_LOGIC_UNSIGNED $(ieee)/IEEE.STD_LOGIC_UNSIGNED-body \
+ $(ieee)/_IEEE.STD_LOGIC_UNSIGNED-body.bc
lib = NVC_LIBPATH=../std
View
2  src/sem.c
@@ -2220,7 +2220,7 @@ static bool sem_check_fcall(tree_t t)
for (int n = 0; n < n_overloads; n++) {
if (overloads[n] != NULL)
- p += snprintf(p, end - p, "\n %s",
+ p += snprintf(p, end - p, "\n%s",
type_pp(tree_type(overloads[n])));
}
View
2  src/util.c
@@ -116,7 +116,7 @@ static void paginate_msg(const char *fmt, va_list ap, int left, int right)
const char *p = strp;
int col = left;
while (*p != '\0') {
- if (isspace((uint8_t)*p) && col >= right) {
+ if ((*p == '\n') || (isspace((uint8_t)*p) && col >= right)) {
// Can break line here
fputc('\n', stderr);
for (col = 0; col < left; col++)
View
24 test/regress/synopsys1.vhd
@@ -0,0 +1,24 @@
+use ieee.std_logic_1164.all;
+use ieee.std_logic_arith.all;
+use ieee.std_logic_unsigned.all;
+
+entity synopsys1 is
+end entity;
+
+architecture test of synopsys1 is
+begin
+
+ process is
+ variable x, y, z : std_logic_vector(7 downto 0);
+ begin
+ x := conv_std_logic_vector(5, 8);
+ y := conv_std_logic_vector(3, 8);
+ z := x + y;
+ assert conv_integer(z) = 8;
+ z := x - y;
+ assert conv_integer(z) = 2;
+ assert conv_integer(x * y) = 15;
+ wait;
+ end process;
+
+end architecture;
View
1  test/regress/testlist.txt
@@ -59,3 +59,4 @@ ieee3 normal
default1 normal
generic1 normal
signal7 normal
+synopsys1 normal
Please sign in to comment.
Something went wrong with that request. Please try again.