Skip to content

Commit fa8d57f

Browse files
Merge pull request #19 from MicrochipTech/dev
Merge dev to main after v2022.2.1 release
2 parents e0d3b54 + e12e840 commit fa8d57f

563 files changed

Lines changed: 210591 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Libero/README.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Each of the Training directories contains a Libero subdirectory which can be
2+
used to regenerate the training for new versions of Libero.
3+
Each of the Libero subdirectories contains the following:
4+
5+
1. readme.txt - this file lists the commands to regenerate the training project
6+
using the tcl flow.
7+
8+
2. softconsole - this folder has the original Softconsole project. You can use
9+
this in case you want to regenerate the hex file to be used in the
10+
Libero project.
11+
12+
3. src - this folder has all the source files used to recreate the Libero project.
13+
14+
4. libero_flow.tcl - this is the file that needs to be sourced to the Libero
15+
executable in script mode. You can also run this file in the IDE by
16+
selecting <Project><Execute Script>
17+
18+
Note: While running libero_flow.tcl, if you see a failure in configuring a
19+
particular core because it is no longer supported in that particular Libero
20+
release, you can edit the top of libero_flow.tcl to update the version of
21+
that particular core with the latest version.

Libero/libero_generate_job.tcl

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# to run:
2+
# libero SCRIPT:libero_generate_job.tcl SCRIPT_ARGS:"<libero_prjx_file> <job_file_name>"
3+
#
4+
# store arguments in parameters
5+
set project [lindex $argv 0]
6+
set job_file [lindex $argv 1]
7+
8+
open_project -file $project
9+
10+
# Workaround to fix Linux Synthesis issue with Libero project. TODO: update original Libero project
11+
# Synthesis is failing with missing mux_3_to_1_8bit module. To avaoid this, added the below code to re-import the corresponding hdl file and to regenerate the top component
12+
13+
import_files \
14+
-convert_EDN_to_HDL 0 \
15+
-library {work} \
16+
-hdl_source {./LegUp_Training1_Libero/hdl/mux_3_to_1_8bit.v}
17+
save_project
18+
generate_component -component_name {LegUp_Image_Filters} -recursive 1
19+
generate_component -component_name {VIDEO_KIT_TOP} -recursive 1
20+
build_design_hierarchy
21+
22+
# we purposely don't change any synthesis or P&R settings to reproduce what the user will do
23+
# when they download the Libero project
24+
25+
run_tool -name {SYNTHESIZE}
26+
run_tool -name {PLACEROUTE}
27+
run_tool -name {VERIFYTIMING}
28+
29+
# regenerate the .job file
30+
export_prog_job \
31+
-job_file_name $job_file \
32+
-export_dir {.} \
33+
-bitstream_file_type {TRUSTED_FACILITY} \
34+
-bitstream_file_components {FABRIC_SNVM} \
35+
-zeroization_likenew_action 0 \
36+
-zeroization_unrecoverable_action 0 \
37+
-program_design 1 \
38+
-program_spi_flash 0 \
39+
-include_plaintext_passkey 0 \
40+
-design_bitstream_format {PPD} \
41+
-prog_optional_procedures {} \
42+
-skip_recommended_procedures {} \
43+
-sanitize_snvm 0

Libero/libero_update_hls_core.tcl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# to run:
2+
# libero SCRIPT:libero_update_hls_core.tcl SCRIPT_ARGS:"<libero_prjx_file> <top_component> <hdl_core_name> <verilog_file> <create_hdl_plus> <current_sd_name> <instance_update>"
3+
#
4+
# store arguments in parameters
5+
set project [lindex $argv 0]
6+
set top_component [lindex $argv 1]
7+
set hdl_core_name [lindex $argv 2]
8+
set verilog_file [lindex $argv 3]
9+
set create_hdl_plus [lindex $argv 4]
10+
set current_sd_name [lindex $argv 5]
11+
set instance_update [lindex $argv 6]
12+
# added the below argument to take into account the name change of hls module from legup to smarthls
13+
set new_hdl_core_name [string map {legup smarthls} $hdl_core_name]
14+
15+
open_project -file $project
16+
remove_hdl_core -hdl_core_name $hdl_core_name
17+
delete_files -file $verilog_file -from_disk
18+
19+
# re-create the SmartHLS core
20+
source $create_hdl_plus
21+
open_smartdesign -sd_name $current_sd_name
22+
sd_replace_component -sd_name $current_sd_name -instance_name $instance_update -new_component_name $new_hdl_core_name -replace_all_instances 1
23+
save_smartdesign -sd_name $current_sd_name
24+
generate_component -component_name $current_sd_name -recursive 1
25+
generate_component -component_name $top_component -recursive 1
26+
build_design_hierarchy
27+
28+
save_project
29+
close_project

Training1/Libero/libero_flow.tcl

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
#Libero project creation
2+
3+
new_project -location {./Libero_training1} -name {Libero_training1} -project_description {} -block_mode 0 -hdl Verilog -family {PolarFire} -die {MPF300TS} -package {FCG1152} -speed {-1} -die_voltage {1.0} -part_range {IND} -adv_options {IO_DEFT_STD:LVCMOS 1.8V} -adv_options {RESERVEMIGRATIONPINS:1} -adv_options {RESTRICTPROBEPINS:1} -adv_options {RESTRICTSPIPINS:0} -adv_options {TEMPR:IND} -adv_options {UNUSED_MSS_IO_RESISTOR_PULL:None} -adv_options {VCCI_1.2_VOLTR:IND} -adv_options {VCCI_1.5_VOLTR:IND} -adv_options {VCCI_1.8_VOLTR:IND} -adv_options {VCCI_2.5_VOLTR:IND} -adv_options {VCCI_3.3_VOLTR:IND} -adv_options {VOLTR:IND}
4+
5+
set PF_CCC_version 2.2.214
6+
set Display_Controller_version 3.1.2
7+
set HDMI_RX_version 4.2.0
8+
set HDMI_TX_version 1.0.2
9+
set PF_TX_PLL_version 2.0.300
10+
set PF_XCVR_ERM_version 3.1.200
11+
set PF_XCVR_REF_CLK_version 1.0.103
12+
set CORERESET_PF_version 2.2.107
13+
set CORERXIODBITALIGN_version 2.1.104
14+
set PF_IOD_GENERIC_RX_version 2.1.109
15+
set PF_DDR4_version 2.5.108
16+
set PF_SRAM_AHBL_AXI_version 1.2.108
17+
set mipicsi2rxdecoderPF_version 2.2.5
18+
set COREAHBTOAPB3_version 3.1.100
19+
set COREI2C_version 7.2.101
20+
set CoreAPB3_version 4.1.100
21+
set CoreGPIO_version 3.2.102
22+
set COREJTAGDEBUG_version 3.1.100
23+
set CoreAHBLite_version 5.4.102
24+
set PF_INIT_MONITOR_version 2.0.304
25+
set MIV_RV32IMA_L1_AHB_version 2.3.100
26+
set COREUART_version 5.6.102
27+
set Bayer_Interpolation_version 3.0.2
28+
set Image_Enhancement_version 3.0.0
29+
30+
#Download all the required cores to the vault
31+
download_core -vlnv "Actel:SgCore:PF_CCC:${PF_CCC_version}" -location {www.microchip-ip.com/repositories/SgCore}
32+
download_core -vlnv "Microsemi:SolutionCore:Display_Controller:${Display_Controller_version}" -location {www.microchip-ip.com/repositories/DirectCore}
33+
download_core -vlnv "Microsemi:SolutionCore:HDMI_RX:${HDMI_RX_version}" -location {www.microchip-ip.com/repositories/DirectCore}
34+
download_core -vlnv "Microsemi:SolutionCore:HDMI_TX:${HDMI_TX_version}" -location {www.microchip-ip.com/repositories/DirectCore}
35+
download_core -vlnv "Actel:SgCore:PF_TX_PLL:${PF_TX_PLL_version}" -location {www.microchip-ip.com/repositories/SgCore}
36+
download_core -vlnv "Actel:SystemBuilder:PF_XCVR_ERM:${PF_XCVR_ERM_version}" -location {www.microchip-ip.com/repositories/SgCore}
37+
download_core -vlnv "Actel:SgCore:PF_XCVR_REF_CLK:${PF_XCVR_REF_CLK_version}" -location {www.microchip-ip.com/repositories/SgCore}
38+
download_core -vlnv "Actel:DirectCore:CORERESET_PF:${CORERESET_PF_version}" -location {www.microchip-ip.com/repositories/DirectCore}
39+
download_core -vlnv "Actel:DirectCore:CORERXIODBITALIGN:${CORERXIODBITALIGN_version}" -location {www.microchip-ip.com/repositories/DirectCore}
40+
download_core -vlnv "Actel:SystemBuilder:PF_IOD_GENERIC_RX:${PF_IOD_GENERIC_RX_version}" -location {www.microchip-ip.com/repositories/SgCore}
41+
download_core -vlnv "Actel:SystemBuilder:PF_DDR4:${PF_DDR4_version}" -location {www.microchip-ip.com/repositories/SgCore}
42+
download_core -vlnv "Actel:SystemBuilder:PF_SRAM_AHBL_AXI:${PF_SRAM_AHBL_AXI_version}" -location {www.microchip-ip.com/repositories/SgCore}
43+
download_core -vlnv "Microsemi:SolutionCore:mipicsi2rxdecoderPF:${mipicsi2rxdecoderPF_version}" -location {www.microchip-ip.com/repositories/DirectCore}
44+
download_core -vlnv "Actel:DirectCore:COREAHBTOAPB3:${COREAHBTOAPB3_version}" -location {www.microchip-ip.com/repositories/DirectCore}
45+
download_core -vlnv "Actel:DirectCore:COREI2C:${COREI2C_version}" -location {www.microchip-ip.com/repositories/DirectCore}
46+
download_core -vlnv "Actel:DirectCore:CoreAPB3:${CoreAPB3_version}" -location {www.microchip-ip.com/repositories/DirectCore}
47+
download_core -vlnv "Actel:DirectCore:CoreGPIO:${CoreGPIO_version}" -location {www.microchip-ip.com/repositories/DirectCore}
48+
download_core -vlnv "Actel:DirectCore:COREJTAGDEBUG:${COREJTAGDEBUG_version}" -location {www.microchip-ip.com/repositories/DirectCore}
49+
download_core -vlnv "Actel:DirectCore:CoreAHBLite:${CoreAHBLite_version}" -location {www.microchip-ip.com/repositories/DirectCore}
50+
download_core -vlnv "Actel:SgCore:PF_INIT_MONITOR:${PF_INIT_MONITOR_version}" -location {www.microchip-ip.com/repositories/SgCore}
51+
download_core -vlnv "Microsemi:MiV:MIV_RV32IMA_L1_AHB:${MIV_RV32IMA_L1_AHB_version}" -location {www.microchip-ip.com/repositories/DirectCore}
52+
download_core -vlnv "Actel:DirectCore:COREUART:${COREUART_version}" -location {www.microchip-ip.com/repositories/DirectCore}
53+
download_core -vlnv "Microsemi:SolutionCore:Bayer_Interpolation:${Bayer_Interpolation_version}" -location {www.microchip-ip.com/repositories/DirectCore}
54+
download_core -vlnv "Microsemi:SolutionCore:Image_Enhancement:${Image_Enhancement_version}" -location {www.microchip-ip.com/repositories/DirectCore}
55+
56+
#source the below tcl file to create the top level SmartDesign and generate it
57+
source ./src/VIDEO_KIT_TOP_recursive.tcl
58+
build_design_hierarchy
59+
60+
#Import the constraint files and organize the Synthesize, Place and Route and Verify Timing tools
61+
import_files \
62+
-io_pdc ./src/constraint/user_io.pdc
63+
import_files \
64+
-fp_pdc ./src/constraint/user_fp.pdc
65+
import_files \
66+
-sdc ./src/constraint/user.sdc
67+
68+
organize_tool_files -tool {PLACEROUTE} -file {./Libero_training1/constraint/io/user_io.pdc} -file {./Libero_training1/constraint/fp/user_fp.pdc} -file {./Libero_training1/constraint/user.sdc} -module {VIDEO_KIT_TOP::work} -input_type {constraint}
69+
organize_tool_files -tool {VERIFYTIMING} -file {./Libero_training1/constraint/user.sdc} -module {VIDEO_KIT_TOP::work} -input_type {constraint}
70+
71+
derive_constraints_sdc
72+
save_project
73+
74+
#Configure and run the tools Synthesize, Place and Route and Verify Timing
75+
#configure_tool -name {SYNTHESIZE} -params {RETIMING:true} -params {ROM_TO_LOGIC:false} -params {SYNPLIFY_TCL_FILE:../src/synplify_options.tcl}
76+
configure_tool -name {SYNTHESIZE} -params {ACTIVE_IMPLEMENTATION:synthesis} -params {AUTO_COMPILE_POINT:false} -params {BLOCK_MODE:false} -params {BLOCK_PLACEMENT_CONFLICTS:ERROR} -params {BLOCK_ROUTING_CONFLICTS:LOCK} -params {CDC_MIN_NUM_SYNC_REGS:2} -params {CDC_REPORT:true} -params {CLOCK_ASYNC:800} -params {CLOCK_DATA:5000} -params {CLOCK_GATE_ENABLE:false} -params {CLOCK_GATE_ENABLE_THRESHOLD_GLOBAL:1000} -params {CLOCK_GATE_ENABLE_THRESHOLD_ROW:100} -params {CLOCK_GLOBAL:2} -params {PA4_GB_COUNT:36} -params {PA4_GB_MAX_RCLKINT_INSERTION:16} -params {PA4_GB_MIN_GB_FANOUT_TO_USE_RCLKINT:1000} -params {RAM_OPTIMIZED_FOR_POWER:0} -params {RETIMING:true} -params {ROM_TO_LOGIC:false} -params {SEQSHIFT_TO_URAM:1} -params {SYNPLIFY_OPTIONS:} -params {SYNPLIFY_TCL_FILE:../src/synplify_options.tcl}
77+
run_tool -name {SYNTHESIZE}
78+
79+
80+
configure_tool -name {PLACEROUTE} -params {DELAY_ANALYSIS:MAX} -params {EFFORT_LEVEL:false} -params {GB_DEMOTION:true} -params {INCRPLACEANDROUTE:false} -params {IOREG_COMBINING:true} -params {MULTI_PASS_CRITERIA:VIOLATIONS} -params {MULTI_PASS_LAYOUT:true} -params {NUM_MULTI_PASSES:5} -params {PDPR:false} -params {RANDOM_SEED:1} -params {REPAIR_MIN_DELAY:true} -params {REPLICATION:true} -params {SLACK_CRITERIA:WORST_SLACK} -params {SPECIFIC_CLOCK:} -params {START_SEED_INDEX:3} -params {STOP_ON_FIRST_PASS:true} -params {TDPR:true}
81+
run_tool -name {PLACEROUTE}
82+
83+
configure_tool -name {VERIFYTIMING} -params {CONSTRAINTS_COVERAGE:1} -params {FORMAT:TEXT} -params {MAX_EXPANDED_PATHS_TIMING:1} -params {MAX_EXPANDED_PATHS_VIOLATION:0} -params {MAX_PARALLEL_PATHS_TIMING:1} -params {MAX_PARALLEL_PATHS_VIOLATION:1} -params {MAX_PATHS_INTERACTIVE_REPORT:1} -params {MAX_PATHS_TIMING:5} -params {MAX_PATHS_VIOLATION:20} -params {MAX_TIMING_FAST_HV_LT:1} -params {MAX_TIMING_MULTI_CORNER:1} -params {MAX_TIMING_SLOW_LV_HT:1} -params {MAX_TIMING_SLOW_LV_LT:1} -params {MAX_TIMING_VIOLATIONS_FAST_HV_LT:1} -params {MAX_TIMING_VIOLATIONS_MULTI_CORNER:1} -params {MAX_TIMING_VIOLATIONS_SLOW_LV_HT:1} -params {MAX_TIMING_VIOLATIONS_SLOW_LV_LT:1} -params {MIN_TIMING_FAST_HV_LT:1} -params {MIN_TIMING_MULTI_CORNER:1} -params {MIN_TIMING_SLOW_LV_HT:1} -params {MIN_TIMING_SLOW_LV_LT:1} -params {MIN_TIMING_VIOLATIONS_FAST_HV_LT:1} -params {MIN_TIMING_VIOLATIONS_MULTI_CORNER:1} -params {MIN_TIMING_VIOLATIONS_SLOW_LV_HT:1} -params {MIN_TIMING_VIOLATIONS_SLOW_LV_LT:1} -params {SLACK_THRESHOLD_VIOLATION:0.0} -params {SMART_INTERACTIVE:0}
84+
run_tool -name {VERIFYTIMING}
85+
86+
run_tool -name {GENERATEPROGRAMMINGDATA}
87+
88+
#Configure Design Initialization Data and Memories
89+
configure_design_initialization_data -second_stage_start_address {0x00000000} -third_stage_uprom_start_address {0x00000000} -third_stage_snvm_start_address {0x00000000} -third_stage_spi_start_address {0x00000400} -third_stage_spi_type {SPIFLASH_NO_BINDING_PLAINTEXT} -third_stage_spi_clock_divider {2} -init_timeout 128 -auto_calib_timeout {3000} -broadcast_RAMs {1}
90+
configure_snvm -cfg_file {./src/cfg_and_mem_files/SNVM.cfg}
91+
#The below file sources the *.hex file generated by the SoftConsole
92+
configure_ram -cfg_file {./src/cfg_and_mem_files/RAM.cfg}
93+
save_project
94+
95+
generate_design_initialization_data
96+
97+
configure_tool \
98+
-name {GENERATEPROGRAMMINGFILE} \
99+
-params {program_fabric:true} \
100+
-params {program_security:false} \
101+
-params {program_snvm:true} \
102+
-params {sanitize_snvm:false}
103+
run_tool -name {GENERATEPROGRAMMINGFILE}
104+
105+
#Generate the Programming job file
106+
export_prog_job \
107+
-job_file_name {VIDEO_KIT_TOP} \
108+
-export_dir {.} \
109+
-bitstream_file_type {TRUSTED_FACILITY} \
110+
-bitstream_file_components {FABRIC_SNVM} \
111+
-zeroization_likenew_action 0 \
112+
-zeroization_unrecoverable_action 0 \
113+
-program_design 1 \
114+
-program_spi_flash 0 \
115+
-include_plaintext_passkey 0 \
116+
-design_bitstream_format {PPD} \
117+
-prog_optional_procedures {} \
118+
-skip_recommended_procedures {} \
119+
-sanitize_snvm 0
120+
121+
save_project

Training1/Libero/readme.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
This training can be regenerated on Windows using Cygwin or on Linux.
2+
3+
-----------------------------------------------------------------------
4+
Windows (Cygwin):
5+
-----------------------------------------------------------------------
6+
7+
1. Open Cygwin by running the .bat file from the SmartHLS installation directory, e.g.:
8+
9+
C:\Microchip\Libero_SoC_v2022.2\SmartHLS-2022.2\cygwin64\Cygwin.bat
10+
11+
2. Navigate to this current directory, e.g.:
12+
13+
cd /cygdrive/c/training_libero_projects/training1
14+
15+
Note that C:\ is replaced by /cygdrive/c/
16+
17+
3. Run the Bash script to generate the HLS example designs:
18+
19+
bash run_shls_on_examples.sh
20+
21+
4. When this completes, use Libero to generate the project. This can be
22+
done from the shell or the IDE.
23+
24+
4a. Shell: From the same directory, run the command:
25+
26+
libero SCRIPT:libero_flow.tcl LOGFILE:output.log &
27+
28+
4b. IDE:
29+
- Open Libero
30+
- Go to File -> Execute Script
31+
- Choose libero_flow.tcl under "Script file". There are no arguments needed.
32+
- Click 'Run'
33+
34+
35+
-----------------------------------------------------------------------
36+
Linux:
37+
-----------------------------------------------------------------------
38+
39+
1. First run the Bash script to generate the HLS example designs:
40+
41+
bash run_shls_on_examples.sh
42+
43+
2. When this completes, use Libero to generate the project. This can be
44+
done from the shell or the IDE.
45+
46+
2a. Shell: From the same directory, run the command:
47+
48+
libero SCRIPT:libero_flow.tcl LOGFILE:output.log &
49+
50+
2b. IDE:
51+
- Open Libero
52+
- Go to File -> Execute Script
53+
- Choose libero_flow.tcl under "Script file". There are no arguments needed.
54+
- Click 'Run'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This script should be run first to run shls on the required examples.
2+
# After this script completed, follow the remaining instructions in the
3+
# readme to run libero on the generated designs.
4+
5+
echo ""
6+
echo "Running shls hw on Canny_FIFO_Switch"
7+
echo ""
8+
cd ../Canny_FIFO_Switch
9+
shls hw
10+
11+
echo ""
12+
echo "Running shls hw on Gaussian_FIFO_Pipelined"
13+
echo ""
14+
cd ../Gaussian_FIFO_Pipelined
15+
shls hw
16+
17+
echo ""
18+
echo "Running shls hw on RGB2YCbCr"
19+
echo ""
20+
cd ../RGB2YCbCr
21+
shls hw
22+
23+
echo ""
24+
echo "Running shls hw on YCbCr2RGB"
25+
echo ""
26+
cd ../YCbCr2RGB
27+
shls hw
28+
29+
echo ""
30+
echo "Running shls hw on alpha_blend"
31+
echo ""
32+
cd ../alpha_blend
33+
shls hw
34+
35+
cd ../Libero/
36+
37+
echo ""
38+
echo "Now run Libero by following the remaining steps in readme.txt."
39+
echo ""

0 commit comments

Comments
 (0)