Skip to content

Instantly share code, notes, and snippets.

instead of this...

vmul.f32  q10, q15, q9
vmul.f32  q11, q13, q9
vfma.f32  q10, q3, q8
vfma.f32  q11, q14, q8

it's doing this...

vmul.f32 q12, q15, q9

#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <semaphore.h>
int main()
#include "wetware/monitor.h"
struct probe probes[] =
{ { "ping-4.2.2.2", "ping to 4.2.2.2", probe_ping("4.2.2.2") }
, { "ping-8.8.8.8", "ping to 8.8.8.8", probe_ping("8.8.8.8") }
};
#include "wetware/monitor-main.h"
#!/bin/sh
usage() {
printf "usage: fehtr IMAGE\n"
}
if test 1 -ne $#; then
usage; exit 1
fi
feh -- "$1"
#!/usr/bin/env python3
from socket import (AF_INET, SOCK_DGRAM, socket)
MTU = 1500
sock = socket(AF_INET, SOCK_DGRAM)
sock.bind(('localhost', 53))
while True:
module top
( input CLK
, output LED1
, output LED2
, output LED3
, output LED4
, output LED5
, input BTN1
, input BTN3
);
# Launch Properties for Sid Meier's Civilization V and Civilization Beyond Earth on Linux
# Pre-loading the Steam Runtime version of `libcurl-gnutls.so.4` fixes a segfault during launch
# Pre-loading the Steam Runtime version of `libtbb.so.2` fixes occassional segfaults during gameplay
LD_PRELOAD="$STEAM_RUNTIME/usr/lib/i386-linux-gnu/libcurl-gnutls.so.4:$STEAM_RUNTIME/usr/lib/i386-linux-gnu/libtbb.so.2" %command%

First step is to translate Verilog into a "gate-level netlist" appropriate for an iCE40-family FPGA. You might make a rough correlation here with compiling C code down to assembly for a family of processors.

$ yosys -ql blink_count_shift.log \
> -p 'synth_ice40 -top top -json blink_count_shift.json' blink_count_shift.v

-top specifies the top-level block to be translated. Since blocks may embed other blocks, it's important to identify which block is top-level. If there is a default value for this, I am unaware of it.

@acdimalev
acdimalev / README.md
Last active September 15, 2019 21:49

Adding a "grammar" context to all parsers.

Option 1 ("grammar omnipresence"):

  • Adding a grammar parameter to the parse and generate functions of every parser.
  • Updating every parse and generate call to pass a grammar parameter

Option 2:

  • Adding a map function to every parser.
-- given a deck with one note type and six card types
update cards
set due = ord - 6 + 6 * (
select sfld
from notes
where nid == notes.id
)
;