Skip to content

Instantly share code, notes, and snippets.

View josyb's full-sized avatar

Josy Boelen josyb

View GitHub Profile
@josyb
josyb / test_xx.py
Created September 8, 2015 19:10
A MyHDL test_ template for Eclipse
'''
Created on ${date}
@author: ${user}
'''
from __future__ import print_function
# optional import to mark 'xfail' tests
import py.test
@josyb
josyb / aos.vhd
Last active August 31, 2015 14:09
MyHDL Structured Types in action.
-- File: aos.vhd
-- Generated by MyHDL 1.0dev
-- Date: Mon Aug 31 15:57:52 2015
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use std.textio.all;
'''
Created on 27 Mar 2015
@author: Josy
'''
import os
from myhdl import *
@josyb
josyb / simpletristateexample.py
Last active August 29, 2015 14:22
a simple tristate pin example in MyHDL
'''
Created on 18 May 2015
@author: Josy
'''
from __future__ import print_function
from myhdl import *
@josyb
josyb / myhdl_issue43_jb
Created April 25, 2015 18:20
reworked and reformatted example from MyHDL issue#43
from __future__ import print_function
import random
from myhdl import *
def m_top_const(COEF, N, clock, reset, a, b, x, y):
v = [Signal(x.val) for _ in range(N-1)]
@josyb
josyb / geschema.py
Created March 26, 2015 13:56
Guy Eschemann: TypeError: Unexpected type
from myhdl import *
def mpegChannel(clk, rst, s_tx_data_xor_mask_r):
# table = tuple([9,8,7,6])
@always_seq(clk.posedge, reset=rst)
def fsm_seq():
for i in range(4):
# s_tx_data_xor_mask_r.next[(i+1)*8:i*8] = table[i]
@josyb
josyb / ListOfConstants.py
Created March 15, 2015 19:08
List of Constants in MyHDL
'''
Created on 14 Mar 2015
@author: Josy
'''
from __future__ import print_function
import os, random
from myhdl import *