Test_BitwiseOR Icon
Test_BitwiseOR
Usage
PrimitiveComponents.Test_BitwiseOR()
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( a_{+}y(t), bitwiseor_{+}a(t) \right) \\ \mathrm{connect}\left( b_{+}y(t), bitwiseor_{+}b(t) \right) \\ \mathtt{bitwiseor.y}\left( t \right) = bitwise\_or\left( \mathtt{bitwiseor.a}\left( t \right), \mathtt{bitwiseor.b}\left( t \right) \right) \\ \mathtt{a.y}\left( t \right) = \mathtt{a.k} \\ \mathtt{b.y}\left( t \right) = \mathtt{b.k} \\ \end{array} \right] \end{equation} \]
Source
component Test_BitwiseOR
bitwiseor = PrimitiveComponents.LogicGates.Bitwise_OR() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
}
}
}
a = PrimitiveComponents.Sources.ConstantIntegerOutput(k = 3) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 140, "y1": 320, "x2": 240, "y2": 420, "rot": 0}
}
}
}
b = PrimitiveComponents.Sources.ConstantIntegerOutput(k = 4) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 540, "x2": 250, "y2": 640, "rot": 0}
}
}
}
relations
connect(a.y, bitwiseor.a) {
"Dyad": {"edges": [{"S": 1, "M": [{"x": 350, "y": 370}, {"x": 350, "y": 472}], "E": 2}]}
}
connect(bitwiseor.b, b.y) {
"Dyad": {"edges": [{"S": 1, "M": [{"x": 350, "y": 528}, {"x": 350, "y": 590}], "E": 2}]}
}
metadata {
"Dyad": {
"experiments": {"Test_Bitwise_OR_": {"stop": 10}},
"tests": {
"case1": {
"stop": 5,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["bitwiseor.b", "bitwiseor.a", "bitwiseor.y"]}
}
}
}
}
end
Flattened Source
component Test_BitwiseOR
bitwiseor = PrimitiveComponents.LogicGates.Bitwise_OR() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
}
}
}
a = PrimitiveComponents.Sources.ConstantIntegerOutput(k = 3) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 140, "y1": 320, "x2": 240, "y2": 420, "rot": 0}
}
}
}
b = PrimitiveComponents.Sources.ConstantIntegerOutput(k = 4) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 540, "x2": 250, "y2": 640, "rot": 0}
}
}
}
relations
connect(a.y, bitwiseor.a) {
"Dyad": {"edges": [{"S": 1, "M": [{"x": 350, "y": 370}, {"x": 350, "y": 472}], "E": 2}]}
}
connect(bitwiseor.b, b.y) {
"Dyad": {"edges": [{"S": 1, "M": [{"x": 350, "y": 528}, {"x": 350, "y": 590}], "E": 2}]}
}
metadata {
"Dyad": {
"experiments": {"Test_Bitwise_OR_": {"stop": 10}},
"tests": {
"case1": {
"stop": 5,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["bitwiseor.b", "bitwiseor.a", "bitwiseor.y"]}
}
}
}
}
endTest Cases
Test Case case1
pltpltpltRelated
- Examples
- Experiments
- Analyses