This file contains 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
require "./rv32sim" | |
def _add(rd, rs1, rs2) | |
0b0110011 | | |
(rd << 7) | | |
(0x0 << 12) | | |
(rs1 << 15) | | |
(rs2 << 20) | | |
(0x00 << 25) | |
end |
This file contains 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
# bin2float.rb | |
# usage: | |
# ruby bin2float.rb 11000010111011010100000000000000 #=> -118.625 | |
puts [ARGV[0]].pack('B*').unpack('g') |
This file contains 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
// uart 送信テスト | |
module top( | |
input clk, | |
input wire RsRx, | |
output wire RsTx, | |
output led | |
); | |
logic s_axi_aresetn = 1'b1; | |
logic interrupt; |
This file contains 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
goodbye: | |
.set nomips16 | |
.frame $fp,8,$31 # vars= 0, regs= 1/0, args= 0, gp= 0 | |
.mask 0x40000000,-4 | |
.fmask 0x00000000,0 | |
.set noreorder | |
.set nomacro | |
addiu $sp,$sp,-8 | |
sw $fp,4($sp) |
This file contains 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
diff -u SPARC/asm.ml PowerPC/asm.ml | |
--- SPARC/asm.ml 2019-03-19 21:12:59.000000000 +0900 | |
+++ PowerPC/asm.ml 2019-03-19 21:12:59.000000000 +0900 | |
@@ -1,4 +1,4 @@ | |
-(* SPARC assembly with a few virtual instructions *) | |
+(* PowerPC assembly with a few virtual instructions *) | |
type id_or_imm = V of Id.t | C of int | |
type t = (* 命令の列 (caml2html: sparcasm_t) *) | |
@@ -6,23 +6,24 @@ |
This file contains 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
`define ENABLE_ADC_CLOCK | |
`define ENABLE_CLOCK1 | |
`define ENABLE_CLOCK2 | |
`define ENABLE_SDRAM | |
`define ENABLE_HEX0 | |
`define ENABLE_HEX1 | |
`define ENABLE_HEX2 | |
`define ENABLE_HEX3 | |
`define ENABLE_HEX4 | |
`define ENABLE_HEX5 |
This file contains 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
`define ENABLE_ADC_CLOCK | |
`define ENABLE_CLOCK1 | |
`define ENABLE_CLOCK2 | |
`define ENABLE_SDRAM | |
`define ENABLE_HEX0 | |
`define ENABLE_HEX1 | |
`define ENABLE_HEX2 | |
`define ENABLE_HEX3 | |
`define ENABLE_HEX4 | |
`define ENABLE_HEX5 |
This file contains 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 <Adafruit_GFX.h> | |
#include <gfxfont.h> | |
#include <Adafruit_TFTLCD.h> | |
#include <pin_magic.h> | |
#include <registers.h> | |
// The control pins for the LCD can be assigned to any digital or | |
// analog pins...but we'll use the analog pins as this allows us to |
This file contains 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
<html> | |
<body> | |
<pre style="font-family: serif"> | |
2017/ 1/ 1 | |
2017/ 1/ 2 | |
2017/ 1/ 3 | |
2017/ 1/10 | |
2017/ 1/28 | |
2017/ 1/29 | |
2017/ 1/30 |
This file contains 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
let cells = [ | |
[false, false, false, false, false], | |
[false, false, false, false, false], | |
[false, false, false, false, false], | |
[false, false, false, false, false], | |
[false, false, false, false, false], | |
] | |
function next_generation() { | |
let newCells = [ |