Skip to content

Instantly share code, notes, and snippets.

View tarikgraba's full-sized avatar

Tarik Graba tarikgraba

View GitHub Profile
@tarikgraba
tarikgraba / thread1.py
Last active March 26, 2019 18:42
Python + Thread + Event + ....
#!/usr/bin/env python
from time import sleep
from threading import Thread
g = 33
def f1():
global g
while True:
@tarikgraba
tarikgraba / Lut.scala
Created March 26, 2019 17:00
Spinal HDL Lut + dummy top
import spinal.core._
case class Lut (width : Int, initval : Seq[Int], size : Int) extends Component {
// TODO: put this in some package
def clog2(x : Int) : Int = {
require(x > 0);
scala.math.ceil(scala.math.log(x)/scala.math.log(2)).toInt
}

Keybase proof

I hereby claim:

  • I am tarikgraba on github.
  • I am tarikgraba (https://keybase.io/tarikgraba) on keybase.
  • I have a public key ASCb69i1oUEqGLkonuTk0-LRE6WKRtf6h-9G1OxGhmqDOwo

To claim this, I am signing this object: