This file contains 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
# Number, list range util | |
def number(a, just_try=False): | |
""" | |
Parse any representation of number from string. | |
:param a: String represented number | |
:type a: Union[str, int, float] | |
:param just_try: True: Return :a: if it is not a number, defaults to False | |
:type just_try: bool, optional |
This file contains 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
from __future__ import print_function | |
import multiprocessing | |
import ctypes | |
import numpy as np | |
def shared_array(shape): | |
""" | |
Form a shared memory numpy array. | |
This file contains 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
#!/usr/bin/env python | |
import logging | |
import sys | |
import os | |
import subprocess | |
import argparse | |
import configparser | |
try: | |
import gitlab |
This file contains 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
#!/usr/bin/env python3 | |
# | |
# fast_bsdl_parser.py | |
# | |
# Based on https://gist.github.com/raczben/88693d22600d743a5ccad797e7374260 | |
# | |
import os | |
import sys | |
import re |
This file contains 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 argparse | |
import os | |
import glob | |
def main(): | |
#Does not currently have support to read files from folders recursively | |
parser = argparse.ArgumentParser(description='Read in a file or set of files, and return the result.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
parser.add_argument('path', nargs='+', help='Path of a file or a folder of files.') | |
parser.add_argument('-e', '--extension', action='append', default=[''], help='File extension to filter by.') | |
args = parser.parse_args() |
This file contains 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
#include "xil_sprintf.h" // Define here: void xil_sprintf(char* s, const char *ctrl1, ...); | |
#include "xil_types.h" | |
#include "ctype.h" | |
#include "stdarg.h" | |
#if defined (__aarch64__) | |
Not tested on __aarch64__!!! | |
Remove these lines to use on __aarch64__, but no guarantee: | |
__aarch64__ related lines has not been reviewed. | |
#endif |
This file contains 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
---------------------------------------------------------------------------------------------------- | |
-- | |
-- Coherent CDC | |
-- | |
-- This module transfer signals between two clock domains. | |
-- | |
-- Use this module to transfer slow signal groups, where | |
-- - the latency is not critical, but | |
-- - the coherency is mandatory. | |
-- |
This file contains 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
# | |
# unused_signals.py | |
# | |
# Prints unused signals in one or multiple VHDL files | |
# | |
import os | |
import sys | |
import re | |
import argparse |
This file contains 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
"""Wexpect is a Windows variant of pexpect https://pexpect.readthedocs.io. | |
Wexpect is a Python module for spawning child applications and controlling | |
them automatically. Wexpect can be used for automating interactive applications | |
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup | |
scripts for duplicating software package installations on different servers. It | |
can be used for automated software testing. Wexpect is in the spirit of Don | |
Libes' Expect, but Wexpect is pure Python. Other Expect-like modules for Python | |
require TCL and Expect or require C extensions to be compiled. Wexpect does not | |
use C, Expect, or TCL extensions. |