Skip to content

Instantly share code, notes, and snippets.

View fgaray's full-sized avatar

Felipe Garay fgaray

  • Google
  • Mountain View
View GitHub Profile
@fgaray
fgaray / test_case_clocks.patch
Created April 25, 2023 20:44
Test case for missing clocks in STA
diff --git a/src/dft/CMakeLists.txt b/src/dft/CMakeLists.txt
index dbff4f64f..d747b68b0 100644
--- a/src/dft/CMakeLists.txt
+++ b/src/dft/CMakeLists.txt
@@ -70,6 +70,7 @@ target_link_libraries(dft
dft_config_lib
dft_replace_lib
dft_clock_domain_lib
+ dft_utils_lib
)
diff --git a/src/dft/src/Dft.cpp b/src/dft/src/Dft.cpp
index 426a90260..f2770de0a 100644
--- a/src/dft/src/Dft.cpp
+++ b/src/dft/src/Dft.cpp
@@ -122,8 +122,22 @@ void Dft::preview_dft(bool verbose)
}
logger_->report("");
- // Go to original state because preview_dft should not modify anything
- scan_replace_->rollbackScanReplace();
@fgaray
fgaray / prepare-commit-msg
Last active April 10, 2023 17:21
Git Hook: Sign-off your commits
#!/bin/sh
# File: .git/hooks/prepare-commit-msg
# Source: https://stackoverflow.com/a/46536244
NAME=$(git config user.name)
EMAIL=$(git config user.email)
if [ -z "$NAME" ]; then
echo "empty git config user.name"
exit 1
@fgaray
fgaray / status_macros.h
Created September 29, 2021 15:56
Status macros for absl::Status and absl::StatusOr<T>
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@fgaray
fgaray / h
Created September 29, 2021 15:56
Status macros for abseil
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@fgaray
fgaray / SIMD.hs
Created June 8, 2017 04:45
Haskell eDSL for SIMD code testing
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module SIMD where
import Data.List hiding (transpose)
import Data.List.Split
import Control.Monad (liftM2, liftM4, void)
import Data.SBV
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module SIMD where
import Data.List hiding (transpose)
import Data.List.Split
import Control.Monad (liftM2, liftM4, void)
import Data.SBV
{-# LANGUAGE ScopedTypeVariables #-}
import Test.QuickCheck
equilibrium :: forall a. (Eq a, Num a) => [a] -> [Int]
equilibrium [] = []
equilibrium [_] = []
equilibrium (x:xs) = equilibrium' 0 0 x (sum xs) xs
@fgaray
fgaray / bootstrap-datepicker
Created August 25, 2015 02:42
Examples for hjsmin
/*!
* Datepicker for Bootstrap v1.5.0-dev (https://github.com/eternicode/bootstrap-datepicker)
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/(function($, undefined){
function UTCDate(){
return new Date(Date.UTC.apply(Date, arguments));
CREATE OR REPLACE FUNCTION sp_crear_participante(nombre TEXT, clave TEXT)
RETURNS TEXT
AS
$$
import json
from hashlib import md5