Hog Hog2024.2-4
quartus-post-module.tcl
Go to the documentation of this file.
1 # Copyright 2018-2024 The University of Birmingham
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 
16 # @file quartus-pre-flow.tcl
17 # The pre synthesis flow checks the status of your git repository and stores into a set of variables that are fed as generics to the HDL project.
18 # This script is automatically integrated into the Quartus workflow by the Create Project script.
19 #
20 
21 ##nagelfar variable quartus
22 
23 set tcl_path [file normalize "[file dirname [info script]]/.."]
24 if {[info procs Msg] == "" } {
25  source $tcl_path/hog.tcl
26 }
27 
28 set stage [lindex $quartus(args) 0]
29 
30 if { [string compare $stage "quartus_map"] == 0 || [string compare $stage "quartus_syn"] == 0 } {
31  set script_path [file normalize "$tcl_path/integrated/post-synthesis.tcl"]
32 } elseif { [string compare $stage "quartus_fit"] == 0 } {
33  set script_path [file normalize "$tcl_path/integrated/post-implementation.tcl"]
34 } elseif { [string compare $stage "quartus_asm"] == 0 } {
35  set script_path [file normalize "$tcl_path/integrated/post-bitstream.tcl"]
36 } else {
37  Msg Info "Unsupported step: $stage"
38  return 0
39 }
40 
41 if {[file exists $script_path]} {
42  source $script_path
43 }
44 
45