EECS 470 Lab 4. Version Control System. Thursday, 27 th September, 2018

Size: px
Start display at page:

Download "EECS 470 Lab 4. Version Control System. Thursday, 27 th September, 2018"

Transcription

1 EECS 470 Lab 4 Version Control System Department of Electrical Engineering and Computer Science College of Engineering niversity of ichigan Thursday, 27 th September, 2018 (niversity of ichigan) Lab 4: VCS Thursday, 27 th September, / 63

2 Administrivia Administrivia Homework I Homework 2 is due Tuesday, 2 nd October I If you haven t, you need to get started now We are available to answer questions on anything here. Office hours can be found in the course web site. (niversity of ichigan) Lab 4: VCS Thursday, 27 th September, / 63

3 Overview Administrivia Git VCS Basics Distributed VCS Git Preliminaries Git Basics by Example Assignment (niversity of ichigan) Lab 4: VCS Thursday, 27 th September, / 63

4 Overview Administrivia Git VCS Basics Distributed VCS Git Preliminaries Git Basics by Example Assignment (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

5 VCS Basics Version Control Systems What is a version control system? I Stores text files I Keeps old versions around I Allows parallel work Why do I care? I Prevents/helps prevent loss of data (nothing is foolproof) I Great for group work I Required for Project 3 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

6 VCS Basics History of VCS otivation Avoid having I isr.v.old I isr.v.old2 I isr.v.working I isr.v.really_working AShortHistory 1950 anual file naming 1982 Revision Control System Local 1986 Concurrent Versions System 2000 Subversion Central 2005 Git Distributed (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

7 Distributed VCS Centralized VCS What does it mean to be centralized? I Clients talk to a server, which is the one, true version I Server copy keeps history I Clients have a(n) (incomplete) working copy (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

8 Distributed VCS Distributed VCS VCS Structure Centralized (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

9 Distributed VCS Distributed VCS What does it mean to be distributed? I Every copy is created equal (can all act as the server) I No one, true version (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

10 Distributed VCS Distributed VCS VCS Structure Distributed (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

11 Distributed VCS Hybrid VCS The Hybrid Approach I se a DVCS I Set up a server to be the synchronization point I Possibly still connect directly to colleagues, but generally not (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

12 Distributed VCS Distributed VCS VCS Structure Hybrid (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

13 Git Preliminaries Subsection 3 Git Preliminaries (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

14

15 Git Preliminaries Secure Shell What is ssh? I Secured remote connection to a server, e.g. I Remote shell I How git (should) communicate(s) with other machines What do I need to know? I Requires that you identify yourself: I Key (RSA or DSA) I Password (keyboard-interactive) I Kerberos (gssapi-with-mic) I Necessary for Bitbucket (coming up) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

16 Git Preliminaries Secure Shell: Keys SSH Keys I Public-private key pair authentication I Can also be password protected ssh-keygen I Creates /.ssh/id_rsa (your private key) and /.ssh/id_rsa.pub (your public key) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

17 Git Preliminaries Example: ssh-keygen ~] $ ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (/home/wcunning/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/wcunning/.ssh/id_rsa. Your public key has been saved in /home/wcunning/.ssh/id_rsa.pub. The key fingerprint is: 3f:91:f9:7f:d7:be:4e:62:56:27:88:1d:3a:5d:b4:56 wcunning@dahak The key's randomart image is: +--[ RSA 4096] E. o. + B = S B o.+...o.o + o= (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

18 Git Preliminaries Bitbucket What is Bitbucket? I Free, online git repositories I ore friendly to private repos than Github What do I need to know? I sed for Project 3 and the final project I You need to make an account, right now I Once you have an account, add it to this spreadsheet How to make a Bitbucket account... (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

19 Git Preliminaries Git Configuration Follow Along I Run the following commands: I git config --global user.name Your Name I git config --global user. uniqname@umich.edu I Optionally: I Download wcunning-dotfiles.tar.gz I Open it up I Copy.gitconfig and.gitignore to your home directory I Optionally copy other configs/google those programs (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

20 Git Basics by Example Example Execution ~] $ git clone git@bitbucket.org:eecs470staff/course_material.git Cloning into 'course_material'... Warning: Permanently added the RSA host key for IP address ' ' to the list of known hosts. remote: Counting objects: 183, done. remote: Compressing objects: 100% (166/166), done. remote: Total 183 (delta 39), reused 0 (delta 0) Receiving objects: 100% (183/183), KiB 0 bytes/s, done. Resolving deltas: 100% (39/39), done. Checking connectivity... done [wcunning@dahak Documents] $ cd course_material/ [wcunning@dahak project1] [master] $ vim projects/project1/testd.v [wcunning@dahak project1] [master *] $ git add projects/project1/testd.v [wcunning@dahak project1] [master +] $ git commit [master 4caae96] pdated Project 1 to clock); 1 file changed, 11 insertions(+), 11 deletions(-) [wcunning@dahak project1] [master] $ git push Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 544 bytes 0 bytes/s, done. Total 5 (delta 3), reused 0 (delta 0) To git@bitbucket.org:eecs470staff/course_material.git da0cf7a..4caae96 master -> master (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

21 Git Basics by Example Git Basics Introduction Structure For each command you need to know, we will 1. Occasionally, an aside with a Git Concept we need to describe a command 2. Describe the command, along with any useful flags/options 3. Show how the command affects the repositories 4. Show an example with output (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

22 Git Basics by Example Git Diagram Git Repo Structure Commit Tree 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

23 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=9a12490 ark HEAD=9a12490 Will HEAD=9a a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

24 Git Basics by Example Git Commands: clone What does git clone do? I akes a copy of a repository Syntax and Options I Example: git clone <protocol>:/<repo> <directory> Clones the repo at <repo> into <directory> I Repos can be accessed through several different protocols I Git: nsecured, do not use I HTTP(S): sed for freely available things, but push should use the secured version I SSH: The right answer, always secure, likely passwordless (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

25 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=9a12490 ark HEAD=9a12490 Jon HEAD=9a12490 Will HEAD=9a a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

26 Git Basics by Example Git Commands by Example: clone ~] $ git clone git@bitbucket.org:eecs470staff/course_material.git Cloning into '.'... remote: Counting objects: 79, done. remote: Compressing objects: 100% (68/68), done. remote: Total 79 (delta 13), reused 0 (delta 0) Receiving objects: 100% (79/79), KiB, done. Resolving deltas: 100% (13/13), done. (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

27 Git Basics by Example Git Concepts: Working Copy vs. Local Repo What is the working copy? I The files/folders you actually operate on I e.g. group1/ What is the local repo? I The hidden folder containing the stored history for the repo I e.g. group1/.git/ Consequences I.git/ directory is a full repo I seful in the event that you needed a backup I Commits get stored here I Synchronization with the remote is explicit (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

28 Git Basics by Example Git Concepts: Remotes What is a remote? I Remotes are bookmarked repositories to synchronize with Consequences I Clone automatically creates a remote named origin, which is the default for all remote operations (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

29 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=9a12490 ark HEAD=9a12490 Jon* HEAD=9a12490 Will HEAD=9a a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

30 Git Basics by Example Git Concepts: Tracked Files What does it mean for a file to be tracked? I Files that are tracked are stored in the repository Consequences I ntracked files have no history I Tracked files can be compared for changes I Files can be ignored (.gitignore) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

31 Git Basics by Example Git Commands: status What does git status do? I Shows the contents of the staging area I Shows the files with differences to the most recent commit I Shows the files untracked by git Syntax and Options I Example: git status (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

32 Git Basics by Example Git Commands by Example: status slides] [master *] $ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: eecs470lab4slides.tex # (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

33 Git Basics by Example Git Commands: add What does git add do? I If a file is untracked it becomes tracked I Otherwise, the current version is taken as a snapshot and added to the staging area Syntax and Options I Example: git add <files> I <files> can be any normal shell file structure (globs, wildcards, directories, etc.) I if <files> has a directory, it is added recursively I git add interactive: Lets you add files and parts of files from the status output interactively; possibly good for commit building after a complex set of changes (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

34 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=9a12490 ark HEAD=9a12490 Jon+ HEAD=9a12490 Will HEAD=9a a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

35 Git Basics by Example Git Commands by Example: add slides] [master *] $ git add eecs470lab4slides.tex [jbbeau@dahak slides] [master +] $ git status # On branch master # Changes to be committed: # (use git reset HEAD <file>..." to unstage # # modified: eecs470lab4slides.tex # (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

36 Git Basics by Example Git Concepts: Snapshots What is a snapshot? I git add doesn t follow a file in perpetuity I Instead, it saves a snapshot (the state of the file at the time the command was called) Consequences I Files need to be added every time they are changed I Can add only certain files to a commit (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

37 Git Basics by Example Git Concepts: The Staging Area What is the staging area? I Contains the snapshots to be used in creating the next commit Consequences I Commits can be built thematically I Commits can be relatively small, even if changes to be committed are large (useful for git bisect) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

38 Git Basics by Example Git Commands: commit What does git commit do? I Combines everything in the staging area into a commit, described by your log message I Adds it all to the local repo I Points at it with a commit hash I Changes HEAD to point at that commit hash Syntax and Options I Example: git commit I Interesting things are possible with commit hooks (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

39 Git Basics by Example Git Ettiquette: Commits What is a good commit? I Informative message short one liner followed by thorough paragraphs describing all of the changes I Thematic all of the changes should go together logically (e.g. added amoduleandintegratedit) I Small keeping your changes small makes it easier to find what broke everything by binary searching the commit history (bisect) Why? I All of these rules make it easier to find bugs and understand the progression of a project I ost are mandatory at companies (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

40 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=9a12490 ark HEAD=9a12490 Jon HEAD=f2ea0f5 Will HEAD=9a12490 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

41 Git Basics by Example Git Commands by Example: commit slides] [master +] $ git commit [master f2ea0f5] Lab 4 diagram change 1 file changed, 1 insertion(+), 1 deletion(-) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

42 Git Basics by Example Git Commands: push What does git push do? I Puts all of your local commits on some remote Syntax and Options I Example: git push I Defaults to pushing the master branch to the origin repo I Interesting things are possible with push hooks (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

43 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=9a12490 Jon HEAD=f2ea0f5 Will HEAD=9a12490 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

44 Git Basics by Example Git Commands by Example: push slides] [master] $ git push Counting objects: 11, done. Delta compression using up to 8 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (6/6), 475 bytes 0 bytes/s, done. Total 6 (delta 3), reused 0 (delta 0) To git@bitbucket.org:eecs470staff/course_material.git 9a f2ea0f5 master -> master (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

45 Git Basics by Example Git Commands: pull What does git pull do? I Gets all commits from some remote I This is actually a combination of git fetch followed by git merge Syntax and Options I Example: git pull I Defaults to pulling the master branch from the origin repo (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

46 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

47 Git Basics by Example Git Commands by Example: pull course_material] [master] $ git pull remote: Counting objects: 13, done. remote: Compressing objects: 100% (7/7), done. remote: Total 8 (delta 2), reused 0 (delta 0) npacking objects: 100% (8/8), done. From bitbucket.org:eecs470staff/course_material 9a f2ea0f5 master -> origin/master (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

48 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will* HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

49 Git Basics by Example Git Commands: reset What does git reset do? I Replaces modified files in the working directory with the versions in the local repo (at some commit hash, generally) Syntax and Options I Example: git reset <hash> <file> I Replaces the contents of <file> with the version in <hash> I <hash> can be specified in relation the HEAD (e.g. HEAD 3) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

50 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

51 Git Basics by Example Git Commands by Example: reset slides] [master *] $ git status # On branch master # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: beamerthemelab.sty # no changes added to commit (use "git add" and/or "git commit -a") [wcunning@mycroft-holmes slides] [master *] $ git reset --hard HEAD is now at f2ea0f5 Lab 4 diagram change (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

52 Git Basics by Example Git Commands: branch What does git branch do? I Creates a pointer to a particular commit hash, future commits update this pointer Syntax and Options I Example: git branch <branchname> I Creates a branch named <branchname> starting at the current HEAD (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

53 Git Basics by Example Git Commands: checkout What does git checkout do? I oves the working directory to the specified commit hash or pointer to a commit hash Syntax and Options I Example: git checkout <hash> I <hash> can be I an older commit (e.g. HEAD 2) I a branch, or other pointer, (e.g. lab4) (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

54 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

55 Git Basics by Example Git Commands by Example: branch, checkout slides] [master] $ git branch lab4 [wcunning@mycroft-holmes slides] [master] $ git status On branch master Your branch is up-to-date with 'origin/master'. [wcunning@mycroft-holmes slides] [master] $ git checkout lab4 Switched to branch 'lab4' (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

56 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will* HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

57 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will+ HEAD=f2ea0f5 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

58 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 ark HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

59 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 ark* HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

60 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 ark+ HEAD=f2ea0f5 Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

61 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 b73416d ark HEAD=b73416d Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

62 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 b73416d ark* HEAD=b73416d Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

63 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 8e4bab6 b73416d ark+ HEAD=b73416d Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

64 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=f2ea0f5 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

65 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=4b3d3cb 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

66 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=4b3d3cb 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will* HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

67 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=4b3d3cb 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will+ HEAD=8e4bab6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

68 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=4b3d3cb 06505f6 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=06505f6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

69 Git Basics by Example Git Diagram Git Repo Structure Commit Tree [origin] HEAD=4b3d3cb 06505f6 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=06505f6 f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

70 Git Basics by Example Git Commands: merge What does git merge do? I Combines two branches (when used manually) I Can mangle a repository I Can have conflicts Syntax and Options I Example: git merge lab4 I erges the lab4 branch into the current branch I git mergetool helps you handle merge conflicts I See me in office hours if you need to do this... (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

71 Git Basics by Example Git Diagram Git Repo Structure Commit Tree a [origin] HEAD=4b3d3cb 06505f6 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=a f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

72 Git Basics by Example Git Commands by Example: merge slides] [master $] $ git merge lab4 pdating f2ea0f5..25cbbce Fast-forward.gitignore labs/lab4/assignment/tex/eecs470lab4assignment.tex 2 +- labs/lab4/slides/eecs470lab4slides.tex labs/lab4/slides/script.txt labs/lab4/slides/ssh-keygen.txt files changed, 841 insertions(+), 11 deletions(-) create mode gitignore create mode labs/lab4/slides/script.txt create mode labs/lab4/slides/ssh-keygen.txt (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

73 Git Basics by Example Git Commands: tag What does git tag do? I Creates an additional pointer to a particular commit hash Syntax and Options I Example: git tag -a <tagname> <hash> I Creates a pointer to <hash> called <tagname> I This pointer can be checked out just like a branch I Tags are local by default, push with git push <tagname> (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

74 Git Basics by Example Git Diagram Git Repo Structure Commit Tree lab4 a [origin] HEAD=4b3d3cb 06505f6 4b3d3cb 8e4bab6 b73416d ark HEAD=4b3d3cb Jon HEAD=f2ea0f5 Will HEAD=a f2ea0f5 9a12490 (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

75 Git Basics by Example Git Commands by Example: merge w14] [master] $ git tag -a lab4-release HEAD [wcunning@mycroft-holmes w14] [master] $ git push origin lab4-release Counting objects: 1, done. Writing objects: 100% (1/1), 187 bytes 0 bytes/s, done. Total 1 (delta 0), reused 0 (delta 0) To git@bitbucket.org:eecs470staff/course_material.git * [new tag] lab4-release -> lab4-release [wcunning@mycroft-holmes w14] [master] $ git tag -l lab4-release (niversity of ichigan) Lab 4: VCS Friday, Sept. 29 th, / 63

76 Bitbucket Guide Bitbucket Account Setup 1. Go to Bitbucket Sign p 2. Fill out the form. I Preferably, use your uniqname as your username I se address I Choose Personal Account 3. Click on the little silhouette of a person in the upper right corner. 4. Select anage Account from the list. 5. Click on SSH Keys in the list on the left. 6. Click on Add Key. 7. In the pop up, paste the contents of /.ssh/id_rsa.pub, and name the key whatever you would like. 8. Check that this worked by running 9. Add your Bitbucket username to the spreadsheet. (niversity of ichigan) Lab 4: VCS Thursday, 27 th September, / 63

77 Verisimple Pipeline Same basic pipeline as book/class If need more info: Appendix A of the book Need to add hazard logic to a simple five stage pipeline Given pipeline without hazard detection or forwarding logic Programs still run because only one instruction is allowed in the pipeline at a time

78 Fetch Decode Execute emory WB 1 PC + Inst mem PC+1 instruction rega regb data Register file R0 R1 R2 R3 R4 R5 R6 R7 0 PC+1 vala valb offset + A L target eq? AL result valb Data memory AL result mdata op op op IF/ ID fwd fwd fwd ID/ E E/ em em/ WB

79 Verisimple Pipeline Forwarding Like what covered in class Need to forward results from later stages to E Structural Hazards Only one memory port for fetch and memory accesses emory gets priority over fetch Control Hazards Predict not taken, resolved in E stage Flush IF/ID, ID/E, E/E if incorrect

80 Alpha ISA Project 3 and your final project will use a subset of the Alpha ISA You ll have a decode stage given to you that works for Project 3 You may need to make very minor changes to it for your final project Just to add additional signals that your design may consider useful For example a functional unit selection bit Alpha has 32 architected registers $r0 - $r31. $r31 is always read as 0, writes have no effect Self-modifying code isn t valid All registers must be written before being read

81 Instructions General format addq $r1, $r2, $r3 $r1 + $r2 $r3 In many cases second register can be an immediate value addq $r1, 0x5, $r3 $r1 + 0x5 $r3 Load/Store format ldq $r2, 0x10($r3) E[$r3+ 0x10] $r2

82 Logic and Arithmetic Instruction List addq $r1, $r2, $r3 Add $r1 + $r2 $r3 subq $r1, $r2, $r3 Subtract $r1 - $r2 $r3 and $r1, $r2, $r3 AND $r1 & $r2 $r3 bic $r1, $r2, $r3 ANDNOT $r1 & ~$r2 $r3 bis $r1, $r2, $r3 OR $r1 $r2 $r3 ornot $r1, $r2, $r3 ORNOT $r1 ~$r2 $r3 eqv $r1, $r2, $r3 EQV (ORNOT) $r1 ~^ $r2 $r3 srl $r1, $r2, $r3 Right Shift Logical $r1 >> $r2 $r3 sll $r1, $r2, $r3 Left Shift Logical $r1 << $r2 $r3 sra $r1, $r2, $r3 Right Shift Arithmetic $r1 >>> $r2 $r3 mulq $r1, $r2, $r3 ultiply $r1 * $r2 $r3 lda $r3, const($r1) Load Address $r1 + const $r3

83 emory & Compare Instruction List ldq $r3, 5($r1) Load E[$r1+5] $r3 stq $r3, 5($r1) Store E[$r1+5] $r3 cmpeq $r1, $r2, $r3 Compare Equal $r1 == $r2? 1 $r3 : 0 $r3 cmplt $r1, $r2, $r3 Compare Less than Signed $r1 < $r2? 1 $r3 : 0 $r3 cmple $r1, $r2, $r3 cmpult $r1, $r2, $r3 cmpule $r1, $r2, $r3 Compare Less or Equal Signed Compare Less than nsigned Compare Less or Equal nsigned $r1 <= $r2? 1 $r3 : 0 $r3 $r1 < $r2? 1 $r3 : 0 $r3 $r1 <= $r2? 1 $r3 : 0 $r3

84 Control Instruction List beq $r3, target Branch if $r3 == 0 $r3 == 0? target PC : NPC PC bne $r3, target Branch if $r3!= 0 $r3!= 0? target PC : NPC PC ble $r3, target Branch if $r3 <= 0 $r3 <= 0? target PC : NPC PC blt $r3, target Branch if $r3 < 0 $r3 < 0? target PC : NPC PC bge $r3, target Branch if $r3 >= 0 $r3 >= 0? target PC : NPC PC bgt $r3, target Branch if $r3 > 0 $r3 > 0? target PC : NPC PC blbc $r3, target Branch if $r3[0] == 0 $r3[0] == 0? target PC : NPC PC blbs $r3, target Branch if $r3[0] == 1 $r3[0] == 1? target PC : NPC PC

85 Control and Link Instruction List br $r31, target Branch target PC; PC $r31 bsr $r31, target Branch Subroutine target PC; PC $r31 jmp $r26, ($r3) Jump PC $r26; $r3 & ~3 PC jsr $r26, ($r3) Jump Subroutine PC $r26; $r3 & ~3 PC ret $r26, ($r3) Return PC $r26; $r3 & ~3 PC jsr_cr $r26, ($r3) Jump Coroutine PC $r26; $r3 & ~3 PC

86 Halt call_pal 0x555 Halt achine Halts

87 Directory Structure akefile - Just like you ve seen before program.mem - Assembled code to run synth - Directory where synthesis output will be created. Also contains synthesis script sys_defs.vh - Constants used throughout code (acros) testbench - Directory with testbench, memory, and pipeline printing code test_progs - Selection of programs to test your pipeline with verilog lines of verilog to implement pipeline vs-asm - Program to assemble test programs into program.mem

88 Running the Code Assemble a test program:./vs-asm test_prog/testname.s > program.mem Running the code: make or./simv (if you already ran make)

89 evens.s data = 0x1000 lda $r2,0 //r2=0 lda $r3,data //r3=data loop1: blbs $r2,loop2 //if($r3[0]==1) PC=loop2 stq $r2,0($r3) //mem[r3+0]=r2 addq $r3,0x8,$r3 //r3+=8 loop2: addq $r2,0x1,$r2 //r2+=1 cmple $r2,0xf,$r1 //r1=(r2<=0xf) bne $r1,loop1 //if(r1!=0) PC=loop1 call_pal 0x555 //halt

90 Output program.out - Output of memory of pipeline pipeline.out - Text file of which PC/instruction is in each stage as well as bus activity writeback.out - PC and what (if anything) is being written to the RF from the WB stage

91 program.out nified emory contents hex on left, decimal on right: mem[ 0] = 207f f0000 : mem[ 8] = b f : mem[ 16] = : mem[ 24] = f43ffffa4041fda1 : mem[ 32] = mem[ 4104] = : mem[ 4112] = : mem[ 4120] = : mem[ 4128] = : mem[ 4136] = a : mem[ 4144] = c : mem[ 4152] = e : System halted on @@ 415 cycles / 82 instrs = ns total time to

92 pipeline.out Cycle: IF ID E E WB 0: 4:lda 0:- 0:- 0:- 0:- 1: 8:- 4:lda 0:- 0:- 0:- 2: 8:- 8:- 4:lda 0:- 0:- 3: 8:- 8:- 8:- 4:lda 0:- 4: 8:- 8:- 8:- 8:- 4:lda 5: 8:lda 8:- 8:- 8:- 8:- 6: 12:- 8:lda 8:- 8:- 8:- 7: 12:- 12:- 8:lda 8:- 8:- 8: 12:- 12:- 12:- 8:lda 8:- 9: 12:- 12:- 12:- 12:- 8:lda 10: 12:blbs 12:- 12:- 12:- 12:- 11: 16:- 12:blbs 12:- 12:- 12:- 12: 16:- 16:- 12:blbs 12:- 12:- 13: 16:- 16:- 16:- 12:blbs 12:- 14: 16:- 16:- 16:- 16:- 12:blbs 15: 16:stq 16:- 16:- 16:- 16:- 16: 20:- 16:stq 16:- 16:- 16:-... Remember, P3 starts with 1 insn at a time going through the pipeline

93 pipeline.out Continued D-E Bus & Reg Result BS_LOAD E[8] accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 BS_STORE E[4096] = 0 accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 r3=4104 BS_LOAD E[16] accepted 1 BS_LOAD E[16] accepted 1 BS_LOAD E[24] accepted 1 BS_LOAD E[24] accepted 1 BS_LOAD E[24] accepted 1 BS_LOAD E[24] accepted 1

94 writeback.out PC= , REG[ 2]= PC= , REG[ 3]= PC= , --- PC= c, --- PC= , REG[ 3]= PC= , REG[ 2]= PC= , REG[ 1]= PC= c, --- PC= , --- PC= , REG[ 2]= PC= , REG[ 1]= PC= c, --- PC= , --- PC= c, --- PC= , REG[ 3]= PC= , REG[ 2]= PC= , REG[ 1]=

95 Checking your solution You can compare memory portion of code we give you against your output. CPI, cycles, ns, will be different emory and writeback output should be the same Like the code you ve been given, should always halt on halt instruction At some point your code probably won t because you messed something up Pay attention to that output

96 Checking your solution We ll also post some pipeline/program/writeback output on the website Your output, and our output should match exactly You can use the program diff to check that they do diff <our output> <your output>

97 VeriSimple Pipeline Specifics

98 Fetch Stage

99 Fetch Stage Code assign PC_plus_4 = PC_reg + 4; assign next_pc = ex_mem_take_branch? ex_mem_target_pc : PC_plus_4; assign if_npc_out = PC_plus_4; // This register holds the PC value clock) begin if(reset) PC_reg <= SD 0; // initial PC value is 0 else if(pc_enable) PC_reg <= SD next_pc; // transition to next PC end // always // This FF controls the stall signal that artificially forces // fetch to stall until the previous instruction has completed // This must be removed for Project 3 clock) begin if (reset) if_valid_inst_out <= SD 1; // must start with something else if_valid_inst_out <= SD mem_wb_valid_inst; end

100 Decode Stage

101 Decode Stage Code // Instantiate the register file used by this pipeline regfile regf_0 (...) // instantiate the instruction decoder decoder decoder_0 (...) // mux to generate dest_reg_idx based on // the dest_reg_select output from decoder always_comb begin case (dest_reg_select) DEST_IS_REGC: id_dest_reg_idx_out = rc_idx; DEST_IS_REGA: id_dest_reg_idx_out = ra_idx; DEST_NONE: id_dest_reg_idx_out = ZERO_REG; default: id_dest_reg_idx_out = ZERO_REG; endcase end

102 Execute Stage

103 Execute Stage Code always_comb begin case (id_ex_opa_select) AL_OPA_IS_REGA: opa_mux_out = id_ex_rega; AL_OPA_IS_E_DISP: opa_mux_out = mem_disp; AL_OPA_IS_NPC: opa_mux_out = id_ex_npc; AL_OPA_IS_NOT3: opa_mux_out = ~64 h3; endcase end always_comb begin opb_mux_out = 64 hbaadbeefdeadbeef; case (id_ex_opb_select) AL_OPB_IS_REGB: opb_mux_out = id_ex_regb; AL_OPB_IS_AL_I: opb_mux_out = alu_imm; AL_OPB_IS_BR_DISP: opb_mux_out = br_disp; endcase end alu alu_0 (...) brcord brcond (...) assign ex_take_branch_out = id_ex_uncond_branch id_ex_cond_branch & brcond_result;

104 emory Stage

105 emory Stage Code // Determine the command that must be sent to mem assign proc2dmem_command = ex_mem_wr_mem? BS_STORE : ex_mem_rd_mem? BS_LOAD : BS_NONE; // The memory address is calculated by the AL assign proc2dmem_data = ex_mem_rega; assign proc2dmem_addr = ex_mem_alu_result; // Assign the result-out for next stage assign mem_result_out = (ex_mem_rd_mem)? Dmem2proc_data : ex_mem_alu_result;

106 Writeback Stage

107 Writeback Stage Code // ux to select register writeback data: // AL/E result, unless taken branch, in which case we write // back the old NPC as the return address. Note that ALL branches // and jumps write back the link value, but those that don t // want it specify ZERO_REG as the destination. assign result_mux = (mem_wb_take_branch)? mem_wb_npc : mem_wb_result; // Generate signals for write-back to register file // reg_wr_en_out computation is sort of overkill since the reg file // has a special way of handling ZERO_REG but there is no harm // in putting this here. Hopefully it illustrates how the pipeline works. assign reg_wr_en_out = mem_wb_dest_reg_idx!= ZERO_REG; assign reg_wr_idx_out = mem_wb_dest_reg_idx; assign reg_wr_data_out = result_mux;

108 emory arbitration

109 emory arbitration code assign proc2mem_command = (proc2dmem_command== BS_NONE)? BS_LOAD : proc2dmem_command; assign proc2mem_addr = (proc2dmem_command== BS_NONE)? proc2imem_addr : proc2dmem_addr;

110 Pipeline register clock) begin if(reset) begin if_id_npc <= SD 0; if_id_ir <= SD NOOP_INST; if_id_valid_inst <= SD FALSE; end // if (reset) else if (if_id_enable) begin if_id_npc <= SD if_npc_out; if_id_ir <= SD if_ir_out; if_id_valid_inst <= SD if_valid_inst_out; end // if (if_id_enable) end // always

111 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage (as was done in the slides in the first few lectures this semester.) If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

112 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage (as was done in the slides in the first few lectures this semester.) If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

113 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage (as was done in the slides in the first few lectures this semester.) If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

114 Sample Code add ; reg 3 = reg 1 + reg 2 nand ; reg 5 = reg 3 ~& reg 4 add ; reg 7 = reg 6 + reg 3 lw ; reg 6 = em[reg ] sw ; em[reg6+12] = reg 2

115 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB op offset valb vala PC+1 1 target AL result op valb op AL result mdata eq? add R2 R3 R4 R5 R1 R6 R0 R7 rega regb data

116 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB add target AL result op valb op AL result mdata eq? nand R2 R3 R4 R5 R1 R6 R0 R7 rega regb data

117 Hazard PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB add nand R2 R3 R4 R5 R1 R6 R0 R7 rega regb data 3 3

118 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB nand add add R2 R3 R4 R5 R1 R6 R0 R7 rega regb 5 data 3 H1

119 New Hazard PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB nand add add R2 R3 R4 R5 R1 R6 R0 R7 rega regb 5 data 3 H

120 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB add nand add 21 lw R2 R3 R4 R5 R1 R6 R0 R7 rega regb data H2 H1

121 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB add nand add 21 lw R2 R3 R4 R5 R1 R6 R0 R7 rega regb data H2 H1 3 No Hazard 21 1

122 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage. If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

123 Sample Code add ; reg 3 = reg 1 + reg 2 nand ; reg 5 = reg 3 ~& reg 4 add ; reg 7 = reg 6 + reg 3 lw ; reg 6 = em[reg ] sw ; em[reg6+12] = reg 2

124 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB lw add nand -2 sw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 7 5 data H2 H1 6

125 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB lw add nand -2 sw R2 R3 R4 R5 R1 R6 R0 R7 rega regb data H2 H1 Hazard 6 en en L

126 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB 5 31 lw add 22 sw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 6 7 data H2 noop

127 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB noop 5 31 lw add 22 sw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 6 7 data H2 Hazard 6

128 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB sw noop lw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 6 data H3

129 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB sw noop lw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 6 data H

130 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB 111 sw 7 noop R2 R3 R4 R5 R1 R6 R0 R7 rega regb data H3

131 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage. If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

132 Project 3 Goals Branches should resolve in the same stage they are currently resolved in. All forwarding must be to the E stage, even if the data isn t needed until a later stage. Any stalling due to data hazards must occur in the decode stage. (That is, if stalling is required the dependent instruction should stall in the decode stage.) Obviously, instructions following the stalling instruction in the IF stage will have to stay in the IF stage. Put another way, if you need to insert an invalid instruction, it should be inserted in the E stage. If you wish to insert a noop you must invalidate the instruction. Otherwise your CPI numbers will be wrong. If there is a structural hazard in the memory, you should let the load/store go and have the fetch stage wait on getting memory.

133 PC Inst mem Register file A L 1 Data memory + + IF/ ID ID/ E E/ em em/ WB noop 5 31 lw add 22 sw R2 R3 R4 R5 R1 R6 R0 R7 rega regb 6 7 data H2 Hazard 6

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014 EECS 470 Lab 4 Version Control System Department of Electrical Engineering and Computer Science College of Engineering University of Michigan Friday, 31 st January, 2014 (University of Michigan) Lab 4:

More information

EECS 470. Further review: Pipeline Hazards and More. Lecture 2 Winter 2018

EECS 470. Further review: Pipeline Hazards and More. Lecture 2 Winter 2018 EECS 470 Further review: Pipeline Hazards and ore Lecture 2 Winter 208 Slides developed in part by Profs. Austin, Brehob, Falsafi, Hill, Hoe, Lipasti, artin, Roth, Shen, Smith, Sohi, Tyson, Vijaykumar,

More information

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes Git Charles J. Geyer School of Statistics University of Minnesota Stat 8054 Lecture Notes 1 Before Anything Else Tell git who you are. git config --global user.name "Charles J. Geyer" git config --global

More information

EECS 470 Lecture 4. Pipelining & Hazards II. Fall 2018 Jon Beaumont

EECS 470 Lecture 4. Pipelining & Hazards II. Fall 2018 Jon Beaumont GAS STATION Pipelining & Hazards II Fall 208 Jon Beaumont http://www.eecs.umich.edu/courses/eecs470 Slides developed in part by Profs. Austin, Brehob, Falsafi, Hill, Hoe, Lipasti, artin, Roth, Shen, Smith,

More information

Initial Design of an Alpha Processor. March 12, 1998 (Revised 3/16/98)

Initial Design of an Alpha Processor. March 12, 1998 (Revised 3/16/98) Initial Design of an Alpha Processor March 12, 1998 (Revised 3/16/98) Topics Objective Instruction formats Instruction processing Principles of pipelining Inserting pipe registers Objective Design Processor

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

Revision control. INF5750/ Lecture 2 (Part I)

Revision control. INF5750/ Lecture 2 (Part I) Revision control INF5750/9750 - Lecture 2 (Part I) Problem area Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control Work on same

More information

Submitting your Work using GIT

Submitting your Work using GIT Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points

More information

Pipeline design. Mehran Rezaei

Pipeline design. Mehran Rezaei Pipeline design Mehran Rezaei How Can We Improve the Performance? Exec Time = IC * CPI * CCT Optimization IC CPI CCT Source Level * Compiler * * ISA * * Organization * * Technology * With Pipelining We

More information

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

FEEG Applied Programming 3 - Version Control and Git II

FEEG Applied Programming 3 - Version Control and Git II FEEG6002 - Applied Programming 3 - Version Control and Git II Richard Boardman, Sam Sinayoko 2016-10-19 Outline Learning outcomes Working with a single repository (review) Working with multiple versions

More information

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141 EECS 151/251A Fall 2017 Digital Design and Integrated Circuits Instructor: John Wawrzynek and Nicholas Weaver Lecture 13 Project Introduction You will design and optimize a RISC-V processor Phase 1: Design

More information

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP Git Guide Meher Krishna Patel Created on : Octorber, 2017 Last updated : October, 2018 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Commands Summary 1 2 Git

More information

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management CPSC 491 Lecture 19 & 20: Source Code Version Control VCS = Version Control Software SCM = Source Code Management Exercise: Source Code (Version) Control 1. Pretend like you don t have a version control

More information

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017 GETTING STARTED WITH Michael Lessard Senior Solutions Architect June 2017 Agenda What is Git? Installation of Git Git basis Github First steps with Git 2 WHAT IS GIT? What is Git? Started in 2005 Created

More information

The Pipelined MIPS Processor

The Pipelined MIPS Processor 1 The niversity of Texas at Dallas Lecture #20: The Pipeline IPS Processor The Pipelined IPS Processor We complete our study of AL architecture by investigating an approach providing even higher performance

More information

Version Control System - Git. zswu

Version Control System - Git. zswu Version Control System - Git zswu Overview Why VCS? Why Git? Using Git Personally Using Git with Others Etiquette Rules of Using Git Tools & Services Tips 2 Why VCS (1/3) How do you manage your homework?

More information

10. Basic Processor Design: Single-Cycle and Multi-Cycle Datapaths

10. Basic Processor Design: Single-Cycle and Multi-Cycle Datapaths 0. Basic Processor Design: Single-Cycle and ulti-cycle paths EECS 370 Introduction to Computer Organization Winter 2007 Prof. Valeria Bertacco & Prof. Scott ahlke EECS Department niversity of ichigan in

More information

Version control with Git.

Version control with Git. 1 Version control with Git http://git-scm.com/book/en/ Basic Intro to Git We will: Discuss how Git differs from Subversion Discuss the basic Git model Pull/clone files from a repository on github Edit

More information

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 Git CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 1 Lecture Goals Present a brief introduction to git You will need to know git to work on your presentations this semester 2 Git

More information

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011 1. Performance Principles [5 pts] The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011 For each of the following comparisons,

More information

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle? CSE 2021: Computer Organization Single Cycle (Review) Lecture-10b CPU Design : Pipelining-1 Overview, Datapath and control Shakil M. Khan 2 Single Cycle with Jump Multi-Cycle Implementation Instruction:

More information

Git for Version Control

Git for Version Control Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from http://git-scm.com/book/en/ http://www.cs.washington.edu/403/ About

More information

Version Control with GIT

Version Control with GIT Version Control with GIT Benjamin Roth CIS LMU München Benjamin Roth (CIS LMU München) Version Control with GIT 1 / 30 Version Control Version control [...] is the management of changes to documents, computer

More information

CSE 391 Lecture 9. Version control with Git

CSE 391 Lecture 9. Version control with Git CSE 391 Lecture 9 Version control with Git slides created by Ruth Anderson & Marty Stepp, images from http://git-scm.com/book/en/ http://www.cs.washington.edu/391/ 1 Problems Working Alone Ever done one

More information

Git, the magical version control

Git, the magical version control Git, the magical version control Git is an open-source version control system (meaning, it s free!) that allows developers to track changes made on their code files throughout the lifetime of a project.

More information

Introduction to distributed version control with git

Introduction to distributed version control with git Institut für theoretische Physik TU Clausthal 04.03.2013 Inhalt 1 Basics Differences to Subversion Translation of commands 2 Config Create and clone States and workflow Remote repos Branching and merging

More information

Pipelining & Hazards. Prof. Thomas Wenisch GAS STATION. Lecture 3 EECS 470. Slide 1

Pipelining & Hazards. Prof. Thomas Wenisch GAS STATION. Lecture 3 EECS 470. Slide 1 Wenisch 2 -- Portions Austin, Brehob, Falsafi, Hill, Hoe, ipasti, artin, Roth, Shen, Smith, Sohi, Tyson, Vijaykumar GAS STATION Pipelining & Hazards Fall 2 Prof. Thomas Wenisch http://www.eecs.umich.edu/courses/eecs4

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Git. Presenter: Haotao (Eric) Lai Contact:

Git. Presenter: Haotao (Eric) Lai Contact: Git Presenter: Haotao (Eric) Lai Contact: haotao.lai@gmail.com 1 Acknowledge images with white background is from the following link: http://marklodato.github.io/visual-git-guide/index-en.html images with

More information

Using Git to Manage Source RTL

Using Git to Manage Source RTL Using Git to Manage Source RTL CS250 Tutorial 1 (Version 082311) August 24, 2011 Brian Zimmer How to use this tutorial This class will be using Git for all of the labs and projects. This will allow the

More information

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko 213/513/613 Linux/Git Bootcamp Cyrus, Eugene, Minji, Niko Outline 1. SSH, bash, and navigating Linux 2. Using VIM 3. Setting up VS Code 4. Git SSH 1. On macos/linux: $ ssh ANDREW-ID@shark.ics.cs.cmu.edu

More information

Revision Control and GIT

Revision Control and GIT Revision Control and GIT On UD HPC Community Clusters William Totten Network & Systems Services Why use revision control You can go back in time It makes it easy to try things out which might not work

More information

EECS 470 Midterm Exam Fall 2014

EECS 470 Midterm Exam Fall 2014 EECS 470 Midterm Exam Fall 2014 Name: uniqname: Rewrite and sign the honor code below: I have neither given nor received aid on this exam nor observed anyone else doing so. Signature: Scores: Page # Points

More information

Pipelining. CSC Friday, November 6, 2015

Pipelining. CSC Friday, November 6, 2015 Pipelining CSC 211.01 Friday, November 6, 2015 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory register file ALU data memory register file Not

More information

(Basic) Processor Pipeline

(Basic) Processor Pipeline (Basic) Processor Pipeline Nima Honarmand Generic Instruction Life Cycle Logical steps in processing an instruction: Instruction Fetch (IF_STEP) Instruction Decode (ID_STEP) Operand Fetch (OF_STEP) Might

More information

Software Project (Lecture 4): Git & Github

Software Project (Lecture 4): Git & Github Software Project (Lecture 4): Git & Github Wouter Swierstra, Atze Dijkstra Feb 2016 Wouter Swierstra, Atze Dijkstra Software Project (Lecture 4): Git & Github Feb 2016 1 / 45 Wouter Swierstra, Atze Dijkstra

More information

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command:

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command: Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command: git --help Get common commands and help git --help How to use git

More information

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

A quick (and maybe practical) guide to Git and version control. By Jay Johnson A quick (and maybe practical) guide to Git and version control By Jay Johnson Necessary shout outs and reference links from slides from CSE 380 with Dr. Chris Simmons (UT-Austin) and notes from Prof. Jean-Luc

More information

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14 MIPS Pipelining Computer Organization Architectures for Embedded Computing Wednesday 8 October 14 Many slides adapted from: Computer Organization and Design, Patterson & Hennessy 4th Edition, 2011, MK

More information

Pipelining Analogy. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop: Speedup = 8/3.5 = 2.3.

Pipelining Analogy. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop: Speedup = 8/3.5 = 2.3. Pipelining Analogy Pipelined laundry: overlapping execution Parallelism improves performance Four loads: Speedup = 8/3.5 = 2.3 Non-stop: Speedup =2n/05n+15 2n/0.5n 1.5 4 = number of stages 4.5 An Overview

More information

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Version Control September 18, 2018 Thursday (September 20) First in-class exercise On using git (today is a prelude with useful

More information

EECS150 Lab Lecture 5 Introduction to the Project

EECS150 Lab Lecture 5 Introduction to the Project EECS150 Lab Lecture 5 Introduction to the Project Ian Juch Electrical Engineering and Computer Sciences University of California, Berkeley 9/28/2012 1 Note on Lab4 You should augment the testbenches we

More information

Version Control: Gitting Started

Version Control: Gitting Started ting Started Cai Li October 2014 What is Version Control? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Local Version

More information

CSE Lecture 13/14 In Class Handout For all of these problems: HAS NOT CANNOT Add Add Add must wait until $5 written by previous add;

CSE Lecture 13/14 In Class Handout For all of these problems: HAS NOT CANNOT Add Add Add must wait until $5 written by previous add; CSE 30321 Lecture 13/14 In Class Handout For the sequence of instructions shown below, show how they would progress through the pipeline. For all of these problems: - Stalls are indicated by placing the

More information

CS Basic Pipeline

CS Basic Pipeline CS 3220 Basic Pipeline Why not go directly to five stages? This is what we had in CS 2200! Will have more stages in Project 3, but We want to start with something easier Lots of things become more complicated

More information

Index. Alias syntax, 31 Author and commit attributes, 334

Index. Alias syntax, 31 Author and commit attributes, 334 Index A Alias syntax, 31 Author and commit attributes, 334 B Bare repository, 19 Binary conflict creating conflicting changes, 218 during merging, 219 during rebasing, 221 Branches backup, 140 clone-with-branches

More information

CS 152 Computer Architecture and Engineering Lecture 4 Pipelining

CS 152 Computer Architecture and Engineering Lecture 4 Pipelining CS 152 Computer rchitecture and Engineering Lecture 4 Pipelining 2014-1-30 John Lazzaro (not a prof - John is always OK) T: Eric Love www-inst.eecs.berkeley.edu/~cs152/ Play: 1 otorola 68000 Next week

More information

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Introduction Chapter 4.1 Chapter 4.2 Review: MIPS (RISC) Design Principles Simplicity favors regularity fixed size instructions small number

More information

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control EE 37 Unit Single-Cycle CPU path and Control CPU Organization Scope We will build a CPU to implement our subset of the MIPS ISA Memory Reference Instructions: Load Word (LW) Store Word (SW) Arithmetic

More information

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi) A Brief Introduction to Git Sylverie Herbert (based on slides by Hautahi Kingi) Introduction Version control is better than mailing files back and forth because: Nothing that is committed to version control

More information

COMPUTER ORGANIZATION AND DESIGN

COMPUTER ORGANIZATION AND DESIGN COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined

More information

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Common Git Commands Git Crash Course Teon Banek theongugl@gmail.com April 7, 2016 Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Outline 1 Introduction About Git Setup 2 Basic Usage Trees Branches

More information

Chapter 4 The Processor 1. Chapter 4B. The Processor

Chapter 4 The Processor 1. Chapter 4B. The Processor Chapter 4 The Processor 1 Chapter 4B The Processor Chapter 4 The Processor 2 Control Hazards Branch determines flow of control Fetching next instruction depends on branch outcome Pipeline can t always

More information

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation CAD for VLSI 2 Pro ject - Superscalar Processor Implementation 1 Superscalar Processor Ob jective: The main objective is to implement a superscalar pipelined processor using Verilog HDL. This project may

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

EECS 470 Lecture 1. Computer Architecture Winter 2014

EECS 470 Lecture 1. Computer Architecture Winter 2014 EECS 470 Lecture 1 Computer Architecture Winter 2014 Slides developed in part by Profs. Brehob, Austin, Falsafi, Hill, Hoe, Lipasti, Shen, Smith, Sohi, Tyson, Vijaykumar, and Wenisch 1 What Is Computer

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

USPAS Simulation of Beam and Plasma Systems Steven M. Lund, Jean-Luc Vay, Remi Lehe, Daniel Winklehner and David L. Bruhwiler Lecture: Software Version Control Instructor: David L. Bruhwiler Contributors:

More information

Computer Science Design I Version Control with Git

Computer Science Design I Version Control with Git Computer Science Design I Version Control with Git Department of Electrical Engineering & Computer Science Information Technology & Telecommunications Research Center The University of Kansas annguyen@ittc.ku.edu

More information

are Softw Instruction Set Architecture Microarchitecture are rdw

are Softw Instruction Set Architecture Microarchitecture are rdw Program, Application Software Programming Language Compiler/Interpreter Operating System Instruction Set Architecture Hardware Microarchitecture Digital Logic Devices (transistors, etc.) Solid-State Physics

More information

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction CS 61C: Great Ideas in Computer Architecture MIPS CPU Datapath, Control Introduction Instructor: Alan Christopher 7/28/214 Summer 214 -- Lecture #2 1 Review of Last Lecture Critical path constrains clock

More information

Introduction to Git and Github

Introduction to Git and Github Introduction to Git and Github Computing in Optimization and Statistics: Lecture 1 Jackie Baek MIT January 10, 2017 What is git and GitHub? git is a version control system. Other version control systems

More information

Eugene, Niko, Matt, and Oliver

Eugene, Niko, Matt, and Oliver 213/513 Linux/Git Bootcamp Eugene, Niko, Matt, and Oliver outline 1. ssh but also Windows ssh client especially 2. bash commands + navigating Linux 3. VIM and VS Code 4. Git how to ssh 1. on OS X/Linux:

More information

LECTURE 3: THE PROCESSOR

LECTURE 3: THE PROCESSOR LECTURE 3: THE PROCESSOR Abridged version of Patterson & Hennessy (2013):Ch.4 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU

More information

Department of Computer and IT Engineering University of Kurdistan. Computer Architecture Pipelining. By: Dr. Alireza Abdollahpouri

Department of Computer and IT Engineering University of Kurdistan. Computer Architecture Pipelining. By: Dr. Alireza Abdollahpouri Department of Computer and IT Engineering University of Kurdistan Computer Architecture Pipelining By: Dr. Alireza Abdollahpouri Pipelined MIPS processor Any instruction set can be implemented in many

More information

Git for Newbies. ComMouse Dongyue Studio

Git for Newbies. ComMouse Dongyue Studio Git for Newbies ComMouse Dongyue Studio 2018.4.25 Contents What is Git? Git Quick Start Git Branch Git Workflow Git in Practice What is Git? What is Git? A Version Control System (VCS) An Open-sourced

More information

Version Control System GIT

Version Control System GIT Version Control System GIT Version Contol System Version (revision) control systems are software that help you track changes you make in your code over time. As you edit to your code, you tell the version

More information

1 Hazards COMP2611 Fall 2015 Pipelined Processor

1 Hazards COMP2611 Fall 2015 Pipelined Processor 1 Hazards Dependences in Programs 2 Data dependence Example: lw $1, 200($2) add $3, $4, $1 add can t do ID (i.e., read register $1) until lw updates $1 Control dependence Example: bne $1, $2, target add

More information

Assignment 1 solutions

Assignment 1 solutions Assignment solutions. The jal instruction does a jump identical to the j instruction (i.e., replacing the low order 28 bits of the with the ress in the instruction) and also writes the value of the + 4

More information

CS 152 Computer Architecture and Engineering

CS 152 Computer Architecture and Engineering CS 152 Computer rchitecture and Engineering Lecture 10 Pipelining III 2005-2-17 John Lazzaro (www.cs.berkeley.edu/~lazzaro) Ts: Ted Hong and David arquardt www-inst.eecs.berkeley.edu/~cs152/ Last time:

More information

Fundamentals of Git 1

Fundamentals of Git 1 Fundamentals of Git 1 Outline History of Git Distributed V.S Centralized Version Control Getting started Branching and Merging Working with remote Summary 2 A Brief History of Git Linus uses BitKeeper

More information

Assumptions. GIT Commands. OS Commands

Assumptions. GIT Commands. OS Commands Many of the world s largest dev teams have adopted Git and it s not hard to see why It can handle small and large projects easily It has a tiny footprint It outclasses other version control tools It s

More information

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU Lab 01 How to Survive & Introduction to Git Web Programming DataLab, CS, NTHU Notice These slides will focus on how to submit you code by using Git command line You can also use other Git GUI tool or built-in

More information

The Pipelined RiSC-16

The Pipelined RiSC-16 The Pipelined RiSC-16 ENEE 446: Digital Computer Design, Fall 2000 Prof. Bruce Jacob This paper describes a pipelined implementation of the 16-bit Ridiculously Simple Computer (RiSC-16), a teaching ISA

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction

More information

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor. COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 13: Pipelining. Krste Asanović & Randy Katz

CS 61C: Great Ideas in Computer Architecture. Lecture 13: Pipelining. Krste Asanović & Randy Katz CS 61C: Great Ideas in Computer Architecture Lecture 13: Pipelining Krste Asanović & Randy Katz http://inst.eecs.berkeley.edu/~cs61c/fa17 RISC-V Pipeline Pipeline Control Hazards Structural Data R-type

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, McKee, and Sirer. memory inst register

More information

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 WHO AM I? @tushar_rishav GSoC'16 student contributing to coala - a static code analysis tool, under Python So ware Foundation. A senior

More information

Lecture 6 Remotes. Sign in on the attendance sheet!

Lecture 6 Remotes. Sign in on the attendance sheet! Lecture 6 Remotes Sign in on the attendance sheet! Midterm Review Everyone did great! What We ve Learned So Far Creating and cloning repositories git init, git clone Linear commit histories and diffs git

More information

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

CS 61C: Great Ideas in Computer Architecture Pipelining and Hazards

CS 61C: Great Ideas in Computer Architecture Pipelining and Hazards CS 61C: Great Ideas in Computer Architecture Pipelining and Hazards Instructors: Vladimir Stojanovic and Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/sp16 1 Pipelined Execution Representation Time

More information

Version Control with Git ME 461 Fall 2018

Version Control with Git ME 461 Fall 2018 Version Control with Git ME 461 Fall 2018 0. Contents Introduction Definitions Repository Remote Repository Local Repository Clone Commit Branch Pushing Pulling Create a Repository Clone a Repository Commit

More information

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git Versioning with git Moritz August 13.03.2017 Git/Bash/Python-Course for MPE 1 Agenda What s git and why is it good? The general concept of git It s a graph! What is a commit? The different levels Remote

More information

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48 Git and GitHub Dan Wysocki February 12, 2015 Dan Wysocki Git and GitHub February 12, 2015 1 / 48 1 Version Control 2 Git 3 GitHub 4 Walkthrough Dan Wysocki Git and GitHub February 12, 2015 2 / 48 Version

More information

Version Control Systems

Version Control Systems Version Control Systems Version Control In the 2 nd edition of Pro Git, version control is described as a system that records changes to a file or set of files over time so that you can recall specific

More information

The Processor: Datapath & Control

The Processor: Datapath & Control Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath & Control Processor Design Step 3 Assemble Datapath Meeting Requirements Build the

More information

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed Lecture 3: General Purpose Processor Design CSCE 665 Advanced VLSI Systems Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, tet etc included in slides are borrowed from various books, websites,

More information

Speeding Up DLX Computer Architecture Hadassah College Spring 2018 Speeding Up DLX Dr. Martin Land

Speeding Up DLX Computer Architecture Hadassah College Spring 2018 Speeding Up DLX Dr. Martin Land Speeding Up DLX 1 DLX Execution Stages Version 1 Clock Cycle 1 I 1 enters Instruction Fetch (IF) Clock Cycle2 I 1 moves to Instruction Decode (ID) Instruction Fetch (IF) holds state fixed Clock Cycle3

More information

Laboratory Pipeline MIPS CPU Design (2): 16-bits version

Laboratory Pipeline MIPS CPU Design (2): 16-bits version Laboratory 10 10. Pipeline MIPS CPU Design (2): 16-bits version 10.1. Objectives Study, design, implement and test MIPS 16 CPU, pipeline version with the modified program without hazards Familiarize the

More information

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow Tutorial: Getting Started with Git Introduction to version control Benefits of using Git Basic commands Workflow http://xkcd.com/1597/ 2 Tutorial Objectives Fundamentals of how git works Everything you

More information

Version Control Systems (VCS)

Version Control Systems (VCS) Version Control Systems (VCS) Xianyi Zeng xzeng@utep.edu Department of Mathematical Sciences The University of Texas at El Paso. September 13, 2016. Version Control Systems Let s get the textbook! Online

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit Gerrit About the Tutorial Gerrit is a web-based code review tool, which is integrated with Git and built on top of Git version control system (helps developers to work together and maintain the history

More information

CS 110 Computer Architecture. Pipelining. Guest Lecture: Shu Yin. School of Information Science and Technology SIST

CS 110 Computer Architecture. Pipelining. Guest Lecture: Shu Yin.   School of Information Science and Technology SIST CS 110 Computer Architecture Pipelining Guest Lecture: Shu Yin http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides based on UC Berkley's CS61C

More information

CS3350B Computer Architecture Quiz 3 March 15, 2018

CS3350B Computer Architecture Quiz 3 March 15, 2018 CS3350B Computer Architecture Quiz 3 March 15, 2018 Student ID number: Student Last Name: Question 1.1 1.2 1.3 2.1 2.2 2.3 Total Marks The quiz consists of two exercises. The expected duration is 30 minutes.

More information

SOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:

SOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name: SOLUTION Notes: CS 152 Computer Architecture and Engineering CS 252 Graduate Computer Architecture Midterm #1 February 26th, 2018 Professor Krste Asanovic Name: I am taking CS152 / CS252 This is a closed

More information

Windows. Everywhere else

Windows. Everywhere else Git version control Enable native scrolling Git is a tool to manage sourcecode Never lose your coding progress again An empty folder 1/30 Windows Go to your programs overview and start Git Bash Everywhere

More information