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 argparse | |
def get_args(): | |
""" | |
Get command line arguments | |
""" | |
parser = argparse.ArgumentParser(description=""" |
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 sys | |
from PyQt4 import QtGui, QtCore | |
class SimpleGui(QtGui.QWidget): | |
""" | |
A simple PyQT gui example | |
""" | |
def __init__(self): |
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
inline uint32_t get_stack_pointer(void) { | |
uint32_t sp; | |
asm("mov %0,sp" : "=r"(sp)); | |
return sp; | |
} |
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
wget -r -A.xsd -l1 http://www.spiritconsortium.org/images/xmlschema/ipxact/1685-2014 -P ip-xact -nH -nd |
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
echo | clang -target arm-none-eabi -ffreestanding -dM -E - |
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
// Integrated clock gating cell | |
// Code from "Low Power Design Methodologies and Flows" | |
module icg(/*AUTOARG*/ | |
// Outputs | |
gclk, | |
// Inputs | |
en, clk | |
); | |
input en; | |
input clk; |
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 | |
from xml.etree import ElementTree as ET | |
import pprint as pp | |
import argparse | |
from collections import defaultdict | |
# From http://stackoverflow.com/questions/2148119/how-to-convert-an-xml-string-to-a-dictionary-in-python/10077069#10077069 | |
def etree_to_dict(t): | |
d = {t.tag: {} if t.attrib else None} |
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
# http://rightfootin.blogspot.fr/2006/09/more-on-python-flatten.html | |
def flatten(l, ltypes=(list, tuple)): | |
ltype = type(l) | |
l = list(l) | |
i = 0 | |
while i < len(l): | |
while isinstance(l[i], ltypes): | |
if not l[i]: | |
l.pop(i) | |
i -= 1 |
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
CPP = g++ | |
CPPFLAGS = -Wall -pedantic -O2 -g -c | |
SOURCES := ${wildcard *.cpp} | |
OBJECTS := ${SOURCES:.cpp=.o} | |
.PHONY: all clean | |
.SUFFIXES: .cpp .o |
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
emacs_auto: | |
emacs --batch $(V_FILE) -f verilog-batch-auto -f whitespace-cleanup -f verilog-indent-buffer -f save-buffer | |
emacs --batch $(C_FILE) -f whitespace-cleanup -f verilog-indent-buffer -f save-buffer | |
emacs --batch $(C_FILE) --eval '(indent-region (point-min) (point-max) nil)' -f save-buffer |
OlderNewer