Skip to content

Instantly share code, notes, and snippets.

View peterzhu2118's full-sized avatar
🤷‍♂️
My code works, I have no idea why

Peter Zhu peterzhu2118

🤷‍♂️
My code works, I have no idea why
View GitHub Profile
@peterzhu2118
peterzhu2118 / beatmap.v
Created November 29, 2018 23:43
CSC258 Project
// start is the signal that (when low) starts the game
// refresh_clk is the clock for the refresh (60Hz)
// adjustment_factor is the number of pixels vertically to adjust by (updates with refresh_clk)
// col_0 to col_5 contains the location of the box on the screen (left most bit is for bottom of screen, right most bit for top)
module beatmap(CLOCK_50, refresh_clk, resetn, start, col_0, col_1, col_2, col_3, col_4, col_5, beatmap_clk);
input CLOCK_50, refresh_clk, resetn, start;
output [4:0] col_0, col_1, col_2, col_3, col_4, col_5;
reg [4:0] col_0, col_1, col_2, col_3, col_4, col_5;
output beatmap_clk;
@peterzhu2118
peterzhu2118 / keyboard_inner_driver.v
Created November 26, 2018 15:23
CSC258 Project Dependencies
module keyboard_inner_driver(keyboard_clk, keyboard_data, clock50, reset, read, scan_ready, scan_code);
input keyboard_clk;
input keyboard_data;
input clock50; // 50 Mhz system clock
input reset;
input read;
output scan_ready;
output [7:0] scan_code;
reg ready_set;
reg [7:0] scan_code;
@peterzhu2118
peterzhu2118 / Altera_UP_Audio_Bit_Counter.v
Created November 13, 2018 23:15
CSC258 Project Speaker Test
/******************************************************************************
* License Agreement *
* *
* Copyright (c) 1991-2009 Altera Corporation, San Jose, California, USA. *
* All rights reserved. *
* *
* Any megafunction design, and related net list (encrypted or decrypted), *
* support information, device programming or simulation file, and any other *
* associated documentation or information provided by Altera or a partner *
* under Altera's Megafunction Partnership Program may be used only to *
@peterzhu2118
peterzhu2118 / animation.v
Created November 11, 2018 16:05
CSC258 Lab 7 Part 3
module animation(
SW,
KEY,
CLOCK_50,
VGA_CLK, // VGA Clock
VGA_HS, // VGA H_SYNC
VGA_VS, // VGA V_SYNC
VGA_BLANK_N, // VGA BLANK
VGA_SYNC_N, // VGA SYNC
VGA_R, // VGA Red[9:0]
@peterzhu2118
peterzhu2118 / black.mif
Created November 11, 2018 15:08
CSC258 Lab 7 Part 2
WIDTH=3;
DEPTH=19200;
ADDRESS_RADIX=UNS;
DATA_RADIX=UNS;
CONTENT BEGIN
[0..19199] : 0;
END;
@peterzhu2118
peterzhu2118 / ram.v
Created November 11, 2018 15:07
CSC258 Lab 7 Part 1
module ram(SW, KEY, HEX0, HEX2, HEX4, HEX5);
input [9:0] SW;
input [3:0] KEY;
output [6:0] HEX0, HEX2, HEX4, HEX5;
wire [3:0] out;
ram32x4 r0 (
.address(SW[8:4]),
.clock(KEY[0]),
@peterzhu2118
peterzhu2118 / hello-rails-deployment
Created January 31, 2018 03:37
Shopify Production Engineering Summer Internship 2k18
C:\WINDOWS\system32>kubectl describe --namespace=hello-rails deployments -n hello-rails
Name: hello-rails
Namespace: hello-rails
CreationTimestamp: Tue, 30 Jan 2018 22:07:52 -0500
Labels: app=hello-rails
Annotations: deployment.kubernetes.io/revision=1
Selector: app=hello-rails
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0