Prabhas Chongstitvatana
Chulalongkorn University
The ability to "reconfigure" digital blocks to perform different functions (easily).
A kind of "specification" (declarative) and a kind of "step-by-step" (imperative) recipe to do something.
Diagram (flow-chart, state diagram), pattern (bits), and mostly language
(script).
It has to be "concise" and most importantly "human readable" because
engineers must be able to read and write it. (It may not be easy to read
though).
bit patterns
higher level (event by signal names)
We will explore "language" from bottom-up (hardware to software)
data path
control logic (from my textbook "Computer
Architecture: A systhesis" 2002, in revision)
simple processor
how the "funtional units" are used repeatedly to satisfy "a work".
how to "specify" this behaviour?
and it becomes a language. (assembly language)
The heart is the control logic (or control unit)
hardwired
softwired
Maurice Wilkes invented it around 1970.
Microprogramming
Processor Sx-chip Sx-microprogram How to microprogram Sx chip mspec.txt
Making
a new instruction for Sx-chip (microprogram)
Machine
level programming for Sx-chip
Microprogram Vs. Assembly
Now we look at "high level"
assembly to high level language
language design
language "implementation"
Implementation means how to execute the language on a particular
"platform" (or processors).
"platform" is more like a virtual machine.
a = b + c
if a, b, c are local variables, they can be mapped to registers, then,
add a b c
if a is global then some additional step is needed,
add r1 b c
st r1 a_global (a slot in the memory)
convert "flow" into "jump" (because assembly program is "linearly" code).
if cond then true-act else false-act
<cond>
jump-if-false @else
<true-act>
jump @exit
else:
<false-act>
exit:
function call, passing parameters, recursive function.
input: source program (text file)
output: assembly program (text or object code)
lexical analyser (change source to tokens)
parser (change tokens to parse-tree)
code generator (change parse-tree to output)
optimiser (improve output, faster, or smaller)
lexical analyser (recogniser, automaton or FSM)
parser (grammar and parser generator)
code generator (mostly a kind of "interpreter")
optimiser (hand made)
Evaluator (virtual
machine)
Code
generator
YES
data-flow
meta-interpreter (cricket, lego-brick, scratch)
macro-recorder (excell) (grid-based)
etc.
Chapter 6 Sx-processor explain in details how Sx chip work at microprogramming level
Sx0 simulator (plus its assembler) sx0-3.zip
End
last update 5 March 2013