Skip to content

Instantly share code, notes, and snippets.

@cazador481
cazador481 / .ctags
Created November 27, 2013 03:23
.ctags for system verilog
--langdef=systemverilog
--langmap=systemverilog:.sv.svh.svi.v
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\bclass\b\s*(\b\w+\b)/\3/c,class/
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\btask\b\s*(\b(static|automatic)\b)?\s*(\w+::)?\s*(\b\w+\b)/\6/t,task/
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\bfunction\b\s*(\b(static|automatic)\b)?\s*\b\w+\b(\s*\[.+\])*\s*(\w+::)?\s*(\b\w+\b)/\7/f,function/
--regex-systemverilog=/^\s*\bmodule\b\s*(\b\w+\b)/\1/m,module/
--regex-systemverilog=/^\s*\bprogram\b\s*(\b\w+\b)/\1/p,program/
--regex-systemverilog=/^\s*\binterface\b\s*(\b\w+\b)/\1/i,interface/
--regex-systemverilog=/^\s*\btypedef\b\s+.*\s+(\b\w+\b)\s*;/\1/e,typedef/
@morganp
morganp / shm_waveforms.md
Last active August 10, 2023 02:49
Creating SHM waveforms with irun

To run a verilog simulation using irun and create a shm waveform file,

initial begin
  $shm_open("waves.shm"); $shm_probe("AS");
end

run with irun -access +r testcase.sv

Or create this tcl file:

@rantav
rantav / meetup-bad-bad-hosts.md
Last active November 2, 2017 15:27
How meetup fucked up, but then fixed it

Update: Meetup had revived the group and are welcoming us back again. At the end, no data was lost, even though interim communications suggested it was.
We are happy that things had finally taken a positive turn and are happy to stay at meetup and grow our community to our next event and next next event. We are a little bit sorry that things went soar for awhile but what's important is that at the end both us and meetup had learned how to make things better for the next time.

Original post below....

Meetup, you've been bad, bad hosts!

TL;DR: Meetup had deleted my group, for what I beleive to be their mistake, yet they did not admit the mistake nor can they restore the data. I am deeply dissapointed from meetup and I've lost my trust in them.

@roidrage
roidrage / ebooks.md
Created December 2, 2011 15:15
Self-published and awesome
@morganp
morganp / timeformat.v
Last active July 29, 2020 16:53
Verilog time format
//To change the way (below) is displayed
$display("%t", $realtime);
//$timeformat(unit#, prec#, "unit", minwidth);
$timeformat(-3, 2, " ms", 10); // -3 and " ms" give useful display msg
unit is the base that time is to be displayed in, from 0 to -15
precision is the number of decimal points to display.
"unit" is a string appended to the time, such as " ns".
minwidth is the minimum number of characters that will be displayed.
<script type="text/javascript">
var a_function = function() {
var a_number = 2;
document.write('Within a_function, a_number = '+a_number+'<br>');
return function(a) {
document.write('Within the callback, a_number = '+a_number+'<br>');
document.write('Within the callback, I was passed = '+a+'<br>');
document.write('Within the callback, a * a_number = '+a*a_number+'<br>');
@latentflip
latentflip / macspoof.sh
Created June 3, 2011 20:10
MAC Spoof on OSX
### Do these once
ifconfig en1|grep ether > .macaddress #Save your real mac address somewhere
#Alias the airport adapter
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
###Then each time you want to change MAC address:
airport -z #disconnect but don't turn off the airport
sudo ifconfig en1 ether 00:00:00:00:00:00 #set new mac address (perhaps just increment your old one)
ifconfig en1|grep ether #check it's actually changed
configuration = configure do |config|
config.tail_logs = true
config.max_connections = 55
config.admin_password = 'secret'
config.app_server do |app_server_config|
app_server_config.port = 8808
app_server_config.admin_password = config.admin_password
end
end
#!/usr/bin/env ruby
require 'slop'
opts = Slop.parse do
banner "Usage: ruby foo.rb [options]\n"
on :n, :name, 'Your username', true
on :a, :age, 'Your age (optional)', :optional => true
on :V, :verbose, 'Run in verbose mode', :default => false
@funny-falcon
funny-falcon / patch-1.9.2-gc.patch
Created March 5, 2011 11:11
GC tunning simple patch ruby 1.9.2 p180
diff --git a/gc.c b/gc.c
--- a/gc.c
+++ b/gc.c
@@ -77,6 +77,41 @@ void *alloca ();
#ifndef GC_MALLOC_LIMIT
#define GC_MALLOC_LIMIT 8000000
#endif
+#define HEAP_MIN_SLOTS 10000
+#define FREE_MIN 4096
+