General:
g - Move
r - Rotate
s - Scale
Tab - Toggle between Object and Edit mode
Shift + Tab - Toggle Snap
Shift + a - Add Menu
#pragma once | |
#define ENABLE_COVERAGE 1 | |
#if ENABLE_COVERAGE | |
#define COVER_LOCATION printf("%s:%u ", __FILE__, __LINE__) | |
#define COVER_TOKEN printf(" // COVERED\n") | |
#define COVER_ONCE(TEXT) \ | |
{ \ |
#include <cstdint> | |
#include <cmath> | |
#include <GLFW/glfw3.h> | |
#include "camera.h" | |
const float pi = 3.14159265359f; |
#include <stdio.h> | |
#include <stdint.h> | |
void swap(uint8_t *a, uint8_t i, uint8_t j) { | |
uint8_t t = a[i]; | |
a[i] = a[j]; | |
a[j] = t; | |
} |
---------------------------------------------------------------- | |
PORTS | |
---------------------------------------------------------------- | |
PORT_DSP_RESET = PORT_BASE + 0x6, // wo | |
PORT_DSP_READ_DATA = PORT_BASE + 0xA, // ro | |
// returns 0xAA after reset |
#include "vcd.h" | |
#include <cstdlib> | |
int main(int argc, char **args) { | |
vcd::vcd_t vcd; | |
if (!vcd.begin("test.vcd", 1, vcd::timescale_ps)) { | |
return 1; | |
} |
module spiSlave( | |
input iClk, // master clock | |
input iSck, // spi clock (sample posedge) | |
input iCs, // spi chip select (active low) | |
input iMosi, // master out slave in | |
input [7:0] iData, // data transmit | |
output oMiso, // master in slave out | |
output [7:0] oData, // data received | |
output oAvail // data received strobe |
General:
g - Move
r - Rotate
s - Scale
Tab - Toggle between Object and Edit mode
Shift + Tab - Toggle Snap
Shift + a - Add Menu
module debounce( | |
input clk, | |
input iKey, | |
output oOut, | |
); | |
reg [3:0] state; | |
assign oOut = state[3]; | |
always @(posedge clk) begin | |
if (iKey) begin | |
state <= (state == 4'hf) ? 4'hf : (state + 1); |
`default_nettype none | |
`timescale 1us/1ns | |
module sid_env_imp( | |
input CLK, | |
input CLKen, | |
input GATE, | |
input [3:0] ATT, | |
input [3:0] DEC, | |
input [3:0] SUS, |
#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" |