Skip to content

Instantly share code, notes, and snippets.

View tmeissner's full-sized avatar
🏠
Home-Office

T. Meissner tmeissner

🏠
Home-Office
View GitHub Profile
@tmeissner
tmeissner / test.vhd
Created January 5, 2024 16:26
Example to check that each request has to be acked before next request
-- Example to check that each request has to be acked before next request
-- VHDL glue logic
process (clk) is
begin
if rising_edge(clk) then
if (not rst_n) then
req_active <= '0';
elsif (req) then
req_active <= '1';
@tmeissner
tmeissner / Dockerfile
Created August 19, 2019 16:15
Dockerfile for SymbiYosys with GHDL-synth plugin
FROM debian:buster-slim AS build
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
build-essential \
clang \
bison \
flex \
libreadline-dev \
@tmeissner
tmeissner / psl_test_endpoint_ended.vhd
Last active March 14, 2016 10:36
Test case of evaluating PSL endpoint & ended constructs in VHDL code
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library std;
use std.env.all;
entity psl_test_endpoint is
@tmeissner
tmeissner / mp3_rename.py
Created February 18, 2016 08:27
Small tool to rename audio files in a directory
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
import os
import stat
import re
import argparse
parser = argparse.ArgumentParser()
@tmeissner
tmeissner / py3_closures.py
Last active August 29, 2015 14:07
Some experiments with closures in Python 3
def closure():
container = 0
def inc():
nonlocal container
container += 1
def get():
return container
def dec():
nonlocal container
container -= 1
@tmeissner
tmeissner / speiseplan.py
Last active August 29, 2015 14:05
Extract menu data from html file
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import xml.dom.minidom as DOM
class SpeisePlan:
'''Class for parsing and extracting the meal data for each day of a week
lying in a given HTML file'''
@tmeissner
tmeissner / tb_adder_osvvm.vhd
Created August 14, 2014 15:43
Simple example of functional coverage using CoveragePkg of OSVVM
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use std.env.all;
library OSVVM;
use OSVVM.RandomPkg.all;
use OSVVM.CoveragePkg.all;
@tmeissner
tmeissner / st7565-lcd.c
Last active December 27, 2015 17:39
C tool to use a ST7565-LCD with Raspberry Pi
#include <stdio.h>
#include <bcm2835.h>
// pin defines
#define LCD_CS 24
#define LCD_RST 23
#define LCD_A0 22
#define LCD_CLK 27
#define LCD_SI 17
@tmeissner
tmeissner / raspiweb.html
Last active December 20, 2015 17:19
raspiweb html website, relies on some external and self written js & css sources
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>raspiweb</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@tmeissner
tmeissner / gcf.js
Created July 30, 2013 08:10
small javascript library for ajax & some other things
// variable to en-/disable debug
// set to 1 to enable debug log
if (DEBUG === undefined) {
var DEBUG;
}
var gcf = {