This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #ifdef NDEBUG | |
| //#define verify(f) ((f) ? (void)(0):(void)(0)) | |
| #else | |
| #define static_assert(cond) \ | |
| __attribute__((unused)) extern char \ | |
| dummy_assert_array[(cond) ? 1 : -1] | |
| #define verify(f) (assert(f)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- changes the endianess BIG <-> LITTLE | |
| function ChangeEndian(vec : std_ulogic_vector) return std_ulogic_vector is | |
| variable vRet : std_ulogic_vector(vec'range); | |
| constant cNumBytes : natural := vec'length / 8; | |
| begin | |
| for i in 0 to cNumBytes-1 loop | |
| for j in 7 downto 0 loop | |
| vRet(8*i + j) := vec(8*(cNumBytes-1-i) + j); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone -b <branch> --single-branch <remote_repo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| print("FAILED...") | |
| \!h sys.stdout.write("\033[F") #back to previous line | |
| \!h sys.stdout.write("\033[K") #clear line | |
| print("SUCCESS!") |