Skip to content

Instantly share code, notes, and snippets.

View panther03's full-sized avatar
🗿

Julien de Castelnau panther03

🗿
View GitHub Profile
@panther03
panther03 / abc.patch
Created March 28, 2025 15:46
patch ABC to parse "^" in XAG
diff --git a/src/base/io/ioReadEqn.c b/src/base/io/ioReadEqn.c
index 1e4f5d46..e3349ed4 100644
--- a/src/base/io/ioReadEqn.c
+++ b/src/base/io/ioReadEqn.c
@@ -154,7 +154,7 @@ Abc_Ntk_t * Io_ReadEqnNetwork( Extra_FileReader_t * p )
// make a copy of formula for names
pFormulaCopy = Extra_UtilStrsav( pFormula );
// find the names of the fanins of this node
- Io_ReadEqnStrCutAt( pFormulaCopy, "!*+()", 1, vVars );
+ Io_ReadEqnStrCutAt( pFormulaCopy, "!*^+()", 1, vVars );
@panther03
panther03 / fixes.patch
Last active March 7, 2025 12:09
esyn patch
diff --git a/abc/src/aig/gia/gia.h b/abc/src/aig/gia/gia.h
index d3eadfb..cd2dcc6 100644
--- a/abc/src/aig/gia/gia.h
+++ b/abc/src/aig/gia/gia.h
@@ -495,7 +495,7 @@ static inline int Gia_ObjIsCi( Gia_Obj_t * pObj ) {
static inline int Gia_ObjIsCo( Gia_Obj_t * pObj ) { return pObj->fTerm && pObj->iDiff0 != GIA_NONE; }
static inline int Gia_ObjIsAnd( Gia_Obj_t * pObj ) { return!pObj->fTerm && pObj->iDiff0 != GIA_NONE; }
static inline int Gia_ObjIsXor( Gia_Obj_t * pObj ) { return Gia_ObjIsAnd(pObj) && pObj->iDiff0 < pObj->iDiff1; }
-static inline int Gia_MuxIObjIsd( Gia_Man_t * p, int iObj ) { return p->pMuxes && p->pMuxes[iObj] > 0; }
+static inline int Gia_ObjIsMuxId( Gia_Man_t * p, int iObj ) { return p->pMuxes && p->pMuxes[iObj] > 0; }
@panther03
panther03 / ebaz_base.tcl
Created February 2, 2025 10:54
Base block design TCL script for EBAZ4205 board
################################################################
# This is a generated script based on design: design_1
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {
@panther03
panther03 / conv1d.py
Created September 18, 2024 19:51
Optimized 1D Convolution for RVM in Exo
# RUN: python %s | FileCheck %s
from __future__ import annotations
import os
import sys
import exo.API_cursors as pc
from exo import proc
from exo.libs.memories import *
from exo.platforms.x86 import *
@panther03
panther03 / gemm.c
Created September 18, 2024 18:59
modified gemm.c from OpenBLAS benchmarks
// gemm.c from OpenBLAS/benchmarks folder: https://github.com/OpenMathLib/OpenBLAS/tree/develop/benchmark
// Ran as OPENBLAS_PARAM_M=1024 OPENBLAS_PARAM_N=1024 OPENBLAS_PARAM_K=1024 ./sgemm.goto
// Set OPENBLAS_USEUNOPT=1 to use the naive matmul, pass nothing for BLAS version
// CPU: AMD Ryzen 7 7735U
/***************************************************************************
Copyright (c) 2014, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@panther03
panther03 / conv1d.py
Created August 13, 2024 17:28
conv1d in exo
from __future__ import annotations
import os
import sys
from exo import proc
from exo.libs.memories import *
from exo.platforms.x86 import *
@panther03
panther03 / mig_exact.py
Created December 21, 2023 19:06
MIG Exact Synthesis
# CS472 Final Project
# Julien de Castelnau
from z3 import *
import argparse
import copy
import functools
import operator
import random
import subprocess
@panther03
panther03 / sim.py
Created October 3, 2022 23:18
r10k ooo sim
from dataclasses import dataclass
from re import I
from tokenize import Name
from typing import Set, NamedTuple
@dataclass
class PReg:
reg: int
ready: bool
def __eq__(self, __o: object) -> bool:
@panther03
panther03 / main.py
Created May 6, 2021 15:49
OpenCV dreadnautilus fishing script
import time
import subprocess
from subprocess import Popen, PIPE
import cv2
import scanf
import numpy as np
import pytesseract
from mss import mss
@panther03
panther03 / Sway config
Created April 1, 2019 01:10
Yeah you heard me right it's my sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4