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 <cstdio> | |
#include <thread> | |
#include <set> | |
#include <string> | |
#include <GLFW/glfw3.h> | |
#include "imgui.h" | |
#include "backends/imgui_impl_glfw.h" | |
#include "backends/imgui_impl_opengl2.h" |
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
005a | |
005a | |
005a | |
005a | |
005a | |
005a | |
005a | |
005a | |
005a | |
005a |
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
module mult(input CLK, | |
input [15:0] iSig, | |
input signed [15:0] iCoef, | |
output signed [15:0] oOut); | |
wire signed [31:0] product; // 16x16 product | |
assign oOut = product[31:16]; | |
SB_MAC16 mac( |
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
module spi_slave(input CLK, // system clock | |
input SPI_CLK, // spi clock | |
input SPI_MOSI, // spi mosi | |
input SPI_CS, // spi chip select | |
output [7:0] DATA, // data out | |
output RECV); // data received | |
reg [2:0] sclk; | |
reg [2:0] smosi; | |
reg [2:0] scs; |
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
module pulse_t( | |
input CLK12, | |
input TICK, | |
input [10:0] PERIOD, | |
output BIT); | |
reg [10:0] counter; | |
always @(posedge CLK12) begin | |
if (TICK) begin |
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
`default_nettype none | |
// moving average filter | |
// filter 222222Hz to ~27777Hz | |
module filter_t( | |
input CLK12, | |
input TICK, | |
input signed [15:0] IN, | |
output signed [15:0] OUT); |
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
`default_nettype none | |
`timescale 1ns / 1ps | |
// | |
// simple sram model (IS61WV25616EDBLL) | |
// | |
module sram(input [3:0] addr, // address bus | |
input ce, // chip enable (act. low) | |
input we, // write enable (act. low) | |
input oe, // output enable (act. low) |
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
// | |
// sdram.v | |
// | |
// sdram controller implementation for the MiST board adaptation | |
// of Luddes NES core | |
// http://code.google.com/p/mist-board/ | |
// | |
// Copyright (c) 2020 René Rebe <[email protected]> | |
// Copyright (c) 2013 Till Harbaum <[email protected]> | |
// |
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
// generate a bitmask between lo and hi bits inclusive | |
#define BIT_MASK(hi, lo) ((~0u >> (31-(hi))) & (~0u << (lo))) |
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
#pragma once | |
#include <Arduino.h> | |
#include <SPI.h> | |
// 23lc1024 pin mapping | |
// | |
// 1 CS | |
// 2 MISO | |
// 3 (tie gnd) | |
// 4 GND |