Skip to content

Instantly share code, notes, and snippets.

View alainlou's full-sized avatar

Alain Lou alainlou

View GitHub Profile
@alainlou
alainlou / donut.c
Created November 1, 2022 16:16
donut.c without any libraries
// Original source: https://www.a1k0n.net/2021/01/13/optimizing-donut.html
#define UART_ADDR 0x20000000
char b[1760], z[1760];
int mult(int a, int b);
int div(int a, int b);
int mod(int a, int b);
@alainlou
alainlou / projects_to_do.txt
Created October 22, 2022 19:21
fpga/digital design exercises
- sklansky adder with hardcaml, verilog, chisel
- integrate with cfu-playground?
- onehot2binary function in sv
@alainlou
alainlou / intel_fpga_modelsim_fedora34.md
Last active September 8, 2021 02:43
Make ModelSim work on Fedora
  • Placing UART rx,tx on 114 and 115 pins as used by interface doesn't work - perhaps some electrical issues when connect to the IC or because of induced current or something.
  • We use 126 and 128 instead
  • BIOS boots and works but loading code doesn't...
@alainlou
alainlou / assign_pins.tcl
Last active February 28, 2021 16:25
RZRD Cyclone IV Board Pin Assignment
# Copyright (C) 2020 Intel Corporation. All rights reserved.
# Your use of Intel Corporation's design tools, logic functions
# and other software and tools, and any partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Intel Program License
# Subscription Agreement, the Intel Quartus Prime License Agreement,
# the Intel FPGA IP License Agreement, or other applicable license
# agreement, including, without limitation, that your use is for

Keybase proof

I hereby claim: * I am alainlou on github. * I am alainlou (https://keybase.io/alainlou) on keybase. * I have a public key ASAiTp3get5i6-F2fG69EKJ783DLxMOAZO455HhtCdyiQAo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "0120224e9de07ade62ebe1767c6ebd10a27bf370cbc4c38064ee39e4786d09dca2400a",       "host": "keybase.io",       "kid": "0120224e9de07ade62ebe1767c6ebd10a27bf370cbc4c38064ee39e4786d09dca2400a",       "uid": "67c6dcd78afd0895e1970e4b48cd8b19",       "username": "alainlou"     },     "merkle_root": {       "ctime": 1569613748,       "hash": "ec3688ea6aa236f55164903d29a05295499d2ad279a1df42ac2b08aa58d4c3ae89eae9a381db9b03408ba2c3f593534f9bdea1d01b017218a5a808a36bd2a5e2",       "hash_meta": "eef9acbc1598cea3aac03155107e6511d234f1863879c0f8204f1eefb1af18f3",       "seqno": 7773350     },     "service": {       "entropy": "QSiHEEGO0ESJUrX7ue/u66zb",       "name": "github",       "username": "alainlou"     },     "type": "web_servi