📄 basic_hal.lyx
字号:
False\end_inset </cell></row><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row></lyxtabular>\end_inset \layout Subsectionor2\layout StandardThe "or2" component is a two input OR gate.\layout StandardSyntax\layout Quoteor2[count=,|names=name1[,name2...]]\layout StandardFunctions\layout Quoteor2.n\layout StandardPins\layout Quoteor2.n.in0 (bit, in)\newline or2.n.in1 (bit, in)\newline or2.n.out (bit, out)\layout Standard\align center Truth Table\layout Standard\align center \begin_inset Tabular<lyxtabular version="3" rows="5" columns="3"><features><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" rightline="true" width="0"><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardin0\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardin1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardout\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell></row></lyxtabular>\end_inset \layout Subsectionxor2\layout StandardThe "xor2" component is a two input XOR (exclusive OR)gate.\layout StandardSyntax\layout Quotexor2[count=,|names=name1[,name2...]]\layout StandardFunctions\layout Quotexor2.n\layout StandardPins\layout Quotexor2.n.in0 (bit, in)\newline xor2.n.in1 (bit, in)\newline xor2.n.out (bit, out)\layout Standard\align center Truth Table\layout Standard\align center \begin_inset Tabular<lyxtabular version="3" rows="5" columns="3"><features><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" rightline="true" width="0"><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardin0\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardin1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardout\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardTrue\end_inset </cell></row><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardFalse\end_inset </cell></row></lyxtabular>\end_inset \layout SubsectionLogic Examples\layout StandardAn "and2" example connecting two inputs to one output.\layout Quoteloadrt and2 count=1\newline addf and2.0 servo-thread\newline net my-sigin1 and2.0.in0 <= paraport.0.pin-11-in\newline net my-sigin2 and2.0.in.1 <= paraport.0.pin-12-in\newline net both-on paraport.0.pin-14-out <= and2.0.out\layout StandardIn the above example one copy of and2 is loaded into real time space and added to the servo thread. Next pin 11 of the parallel port is connected to the in0 bit of the and gate. Next pin 12 is connected to the in1 bit of the and gate. Last we connect the and2 out bit to the parallel port pin 14. So following the truth table for and2 if pin 11 and pin 12 are on then the output pin 14 will be on.\layout Standard\the_end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -