This file contains hidden or 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
// TODO: this module occasionally reads garbage | |
`define BAUD_RATE 9_600 | |
`define CLOCK 27_000_000 | |
module uart_rx #(TICKS_PER_BIT=2_812) (clk, reset, re, rx, data, received, busy, valid); | |
input clk; | |
input reset; | |
input re; |
This file contains hidden or 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 <math.h> | |
#include <stdio.h> | |
#include "uthash.h" | |
#include "utlist.h" | |
// minus one for extra vertex | |
#define VOXEL_SIDE 31 | |
#define BITS_PER_SIDE 5 | |
#define VERTEX_MASK 0x1F |