Skip to content

Instantly share code, notes, and snippets.

View uenoku's full-sized avatar
🏠

Hideto Ueno uenoku

🏠
View GitHub Profile
@uenoku
uenoku / FPU.mlir
Created October 12, 2024 19:19
FPU hw
// Created from https://github.com/circt/perf/blob/trunk/regress/FPU.fir
module {
hw.module @FPU(in %clock : !seq.clock, in %reset : i1, in %io_inst : i32, in %io_fromint_data : i64, in %io_fcsr_rm : i3, out io_fcsr_flags_valid : i1, out io_fcsr_flags_bits : i5, out io_store_data : i64, out io_toint_data : i64, in %io_dmem_resp_val : i1, in %io_dmem_resp_type : i3, in %io_dmem_resp_tag : i5, in %io_dmem_resp_data : i64, in %io_valid : i1, out io_fcsr_rdy : i1, out io_nack_mem : i1, out io_illegal_rm : i1, in %io_killx : i1, in %io_killm : i1, out io_dec_cmd : i5, out io_dec_ldst : i1, out io_dec_wen : i1, out io_dec_ren1 : i1, out io_dec_ren2 : i1, out io_dec_ren3 : i1, out io_dec_swap12 : i1, out io_dec_swap23 : i1, out io_dec_single : i1, out io_dec_fromint : i1, out io_dec_toint : i1, out io_dec_fastpipe : i1, out io_dec_fma : i1, out io_dec_div : i1, out io_dec_sqrt : i1, out io_dec_wflags : i1, out io_sboard_set : i1, out io_sboard_clr : i1, out io_sboard_clra : i5, out io_cp_req_ready : i1, in %io_cp
module {
hw.module @MultibitMux(in %a_0 : i1, in %a_1 : i1, in %a_2 : i1, in %a_3 : i1, in %a_4 : i1, in %a_5 : i1, in %a_6 : i1, in %a_7 : i1, in %a_8 : i1, in %a_9 : i1, in %a_10 : i1, in %a_11 : i1, in %a_12 : i1, in %a_13 : i1, in %a_14 : i1, in %a_15 : i1, in %a_16 : i1, in %a_17 : i1, in %a_18 : i1, in %a_19 : i1, in %a_20 : i1, in %a_21 : i1, in %a_22 : i1, in %a_23 : i1, in %a_24 : i1, in %a_25 : i1, in %a_26 : i1, in %a_27 : i1, in %a_28 : i1, in %a_29 : i1, in %a_30 : i1, in %a_31 : i1, in %a_32 : i1, in %a_33 : i1, in %a_34 : i1, in %a_35 : i1, in %a_36 : i1, in %a_37 : i1, in %a_38 : i1, in %a_39 : i1, in %a_40 : i1, in %a_41 : i1, in %a_42 : i1, in %a_43 : i1, in %a_44 : i1, in %a_45 : i1, in %a_46 : i1, in %a_47 : i1, in %a_48 : i1, in %a_49 : i1, in %a_50 : i1, in %a_51 : i1, in %a_52 : i1, in %a_53 : i1, in %a_54 : i1, in %a_55 : i1, in %a_56 : i1, in %a_57 : i1, in %a_58 : i1, in %a_59 : i1, in %a_60 : i1, in %a_61 : i1, in %a_62 : i1, in %a_63 : i1, in %a_64 : i1, in %a_65 : i1, in %a_66 :
@uenoku
uenoku / reduced.mlir
Last active February 27, 2022 12:22
reduce.mlir
This file has been truncated, but you can view the full file.
module attributes {circt.loweringOptions = "disallowLocalVariables"} {
sv.verbatim "// Standard header to adapt well known macros to our needs." {symbols = []}
sv.ifdef "RANDOMIZE_REG_INIT" {
sv.verbatim "`define RANDOMIZE" {symbols = []}
}
sv.verbatim "\0A// RANDOM may be set to an expression that produces a 32-bit random unsigned value." {symbols = []}
sv.ifdef "RANDOM" {
} else {
sv.verbatim "`define RANDOM {$random}" {symbols = []}
}
@uenoku
uenoku / chipyard_digital_top.sv
Last active February 14, 2022 15:49
chipyard_digital_top.sv
module DigitalTop( // ../perf/regress/chipyard.TestHarness.RocketSmall1Medium1Big1_BoomMedium1Large1Mega1.top.v.hi.fir:1063044:10
input clock, reset, auto_domain_resetCtrl_async_reset_sink_in_reset,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_cbus_0_clock,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_cbus_0_reset,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_mbus_0_clock,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_mbus_0_reset,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_fbus_0_clock,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_fbus_0_reset,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_pbus_0_clock,
input auto_domain_resetCtrl_tile_reset_provider_in_member_allClocks_subsystem_pbus_0_reset,
// Standard header to adapt well known macros to our needs.
`ifdef RANDOMIZE_REG_INIT
`define RANDOMIZE
`endif
// RANDOM may be set to an expression that produces a 32-bit random unsigned value.
`ifndef RANDOM
`define RANDOM {$random}
`endif
@uenoku
uenoku / fpu.sv
Created December 10, 2021 16:47
// Standard header to adapt well known macros to our needs.
`ifdef RANDOMIZE_REG_INIT
`define RANDOMIZE
`endif
// RANDOM may be set to an expression that produces a 32-bit random unsigned value.
`ifndef RANDOM
`define RANDOM {$random}
`endif
aa-eval
adce
add-discriminators
aggressive-instcombine
assume-builder
assume-simplify
alignment-from-assumptions
bdce
bounds-checking
break-crit-edges
https://github.com/tom-james-watson/dotfiles/blob/master/docs/thinkpad-x1-extreme-setup.md#thermal-management
# tlp
/etc/default/tlp
STARTみたいなやつを75, 80とかにする
@uenoku
uenoku / count.py
Created January 11, 2020 05:34
sotsuron
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import sys
import time
import datetime
import subprocess
import argparse
scope = ['https://spreadsheets.google.com/feeds',
'https://www.googleapis.com/auth/drive']
@uenoku
uenoku / gist:2f96469a36e2ee74075b95f0b668b159
Created August 26, 2019 10:57
separate_back_forward.patch
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 01d09105e..6ea831f5f 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -120,6 +120,11 @@ ChangeStatus operator|(ChangeStatus l, ChangeStatus r);
ChangeStatus operator&(ChangeStatus l, ChangeStatus r);
///}
+enum Direction {
+ FORWARD = 0,