Digital Design versus
Computer
Programming
IMPORTANCE OF PROJECTS IN THIS CLASS
How to learn and be successful
= Boo!
When I was young life of a
student was really tough
>
I had to program in machine language
Machine language
• 01000010 01101111 01101111
00100001
= Boo!
• Specific to each machine,
although often overlaps (e.g., all
PCs read it the same way)
• First coded on punch cards
• I had to check each card that the
holes were really punched – see
the election problem.
BUT PROGRAMMING
IN MACHINE LANGUAGE
TEACHES YOU ABOUT REGISTERS
AND COMPUTER ORGANIZATION
>
Assembly language
• Human-readable version of machine language,
e.g. …
• In programming terms:
10110000 01100001
= move al, 0x61
• Again, not exactly inspiring dreams of teaching
students
BUT assembly level programming teaches
>
you about register transfers
High-level languages
• “high” = more abstract (removed) from machine language
• More truly human-readable:
IDENTIFICATION DIVISION.
PROGRAM-ID.
HELLO-WORLD.
*
ENVIRONMENT DIVISION.
*
DATA DIVISION.
*
PROCEDURE DIVISION.
PARA-1.
DISPLAY "Hello, world.".
*
EXIT PROGRAM.
END PROGRAM HELLO-WORLD.
Programming in high level
languages makes you more
efficient and allows you to
achieve the task faster but
separates you from
hardware
• Use of compiler to generate machine code
>
Examples of early high-level
languages:
– ALGOL
– APL
– BASIC
– COBOL
– FORTRAN
– Lisp
– PL/I
– RPG
>
What is the best way to learn
programming?
Complaints:
"The use of COBOL cripples the mind; its
teaching should, therefore, be regarded as
a criminal offence."
- Edsger Dijkstra,
“How Do We Tell
Truths That
>
Might Hurt?”
Thankfully, we have lots of choices
>
Side-by-side comparison
#include <iostream>
using namespace std;
public class SquareThis
{
public double SquareThis(int someNum)
{
int answer;
int main()
{
int num = 0;
int numSquared = 0;
answer = someNum * someNum;
cout << "I will square a number\n";
cout << "Please type a number to be
squared: ";
cin >> num;
return answer;
}
}
numSquared = num * num;
cout << "\nThe square of this num is ";
cout << numSquared;
cout << "\n\nPlease hit any key to
exit";
cin >> num;
return 0;
}
C++
Java
>
…by side comparison
(define
(square-this somenumber)
(* some-number somenumber)
)
(square-this 3 5)
Scheme
You should select a good
language for your task
to JB
when [switch1] [ab,
thatway setpower 4
onfor 40]
when [switch2] [ab,
thisway setpower 4
onfor 40]
launch [loop [if switch3 [c,
thisway on ] if not
switch3 [c, thatway on
]]]
end
Yellow Brick Logo
>
History of the Comp Science
programming
• 1984 – 1998 = Pascal
• 1999 – 2003 = C++
“THE computer
science language of
the 1970s” !
You should select a good
language to learn the
concepts rather than syntax
only. Java and Lisp are better
than C++
• 2004 - = Java
>
Now I am old and I
have experience
And my advise is…….
You should learn digital design by examples…….
You should learn programming by examples…….
You should build practical systems, never learn from book only …….
RobotC,
Python and
Robotics
Scheme ,
Lisp and
Robotics
>
Verilog
VHDL
Programming in VHDL or Verilog is
more like hardware design than
software design. On the other hand
you get experience with programming
environment, compilers, editors etc.
>
You should start programming and designing
digital circuits when you are young, in a
middle school or high school
a debate between Einstein and Schroedinger
Cat about quantum mechanics –
an educational theatre.
Improvisational Theatre “What’s That? Schrödinger
Cat”
Schrödinger Cat
Professor Einstein
2010 - OUR
RECENT
BIPED THEATRE
New version of
Hahoe
To be shown in 2010
KHR-1
iSOBOT
Lynxmotion Systems
• Walking biped
robot can express
the fullness of
human emotions:
–
–
–
–
body gestures,
dancing,
jumping,
gesticulating with
hands.
• Emotions can be:
– Emergent - Arushi
– Programmed –
Martin Lukac
ISMVL
– Mimicked – ULSI
– Learned – Martin
Lukac Reed-Muller
Fighting KHR-1
iSOBOT robot
The
stage of
Portland
Cyber
Theatre
in FAB
building
Marie Curie
Emotional
Robot
Head
You can work on
these or other
robots…..
Conclusions
Practical project is an
important component of
this class
It teaches very useful
skills
It teaches group work
and design verification
You cannot avoid using
computers and
programming when you
are an engineer
What can you learn in 171 projects
1. Programming in Verilog or VHDL
2. Programming in Java, C++ or RobotC, related to
hardware and robot design, in practical environment.
3. Building a digital circuit using FPGAs or PLDs.
4. Practically learning about interfacing and simple
analog/digital circuits, motors, lights, etc.
5. Simulating digital circuits.
6. Designing conceptual digital systems, such as
Sudoku Machine, or logic minimization machine.
Projects in 2010 Summer class
Allan Raven
Her own robot design
Chu Tiffany and Crystal Epinger
Digital lock
Clor Josh , Jacquot Joshua and
Morehouse Brandon
Fan System
Dhawan Sidharth
Quantum Circuit Synthesis
Heisterkamp Cory, Penny Dustin,
Climate Control
Owens Hugh
Reversible Circuits
Saelee Torn and Thao George
Fibonacci Sequence
Tsai Edison
Sudoku Computer
Wolfe Devin
Binary Calculator simulation
Cross Matthew
Arm/hand design for a humanoid robot
Yushi Wang
Clifford Algebra in Quantum Circuits
Descargar

History and analysis of K