From 58414f713ffeb89684711ea376636674b0f691f4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 25 Jun 2020 07:06:57 -0500 Subject: [PATCH 1/1] add comment and sim build rule --- Makefile | 3 +++ mandelsim.c | 3 +++ 2 files changed, 6 insertions(+) mode change 100644 => 100755 Makefile diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index cd766fa..b7b04ce --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ PART = xc3s1200e-fg320-5 all: fpga_target +sim: mandelsim.c + gcc -O3 -lSDL -o mandelsim mandelsim.c -march=pentium3 + BITGEN_OPTS = \ -w \ -g DebugBitstream:No \ diff --git a/mandelsim.c b/mandelsim.c index 16bdf46..2ce2feb 100644 --- a/mandelsim.c +++ b/mandelsim.c @@ -5,6 +5,9 @@ #define YRES 480 #define MAX_ITER 66 #define MAXNUM 0x8000 + +/* be sure to change the number of bits in the multiplier when doing this + * bits > 14 need extension of num_t to unsigned int */ #define BITS 14 #define BAIL (1 << (BITS + 1)) #define BAIL_A (1 << BITS) -- 2.43.0