1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-04-21 12:27:27 +03:00

Updating prototype of SIE code generator.

This commit is contained in:
Juan64Bits
2010-11-10 14:20:10 -05:00
parent d302857917
commit 9d578912b7
48 changed files with 1785 additions and 62 deletions

View File

@@ -0,0 +1,23 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="ADC Single">
<Polygon>
<Point x="-80" y="0"/>
<Point x="-60" y="-40"/>
<Point x="60" y="-40"/>
<Point x="60" y="40"/>
<Point x="110" y="40"/>
<Point x="110" y="-40"/>
<Point x="60" y="-40"/>
<Point x="110" y="-40"/>
<Point x="110" y="40"/>
<Point x="-60" y="40"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="3" text="ADC Single Channel" posOffset-x="0"/>
<TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="4" text="0" posOffset-x="20"/>
<TextItem myStyleIO="0" posOffset-y="-0" editableItem="0" ID="5" text="CH:" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="-20" editableItem="0" ID="6" text="SP:" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="-20" editableItem="1" ID="7" text="255" posOffset-x="20"/>
<TextItem myStyleIO="8" posOffset-y="-20" editableItem="0" ID="8" text="UChar" posOffset-x="110"/>
</TextItems>
</CustomItem>

View File

@@ -0,0 +1,14 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="Constant">
<Polygon>
<Point x="-50" y="-10"/>
<Point x="-50" y="30"/>
<Point x="30" y="30"/>
<Point x="30" y="-10"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="21" text="Value" posOffset-x="-30"/>
<TextItem myStyleIO="3" posOffset-y="-20" editableItem="0" ID="15" text="OUT Integer" posOffset-x="30"/>
<TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="19" text="1" posOffset-x="10"/>
</TextItems>
</CustomItem>

View File

@@ -118,8 +118,8 @@ void DiagramScene::doSnapToGrid(QGraphicsSceneMouseEvent *mouseEvent)
{
if(snapToGrid){
mouseEvent->setScenePos(QPointF(
int(mouseEvent->scenePos().x()/myGrid)*myGrid,
int(mouseEvent->scenePos().y()/myGrid)*myGrid
round(mouseEvent->scenePos().x()/myGrid)*myGrid,
round(mouseEvent->scenePos().y()/myGrid)*myGrid
));
}
}

View File

@@ -0,0 +1,18 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="Left Shift">
<Polygon>
<Point x="-70" y="-30"/>
<Point x="-70" y="20"/>
<Point x="60" y="20"/>
<Point x="60" y="-30"/>
<Point x="-50" y="-30"/>
<Point x="-70" y="-30"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="9" posOffset-y="-0" editableItem="0" ID="13" text="OUT" posOffset-x="60"/>
<TextItem myStyleIO="138" posOffset-y="-0" editableItem="0" ID="12" text="IN" posOffset-x="-70"/>
<TextItem myStyleIO="0" posOffset-y="-10" editableItem="1" ID="11" text="1" posOffset-x="10"/>
<TextItem myStyleIO="0" posOffset-y="-10" editableItem="0" ID="10" text="&lt;&lt;" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="5" text="Bitwise Shift" posOffset-x="-10"/>
</TextItems>
</CustomItem>

View File

@@ -168,6 +168,20 @@ void MainWindow::createToolBox()
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("Float"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("Short"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("Long"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("UChar"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("UInt"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("UShort"),
QIcon(":/images/background1.png")),++i,0);
layout->addWidget(createToolButton(129+i,tr("ULong"),
QIcon(":/images/background1.png")),++i,0);
//OUTPUTS
i=0;
@@ -181,6 +195,18 @@ void MainWindow::createToolBox()
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("Float"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("Short"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("Long"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("UChar"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("UInt"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("UShort"),
QIcon(":/images/background3.png")),++i,1);
layout->addWidget(createToolButton(i,tr("ULong"),
QIcon(":/images/background3.png")),++i,1);
layout->setRowStretch(3, 10);
layout->setColumnStretch(2, 10);

View File

@@ -0,0 +1,32 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="PWM Single">
<Polygon>
<Point x="-90" y="-50"/>
<Point x="50" y="-50"/>
<Point x="50" y="-30"/>
<Point x="-90" y="-30"/>
<Point x="-90" y="20"/>
<Point x="-40" y="20"/>
<Point x="50" y="20"/>
<Point x="50" y="10"/>
<Point x="-40" y="10"/>
<Point x="-40" y="-10"/>
<Point x="-20" y="-10"/>
<Point x="0" y="-10"/>
<Point x="0" y="10"/>
<Point x="10" y="10"/>
<Point x="10" y="-10"/>
<Point x="50" y="-10"/>
<Point x="50" y="10"/>
<Point x="50" y="-30"/>
<Point x="50" y="20"/>
<Point x="-90" y="20"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="137" posOffset-y="-0" editableItem="0" ID="14" text="UChar" posOffset-x="-90"/>
<TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="15" text="|-Duty-|" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="40" editableItem="1" ID="16" text="0" posOffset-x="0"/>
<TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="11" text="Out:" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="18" text="PWM" posOffset-x="-50"/>
</TextItems>
</CustomItem>

View File

@@ -0,0 +1,18 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="Right Shift">
<Polygon>
<Point x="-70" y="-30"/>
<Point x="-70" y="20"/>
<Point x="60" y="20"/>
<Point x="60" y="-30"/>
<Point x="-50" y="-30"/>
<Point x="-70" y="-30"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="9" posOffset-y="-0" editableItem="0" ID="13" text="OUT" posOffset-x="60"/>
<TextItem myStyleIO="138" posOffset-y="-0" editableItem="0" ID="12" text="IN" posOffset-x="-70"/>
<TextItem myStyleIO="0" posOffset-y="-10" editableItem="1" ID="11" text="1" posOffset-x="10"/>
<TextItem myStyleIO="0" posOffset-y="-10" editableItem="0" ID="10" text=">>" posOffset-x="-20"/>
<TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="5" text="Bitwise Shift" posOffset-x="-10"/>
</TextItems>
</CustomItem>

View File

@@ -1,15 +1,15 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="Test Block 2">
<Polygon>
<Point x="-50" y="-20"/>
<Point x="-30" y="0"/>
<Point x="-50" y="20"/>
<Point x="-60" y="-20"/>
<Point x="-40" y="0"/>
<Point x="-60" y="20"/>
<Point x="30" y="20"/>
<Point x="60" y="0"/>
<Point x="40" y="-20"/>
<Point x="50" y="0"/>
<Point x="30" y="-20"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="130" posOffset-y="-0" editableItem="0" ID="1" text=" IN Bool" posOffset-x="-30"/>
<TextItem myStyleIO="0" posOffset-y="30" editableItem="0" ID="0" text="Test Block 2" posOffset-x="-10"/>
<TextItem myStyleIO="130" posOffset-y="-0" editableItem="0" ID="1" text=" IN Bool" posOffset-x="-30"/>
</TextItems>
</CustomItem>

View File

@@ -0,0 +1,69 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="Timer">
<Polygon>
<Point x="-70" y="-80"/>
<Point x="-70" y="80"/>
<Point x="80" y="80"/>
<Point x="80" y="-80"/>
<Point x="-70" y="-80"/>
<Point x="-70" y="-30"/>
<Point x="80" y="-30"/>
<Point x="80" y="80"/>
<Point x="50" y="80"/>
<Point x="40" y="50"/>
<Point x="30" y="50"/>
<Point x="20" y="60"/>
<Point x="40" y="40"/>
<Point x="40" y="40"/>
<Point x="40" y="30"/>
<Point x="30" y="40"/>
<Point x="30" y="30"/>
<Point x="30" y="30"/>
<Point x="10" y="30"/>
<Point x="10" y="30"/>
<Point x="10" y="30"/>
<Point x="30" y="30"/>
<Point x="30" y="20"/>
<Point x="40" y="30"/>
<Point x="40" y="20"/>
<Point x="30" y="10"/>
<Point x="30" y="10"/>
<Point x="40" y="0"/>
<Point x="50" y="10"/>
<Point x="50" y="0"/>
<Point x="40" y="-10"/>
<Point x="30" y="-20"/>
<Point x="20" y="-20"/>
<Point x="30" y="-10"/>
<Point x="20" y="0"/>
<Point x="20" y="0"/>
<Point x="-10" y="0"/>
<Point x="-20" y="-10"/>
<Point x="-10" y="-20"/>
<Point x="-20" y="-20"/>
<Point x="-40" y="0"/>
<Point x="-40" y="10"/>
<Point x="-30" y="0"/>
<Point x="-20" y="10"/>
<Point x="-20" y="10"/>
<Point x="-20" y="10"/>
<Point x="-30" y="20"/>
<Point x="-30" y="40"/>
<Point x="-20" y="50"/>
<Point x="-10" y="60"/>
<Point x="20" y="60"/>
<Point x="-10" y="60"/>
<Point x="-20" y="50"/>
<Point x="-30" y="50"/>
<Point x="-30" y="50"/>
<Point x="-40" y="80"/>
<Point x="-70" y="80"/>
<Point x="-70" y="80"/>
<Point x="-70" y="80"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="0" posOffset-y="40" editableItem="1" ID="1" text="1 " posOffset-x="-10"/>
<TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="2" text="ms" posOffset-x="10"/>
<TextItem myStyleIO="0" posOffset-y="60" editableItem="0" ID="0" text="System Timer" posOffset-x="0"/>
</TextItems>
</CustomItem>

View File

@@ -0,0 +1,29 @@
<!--File for SIE Code Generator. Custmos Blocks-->
<CustomItem BlockName="System While">
<Polygon>
<Point x="-50" y="-30"/>
<Point x="50" y="-30"/>
<Point x="50" y="-10"/>
<Point x="-50" y="-10"/>
<Point x="-50" y="30"/>
<Point x="0" y="30"/>
<Point x="0" y="0"/>
<Point x="40" y="0"/>
<Point x="40" y="20"/>
<Point x="20" y="20"/>
<Point x="20" y="10"/>
<Point x="10" y="20"/>
<Point x="20" y="30"/>
<Point x="20" y="20"/>
<Point x="20" y="30"/>
<Point x="50" y="30"/>
<Point x="50" y="-10"/>
<Point x="50" y="30"/>
<Point x="-50" y="30"/>
<Point x="-50" y="-10"/>
</Polygon>
<TextItems>
<TextItem myStyleIO="130" posOffset-y="-10" editableItem="0" ID="14" text="IN Bool" posOffset-x="-50"/>
<TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="23" text="System While" posOffset-x="0"/>
</TextItems>
</CustomItem>