Skip to content

Instantly share code, notes, and snippets.

View ThePerfectComputer's full-sized avatar

Yehowshua Immanuel ThePerfectComputer

View GitHub Profile
@ThePerfectComputer
ThePerfectComputer / gist:b5392dbdeeb477e417b3f67d5618b63b
Created October 1, 2024 13:09
Tenstorrent riscv32-unknown-elf-gcc in docker
Last login: Tue Oct 1 09:04:40 on ttys003
yehowshua@Yehowshuas-iMac:~$cd sandbox/
yehowshua@Yehowshuas-iMac:sandbox$mkdir test-tt-gcc
yehowshua@Yehowshuas-iMac:sandbox$cd test-tt-gcc/
yehowshua@Yehowshuas-iMac:test-tt-gcc$wget https://raw.githubusercontent.com/ThePerfectComputer/tt-gcc/refs/heads/gcc_10.2.0/test.c
--2024-10-01 09:05:38-- https://raw.githubusercontent.com/ThePerfectComputer/tt-gcc/refs/heads/gcc_10.2.0/test.c
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8003::154, 2606:50c0:8000::154, 2606:50c0:8001::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 928 [text/plain]
@ThePerfectComputer
ThePerfectComputer / gist:45fa1da83e317439cdae130200ec952b
Last active September 29, 2024 07:17
Configures extracted from sfpi-tt-gg Ubuntu Successfully built log
# 1
cd build-gdb-newlib && CC_FOR_TARGET=riscv32-unknown-elf-gcc /srcs/sfpi-tt-gcc/build/../riscv-gdb/configure \
--target=riscv32-unknown-elf \
\
--prefix= \
\
--disable-werror \
--with-expat=yes \
--enable-gdb \
--disable-gas \
@ThePerfectComputer
ThePerfectComputer / log.txt
Created September 29, 2024 05:54
sfpi-tt-gg Ubuntu Successfully built log
This file has been truncated, but you can view the full file.
Last login: Tue Sep 17 09:01:36 on ttys002
yehowshuaimmanuel@Yehowshuas-Laptop:~$dell-on
Chassis Power Control: Up/On
yehowshuaimmanuel@Yehowshuas-Laptop:~$dell-status
Chassis Power is on
yehowshuaimmanuel@Yehowshuas-Laptop:~$dell-off
Chassis Power Control: Down/Off
yehowshuaimmanuel@Yehowshuas-Laptop:~$cisco-off
Chassis Power Control: Down/Off
yehowshuaimmanuel@Yehowshuas-Laptop:~$cisco-on
@ThePerfectComputer
ThePerfectComputer / invoke_ghci.sh
Created March 20, 2024 03:21
Bluespec Haskell Linking with Tcl
set -ex
BLUESPECDIR=`echo 'puts $env(BLUESPECDIR)' | bluetcl`
INCLUDES=$(find $BLUESPECDIR/../../src/comp -type d -exec echo -n '-i{} ' \;)
ghci $INCLUDES \
-ltcl -L$BLUESPECDIR/../../src/vendor/htcl -lhtcl \
-i$BLUESPECDIR/../../src/vendor/htcl \
-fobject-code \
-package mtl \
-package syb \
@ThePerfectComputer
ThePerfectComputer / Blinky.hs
Created March 7, 2023 04:16
Some notes from Clash Haskell
module Blinky(topEntity, main) where
import qualified Data.List as List
import Clash.Prelude
counter :: HiddenClockResetEnable dom => Signal dom (Signed 8)
counter = c
where c = register 0 (c + 1)
pulseHighEveryNTicks :: forall n dom. HiddenClockResetEnable dom
=> 1 <= n