Full-Time Student at Duke University
Aug. 2011 - Present
Founder of iFixTeam
May 2011 - Present
Teaching Assistant for Duke E.C.E. & C.S. Departments
ECE/CS 250 - Computer Architecture (Review Page)
Aug. 2013 - Present
Learning to invest in equities, progress at Stocks With Ruslan
May 2013 - Present
[Objective C]
panicLock - Extra level of security for iDevices
Aug. 2014
[Verilog]
Custom 32 Bit Processor - Ran "Connect Four" on a VGA Display via custom assembly from scratch
Spring 2014
Engineering Intern at Apportable, San Francisco, CA
Contributed to the Apportable Platform in key areas.
UIKit
CoreGraphics Testing
Apportable Xcode Plugin
Performed NDA work with bringing Google Snapshots to Objective C.
May - Aug. '14
Unified Core Storage
Sep. 2013 - Dec. 2013
Power in Mobile Cache Coherence
Jan. 2014 - April 2014
Paper Reviews
[pptx] C. Gniady, B. Falsafi, T.N. Vijaykumar, Is SC+ILP = RC? In Proceedings of the Twenty Sixth Annual International Symposium on Computer Architecture, 1999.
Jan. 2014
[pptx] R. M. Russell, The CRAY-1 Computer System In Communications of the ACM, January 1978, Volume 21, Number 1.
Feb. 2014
[pptx] R. Rajwar, J. R. Goodman, Speculative Lock Elision: Enabling Highly Concurrent Multithreaded Execution In Proceedings of the Thirty Fourth Annual International Symposium on Computer Architecture, 2001.
April 2014
[CS] Data Structures and Algorithms, Amortization, Unix Fundamentals, Thread & Data Concurrency, File Systems, Virtual Machines, Object-Oriented Programming
[ECE] Verilog Design, SimpleScalar Processor Simulation, PSPICE Circuit Design & Analysis, Processor Modeling with Logisim, Fourier Transforms, Signal Generation, Advanced Pipeline Design, Advanced Cache / Memory Design, Vector Computing, Fault Tolerant Computing, Transmission Line Transients, Antenna Design
First & Second President of Montauk House at Duke University
Sep. 12' - May '14
Helped lead Duke University's transition from independent housing to the housing model
Duke Men's Crew Rowing Team
Sep. '12 - Dec. '12
Hoof N' Horn Theatre Group
Sep. 11' - Present
Performed in The Mystery of Edwin Drood (Winter '11)
Cast member in The Freshman Orientation Cabaret (Fall '12, Fall '13)
Before even getting started, get a better C editor. For mac users, get the latest xCode (includes gcc), and download Sublime. Using this is much easier than compiling via connecting to the Teer machines and will make editting and debugging much easier.
How to connect to CIFS and edit that way. [Coming soon.]
To get started on this homework's coding assignment, first get a little comfortable with C if you aren't already --
you will need to be for the midterms and final. Don't go crazy with worrying, but you should be familiar with a simple
data structure, the "struct" (more on that later), pointers, and how dynamic memory allocation is done.
Below are some getting-started tutorials. These should help with the preliminary coding problems and with
getting started with C:
First and foremost, you need to learn how to read from the text file provided. The code below is provided as a reference for reading off lines in C.
C - Reading from a Text File
/*
** File FILE_3.C
**
** Illustrates how to read from a file.
**
** The file is opened for reading. Each line is successively fetched
** using fgets command. The string is then converted to a long integer.
**
** Note that fgets returns NULL when there are no more lines in the file.
**
** In this example file ELAPSED.DTA consists of various elapsed times in
** seconds. This may have been the result of logging the time of events
** using an elapsed time counter which increments each second from the
** time the data logger was placed in service.
**
** Typical data in elapsed.dta might be;
**
** 65
** 142
** 1045
** 60493
** 124567
**
**
** Peter H. Anderson, 4 April, '97
*/
#include <stdio.h> /* required for file operations */
#include <onio.h> /* for clrscr */
#include <dos.h> /* for delay */
FILE *fr; /* declare the file pointer */
main()
{
int n;
long elapsed_seconds;
char line[80];
clrscr();
fr = fopen ("elapsed.dta", "rt");
// open the file for reading
// elapsed.dta is the name of the file
// "rt" means open the file for reading text
while(fgets(line, 80, fr) != NULL)
{
/* get a line, up to 80 chars from fr. done if NULL */
sscanf (line, "%ld", &elapsed_seconds);
/* convert the string to a long int */
printf ("%ld\n", elapsed_seconds);
}
fclose(fr); /* close the file prior to exiting the routine */
} /*of main*/
Courtesy of http://www.phanderson.com/files/file_read.html .
Once we have read the file, you will need to dynamically allocate whatever data structure(s) you are using. Below is a great explanation on how to do this.
In general, if we have the line newptr=(struct Node *) malloc(sizeof(Node));,
we cast it with (struct Node *) before writing malloc(sizeof(Node)).
We do this because by default, malloc returns a void*, or a void pointer.
We "cast" the malloc'd memory as, in this case, a struct pointer.
On another note, you will need to contain your data. For this, C has a convenient data structure known as a "struct." Structs are essentially just pre-set "offsets." If you malloc a struct with an int, int, and a char[32] (a string with maximum 32 chars), for example, the struct.int0 will be at 0, struct.int1 will be at 4 (on a 32 bit machine, since an int is 4 bytes in size), and the char will span from 8 to 39 (since it begins at byte 8, and is 32 bytes in size, so it takes 8, 9, 10, ..., 38, 39, and the next data structure begins at 40).
After dynamic allocation comes sorting. This portion draws heavily upon CS 201 knowledge and, aside from some C vernacular, is left to 201 experience. One way of doing it by creating another identically sized data structure and placing results there as you sort.
Before you get started, download a better editor. There exists a program called MARS which is the ultimate tool in developing in MIPS. It is easier and much quicker than what is provided. The best way of using this resource is to first read the entire resource and its links. Once you have done so, then sit down and reference this as you code. KEEP IN MIND that there are slight differences between MARS and QtSpim. Make sure your code works on both!
First and foremost, familiarize yourself with the syscall. You will be using it for:
Below is an example on how to use a syscall. Included below that is the ultimate resource you can possibly find on how to use every syscall.
To print "the answer = 5", use the commands:
.data
str: .asciiz "the answer = "
.text
li $v0, 4 # $system call code for print_str
la $a0, str # $address of string to print
syscall # print the string
li $v0, 1 # $system call code for print_int
li $a0, 5 # $integer to print
syscall # print it
Next is the matter of your data structures. Since MIPS doesn't have "structs," recall what structs were on a fundamental level in C -- pre-set offsets for data. An int, int, 8-char string struct, for example, always store the first int at 0-3 (0,1,2,3), second at 4 (4,5,6,7), and the 8 char string as 8 chars at 8 (8,9,10,11,12,13,14,15). Note how the beginning of the next data always begins at an interation of 4, and the previous data ends at the one before it (0-3, 4-7, 8-15, 16 onwards, etc).
Imagine how you would implement a struct in C if it were not written for you, and then do it in MIPS. (Hint: a var can maybe hold the first offset, the second the second offset...).
The rest is translating your C program to MIPS Assembly. See the resources below to learn all about MIPS (these will make your life much easier).
Download Logisim.
Become familiar with Boolean Algebra and writing Truth Tables. This will be very important on this HW, the next HW, and the second exam onwards.
More content coming soon! Email me at ruslan.ardashev@duke.edu if you would like to request additional help in this topic!
The majority of this homework is already "done" for you on a fundamental level in the slides from class. Many of the inner workings of the components are already detailed for you. Your task now is to put them together and to scale it up to 16 bits. Below are resources to help you in doing so.
More content coming soon! Email me at ruslan.ardashev@duke.edu if you would like to request additional help in this topic!
More content coming soon! Email me at ruslan.ardashev@duke.edu if you would like to request additional help in this topic!
More content coming soon! Email me at ruslan.ardashev@duke.edu if you would like to request additional help in this topic!
More content coming soon! Email me at ruslan.ardashev@duke.edu if you would like to request additional help in this topic!