aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/ram_tile.html4
-rw-r--r--iceprog/iceprog.c6
-rw-r--r--icetime/iceutil.cc8
3 files changed, 13 insertions, 5 deletions
diff --git a/docs/ram_tile.html b/docs/ram_tile.html
index 73bda8d..2264966 100644
--- a/docs/ram_tile.html
+++ b/docs/ram_tile.html
@@ -91,8 +91,8 @@ The read/write mode selects the width of the read/write port:
</table>
<p>
-The <span style="font-family:monospace">NegClk</span> bit in the RAMB tile negates the polarity of the <span style="font-family:monospace">WCLK</span> port,
-and the <span style="font-family:monospace">NegClk</span> bit in the RAMT tile negates the polarity of the <span style="font-family:monospace">RCLK</span> port.
+The <span style="font-family:monospace">NegClk</span> bit in the RAMB tile (1k die) or RAMT tile (other devices) negates the polarity of the <span style="font-family:monospace">WCLK</span> port,
+and the <span style="font-family:monospace">NegClk</span> bit in the RAMT (1k die) or RAMB tile (other devices) tile negates the polarity of the <span style="font-family:monospace">RCLK</span> port.
</p>
<p>
diff --git a/iceprog/iceprog.c b/iceprog/iceprog.c
index 8ee6443..3ad202a 100644
--- a/iceprog/iceprog.c
+++ b/iceprog/iceprog.c
@@ -1048,6 +1048,10 @@ int main(int argc, char **argv)
flash_read(rw_offset + addr, buffer_flash, rc);
if (memcmp(buffer_file, buffer_flash, rc)) {
fprintf(stderr, "Found difference between flash and file!\n");
+ if (!disable_powerdown)
+ flash_power_down();
+ flash_release_reset();
+ usleep(250000);
mpsse_error(3);
}
}
@@ -1064,7 +1068,7 @@ int main(int argc, char **argv)
if (!disable_powerdown)
flash_power_down();
- set_cs_creset(1, 1);
+ flash_release_reset();
usleep(250000);
fprintf(stderr, "cdone: %s\n", get_cdone() ? "high" : "low");
diff --git a/icetime/iceutil.cc b/icetime/iceutil.cc
index 440b9a8..c9075a4 100644
--- a/icetime/iceutil.cc
+++ b/icetime/iceutil.cc
@@ -32,7 +32,7 @@
# include <unistd.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
# include <sys/sysctl.h>
#endif
@@ -51,10 +51,14 @@ std::string proc_self_dirname()
buflen--;
return std::string(path, buflen);
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
std::string proc_self_dirname()
{
+#ifdef __NetBSD__
+ int mib[4] = {CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_PATHNAME};
+#else
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
+#endif
size_t buflen;
char *buffer;
std::string path;