This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module testbench (); | |
endmodule | |
/* | |
module testbench2 (); | |
reg GCLK100 = 1'b0; | |
wire ETH_MDC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apple: | |
var body = document.getElementByTagName('body') | |
body.addEventListener('touchstart', function(evt){ | |
// should be either "stylus" or "direct" | |
console.log(evt.touches[0].touchType) | |
}) | |
// Chrome & Edge: | |
if (window.PointerEvent) { | |
// Pointer events are supported. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (=>) left right = print_char (if left = right then '.' else 'F') | |
open Printf | |
let id x = x | |
let const x = fun _ -> x | |
let sum = List.fold_left (+) 0 | |
let (>>) f g x = g (f x) | |
let () = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<project source="2.7.1" version="1.0"> | |
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/). | |
<lib desc="#Wiring" name="0"/> | |
<lib desc="#Gates" name="1"/> | |
<lib desc="#Plexers" name="2"/> | |
<lib desc="#Arithmetic" name="3"/> | |
<lib desc="#Memory" name="4"> | |
<tool name="ROM"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# full iCEstick pinout: | |
# http://www.pighixxx.com/test/portfolio-items/icestick/ | |
set_io CLK_pad 21 | |
set_io FT2232H_GPIOL2_pad 1 | |
set_io FT2232H_GPIOL1_pad 2 | |
set_io FT2232H_GPIOL0_pad 3 | |
set_io FT2232H_TMS_CS_pad 4 | |
set_io FT2232H_TDO_DI_pad 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"nodes":[{"x":462,"y":465,"text":"reset_btn_pressed","isAcceptState":false},{"x":462,"y":743,"text":"reset_btn_released","isAcceptState":false},{"x":1537,"y":112,"text":"powered_on","isAcceptState":false},{"x":1555,"y":325,"text":"resetting","isAcceptState":false},{"x":1738,"y":582,"text":"clearing_registers","isAcceptState":false},{"x":2210,"y":590,"text":"select_random","isAcceptState":false},{"x":1231,"y":582,"text":"not_resetting","isAcceptState":false},{"x":2286,"y":325,"text":"\"playing\"","isAcceptState":false},{"x":3171,"y":248,"text":"lcd_rdy_scrn","isAcceptState":false},{"x":3217,"y":1314,"text":"led_green_on","isAcceptState":false},{"x":3502,"y":1530,"text":"LED_strip","isAcceptState":false},{"x":3243,"y":1897,"text":"bad_sound","isAcceptState":false},{"x":3381,"y":94,"text":"lcd_off","isAcceptState":false},{"x":3217,"y":1517,"text":"led_green_off","isAcceptState":false},{"x":3489,"y":1819,"text":"no_sound","isAcceptState":false},{"x":3429,"y":622,"text":"lcd_make_selections","isAcceptState":false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const deviceMachine = Machine({ | |
id: 'device', | |
initial: 'powered_off', | |
states: { | |
powered_on: { | |
type: 'parallel', | |
on: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <stdio.h> | |
bool memory[12] = { | |
0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, | |
// 0 1 0 1 0 1 0 1 0 1 0 1 | |
// 0 0 1 1 0 0 1 1 0 0 1 1 | |
// 0 0 0 0 1 1 1 1 0 0 0 0 | |
// 0 0 0 0 0 0 0 0 1 1 1 1 | |
}; | |
bool current_instruction[12] = { 0 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://en.wikipedia.org/wiki/Fold_(higher-order_function)#Folds_as_structural_transformations |