Skip to content

Instantly share code, notes, and snippets.

View arjenroodselaar's full-sized avatar

Arjen Roodselaar arjenroodselaar

View GitHub Profile
@arjenroodselaar
arjenroodselaar / gist:d338f80faad2c113f41e786cd7ce9c74
Last active January 6, 2024 22:30
Yosys synthesis comparison GateMate, Nexus, ECP5, XC7 for 8x22 instruction decoder
Yosys GateMate (synth_gatemate -noiopad):
=== mkOpcodeDecoder ===
Number of wires: 242
Number of wire bits: 675
Number of public wires: 15
Number of public wire bits: 84
Number of memories: 0
Number of memory bits: 0
@arjenroodselaar
arjenroodselaar / gist:d1300b6c0d888b53cefb837f51c95bf3
Last active March 23, 2021 23:19
BSC internal clocking of interface methods
(* always_enabled, always_ready *)
interface Top;
method Bit#(1) led();
method Action btn(Bit#(6) val);
endinterface
interface Foo;
method Bit#(1) status();
method Action do_something_with_btn_input(Bit#(6) val);
...
@arjenroodselaar
arjenroodselaar / UARTLoopback12MHz.v
Created February 23, 2021 09:19
UART Loopback for 12MHz clock
//
// Generated by Bluespec Compiler (build 3467c84)
//
// On Tue Feb 23 01:14:43 PST 2021
//
//
// Ports:
// Name I/O size props
// tx O 1 reg
// CLK I 1 clock
@arjenroodselaar
arjenroodselaar / gist:aaf03d3f2577c273a91ba104a5086035
Created May 24, 2019 05:16
Verific missing sdf component link error
[100%] Building yosys
Undefined symbols for architecture x86_64:
"Verific::SdfDelay12::SdfDelay12(Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*, Verific::SdfDelay*)", referenced from:
Verific::VeriPath::Elaborate(Verific::VeriExpression*, Verific::Array const*, unsigned int) const in verilog-mac.a(VeriMisc_Elab.o)
"Verific::SdfRealValue::SdfRealValue(double)", referenced from:
Verific::VeriValue::ToSdfValue() in verilog-mac.a(VeriValue_Elab.o)
"Verific::SdfMinTypMaxValue::SdfMinTypMaxValue(Verific::SdfRealValue*, Verific::SdfRealValue*, Verific::SdfRealValue*)", referenced from:
Verific::VeriMinTypMaxVal::ToSdfValue() in verilog-mac.a(VeriValue_Elab.o)
"Verific::SdfDelay2::SdfDelay2(Verific::SdfDelay*, Verific::SdfDelay*)", referenced from:
Verific::VeriPath::Elaborate(Verific::VeriExpression*, Verific::Arra
@arjenroodselaar
arjenroodselaar / buck_verilog.py
Created October 13, 2017 18:18
Buck macros for Icarus Verilog
def verilog_module(**kwargs):
export_file(**kwargs)
def verilog_test(**kwargs):
genrule(
name = kwargs['name'],
srcs = kwargs.get('srcs', []),
out = kwargs['name'],
cmd = 'iverilog -g2012 -Wall -Wno-timescale -o $OUT {deps} $SRCS'.format(
deps = ' '.join([
@arjenroodselaar
arjenroodselaar / fbthrift_TEventServerCreator.diff
Created June 24, 2015 06:20
Add TEventServerCreator to fbthrift Makefile
diff --git a/thrift/lib/cpp/Makefile.am b/thrift/lib/cpp/Makefile.am
index 9b727fa..47fbd33 100644
--- a/thrift/lib/cpp/Makefile.am
+++ b/thrift/lib/cpp/Makefile.am
@@ -82,7 +82,8 @@ libthrift_la_SOURCES = EventHandlerBase.cpp \
util/FdUtils.cpp \
util/THttpParser.cpp \
util/SocketRetriever.cpp \
- util/VarintUtils.cpp
+ util/VarintUtils.cpp \
@arjenroodselaar
arjenroodselaar / fbthrift_link_boost_thread.diff
Created June 24, 2015 03:50
fbthrift boost_thread link fix
@arjenroodselaar
arjenroodselaar / gist:f8d20534b0d8c7542d01
Created May 24, 2015 04:24
musl mips-sf configure output
tar -zxf /home/arjen/tool-chain/tmp/musl-1.1.9.tar.gz -C /home/arjen/tool-chain/tmp
cd /home/arjen/tool-chain/tmp/musl-1.1.9 && \
CC=/home/arjen/tool-chain/bin/mips-linux-gnu-gcc \
CFLAGS="-march=24kc -msoft-float -g" \
/home/arjen/tool-chain/tmp/musl-1.1.9/configure \
--prefix=/usr/local \
--target=mips-sf-linux-gnu \
--bindir=/home/arjen/tool-chain/bin
checking for C compiler... /home/arjen/tool-chain/bin/mips-linux-gnu-gcc
checking whether C compiler works... yes
@arjenroodselaar
arjenroodselaar / gist:270df6970b2bd43c9bce
Created May 24, 2015 04:05
musl softfloat linker warning
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-linux-gnu/bin/ld: Warning: lib/libc.so uses -msoft-float (set by src/aio/aio.lo), src/internal/syscall.lo uses -mhard-float
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-linux-gnu/bin/ld: Warning: lib/libc.so uses -msoft-float (set by src/aio/aio.lo), src/ldso/dlsym.lo uses -mhard-float
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-linux-gnu/bin/ld: Warning: lib/libc.so uses -msoft-float (set by src/aio/aio.lo), src/setjmp/longjmp.lo uses -mhard-float
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-linux-gnu/bin/ld: Warning: lib/libc.so uses -msoft-float (set by src/aio/aio.lo), src/setjmp/setjmp.lo uses -mhard-float
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-linux-gnu/bin/ld: Warning: lib/libc.so uses -msoft-float (set by src/aio/aio.lo), src/signal/restore.lo uses -mhard-float
/home/arjen/tool-chain/lib/gcc/mips-linux-gnu/4.8.4/../../../../mips-lin
@arjenroodselaar
arjenroodselaar / compile_PHPUnit-3.5.15.sh
Created November 2, 2011 18:57 — forked from markomarkovic/compile_PHPUnit-3.5.15.sh
A script to compile PHPUnit-3.5.15 with all dependencies into archive which can be extracted to CakePHP 2.0 Vendor directory in order to UnitTest cake (if you don't have access to PEAR commands or PEAR insists on installing PHPUnit-3.6.0 and not working).
#!/bin/sh
# Creating temp dirs
mkdir .compile_PHPUnit_$$
cd .compile_PHPUnit_$$
# Fetching the archives
wget -nv http://pear.phpunit.de/get/PHPUnit-3.5.15.tgz
wget -nv http://pear.phpunit.de/get/DbUnit-1.0.0.tgz
wget -nv http://pear.phpunit.de/get/File_Iterator-1.2.3.tgz