Skip to content

Instantly share code, notes, and snippets.

# This file is generated. Make sure you are editing the right source!
# Earendil IRC Protocol Specification, version 0.0
import attr
class IrcParseError(Exception):
pass
module reservoir_node_000(input enable,
input [99:0] r [99:0],
input [15:0] u [99:0],
output out);
wire value = u[ 40][ 5] & ~u[ 16][ 6] & ~u[ 40][ 7]
| u[ 40][ 5] & ~r[ 51][ 25] & ~r[ 95][ 94] & ~u[ 16][ 6]
| ~r[ 51][ 25] & ~r[ 46][ 45] & ~r[ 95][ 94] & ~u[ 16][ 6] & ~u[ 40][ 7];
assign out = enable ? value : 1'b0;
endmodule
module reservoir_node_0(input enable,
input [0:99] r,
input [0:15] u,
output out);
wire value = r[18] & r[72]
| r[18] & ~u[13]
| r[72] & ~u[13]
| r[18] & ~r[92] & ~u[15]
| r[18] & ~r[92] & ~u[8]
| r[18] & ~u[15] & ~u[8]
@agrif
agrif / main.c
Created February 15, 2020 05:29
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "font.h"
__sfr __at 0x50 ioLED;
module vga_demo(/*AUTOARG*/);
input clk50m;
input reset_n;
output hsync_n;
output vsync_n;
output data_enable;
output pixel_clk;
output [7:0] r;
output [7:0] g;
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
__sfr __at 0x00 ioLED;
__sfr __at 0x10 ioID0;
__sfr __at 0x11 ioID1;
__sfr __at 0x12 ioID2;
module tv80_avalon_master(/*AUTOARG*/);
parameter width = 16;
// clock and reset
input clk;
input reset_n;
// avalon master signals
output [width-1:0] address;
output reg read_n;
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
__sfr __at 0x00 ioLED;
__sfr __at 0x10 ioID0;
__sfr __at 0x11 ioID1;
__sfr __at 0x12 ioID2;
#include <stdbool.h>
#include <stdint.h>
__sfr __at 0x00 ioLED;
__sfr __at 0x10 ioID0;
__sfr __at 0x11 ioID1;
__sfr __at 0x12 ioID2;
__sfr __at 0x13 ioID3;
__sfr __at 0x14 ioID4;
import inspect
## utility stuff
def identity(x):
return x
def swap(t):
return tuple(reversed(t))