| 55 | } |
| 56 | |
| 57 | void comp_2bit::createSymbol() |
| 58 | { |
| 59 | Lines.append(new Line(-40, -50, 40,-50,QPen(Qt::darkBlue,2))); |
| 60 | Lines.append(new Line( 40, -50, 40, 60,QPen(Qt::darkBlue,2))); |
| 61 | Lines.append(new Line( 40, 60,-40, 60,QPen(Qt::darkBlue,2))); |
| 62 | Lines.append(new Line(-40, 60,-40, -50,QPen(Qt::darkBlue,2))); |
| 63 | |
| 64 | Lines.append(new Line(-60,-10,-40,-10,QPen(Qt::darkBlue,2))); // X0 |
| 65 | Lines.append(new Line(-60, 10,-40, 10,QPen(Qt::darkBlue,2))); // X1 |
| 66 | Lines.append(new Line(-60, 30,-40, 30,QPen(Qt::darkBlue,2))); // Y0 |
| 67 | Lines.append(new Line(-60, 50,-40, 50,QPen(Qt::darkBlue,2))); // Y1 |
| 68 | Lines.append(new Line( 40, 30, 60, 30,QPen(Qt::darkBlue,2))); // L |
| 69 | Lines.append(new Line( 40, 10, 60, 10,QPen(Qt::darkBlue,2))); // G |
| 70 | Lines.append(new Line( 40,-10, 60,-10,QPen(Qt::darkBlue,2))); // E |
| 71 | |
| 72 | Texts.append(new Text(-25,-45, "COMP", Qt::darkBlue, 12.0)); |
| 73 | |
| 74 | Texts.append(new Text(-25,-20, "{", Qt::darkBlue, 16.0)); |
| 75 | Texts.append(new Text(-15,-15, "X", Qt::darkBlue, 12.0)); |
| 76 | Texts.append(new Text(-35,-23, "0", Qt::darkBlue, 12.0)); |
| 77 | Texts.append(new Text(-35, -3, "1", Qt::darkBlue, 12.0)); |
| 78 | Texts.append(new Text(-25, 22, "{", Qt::darkBlue, 16.0)); |
| 79 | Texts.append(new Text(-15, 27, "Y", Qt::darkBlue, 12.0)); |
| 80 | Texts.append(new Text(-35, 17, "0", Qt::darkBlue, 12.0)); |
| 81 | Texts.append(new Text(-35, 37, "1", Qt::darkBlue, 12.0)); |
| 82 | Texts.append(new Text( 5, 17, "X<Y", Qt::darkBlue, 12.0)); |
| 83 | Texts.append(new Text( 5, -3, "X>Y", Qt::darkBlue, 12.0)); |
| 84 | Texts.append(new Text( 5,-23, "X=Y", Qt::darkBlue, 12.0)); |
| 85 | |
| 86 | Ports.append(new Port(-60,-10)); // X0 |
| 87 | Ports.append(new Port(-60, 10)); // X1 |
| 88 | Ports.append(new Port(-60, 30)); // Y0 |
| 89 | Ports.append(new Port(-60, 50)); // Y1 |
| 90 | Ports.append(new Port( 60, 30)); // L |
| 91 | Ports.append(new Port( 60, 10)); // G |
| 92 | Ports.append(new Port( 60,-10)); // E |
| 93 | |
| 94 | x1 = -60; y1 = -54; |
| 95 | x2 = 60; y2 = 64; |
| 96 | } |
| 97 | |
| 98 | QString comp_2bit::vhdlCode( int ) |
| 99 | { |