初始的工程参考
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/.Xil
|
||||
vivado.*
|
||||
vivado_*.*
|
||||
# /vivado_prj/*
|
||||
52
Sourceprj.bat
Normal file
52
Sourceprj.bat
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
@REM @echo off
|
||||
@REM setlocal
|
||||
@REM set VAR1=value1
|
||||
@REM set VAR2=value2
|
||||
|
||||
@REM call C:\Xilinx\Vivado_Lab\2023.1\bin\vivado_lab -mode tcl
|
||||
|
||||
@REM endlocal
|
||||
|
||||
@REM ------------------------------------------------------------------
|
||||
|
||||
@echo off
|
||||
@REM 设置控制台为UTF-8编码
|
||||
chcp 65001 >nul
|
||||
|
||||
setlocal
|
||||
|
||||
@REM :: 假设Vivado已经被安装在下述路径:
|
||||
set VIVADO_PATH=C:\Xilinx\Vivado\2024.2\bin
|
||||
|
||||
@REM 设置VIVADO版本的环境变量,如果有的话; 这里VIVADO_VERSION替换成实际的字符串比如“2019.1”
|
||||
set VIVADO_VERSION=2024.2
|
||||
set PATH=%VIVADO_PATH%;%PATH%
|
||||
|
||||
@REM :: 打印当前Vivado的版本号
|
||||
echo Loaded Vivado version %VIVADO_VERSION%
|
||||
|
||||
|
||||
@REM REM 读取 config.ini 中的 username 和 password 字段值
|
||||
@REM FOR /F "tokens=2 delims==" %%A IN ('findstr /R "^PORT=" config.ini') DO SET PORT=%%A
|
||||
@REM FOR /F "tokens=2 delims==" %%A IN ('findstr /R "^TARGET=" config.ini') DO SET TARGET=%%A
|
||||
|
||||
|
||||
:: 这里输入你要执行的命令和使用到的变量
|
||||
:: 例子:运行vivado_lab命令并回显用户输入的变量VALUE。
|
||||
@REM set /p USER_INPUT="Enter the value for VARIABLE: "
|
||||
@REM echo Your input was: %USER_INPUT%
|
||||
call vivado -mode batch -source project_gen.tcl
|
||||
@REM call vivado_lab -mode batch -source Configscript.tcl -tclargs
|
||||
|
||||
endlocal
|
||||
|
||||
@REM @echo off
|
||||
|
||||
@REM :: 获取传入的参数
|
||||
@REM set PARAM1=%~1
|
||||
@REM set PARAM2=%~2
|
||||
|
||||
@REM :: 使用变量进行操作,比如打印出来
|
||||
@REM echo Received parameter 1: %PARAM1%
|
||||
@REM echo Received parameter 2: %PARAM2%
|
||||
75
modules/LVDS/rtl/lvds_1to3_copy_reg.v
Normal file
75
modules/LVDS/rtl/lvds_1to3_copy_reg.v
Normal file
@@ -0,0 +1,75 @@
|
||||
`timescale 1ns / 1ps
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// Company:
|
||||
// Engineer:
|
||||
//
|
||||
// Create Date: 2026/01/25 21:01:38
|
||||
// Design Name:
|
||||
// Module Name: lvds_1to3_copy_reg
|
||||
// Project Name:
|
||||
// Target Devices:
|
||||
// Tool Versions:
|
||||
// Description:
|
||||
//
|
||||
// Dependencies:
|
||||
//
|
||||
// Revision:
|
||||
// Revision 0.01 - File Created
|
||||
// Additional Comments:
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
module lvds_1to3_copy_reg (
|
||||
// 输入LVDS差分信号
|
||||
input wire clk_in_p, clk_in_n,
|
||||
input wire [2:0] data_in_p, data_in_n,
|
||||
|
||||
// 输出LVDS差分信号
|
||||
output wire clk_out0_p, clk_out0_n,
|
||||
output wire clk_out1_p, clk_out1_n,
|
||||
output wire clk_out2_p, clk_out2_n,
|
||||
output wire [2:0] data_out0_p, data_out0_n,
|
||||
output wire [2:0] data_out1_p, data_out1_n,
|
||||
output wire [2:0] data_out2_p, data_out2_n
|
||||
);
|
||||
|
||||
// 输入缓冲
|
||||
wire clk_ibuf;
|
||||
wire [2:0] data_ibuf;
|
||||
|
||||
IBUFDS clk_ibuf_inst (.O(clk_ibuf), .I(clk_in_p), .IB(clk_in_n));
|
||||
generate
|
||||
for (genvar i = 0; i < 3; i = i + 1) begin
|
||||
IBUFDS data_ibuf_inst (.O(data_ibuf[i]), .I(data_in_p[i]), .IB(data_in_n[i]));
|
||||
end
|
||||
endgenerate
|
||||
|
||||
// 全局时钟
|
||||
wire clk_bufg;
|
||||
BUFG bufg_inst (.I(clk_ibuf), .O(clk_bufg));
|
||||
|
||||
// 寄存器同步
|
||||
reg [2:0] data_sync0, data_sync1, data_sync2;
|
||||
always @(posedge clk_bufg) begin
|
||||
data_sync0 <= data_ibuf;
|
||||
data_sync1 <= data_ibuf;
|
||||
data_sync2 <= data_ibuf;
|
||||
end
|
||||
|
||||
// 输出缓冲
|
||||
generate
|
||||
for (genvar i = 0; i < 3; i = i + 1) begin
|
||||
OBUFDS data_obuf0_inst (.O(data_out0_p[i]), .OB(data_out0_n[i]), .I(data_sync0[i]));
|
||||
OBUFDS data_obuf1_inst (.O(data_out1_p[i]), .OB(data_out1_n[i]), .I(data_sync1[i]));
|
||||
OBUFDS data_obuf2_inst (.O(data_out2_p[i]), .OB(data_out2_n[i]), .I(data_sync2[i]));
|
||||
end
|
||||
endgenerate
|
||||
|
||||
// 时钟输出缓冲
|
||||
OBUFDS clk_obuf0_inst (.O(clk_out0_p), .OB(clk_out0_n), .I(clk_bufg));
|
||||
OBUFDS clk_obuf1_inst (.O(clk_out1_p), .OB(clk_out1_n), .I(clk_bufg));
|
||||
OBUFDS clk_obuf2_inst (.O(clk_out2_p), .OB(clk_out2_n), .I(clk_bufg));
|
||||
|
||||
endmodule
|
||||
|
||||
178
modules/LVDS/sim/testbench/tb_lvds_1to3_copy_reg.v
Normal file
178
modules/LVDS/sim/testbench/tb_lvds_1to3_copy_reg.v
Normal file
@@ -0,0 +1,178 @@
|
||||
`timescale 1ns / 1ps
|
||||
|
||||
module tb_lvds_1to3_copy_reg;
|
||||
|
||||
// 输入信号
|
||||
reg clk_in_p, clk_in_n;
|
||||
reg [2:0] data_in_p, data_in_n;
|
||||
|
||||
// 输出信号
|
||||
wire clk_out0_p, clk_out0_n;
|
||||
wire clk_out1_p, clk_out1_n;
|
||||
wire clk_out2_p, clk_out2_n;
|
||||
wire [2:0] data_out0_p, data_out0_n;
|
||||
wire [2:0] data_out1_p, data_out1_n;
|
||||
wire [2:0] data_out2_p, data_out2_n;
|
||||
|
||||
// 时钟参数
|
||||
parameter CLK_PERIOD = 10.0; // 100MHz时钟
|
||||
parameter HALF_PERIOD = CLK_PERIOD / 2;
|
||||
|
||||
// 实例化被测试模块
|
||||
lvds_1to3_copy_reg dut (
|
||||
.clk_in_p(clk_in_p),
|
||||
.clk_in_n(clk_in_n),
|
||||
.data_in_p(data_in_p),
|
||||
.data_in_n(data_in_n),
|
||||
.clk_out0_p(clk_out0_p),
|
||||
.clk_out0_n(clk_out0_n),
|
||||
.clk_out1_p(clk_out1_p),
|
||||
.clk_out1_n(clk_out1_n),
|
||||
.clk_out2_p(clk_out2_p),
|
||||
.clk_out2_n(clk_out2_n),
|
||||
.data_out0_p(data_out0_p),
|
||||
.data_out0_n(data_out0_n),
|
||||
.data_out1_p(data_out1_p),
|
||||
.data_out1_n(data_out1_n),
|
||||
.data_out2_p(data_out2_p),
|
||||
.data_out2_n(data_out2_n)
|
||||
);
|
||||
|
||||
// 生成差分时钟信号
|
||||
always #HALF_PERIOD begin
|
||||
clk_in_p = ~clk_in_p;
|
||||
clk_in_n = ~clk_in_p; // 差分信号相位相反
|
||||
end
|
||||
|
||||
// 生成差分数据信号
|
||||
task generate_diff_data;
|
||||
input [2:0] data_value;
|
||||
begin
|
||||
data_in_p = data_value;
|
||||
data_in_n = ~data_value; // 差分信号取反
|
||||
end
|
||||
endtask
|
||||
|
||||
// 检查输出同步性
|
||||
task check_output_sync;
|
||||
input integer test_case;
|
||||
begin
|
||||
#1; // 等待稳定
|
||||
|
||||
// 检查三组输出是否相同
|
||||
if ((data_out0_p === data_out1_p) &&
|
||||
(data_out1_p === data_out2_p) &&
|
||||
(data_out0_n === data_out1_n) &&
|
||||
(data_out1_n === data_out2_n)) begin
|
||||
$display("[PASS] Test Case %0d: 三组输出完全同步", test_case);
|
||||
end else begin
|
||||
$display("[FAIL] Test Case %0d: 三组输出不同步", test_case);
|
||||
$display(" Data0_p: %b, Data1_p: %b, Data2_p: %b",
|
||||
data_out0_p, data_out1_p, data_out2_p);
|
||||
$display(" Data0_n: %b, Data1_n: %b, Data2_n: %b",
|
||||
data_out0_n, data_out1_n, data_out2_n);
|
||||
end
|
||||
|
||||
// 检查差分对一致性
|
||||
if ((data_out0_p === ~data_out0_n) &&
|
||||
(data_out1_p === ~data_out1_n) &&
|
||||
(data_out2_p === ~data_out2_n)) begin
|
||||
$display("[PASS] Test Case %0d: 差分对极性正确", test_case);
|
||||
end else begin
|
||||
$display("[FAIL] Test Case %0d: 差分对极性错误", test_case);
|
||||
end
|
||||
end
|
||||
endtask
|
||||
|
||||
// 主要测试向量
|
||||
initial begin
|
||||
// 初始化信号
|
||||
clk_in_p = 1'b1;
|
||||
clk_in_n = 1'b0;
|
||||
data_in_p = 3'b000;
|
||||
data_in_n = 3'b111;
|
||||
|
||||
$display("=== LVDS信号复制模块仿真开始 ===");
|
||||
$display("时钟周期: %0t ns", CLK_PERIOD);
|
||||
$timeformat(-9, 0, " ns", 10);
|
||||
|
||||
// 等待复位完成
|
||||
#(CLK_PERIOD * 2);
|
||||
|
||||
// 测试用例1: 全0数据
|
||||
$display("\n--- 测试用例1: 输入全0 ---");
|
||||
generate_diff_data(3'b000);
|
||||
#(CLK_PERIOD * 3); // 等待多个周期稳定
|
||||
check_output_sync(1);
|
||||
|
||||
// 测试用例2: 全1数据
|
||||
$display("\n--- 测试用例2: 输入全1 ---");
|
||||
generate_diff_data(3'b111);
|
||||
#(CLK_PERIOD * 3);
|
||||
check_output_sync(2);
|
||||
|
||||
// 测试用例3: 递增模式
|
||||
$display("\n--- 测试用例3: 数据递增模式 ---");
|
||||
for (integer i = 0; i < 8; i = i + 1) begin
|
||||
generate_diff_data(i);
|
||||
#(CLK_PERIOD);
|
||||
$display("时间 %t: 输入数据 %b -> 输出0_p %b", $time, i, data_out0_p);
|
||||
if (i > 0) check_output_sync(3);
|
||||
end
|
||||
|
||||
// 测试用例4: 随机数据
|
||||
$display("\n--- 测试用例4: 随机数据测试 ---");
|
||||
for (integer j = 0; j < 10; j = j + 1) begin
|
||||
generate_diff_data($random % 8);
|
||||
#(CLK_PERIOD);
|
||||
check_output_sync(4);
|
||||
end
|
||||
|
||||
// 测试用例5: 快速数据变化
|
||||
$display("\n--- 测试用例5: 快速数据变化测试 ---");
|
||||
repeat(5) begin
|
||||
generate_diff_data(3'b010);
|
||||
#(CLK_PERIOD/4);
|
||||
generate_diff_data(3'b101);
|
||||
#(CLK_PERIOD/4);
|
||||
generate_diff_data(3'b110);
|
||||
#(CLK_PERIOD/4);
|
||||
generate_diff_data(3'b001);
|
||||
#(CLK_PERIOD/4);
|
||||
check_output_sync(5);
|
||||
end
|
||||
|
||||
// 测试用例6: 验证寄存器延迟
|
||||
$display("\n--- 测试用例6: 寄存器延迟验证 ---");
|
||||
generate_diff_data(3'b010);
|
||||
#(CLK_PERIOD/2); // 半周期后检查
|
||||
if ((data_out0_p !== 3'b010) &&
|
||||
(data_out0_p === data_out1_p) &&
|
||||
(data_out1_p === data_out2_p)) begin
|
||||
$display("[PASS] 寄存器延迟正确:输出尚未更新");
|
||||
end
|
||||
|
||||
#(CLK_PERIOD/2); // 完整周期后检查
|
||||
if ((data_out0_p === 3'b010) &&
|
||||
(data_out0_p === data_out1_p) &&
|
||||
(data_out1_p === data_out2_p)) begin
|
||||
$display("[PASS] 寄存器延迟正确:输出已更新");
|
||||
end
|
||||
|
||||
$display("\n=== 仿真完成 ===");
|
||||
#100 $finish;
|
||||
end
|
||||
|
||||
// 监控关键信号
|
||||
initial begin
|
||||
$monitor("时间 %t: 输入=%b, 输出0_p=%b, 输出1_p=%b, 输出2_p=%b",
|
||||
$time, data_in_p, data_out0_p, data_out1_p, data_out2_p);
|
||||
end
|
||||
|
||||
// 波形文件生成(用于Vivado仿真)
|
||||
initial begin
|
||||
$dumpfile("lvds_1to3_copy_reg.vcd");
|
||||
$dumpvars(0, tb_lvds_1to3_copy_reg);
|
||||
end
|
||||
|
||||
endmodule
|
||||
541
project_gen.tcl
Normal file
541
project_gen.tcl
Normal file
@@ -0,0 +1,541 @@
|
||||
#*****************************************************************************************
|
||||
# Vivado (TM) v2024.2 (64-bit)
|
||||
#
|
||||
# project_gen.tcl: Tcl script for re-creating project 'vivado_prj'
|
||||
#
|
||||
# Generated by Vivado on Mon Feb 02 17:52:29 +0800 2026
|
||||
# IP Build 5239520 on Sun Nov 10 16:12:51 MST 2024
|
||||
#
|
||||
# This file contains the Vivado Tcl commands for re-creating the project to the state*
|
||||
# when this script was generated. In order to re-create the project, please source this
|
||||
# file in the Vivado Tcl Shell.
|
||||
#
|
||||
# * Note that the runs in the created project will be configured the same way as the
|
||||
# original project, however they will not be launched automatically. To regenerate the
|
||||
# run results please launch the synthesis/implementation runs as needed.
|
||||
#
|
||||
#*****************************************************************************************
|
||||
# NOTE: In order to use this script for source control purposes, please make sure that the
|
||||
# following files are added to the source control system:-
|
||||
#
|
||||
# 1. This project restoration tcl script (project_gen.tcl) that was generated.
|
||||
#
|
||||
# 2. The following source(s) files that were local or imported into the original project.
|
||||
# (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
|
||||
#
|
||||
# <none>
|
||||
#
|
||||
# 3. The following remote source files that were added to the original project:-
|
||||
#
|
||||
# "D:/vivadoworkspace/LVDS1M/modules/LVDS/rtl/lvds_1to3_copy_reg.v"
|
||||
# "D:/vivadoworkspace/LVDS1M/modules/LVDS/sim/testbench/tb_lvds_1to3_copy_reg.v"
|
||||
#
|
||||
#*****************************************************************************************
|
||||
|
||||
# Check file required for this script exists
|
||||
proc checkRequiredFiles { origin_dir} {
|
||||
set status true
|
||||
set files [list \
|
||||
"[file normalize "$origin_dir/modules/LVDS/rtl/lvds_1to3_copy_reg.v"]"\
|
||||
"[file normalize "$origin_dir/modules/LVDS/sim/testbench/tb_lvds_1to3_copy_reg.v"]"\
|
||||
]
|
||||
foreach ifile $files {
|
||||
if { ![file isfile $ifile] } {
|
||||
puts " Could not find remote file $ifile "
|
||||
set status false
|
||||
}
|
||||
}
|
||||
|
||||
return $status
|
||||
}
|
||||
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
||||
set origin_dir "."
|
||||
|
||||
# Use origin directory path location variable, if specified in the tcl shell
|
||||
if { [info exists ::origin_dir_loc] } {
|
||||
set origin_dir $::origin_dir_loc
|
||||
}
|
||||
|
||||
# Set the project name
|
||||
set _xil_proj_name_ "vivado_prj"
|
||||
|
||||
# Use project name variable, if specified in the tcl shell
|
||||
if { [info exists ::user_project_name] } {
|
||||
set _xil_proj_name_ $::user_project_name
|
||||
}
|
||||
|
||||
variable script_file
|
||||
set script_file "project_gen.tcl"
|
||||
|
||||
# Help information for this script
|
||||
proc print_help {} {
|
||||
variable script_file
|
||||
puts "\nDescription:"
|
||||
puts "Recreate a Vivado project from this script. The created project will be"
|
||||
puts "functionally equivalent to the original project for which this script was"
|
||||
puts "generated. The script contains commands for creating a project, filesets,"
|
||||
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
||||
puts "Syntax:"
|
||||
puts "$script_file"
|
||||
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
||||
puts "$script_file -tclargs \[--project_name <name>\]"
|
||||
puts "$script_file -tclargs \[--help\]\n"
|
||||
puts "Usage:"
|
||||
puts "Name Description"
|
||||
puts "-------------------------------------------------------------------------"
|
||||
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
||||
puts " origin_dir path value is \".\", otherwise, the value"
|
||||
puts " that was set with the \"-paths_relative_to\" switch"
|
||||
puts " when this script was generated.\n"
|
||||
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
||||
puts " name is the name of the project from where this"
|
||||
puts " script was generated.\n"
|
||||
puts "\[--help\] Print help information for this script"
|
||||
puts "-------------------------------------------------------------------------\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if { $::argc > 0 } {
|
||||
for {set i 0} {$i < $::argc} {incr i} {
|
||||
set option [string trim [lindex $::argv $i]]
|
||||
switch -regexp -- $option {
|
||||
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
||||
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
||||
"--help" { print_help }
|
||||
default {
|
||||
if { [regexp {^-} $option] } {
|
||||
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Set the directory path for the original project from where this script was exported
|
||||
set orig_proj_dir "[file normalize "$origin_dir/vivado_prj"]"
|
||||
|
||||
# Check for paths and files needed for project creation
|
||||
set validate_required 0
|
||||
if { $validate_required } {
|
||||
if { [checkRequiredFiles $origin_dir] } {
|
||||
puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
|
||||
} else {
|
||||
puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
# Create project
|
||||
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7z020clg400-1
|
||||
|
||||
# Set the directory path for the new project
|
||||
set proj_dir [get_property directory [current_project]]
|
||||
|
||||
# Reconstruct message rules
|
||||
# None
|
||||
|
||||
# Set project properties
|
||||
set obj [current_project]
|
||||
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
||||
set_property -name "enable_resource_estimation" -value "0" -objects $obj
|
||||
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
||||
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
||||
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
||||
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
||||
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
|
||||
set_property -name "revised_directory_structure" -value "1" -objects $obj
|
||||
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
||||
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
||||
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
||||
set_property -name "sim_compile_state" -value "1" -objects $obj
|
||||
set_property -name "use_inline_hdl_ip" -value "1" -objects $obj
|
||||
set_property -name "webtalk.activehdl_export_sim" -value "3" -objects $obj
|
||||
set_property -name "webtalk.modelsim_export_sim" -value "3" -objects $obj
|
||||
set_property -name "webtalk.questa_export_sim" -value "3" -objects $obj
|
||||
set_property -name "webtalk.riviera_export_sim" -value "3" -objects $obj
|
||||
set_property -name "webtalk.xsim_export_sim" -value "3" -objects $obj
|
||||
set_property -name "webtalk.xsim_launch_sim" -value "1" -objects $obj
|
||||
|
||||
# Create 'sources_1' fileset (if not found)
|
||||
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
||||
create_fileset -srcset sources_1
|
||||
}
|
||||
|
||||
# Set 'sources_1' fileset object
|
||||
set obj [get_filesets sources_1]
|
||||
set files [list \
|
||||
[file normalize "${origin_dir}/modules/LVDS/rtl/lvds_1to3_copy_reg.v"] \
|
||||
]
|
||||
add_files -norecurse -fileset $obj $files
|
||||
|
||||
# Set 'sources_1' fileset file properties for remote files
|
||||
# None
|
||||
|
||||
# Set 'sources_1' fileset file properties for local files
|
||||
# None
|
||||
|
||||
# Set 'sources_1' fileset properties
|
||||
set obj [get_filesets sources_1]
|
||||
set_property -name "dataflow_viewer_settings" -value "min_width=16" -objects $obj
|
||||
set_property -name "top" -value "lvds_1to3_copy_reg" -objects $obj
|
||||
set_property -name "top_auto_set" -value "0" -objects $obj
|
||||
|
||||
# Create 'constrs_1' fileset (if not found)
|
||||
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
||||
create_fileset -constrset constrs_1
|
||||
}
|
||||
|
||||
# Set 'constrs_1' fileset object
|
||||
set obj [get_filesets constrs_1]
|
||||
|
||||
# Empty (no sources present)
|
||||
|
||||
# Set 'constrs_1' fileset properties
|
||||
set obj [get_filesets constrs_1]
|
||||
set_property -name "target_part" -value "xc7z020clg400-1" -objects $obj
|
||||
|
||||
# Create 'sim_1' fileset (if not found)
|
||||
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
||||
create_fileset -simset sim_1
|
||||
}
|
||||
|
||||
# Set 'sim_1' fileset object
|
||||
set obj [get_filesets sim_1]
|
||||
set files [list \
|
||||
[file normalize "${origin_dir}/modules/LVDS/sim/testbench/tb_lvds_1to3_copy_reg.v"] \
|
||||
]
|
||||
add_files -norecurse -fileset $obj $files
|
||||
|
||||
# Set 'sim_1' fileset file properties for remote files
|
||||
# None
|
||||
|
||||
# Set 'sim_1' fileset file properties for local files
|
||||
# None
|
||||
|
||||
# Set 'sim_1' fileset properties
|
||||
set obj [get_filesets sim_1]
|
||||
set_property -name "sim_wrapper_top" -value "1" -objects $obj
|
||||
set_property -name "top" -value "tb_lvds_1to3_copy_reg" -objects $obj
|
||||
set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
|
||||
|
||||
# Set 'utils_1' fileset object
|
||||
set obj [get_filesets utils_1]
|
||||
# Empty (no sources present)
|
||||
|
||||
# Set 'utils_1' fileset properties
|
||||
set obj [get_filesets utils_1]
|
||||
|
||||
set idrFlowPropertiesConstraints ""
|
||||
catch {
|
||||
set idrFlowPropertiesConstraints [get_param runs.disableIDRFlowPropertyConstraints]
|
||||
set_param runs.disableIDRFlowPropertyConstraints 1
|
||||
}
|
||||
|
||||
# Create 'synth_1' run (if not found)
|
||||
if {[string equal [get_runs -quiet synth_1] ""]} {
|
||||
create_run -name synth_1 -part xc7z020clg400-1 -flow {Vivado Synthesis 2024} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
||||
} else {
|
||||
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
||||
set_property flow "Vivado Synthesis 2024" [get_runs synth_1]
|
||||
}
|
||||
set obj [get_runs synth_1]
|
||||
set_property set_report_strategy_name 1 $obj
|
||||
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
||||
set_property set_report_strategy_name 0 $obj
|
||||
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
||||
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
set obj [get_runs synth_1]
|
||||
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
|
||||
set_property -name "auto_incremental_checkpoint" -value "1" -objects $obj
|
||||
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
||||
|
||||
# set the current synth run
|
||||
current_run -synthesis [get_runs synth_1]
|
||||
|
||||
# Create 'impl_1' run (if not found)
|
||||
if {[string equal [get_runs -quiet impl_1] ""]} {
|
||||
create_run -name impl_1 -part xc7z020clg400-1 -flow {Vivado Implementation 2024} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
||||
} else {
|
||||
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
||||
set_property flow "Vivado Implementation 2024" [get_runs impl_1]
|
||||
}
|
||||
set obj [get_runs impl_1]
|
||||
set_property set_report_strategy_name 1 $obj
|
||||
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
||||
set_property set_report_strategy_name 0 $obj
|
||||
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
||||
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_io_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "options.verbose" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "is_enabled" -value "0" -objects $obj
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_drc_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_power_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
||||
if { $obj != "" } {
|
||||
|
||||
}
|
||||
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
||||
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
||||
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "options.max_paths" -value "10" -objects $obj
|
||||
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
||||
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
||||
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
||||
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
||||
}
|
||||
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
||||
if { $obj != "" } {
|
||||
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
||||
|
||||
}
|
||||
set obj [get_runs impl_1]
|
||||
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
|
||||
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
||||
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
||||
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
||||
|
||||
# set the current impl run
|
||||
current_run -implementation [get_runs impl_1]
|
||||
catch {
|
||||
if { $idrFlowPropertiesConstraints != {} } {
|
||||
set_param runs.disableIDRFlowPropertyConstraints $idrFlowPropertiesConstraints
|
||||
}
|
||||
}
|
||||
|
||||
puts "INFO: Project created:${_xil_proj_name_}"
|
||||
# Create 'drc_1' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
||||
create_dashboard_gadget -name {drc_1} -type drc
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
||||
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
||||
|
||||
# Create 'methodology_1' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
||||
create_dashboard_gadget -name {methodology_1} -type methodology
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
||||
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
||||
|
||||
# Create 'power_1' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
||||
create_dashboard_gadget -name {power_1} -type power
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
||||
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
||||
|
||||
# Create 'timing_1' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
||||
create_dashboard_gadget -name {timing_1} -type timing
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
||||
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
||||
|
||||
# Create 'utilization_1' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
||||
create_dashboard_gadget -name {utilization_1} -type utilization
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
||||
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
||||
set_property -name "run.step" -value "synth_design" -objects $obj
|
||||
set_property -name "run.type" -value "synthesis" -objects $obj
|
||||
|
||||
# Create 'utilization_2' gadget (if not found)
|
||||
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
||||
create_dashboard_gadget -name {utilization_2} -type utilization
|
||||
}
|
||||
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
||||
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
||||
|
||||
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
||||
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
||||
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
||||
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
||||
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
||||
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
||||
Reference in New Issue
Block a user