Commit f198be10 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

synchronized to vdt

parent 90045834
Loading
Loading
Loading
Loading

icons/check.png

0 → 100644
+324 B
Loading image diff...
+5.27 KiB
Loading image diff...
+5.89 KiB
Loading image diff...
+182 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 /*******************************************************************************
 * Copyright (c) 2015 Elphel, Inc.
 * This file is a part of VDT plug-in.
 * VDT plug-in is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * VDT plug-in is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *  Additional permission under GNU GPL version 3 section 7:
 * If you modify this Program, or any covered work, by linking or combining it
 * with Eclipse or Eclipse plugins (or a modified version of those libraries),
 * containing parts covered by the terms of EPL/CPL, the licensors of this
 * Program grant you additional permission to convey the resulting work.
 * {Corresponding Source for a non-source form of such a combination shall
 * include the source code for the parts of Eclipse or Eclipse plugins used
 * as well as that of the covered work.}
 *******************************************************************************/
 -->
<vdt-project>
	<interface name="QuartusAssemblerInterface" extends="QuartusInterface">
	</interface>

	<tool name="QuartusAssembler" label="Generate a device programming image"
	    project="FPGA_project"
		interface="QuartusAssemblerInterface"
		package="FPGA_package"
		shell="/bin/bash"
		ignore="%QuartusIgnoreSource"
		description="Quartus assembler generates a device programming image"
		log-dir="QuartusLogDir"
		inherits="QuartusToolPrototype"
		disable="DisableTool"
		>

		<depends-list>
			<depends state="QuartusSnapshotPlace"/>
		</depends-list>
		<action-menu>
			<action label="Generate bitstream" resourse="" icon="bitstream.png"/>
		</action-menu>

		<!-- Interfce parameters -->	
		<parameter id="DisableTool" label="Disable autorun" tooltip="Disable automatic launch of this tool"
			type="Boolean" default="false" visible="true" readonly="false" format="None"/>
		<parameter id="BitfileName" label="Bitstream file name" tooltip="Bitstream file name (will have 'sof' extension)"
			type="String" default="%%ProjectName" visible="true" readonly="false" format="CopyValue"/>
		<parameter id="CreatePof" label="Create .pof" tooltip="Create Programming Object File (.pof)"
			type="Boolean" default="false" visible="true" readonly="false" format="None"/>
		<parameter id="ConfigDevice" label="Configuration device" tooltip="Specify Altera configuration device"
			type="String" default="EPCS128" visible="true" readonly="false" format="CopyValue"/>
		<parameter id="CreateHex" label="Create .hexout" tooltip="Create Hexadecimal (Intel format) Output File (.hexout)"
			type="Boolean" default="false" visible="true" readonly="false" format="None"/>

		<!-- parser parameters, these can differ from base tool and will be stored separately -->
        <parameter id="PatternErrors"/>
		<parameter id="PatternWarnings"/>
		<parameter id="PatternInfo"/>
		<parameter id="InstanceCapture"/>
		<parameter id="InstanceSeparator"/>
		<parameter id="InstanceSuffix"/>
		<parameter id="ShowWarnings"/>
		<parameter id="ShowInfo"/>
		<parameter id="PreGrepW"/>
		<parameter id="PreGrepI"/>
		<parameter id="GrepEWI"/>
		<parameter id="MaxMsg"/>
		<parameter id="parser_mode"/>
		<parameter id="parsers_path"/>
		<parameter id="parser_name"/>
		<parameter id="include_msg_id"/>
		<parameter id="exclude_id_list"/>
		<parameter id="disable_exclude_list"/>

		<input>
			<group name="General">
				"DisableTool"
				"BitfileName"
				"CreatePof"
				"ConfigDevice"
				"CreateHex"
			</group>
		</input>

		<output>
			<!-- Start assembler -->
			<line name="quartus_run_asm"
			      dest="QuartusConsole"
			      mark="``" 
			      sep="\n"
				  prompt="@@FINISH@@"
				  success="@@FINISH@@"
				  log=""
				  stdout="parser_Quartus">
				"cd ~/%QuartusProjectRoot"
				"set projectName %%ProjectName"
			    "set outputDir ~/%QuartusProjectRoot/%QuartusRemoteDir"
				"file mkdir $outputDir"
				"load_package flow"
				<!-- Reopen project if it was closed somehow -->
				"if [is_project_open] {"
				"puts \"Project is open, starting assembler\""
				"} else {"
				"project_open $projectName"
				"}"
				"if {[catch {execute_module -tool asm} result]} {"
				"puts \"Result: $result\""
				"puts \"Error: Assembler faild. See the report file.\""
				"} else {"
				"puts \"Info: Assembly was successful.\""
				"}"
				<!-- Convert generated sof to pof -->
				<if CreatePof="true">
					<if-not ConfigDevice="">
						"set sof_file %BitfileName.sof"
						"set pof_file %BitfileName.pof"
						"set device_name %ConfigDevice"
						"if {[catch {execute_module -tool cpf -args \"-c -d $device_name $sof_file $pof_file\"} result]} {"
						"puts \"Result: $result\""
						"puts \"Error: Programming files converter faild. See the report file.\""
						"} else {"
						"puts \"Info: File convertion was successful.\""
						"}"
					</if-not>
					<if configDevice="">
						"puts \"Error: configuration device is not specified, Programmer Object File is not created \""
					</if>
				</if>
				<!-- Convert generated sof to hex -->
				<if CreatePof="true">
					"set sof_file %BitfileName.sof"
					"set hex_file %BitfileName.hexout"
					"if {[catch {execute_module -tool cpf -args \"-c $sof_file $hex_file\"} result]} {"
					"puts \"Result: $result\""
					"puts \"Error: Programming files converter faild. See the report file.\""
					"} else {"
					"puts \"Info: File convertion was successful.\""
					"}"
				</if>
				"puts \"@@FINISH@@\""
			</line>
			<line name="quartus_copy_bitstream">
				"-c"
				"mkdir -p %QuartusLocalResultDir;"
				"rsync -avr -e ssh"
				"%RemoteUser@%RemoteHost:%QuartusProjectRoot/%BitfileName.sof"
				"%QuartusLocalResultDir/;"
				<!-- Copy pof if it was created -->
				<if CreatePof="true">
					<if-not ConfigDevice="">
						"rsync -avr -e ssh"
						"%RemoteUser@%RemoteHost:%QuartusProjectRoot/%BitfileName.pof"
						"%QuartusLocalResultDir/;"
					</if-not>
				</if>
				<!-- Copy hex if it was created -->
				<if CreateHex="true">
					"rsync -avr -e ssh"
					"%RemoteUser@%RemoteHost:%QuartusProjectRoot/%BitfileName.hexout"
					"%QuartusLocalResultDir/;"
				</if>
			</line>
			<line name="quartus_copy_reports">
				"-c"
				"mkdir -p %QuartusLocalResultDir ;"
				"rsync -av -e ssh"
				"%RemoteUser@%RemoteHost:%QuartusProjectRoot/*.rpt"
				"%QuartusLocalResultDir/"
			</line>
		</output>
	</tool>
	
</vdt-project>
+153 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 /*******************************************************************************
 * Copyright (c) 2015 Elphel, Inc.
 * This file is a part of VDT plug-in.
 * VDT plug-in is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * VDT plug-in is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *  Additional permission under GNU GPL version 3 section 7:
 * If you modify this Program, or any covered work, by linking or combining it
 * with Eclipse or Eclipse plugins (or a modified version of those libraries),
 * containing parts covered by the terms of EPL/CPL, the licensors of this
 * Program grant you additional permission to convey the resulting work.
 * {Corresponding Source for a non-source form of such a combination shall
 * include the source code for the parts of Eclipse or Eclipse plugins used
 * as well as that of the covered work.}
 *******************************************************************************/
 -->
<vdt-project>
	<interface name="QuartusDrcInterface" extends="QuartusInterface">
		<syntax name="DoubleDashValue" format="--%%ParamValue"/>
		<typedef name="ModeType">
			<paramtype kind="enum" base="String">
				<item value="None" label=""/>
				<item value="post_fit" label="Option to perform post-fit design analysis"/>
				<item value="post_syn" label="Option to perform post-synthesis design analysis"/>
				<item value="rtl" label="Option to perform pre-synthesis design analysis"/>
			</paramtype>
		</typedef>
	</interface>

	<tool name="QuartusDrc" label="Perform design check"
	    project="FPGA_project"
		interface="QuartusDrcInterface"
		package="FPGA_package"
		shell="/bin/bash"
		description="Check the reliability of a design on a set of design rules"
		log-dir="QuartusLogDir"
		inherits="QuartusToolPrototype"
		disable="DisableTool"
		>

		<depends-list>
			<depends state="QuartusSnapshotPlace"/>
		</depends-list>
		<action-menu>
			<action label="Design check" resourse="" icon="check.png"/>
		</action-menu>

		<!-- Interfce parameters -->	
		<parameter id="DisableTool" label="Disable autorun" tooltip="Disable automatic launch of this tool"
			type="Boolean" default="false" visible="true" readonly="false" format="None"/>
		<parameter id="Mode" label="Analysis mode" tooltip="Select analysis mode"
			type="ModeType" default="None" omit="None" visible="true" readonly="false" format="DoubleDashValue"/>
		<parameter id="lower_priority" label="Lower priority" tooltip="Option to lower priority of the current process"
			default="false" visible="true" readonly="false" omit="false" type="Boolean" format="DoubleDashName"/>

		<!-- parser parameters, these can differ from base tool and will be stored separately -->
        <parameter id="PatternErrors"/>
		<parameter id="PatternWarnings"/>
		<parameter id="PatternInfo"/>
		<parameter id="InstanceCapture"/>
		<parameter id="InstanceSeparator"/>
		<parameter id="InstanceSuffix"/>
		<parameter id="ShowWarnings"/>
		<parameter id="ShowInfo"/>
		<parameter id="PreGrepW"/>
		<parameter id="PreGrepI"/>
		<parameter id="GrepEWI"/>
		<parameter id="MaxMsg"/>
		<parameter id="parser_mode"/>
		<parameter id="parsers_path"/>
		<parameter id="parser_name"/>
		<parameter id="include_msg_id"/>
		<parameter id="exclude_id_list"/>
		<parameter id="disable_exclude_list"/>

		<input>
			<group name="General">
				"DisableTool"
				"Mode"
				"lower_priority"
			</group>
		</input>

		<output>
			<!-- Assemble quartus_drc arguments line -->
			<line name="quartus_drc_args"
				  dest="QuartusConsole"
				  sep=" ">
				"set drc_args \""
				"%lower_priority"
				"%Mode"
				"\"\n"
			</line>
			<!-- Start Design Assistant -->
			<line name="quartus_run_drc"
			      dest="QuartusConsole"
			      mark="``" 
			      sep="\n"
				  prompt="@@FINISH@@"
				  success="@@FINISH@@"
				  log=""
				  stdout="parser_Quartus">
				"cd ~/%QuartusProjectRoot"
				"set projectName %%ProjectName"
			    "set outputDir ~/%QuartusProjectRoot/%QuartusRemoteDir"
				"file mkdir $outputDir"
				"load_package flow"
				<!-- Reopen project if it was closed somehow -->
				"if [is_project_open] {"
				"puts \"Project is open, starting assembler\""
				"} else {"
				"project_open $projectName"
				"}"
				"if {$drc_args ne \" \"} {"
				"if {[catch {execute_module -tool drc -args $drc_args} result]} {"
				"puts \"Result: $result\""
				"puts \"Error: Design check faild. See the report file.\""
				"} else {"
				"puts \"Info: Design check was successful.\""
				"}"
				"} else {"
				"if {[catch {execute_module -tool drc} result]} {"
				"puts \"Result: $result\""
				"puts \"Error: Design check faild. See the report file.\""
				"} else {"
				"puts \"Info: Design check was successful.\""
				"}"
				"}"
				"puts \"@@FINISH@@\""
			</line>
			<line name="quartus_copy_reports">
				"-c"
				"mkdir -p %QuartusLocalResultDir ;"
				"rsync -av -e ssh"
				"%RemoteUser@%RemoteHost:%QuartusProjectRoot/*.rpt"
				"%QuartusLocalResultDir/"
			</line>
		</output>
	</tool>
	
</vdt-project>
Loading