From 12fe204bc268f9cf77642cd0eaa25585caae1d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Mon, 30 Jun 2025 08:32:32 +0200 Subject: [PATCH 01/15] Add aldec::alint plugin --- tclapp/aldec/alint/alint.tcl | 11 ++++++ tclapp/aldec/alint/app.xml | 18 +++++++++ tclapp/aldec/alint/convert_project.tcl | 44 ++++++++++++++++++++++ tclapp/aldec/alint/doc/legal.txt | 18 +++++++++ tclapp/aldec/alint/pkgIndex.tcl | 11 ++++++ tclapp/aldec/alint/revision_history.txt | 1 + tclapp/aldec/alint/tclIndex | 9 +++++ tclapp/aldec/alint/tclstore.wpc | 4 ++ tclapp/aldec/alint/test/src/testbench.v | 38 +++++++++++++++++++ tclapp/aldec/alint/test/src/uut.v | 16 ++++++++ tclapp/aldec/alint/test/test.tcl | 49 +++++++++++++++++++++++++ 11 files changed, 219 insertions(+) create mode 100644 tclapp/aldec/alint/alint.tcl create mode 100644 tclapp/aldec/alint/app.xml create mode 100644 tclapp/aldec/alint/convert_project.tcl create mode 100644 tclapp/aldec/alint/doc/legal.txt create mode 100644 tclapp/aldec/alint/pkgIndex.tcl create mode 100644 tclapp/aldec/alint/revision_history.txt create mode 100644 tclapp/aldec/alint/tclIndex create mode 100644 tclapp/aldec/alint/tclstore.wpc create mode 100644 tclapp/aldec/alint/test/src/testbench.v create mode 100644 tclapp/aldec/alint/test/src/uut.v create mode 100644 tclapp/aldec/alint/test/test.tcl diff --git a/tclapp/aldec/alint/alint.tcl b/tclapp/aldec/alint/alint.tcl new file mode 100644 index 000000000..047b2a889 --- /dev/null +++ b/tclapp/aldec/alint/alint.tcl @@ -0,0 +1,11 @@ +package require Tcl 8.5 + +namespace eval ::tclapp::aldec::alint { + # Allow Tcl to find tclIndex + variable home [file join [pwd] [file dirname [info script]]] + if {[lsearch -exact $::auto_path $home] == -1} { + lappend ::auto_path $home + } +} + +package provide ::tclapp::aldec::alint 1.0 diff --git a/tclapp/aldec/alint/app.xml b/tclapp/aldec/alint/app.xml new file mode 100644 index 000000000..8a21d9380 --- /dev/null +++ b/tclapp/aldec/alint/app.xml @@ -0,0 +1,18 @@ + + + + + Initial version + alint + aldec + Aldec, Inc. + Alint Linter + + + convert_project + Convert Vivado project to Alint + + + + + diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl new file mode 100644 index 000000000..0bbb2a36a --- /dev/null +++ b/tclapp/aldec/alint/convert_project.tcl @@ -0,0 +1,44 @@ +package require Vivado 1.2024.1 + +namespace eval ::tclapp::aldec::alint { + namespace export convert_project +} + +proc ::tclapp::aldec::alint::convert_project {alint_path} { + + # Summary: Convert Vivado project to Alint + + # Argument Usage: + # alint_path: Path where Alint is located + + # Return Value: + + # Categories: xilinxtclstore, aldec, alint, convert + + set alintcon $alint_path/bin/alintcon + + if {![file exists $alintcon]} { + error "Required file $alintcon not found" + } + + # Generate a script file for Alint + set alint_script_path [file tempfile] + set alint_script_file [open $alint_script_path w] + set alint_script { + convert.xpr.project {*}$argv + } + puts $alint_script_file $alint_script + close $alint_script_file + + set project_dir [get_property DIRECTORY [current_project]] + set project_name [get_property NAME [current_project]] + set xpr_path [file join $project_dir $project_name.xpr] + if {![file exists $xpr_path]} { + error "Project file not found" + } + + exec -- $alintcon \ + -batch \ + -do $alint_script_path $xpr_path \ + >@stdout +} diff --git a/tclapp/aldec/alint/doc/legal.txt b/tclapp/aldec/alint/doc/legal.txt new file mode 100644 index 000000000..14dcd8c5f --- /dev/null +++ b/tclapp/aldec/alint/doc/legal.txt @@ -0,0 +1,18 @@ +Copyright (c) 2025, Aldec, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +================================================================================================= +This file must be included in /doc/legal.txt for all accepted contributions to the Xilinx Tcl Store. +All contributors must date and digitally sign once below in order to submit to the Xilinx Tcl Store +:::: +================================================================================================= +20250627::cezdro::Cezary Drożak diff --git a/tclapp/aldec/alint/pkgIndex.tcl b/tclapp/aldec/alint/pkgIndex.tcl new file mode 100644 index 000000000..50e6821af --- /dev/null +++ b/tclapp/aldec/alint/pkgIndex.tcl @@ -0,0 +1,11 @@ +# Tcl package index file, version 1.1 +# This file is generated by the "pkg_mkIndex" command +# and sourced either when an application starts up or +# by a "package unknown" script. It invokes the +# "package ifneeded" command to set up package-related +# information so that packages will be loaded automatically +# in response to "package require" commands. When this +# script is sourced, the variable $dir must contain the +# full path name of this file's directory. + +package ifneeded ::tclapp::aldec::alint 1.0 [list source [file join $dir alint.tcl]] diff --git a/tclapp/aldec/alint/revision_history.txt b/tclapp/aldec/alint/revision_history.txt new file mode 100644 index 000000000..5074b2803 --- /dev/null +++ b/tclapp/aldec/alint/revision_history.txt @@ -0,0 +1 @@ +1.0 Initial version diff --git a/tclapp/aldec/alint/tclIndex b/tclapp/aldec/alint/tclIndex new file mode 100644 index 000000000..c1852367d --- /dev/null +++ b/tclapp/aldec/alint/tclIndex @@ -0,0 +1,9 @@ +# Tcl autoload index file, version 2.0 +# This file is generated by the "auto_mkindex" command +# and sourced to set up indexing information for one or +# more commands. Typically each line is a command that +# sets an element in the auto_index array, where the +# element name is the name of a command and the value is +# a script that loads the command. + +set auto_index(::tclapp::aldec::alint::convert_project) [list source [file join $dir convert_project.tcl]] diff --git a/tclapp/aldec/alint/tclstore.wpc b/tclapp/aldec/alint/tclstore.wpc new file mode 100644 index 000000000..062fddec6 --- /dev/null +++ b/tclapp/aldec/alint/tclstore.wpc @@ -0,0 +1,4 @@ +version:1 +74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:31:74636c73746f72655c7573616765:00:00: +74636c73746f7265:6c696e745f66696c65735f636f756e74:32:74636c73746f72655c7573616765:00:00: +eof:729719586 \ No newline at end of file diff --git a/tclapp/aldec/alint/test/src/testbench.v b/tclapp/aldec/alint/test/src/testbench.v new file mode 100644 index 000000000..eb1be62b0 --- /dev/null +++ b/tclapp/aldec/alint/test/src/testbench.v @@ -0,0 +1,38 @@ +`timescale 1ns / 1ps +module testbench; + + reg CLK = 0; + reg RST = 0; + reg [3:0] D; + wire [3:0] O; + + UUT uut ( + .CLK(CLK), + .RST(RST), + .D(D), + .O(O) + ); + + initial + forever CLK = #10 ~CLK; + + initial + begin + RST = 1; + D = 0; + #100; + RST = 0; + #100; + D = 3; + #100; + D = 4; + #100; + D = 7; + #100; + D = 0; + $display("SIMULATION_FINISHED"); + end + + + +endmodule diff --git a/tclapp/aldec/alint/test/src/uut.v b/tclapp/aldec/alint/test/src/uut.v new file mode 100644 index 000000000..ca3781e9a --- /dev/null +++ b/tclapp/aldec/alint/test/src/uut.v @@ -0,0 +1,16 @@ +`timescale 1ns / 1ps +module UUT(CLK,RST,D,O); + +input CLK; +input RST; +input [3:0] D; +output [3:0] O; +reg [3:0] O; + +always @(posedge CLK) + if (RST) + O <= 'b0; + else + O <= D; + +endmodule diff --git a/tclapp/aldec/alint/test/test.tcl b/tclapp/aldec/alint/test/test.tcl new file mode 100644 index 000000000..8959fc61e --- /dev/null +++ b/tclapp/aldec/alint/test/test.tcl @@ -0,0 +1,49 @@ +set app_name {aldec::alint} + +if {![info exists alint_path]} { + error "alint tests require \$alint_path variable to run" +} + +set file_dir [file normalize [file dirname [info script]]] +puts "== Unit Test directory: $file_dir" + +set ::env(XILINX_TCLAPP_REPO) [file normalize [file join $file_dir .. .. ..]] +puts "== Application directory: $::env(XILINX_TCLAPP_REPO)" +lappend auto_path $::env(XILINX_TCLAPP_REPO) + +set list_installed_apps [::tclapp::list_apps] + +# Uninstall the app if it is already installed +if {[lsearch -exact $list_installed_apps $app_name] != -1} { + ::tclapp::unload_app $app_name +} + +# Install the app and require the package +catch "package forget ::tclapp::${app_name}" +::tclapp::load_app $app_name +package require ::tclapp::${app_name} + +set project_name "test_project" + +# Prepare Vivado project +create_project -force -quiet $project_name ./$project_name +add_files -copy_to ./$project_name/sources -force -fileset sources_1 "$file_dir/src/uut.v" +add_files -copy_to ./$project_name/sources -force -fileset sim_1 "$file_dir/src/testbench.v" +update_compile_order -fileset sources_1 +update_compile_order -fileset sim_1 + +::tclapp::${app_name}::convert_project $alint_path + +if {[file exists ./$project_name/ALINT-PRO/$project_name.alintws]} { + puts "TEST_PASSED" +} else { + error "TEST_FAILED" +} + +close_project +file delete -force ./$project_name + +# Uninstall the app if it was not already installed when starting the script +if {[lsearch -exact $list_installed_apps $app_name] == -1} { + ::tclapp::unload_app $app_name +} From b2357eae97f4a0a40ca8034613f70e70ccfc2cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Tue, 1 Jul 2025 09:44:50 +0200 Subject: [PATCH 02/15] Update alint metadata --- tclapp/aldec/alint/app.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tclapp/aldec/alint/app.xml b/tclapp/aldec/alint/app.xml index 8a21d9380..dbd4146aa 100644 --- a/tclapp/aldec/alint/app.xml +++ b/tclapp/aldec/alint/app.xml @@ -6,7 +6,8 @@ alint aldec Aldec, Inc. - Alint Linter + This is an Aldec app to convert a Vivado project to an Alint-PRO project + Alint-PRO Linter convert_project From bf6e4b4c55feeedb29b732ea6435a6fd7ab449fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Tue, 8 Jul 2025 13:36:05 +0200 Subject: [PATCH 03/15] Add Windows support in convert_project --- tclapp/aldec/alint/convert_project.tcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index 0bbb2a36a..0d0883303 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -15,7 +15,11 @@ proc ::tclapp::aldec::alint::convert_project {alint_path} { # Categories: xilinxtclstore, aldec, alint, convert - set alintcon $alint_path/bin/alintcon + if {$::tcl_platform(platform) == "windows"} { + set alintcon $alint_path/bin/alintcon.exe + } else { + set alintcon $alint_path/bin/alintcon + } if {![file exists $alintcon]} { error "Required file $alintcon not found" From 46c3d2413af2f88386d9083a6b1083b9e7456116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Tue, 8 Jul 2025 13:40:11 +0200 Subject: [PATCH 04/15] Don't redirect alint output to stdout --- tclapp/aldec/alint/convert_project.tcl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index 0d0883303..35aaa84d4 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -43,6 +43,5 @@ proc ::tclapp::aldec::alint::convert_project {alint_path} { exec -- $alintcon \ -batch \ - -do $alint_script_path $xpr_path \ - >@stdout + -do $alint_script_path $xpr_path } From d4a7d3f041e7d299dd63842753e18f00580f13f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Wed, 9 Jul 2025 13:07:52 +0200 Subject: [PATCH 05/15] Add a -usage option --- tclapp/aldec/alint/convert_project.tcl | 50 +++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index 35aaa84d4..cad286f4c 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -4,21 +4,61 @@ namespace eval ::tclapp::aldec::alint { namespace export convert_project } -proc ::tclapp::aldec::alint::convert_project {alint_path} { +proc ::tclapp::aldec::alint::convert_project {args} { # Summary: Convert Vivado project to Alint # Argument Usage: - # alint_path: Path where Alint is located + # alint_path: Path where Alint is located + # [-usage]: This help message # Return Value: # Categories: xilinxtclstore, aldec, alint, convert + set usage [format { + Usage: convert_project + alint_path - Path where Alint is located + [-usage] - This help message + + Description: Convert Vivado project to Alint + Example: + convert_project ~/ALINT-PRO +}] + + set help false + + foreach arg $args { + switch -- $arg { + -usage { + set help true + } + -* { + error "Unrecognized option $arg" + } + default { + if {[info exists alint_path]} { + error "Too many arguments\n$usage" + } + set alint_path $arg + } + } + } + + if {$help} { + puts $usage + return + } + + if {![info exists alint_path]} { + error "Alint path not passed\n$usage" + } + + set alint $alint_path/bin/alint + set alintcon $alint_path/bin/alintcon if {$::tcl_platform(platform) == "windows"} { - set alintcon $alint_path/bin/alintcon.exe - } else { - set alintcon $alint_path/bin/alintcon + set alint $alint.exe + set alintcon $alintcon.exe } if {![file exists $alintcon]} { From 27a74042b4f834a69bace77b83cf2fab8eea1b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Wed, 9 Jul 2025 13:10:55 +0200 Subject: [PATCH 06/15] Add a -gui option --- tclapp/aldec/alint/convert_project.tcl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index cad286f4c..6f4cfca47 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -10,6 +10,7 @@ proc ::tclapp::aldec::alint::convert_project {args} { # Argument Usage: # alint_path: Path where Alint is located + # [-gui]: Start Alint in GUI mode and don't exit after converting # [-usage]: This help message # Return Value: @@ -19,17 +20,23 @@ proc ::tclapp::aldec::alint::convert_project {args} { set usage [format { Usage: convert_project alint_path - Path where Alint is located + [-gui] - Start Alint in GUI mode and don't exit after converting [-usage] - This help message Description: Convert Vivado project to Alint Example: convert_project ~/ALINT-PRO + convert_project -gui ~/ALINT-PRO }] + set gui false set help false foreach arg $args { switch -- $arg { + -gui { + set gui true + } -usage { set help true } @@ -81,7 +88,12 @@ proc ::tclapp::aldec::alint::convert_project {args} { error "Project file not found" } - exec -- $alintcon \ - -batch \ - -do $alint_script_path $xpr_path + if {$gui} { + exec -- $alint \ + -do $alint_script_path $xpr_path + } else { + exec -- $alintcon \ + -batch \ + -do $alint_script_path $xpr_path + } } From 925856aada5e60260ec3c4ae84e0be7241acb983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Wed, 9 Jul 2025 14:33:39 +0200 Subject: [PATCH 07/15] Change Alint to ALINT-PRO --- tclapp/aldec/alint/app.xml | 6 +++--- tclapp/aldec/alint/convert_project.tcl | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tclapp/aldec/alint/app.xml b/tclapp/aldec/alint/app.xml index dbd4146aa..117650ae4 100644 --- a/tclapp/aldec/alint/app.xml +++ b/tclapp/aldec/alint/app.xml @@ -6,12 +6,12 @@ alint aldec Aldec, Inc. - This is an Aldec app to convert a Vivado project to an Alint-PRO project - Alint-PRO Linter + This is an Aldec app to convert a Vivado project to an ALINT-PRO project + ALINT-PRO Linter convert_project - Convert Vivado project to Alint + Convert Vivado project to ALINT-PRO diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index 6f4cfca47..ccbca9870 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -6,11 +6,11 @@ namespace eval ::tclapp::aldec::alint { proc ::tclapp::aldec::alint::convert_project {args} { - # Summary: Convert Vivado project to Alint + # Summary: Convert Vivado project to ALINT-PRO # Argument Usage: - # alint_path: Path where Alint is located - # [-gui]: Start Alint in GUI mode and don't exit after converting + # alint_path: Path where ALINT-PRO is located + # [-gui]: Start ALINT-PRO in GUI mode and don't exit after converting # [-usage]: This help message # Return Value: @@ -19,11 +19,11 @@ proc ::tclapp::aldec::alint::convert_project {args} { set usage [format { Usage: convert_project - alint_path - Path where Alint is located - [-gui] - Start Alint in GUI mode and don't exit after converting + alint_path - Path where ALINT-PRO is located + [-gui] - Start ALINT-PRO in GUI mode and don't exit after converting [-usage] - This help message - Description: Convert Vivado project to Alint + Description: Convert Vivado project to ALINT-PRO Example: convert_project ~/ALINT-PRO convert_project -gui ~/ALINT-PRO @@ -58,7 +58,7 @@ proc ::tclapp::aldec::alint::convert_project {args} { } if {![info exists alint_path]} { - error "Alint path not passed\n$usage" + error "ALINT-PRO path not passed\n$usage" } set alint $alint_path/bin/alint @@ -72,7 +72,7 @@ proc ::tclapp::aldec::alint::convert_project {args} { error "Required file $alintcon not found" } - # Generate a script file for Alint + # Generate a script file for ALINT-PRO set alint_script_path [file tempfile] set alint_script_file [open $alint_script_path w] set alint_script { From c278747752d8ecf2e28de83c3fa0f7cccab05d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Wed, 9 Jul 2025 14:51:55 +0200 Subject: [PATCH 08/15] Update tclstore.wpc --- tclapp/aldec/alint/tclstore.wpc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tclapp/aldec/alint/tclstore.wpc b/tclapp/aldec/alint/tclstore.wpc index 062fddec6..771e49e17 100644 --- a/tclapp/aldec/alint/tclstore.wpc +++ b/tclapp/aldec/alint/tclstore.wpc @@ -1,4 +1,4 @@ version:1 -74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:31:74636c73746f72655c7573616765:00:00: +74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:3136:74636c73746f72655c7573616765:00:00: 74636c73746f7265:6c696e745f66696c65735f636f756e74:32:74636c73746f72655c7573616765:00:00: -eof:729719586 \ No newline at end of file +eof:1071018958 \ No newline at end of file From 6e14f585d684c715b2e9f72348799d6f4a96e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Thu, 10 Jul 2025 12:53:35 +0200 Subject: [PATCH 09/15] Provide script file in the repository --- tclapp/aldec/alint/alint_script.do | 1 + tclapp/aldec/alint/convert_project.tcl | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 tclapp/aldec/alint/alint_script.do diff --git a/tclapp/aldec/alint/alint_script.do b/tclapp/aldec/alint/alint_script.do new file mode 100644 index 000000000..995855050 --- /dev/null +++ b/tclapp/aldec/alint/alint_script.do @@ -0,0 +1 @@ +convert.xpr.project {*}$argv diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index ccbca9870..c7734fee0 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -72,14 +72,7 @@ proc ::tclapp::aldec::alint::convert_project {args} { error "Required file $alintcon not found" } - # Generate a script file for ALINT-PRO - set alint_script_path [file tempfile] - set alint_script_file [open $alint_script_path w] - set alint_script { - convert.xpr.project {*}$argv - } - puts $alint_script_file $alint_script - close $alint_script_file + set alint_script_path [file normalize [file dirname [info script]]]/alint_script.do set project_dir [get_property DIRECTORY [current_project]] set project_name [get_property NAME [current_project]] From 08b0596f15a4b7f71b2527973efe82ca15025150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Thu, 10 Jul 2025 13:02:14 +0200 Subject: [PATCH 10/15] Provide full namespace in -usage --- tclapp/aldec/alint/convert_project.tcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index c7734fee0..f79295d36 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -18,15 +18,15 @@ proc ::tclapp::aldec::alint::convert_project {args} { # Categories: xilinxtclstore, aldec, alint, convert set usage [format { - Usage: convert_project + Usage: aldec::alint::convert_project alint_path - Path where ALINT-PRO is located [-gui] - Start ALINT-PRO in GUI mode and don't exit after converting [-usage] - This help message Description: Convert Vivado project to ALINT-PRO Example: - convert_project ~/ALINT-PRO - convert_project -gui ~/ALINT-PRO + aldec::alint::convert_project ~/ALINT-PRO + aldec::alint::convert_project -gui ~/ALINT-PRO }] set gui false From cd5644e6ddac14b4e1cf3e0f2c699598d497105a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Thu, 10 Jul 2025 13:05:21 +0200 Subject: [PATCH 11/15] Replace $alint and $alintcon with $alint_bin --- tclapp/aldec/alint/convert_project.tcl | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index f79295d36..aa1c05b6e 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -61,15 +61,17 @@ proc ::tclapp::aldec::alint::convert_project {args} { error "ALINT-PRO path not passed\n$usage" } - set alint $alint_path/bin/alint - set alintcon $alint_path/bin/alintcon + if {$gui} { + set alint_bin $alint_path/bin/alint + } else { + set alint_bin $alint_path/bin/alintcon + } if {$::tcl_platform(platform) == "windows"} { - set alint $alint.exe - set alintcon $alintcon.exe + set alint_bin $alint_bin.exe } - if {![file exists $alintcon]} { - error "Required file $alintcon not found" + if {![file exists $alint_bin]} { + error "Required file $alint_bin not found" } set alint_script_path [file normalize [file dirname [info script]]]/alint_script.do @@ -82,10 +84,10 @@ proc ::tclapp::aldec::alint::convert_project {args} { } if {$gui} { - exec -- $alint \ - -do $alint_script_path $xpr_path + exec -- $alint_bin \ + -do $alint_script_path $xpr_path & } else { - exec -- $alintcon \ + exec -- $alint_bin \ -batch \ -do $alint_script_path $xpr_path } From 1a3b8d2e89d4ca4651cece000edd0180827aa737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Thu, 10 Jul 2025 14:59:43 +0200 Subject: [PATCH 12/15] Use [info frame 0] for getting script path --- tclapp/aldec/alint/convert_project.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tclapp/aldec/alint/convert_project.tcl b/tclapp/aldec/alint/convert_project.tcl index aa1c05b6e..217216e43 100644 --- a/tclapp/aldec/alint/convert_project.tcl +++ b/tclapp/aldec/alint/convert_project.tcl @@ -74,7 +74,8 @@ proc ::tclapp::aldec::alint::convert_project {args} { error "Required file $alint_bin not found" } - set alint_script_path [file normalize [file dirname [info script]]]/alint_script.do + set this_script_path [dict get [info frame 0] file] + set alint_script_path [file dirname $this_script_path]/alint_script.do set project_dir [get_property DIRECTORY [current_project]] set project_name [get_property NAME [current_project]] From e4216327cb3d3183fb85c08f62521bd3e4d80f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Tue, 19 Aug 2025 10:17:06 +0200 Subject: [PATCH 13/15] Update aldec::alint summary --- tclapp/aldec/alint/app.xml | 2 +- tclapp/aldec/alint/tclstore.wpc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tclapp/aldec/alint/app.xml b/tclapp/aldec/alint/app.xml index 117650ae4..3d7ebf4ea 100644 --- a/tclapp/aldec/alint/app.xml +++ b/tclapp/aldec/alint/app.xml @@ -6,7 +6,7 @@ alint aldec Aldec, Inc. - This is an Aldec app to convert a Vivado project to an ALINT-PRO project + This is an Aldec ALINT-PRO Linter integration app that allows users to convert a Vivado project to an ALINT-PRO project. ALINT-PRO is a design verification solution for RTL code written in VHDL, Verilog, and SystemVerilog, which is focused on verifying coding style and naming conventions, RTL and post-synthesis simulation mismatches, smooth and optimal synthesis, correct FSM descriptions, avoiding problems on further design stages, clocks and reset tree issues, CDC, RDC, DFT, and coding for portability and reuse. You can generate an ALINT-PRO project and also start ALINT-PRO in GUI mode with the converted project directly from Vivado IDE. The ALINT-PRO project files are saved in the same location as the currently opened Vivado project. To run ALINT-PRO conversion, please ensure that the ALINT-PRO software and required licenses are available. For more details, please check the help message for the Tcl Procs below. ALINT-PRO Linter diff --git a/tclapp/aldec/alint/tclstore.wpc b/tclapp/aldec/alint/tclstore.wpc index 771e49e17..ee658b8dc 100644 --- a/tclapp/aldec/alint/tclstore.wpc +++ b/tclapp/aldec/alint/tclstore.wpc @@ -1,4 +1,4 @@ version:1 -74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:3136:74636c73746f72655c7573616765:00:00: -74636c73746f7265:6c696e745f66696c65735f636f756e74:32:74636c73746f72655c7573616765:00:00: -eof:1071018958 \ No newline at end of file +74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:3137:74636c73746f72655c7573616765:00:00: +74636c73746f7265:6c696e745f66696c65735f636f756e74:33:74636c73746f72655c7573616765:00:00: +eof:1320572993 \ No newline at end of file From 9954238523abc5ef3dcb19aafba0d7c66613b0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Mon, 8 Sep 2025 10:45:47 +0200 Subject: [PATCH 14/15] Add tclapp/aldec/alint/doc/convert_project --- tclapp/aldec/alint/doc/convert_project | 9 +++++++++ tclapp/aldec/alint/tclstore.wpc | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tclapp/aldec/alint/doc/convert_project diff --git a/tclapp/aldec/alint/doc/convert_project b/tclapp/aldec/alint/doc/convert_project new file mode 100644 index 000000000..2bf3e5ad0 --- /dev/null +++ b/tclapp/aldec/alint/doc/convert_project @@ -0,0 +1,9 @@ + + +Examples: + + Convert the project by running ALINT-PRO in the batch mode and exiting: + ::aldec::alint::convert_project + + Convert the project by running ALINT-PRO in the GUI mode: + ::aldec::alint::convert_project -gui diff --git a/tclapp/aldec/alint/tclstore.wpc b/tclapp/aldec/alint/tclstore.wpc index 771e49e17..0c34651f1 100644 --- a/tclapp/aldec/alint/tclstore.wpc +++ b/tclapp/aldec/alint/tclstore.wpc @@ -1,4 +1,4 @@ version:1 -74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:3136:74636c73746f72655c7573616765:00:00: -74636c73746f7265:6c696e745f66696c65735f636f756e74:32:74636c73746f72655c7573616765:00:00: -eof:1071018958 \ No newline at end of file +74636c73746f7265:6170705f696e7374616c6c5f636f756e743a3a616c696e74:3235:74636c73746f72655c7573616765:00:00: +74636c73746f7265:6c696e745f66696c65735f636f756e74:33:74636c73746f72655c7573616765:00:00: +eof:2000902078 \ No newline at end of file From 075bebc70b9a77b53545b616ad25b5341a9175e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Dro=C5=BCak?= Date: Fri, 12 Sep 2025 11:17:42 +0200 Subject: [PATCH 15/15] Update convert_project docs --- tclapp/aldec/alint/doc/convert_project | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tclapp/aldec/alint/doc/convert_project b/tclapp/aldec/alint/doc/convert_project index 2bf3e5ad0..2388b9e94 100644 --- a/tclapp/aldec/alint/doc/convert_project +++ b/tclapp/aldec/alint/doc/convert_project @@ -1,9 +1,18 @@ +Description: +Convert a Vivado project to an ALINT-PRO format directly from Vivado IDE. + +The ALINT-PRO project files are saved in the same location as the currently +opened Vivado project. To run ALINT-PRO conversion, please ensure that the +ALINT-PRO software and required licenses are available. + +Optionally, ALINT-PRO can be started in GUI mode with the converted project +using the -gui flag. Examples: - Convert the project by running ALINT-PRO in the batch mode and exiting: - ::aldec::alint::convert_project +Convert the project by running ALINT-PRO in the batch mode and exiting: + ::aldec::alint::convert_project - Convert the project by running ALINT-PRO in the GUI mode: - ::aldec::alint::convert_project -gui +Convert the project by running ALINT-PRO in the GUI mode: + ::aldec::alint::convert_project -gui