Commit 6b1f034b authored by Christopher Jan-Steffen Brix's avatar Christopher Jan-Steffen Brix
Browse files

Modifed CalculatorTest

parent be963637
package CalculatorTest;
import NumberDetector;
component Calculator{ component Calculator{
ports in Z(0:999) number1, ports in Q(0:1)^10 vec1_1,
in Z(0:999) number2, in Q(0:1)^10 vec1_2,
in Q(0:1)^10 vec1_3,
in Q(0:1)^10 vec2_1,
in Q(0:1)^10 vec2_2,
in Q(0:1)^10 vec2_3,
out Z(0:1998) result; out Z(0:1998) result;
instance NumberDetector nd1;
instance NumberDetector nd2;
connect vec1_1 -> nd1.pred_num1;
connect vec1_2 -> nd1.pred_num2;
connect vec1_3 -> nd1.pred_num3;
connect vec2_1 -> nd2.pred_num1;
connect vec2_2 -> nd2.pred_num2;
connect vec2_3 -> nd2.pred_num3;
implementation Math{ implementation Math{
result = number1 + number2; result = nd1.number + nd2.number;
} }
} }
component Number{ package CalculatorTest;
component NumberDetector{
ports in Q(0:1)^10 pred_num1, ports in Q(0:1)^10 pred_num1,
in Q(0:1)^10 pred_num2, in Q(0:1)^10 pred_num2,
in Q(0:1)^10 pred_num3, in Q(0:1)^10 pred_num3,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment