summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 697e376)
raw | patch | inline | side by side (parent: 697e376)
author | Brad Griffis <bgriffis@ti.com> | |
Tue, 19 Feb 2019 19:02:34 +0000 (13:02 -0600) | ||
committer | Brad Griffis <bgriffis@ti.com> | |
Tue, 19 Feb 2019 19:02:34 +0000 (13:02 -0600) |
am57xx-ddr.dss | patch | blob | history |
diff --git a/am57xx-ddr.dss b/am57xx-ddr.dss
index cff506df39616665922c57b9badf21805c67fd25..27a7bf6427a0aea81a886badb8e8300a3556ea1c 100755 (executable)
--- a/am57xx-ddr.dss
+++ b/am57xx-ddr.dss
}
// helper function to create 8-digit hex numbers in ascii format
-function d2h(d) {return ("00000000" + (+d).toString(16)).slice(-8);}
+function d2h(d) {
+ // bottom half
+ bottom = d & 0xFFFF;
+ bottom_ascii = ("0000" + bottom.toString(16)).slice(-4);
+
+ // top half
+ top = d >>> 16; // unsigned right shift - avoids major sign issues...
+ top_ascii = ("0000" + top.toString(16)).slice(-4);
+ return (top_ascii + bottom_ascii);
+}
// helper function to create decimal numbers in ascii format
function d2d(d) {return ((+d).toString());}