Skip to content

Instantly share code, notes, and snippets.

View Hikari9's full-sized avatar

Rico Tiongson Hikari9

  • Ateneo de Manila University
View GitHub Profile
@Hikari9
Hikari9 / FinalLabMemory.jsim
Created December 1, 2015 04:01
CS 152 final lab using JSIM memory
.include "8clocks.jsim"
.include "nominal.jsim"
.include "stdcell.jsim"
// for alufn connect
.subckt knex a b
.connect a b
.ends
// Xlab opcode[5:0] z pcsel[1:0] ra2sel bsel wdsel[1:0] alufn[5:0] wr werf FINALLAB
// run this in the k-map solver site in http://www.32x8.com/circuits6 to choose radio buttons
index = 3;
tags = document.getElementsByTagName('input');
radio = {};
// find radio tags
for (i in tags) {
if (tags[i].type == 'radio' && tags[i].name.substring(0, 2) == 'in') {
@Hikari9
Hikari9 / FINALLAB.jsim
Created November 30, 2015 14:05
CS 152 final lab: f(opcode, z) = (pcsel, ra2sel, bsel, wdsel, alufn, wr, werf)
.include "8clocks.jsim"
.include "nominal.jsim"
.include "stdcell.jsim"
// for alufn connect
.subckt knex a b
.connect a b
.ends
// Subcircuit for final lab