Commit 8c4668b9 authored by Andrey Filippov's avatar Andrey Filippov

Added bitstream generation command

parent e4d8cb76
......@@ -56,6 +56,10 @@
label="Route design"
icon="route66.png"
call="VivadoRoute"/>
<menuitem name="VivadoBitstream"
label="Generate bitstream"
icon="bitstream.png"
call="VivadoBitstream"/>
<menuitem name="Vivado Test"
label="Send a 'Hello World' command to the remote Vivado session"
icon="my_tool.gif"
......
<?xml version="1.0" encoding="UTF-8"?>
<vdt-project>
<interface name="VivadoBitstreamInterface" extends="VivadoInterface">
</interface>
<tool name="VivadoBitstream" label="Generate bitstream"
project="FPGA_project"
interface="VivadoBitstreamInterface"
package="FPGA_package"
shell="/bin/bash"
description="Generate bitstream"
log-dir="vivado_logs">
<action-menu>
<action label="Generate bitstream" resource="" icon="bitstream.png" />
</action-menu>
<parameter id="FromMemory" label="Run from memory" tooltip="Do not load snapshot created after routing"
default="false" type= "Boolean" format="None"/>
<parameter id="SkipPreBitstream" label="Skip pre-bitstream" tooltip="Do not run pre bitstream TCL commands"
default="false" type= "Boolean" format="None"/>
<!-- left from synthesis, may need update-->
<parameter id="ShowWarnings" label="Parse warnings" tooltip="Parse warning messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="ShowInfo" label="Parse info" tooltip="Parse info messages"
default="true"
type= "Boolean" format="None"/>
<parameter id="PreGrepW" visible="false"
type="String" format="None"
default="?%ShowWarnings=true: |WARNING, "/>
<parameter id="PreGrepI" visible="false"
type="String" format="None"
default="?%ShowInfo=true: |INFO, "/>
<parameter id="GrepEWI" label="Grep filter" tooltip="Calculated grep filter"
default="grep --line-buffered -E 'ERROR%PreGrepW%PreGrepI'"
type="String" format="CopyValue"
visible="true" readonly="true"/>
<parameter id="PreBitstreamTCL" label="Pre-bitstream TCL commands" tooltip="TCL commands to run before write_bitstream"
type="Stringlist" format="ProgramSyntax" default="" omit=""
readonly="false" visible="true" />
<!-- write_bitstream arguments -->
<parameter id="filename" label="Bitstream filename" tooltip= "Bitstream file name (will add *.bit extension)."
default="%%ProjectName" visible="true" omit="" type="String" format="CopyValue"/>
<parameter id="force" label="Force (overwrite)" tooltip= "Overwrite existent files."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="raw_bitfile" label="Write raw bitfile" tooltip= "Write bitfile in ASCII (*.rbt)."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="no_binary_bitfile" label="Do not write .bit" tooltip= "Do not write to binary bitfile (*.bit)."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="readback_file" label="Create readback file (.rbd, .msd)" tooltip= "Create file needed for readback."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="logic_location_file" label="Create logic location file (.ll)" tooltip= "Create ASCII logic location file showing locations of latches, FF, BRAM and I/O."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="bin_file" label="Create .bin file" tooltip= "Create bitsteream without the header (.bin)."
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="reference_bitfile" label="Read reference bitfile" tooltip= "Read reference bitstream file."
default="" visible="true" omit="" type="Filename" format="Dash"/>
<parameter id="quiet_bit" outid="quiet" label="Quiet" tooltip= "Ignore errors, return TCL_OK in any case"
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<parameter id="verbose_bit" outid="verbose" label="Verbose" tooltip= "Temporarily override message limits set with set_msg_config"
default="false" visible="true" omit="false" type="Boolean" format="DashName"/>
<!-- parser parameters -->
<parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages"
default=".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternWarnings" label="Warnings" tooltip= "Regular expression for warnings messages"
default=".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternInfo" label="Info" tooltip= "Regular expression for info messages"
default=".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="NoFileProblem" label="No-file problems" tooltip= "Report problems that do not specify particular source file/line"
default="true" visible="true" omit="false" type="Boolean" format="None"/>
<!-- TODO: change to bitstream-specific problems -->
<parameter id="Drc" label="Drc" tooltip= "Enable problems with [Drc to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Vivado_Tcl" label="Vivado_Tcl" tooltip= "Enable problems with [Vivado_Tcl to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Route" label="Route" tooltip= "Enable problems with [Route to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<!-- Other patterns copied from other commands, maybe not applicablwe here -->
<parameter id="Memdata" label="Memdata" tooltip= "Enable problems with [Memdata to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Netlist" label="Netlist" tooltip= "Enable problems with [Netlist to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Opt" label="Opt" tooltip= "Enable problems with [Opt to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Project" label="Project" tooltip= "Enable problems with [Project to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Timing" label="Timing" tooltip= "Enable problems with [Timing to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="Pwropt" label="Pwropt" tooltip= "Enable problems with [Pwropt to be reported"
default="true" visible="true" omit="true" type="Boolean" format="GrepFilterProblemSyntax"/>
<parameter id="OtherProblems" label="Other problems" tooltip= "Other problem patterns (after opening '[') to be suppressed)"
default="" visible="true" omit="" type="Stringlist" format="GrepFilterProblemOtherSyntax"/>
<!-- hidden (calculated) parameters -->
<!-- not really used now, always "0" -->
<parameter id="VivadoBitstreamActionIndex" default="%%ChosenActionIndex"
type="String" format="CopyValue" visible="false" />
<input>
<group name="General">
"FromMemory"
"SkipPreBitstream"
"ShowWarnings"
"ShowInfo"
"GrepEWI"
</group>
<group name="Pre-bitstream commands">
"PreBitstreamTCL"
</group>
<group name="Bitstream">
"filename"
"force"
"raw_bitfile"
"no_binary_bitfile"
"readback_file"
"logic_location_file"
"bin_file"
"reference_bitfile"
"---"
"quiet_bit"
"verbose_bit"
</group>
<group name="Parser">
"NoFileProblem"
"Drc"
"Vivado_Tcl"
"Route"
"Memdata"
"Netlist"
"Opt"
"Project"
"Timing"
"Pwropt"
"OtherProblems"
"---"
"PatternErrors"
"PatternWarnings"
"PatternInfo"
</group>
</input>
<output>
<!-- mkdir -p vdt/npmtest-->
<!-- Now skipping completely pre_opt copying - maybe some will still be needed (custom tcl scripts), then move conditional inside block -->
<if FromMemory = "false">
<line name="vivado_copy_pre_opt">
"-c"
<!-- Create project directory on remote server if it did not exist -->
"ssh"
"-oBatchMode=yes"
"-l %RemoteUser %RemoteHost"
"'"
"mkdir -p"
"%VivadoProjectRoot"
"' ;"
<!-- Copy snapshot generated after opt/place from local to remote -->
"rsync -avrR -e ssh"
<!-- from: -->
"%VivadoLocalDir/%SnapshotOptPlace"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot"
";"
<!-- Copy bitstream reference file (full name) reference_bitfile -->
<if-not reference_bitfile="">
"rsync -avrR -e ssh"
<!-- from: (trying full name) -->
<!-- "%VivadoLocalDir/%SnapshotOptPlace" -->
"%reference_bitfile"
<!-- to: -->
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/build"
";"
</if-not>
</line>
</if>
<!-- Set sep="", so all new lines should be specified as \n -->
<line name="vivado_run_bitstream"
dest="VivadoConsole"
mark="``"
sep=""
prompt="@@FINISH@@"
success="write_bitstream completed successfully"
log=""
stdout="parser_VivadoBitstream">
"cd ~/%VivadoProjectRoot\n"
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
<!-- Start fresh from the loaded checkpoint -->
<if FromMemory = "false">
"open_checkpoint %SnapshotRoute\n"
</if>
<!-- Run pre-bitstream TCL commands (if specified) -->
<if SkipPreBitstream="false">
<if-not PreBitstreamTCL="">
"%PreBitstreamTCL\n"
</if-not>
<if PreBitstreamTCL="">
"puts \"No pre-bitstream TCL commands specified\"\n"'
</if>
</if>
<!-- Run routing -->
"write_bitstream "
"%filename"
"%force"
"%raw_bitfile"
"%no_binary_bitfile"
"%readback_file"
"%logic_location_file"
"%bin_file"
"%reference_bitfile"
"%quiet_bit"
"%verbose_bit"
"\n"
"puts \"@@FINISH@@\"\n"
</line>
<line name="vivado_copy_after_bitstream">
"-c"
"mkdir -p %VivadoLocalDir ;"
"rsync -avr -e ssh"
"%RemoteUser@%RemoteHost:%VivadoProjectRoot/build/%filename.*"
"%VivadoLocalDir/"
</line>
<line name="parser_VivadoBitstream"
errors= "PatternErrors"
warnings= "PatternWarnings"
info= "PatternInfo">
"-c"
"%GrepEWI"
"| %SedPaths"
<if NoBabyTalk="true">
"| grep --line-buffered -v \"license\""
</if>
"%Drc"
"%Vivado_Tcl"
"%Route"
"%Memdata"
"%Netlist"
"%Opt"
"%Project"
"%Timing"
"%Pwropt"
"%OtherProblems"
<!-- TODO: change Placement to Routing? or such -->
<if NoFileProblem="true">
<!-- Add [Placement:0000] to lines that do not have [file:line] - then "Placement" will appear in "Problems" location-->
"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Bitstream:0000\]@'"
</if>
</line>
</output>
</tool>
</vdt-project>
......@@ -26,7 +26,7 @@
<action-menu>
<action label="Route" resource="" icon="route66.png" />
</action-menu>
<parameter id="FromMemoryRouting" label="Run from memory" tooltip="Do not load snapshot created after placement"
<parameter id="FromMemory" label="Run from memory" tooltip="Do not load snapshot created after placement"
default="false" type= "Boolean" format="None"/>
<parameter id="SkipPreRoute" label="Skip pre-route" tooltip="Do not run pre route TCL commands"
default="false" type= "Boolean" format="None"/>
......@@ -136,7 +136,7 @@
<input>
<group name="General">
"FromMemoryRouting"
"FromMemory"
"SkipPreRoute"
"SkipSnapshotRoute"
"SnapshotRoute" <!-- same as in project -->
......@@ -189,7 +189,7 @@
<output>
<!-- mkdir -p vdt/npmtest-->
<!-- Now skipping completely pre_opt copying - maybe some will still be needed (custom tcl scripts), then move conditional inside block -->
<if FromMemoryRouting = "false">
<if FromMemory = "false">
<line name="vivado_copy_pre_opt">
"-c"
<!-- Create project directory on remote server if it did not exist -->
......@@ -222,7 +222,7 @@
"set outputDir ~/%VivadoProjectRoot/build\n"
"file mkdir $outputDir\n"
<!-- Start fresh from the loaded checkpoint -->
<if FromMemoryRouting = "false">
<if FromMemory = "false">
"open_checkpoint %SnapshotOptPlace\n"
</if>
<!-- Run pre-route TCL commands (if specified) -->
......
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