Add batch 3 (alexforencich_verilog-uart, schlae_graphics-gremlin, quanzaihh_Neural-Network-Accelerator, google_CFU-Playground, abdelazeem201_ASIC-Design-Roadmap)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +7 -0
- abdelazeem201_ASIC-Design-Roadmap/.github/workflows/blank.yml +36 -0
- abdelazeem201_ASIC-Design-Roadmap/Figures/Fig. Complex ASIC Design.jpeg +3 -0
- abdelazeem201_ASIC-Design-Roadmap/Guide to HDL Coding Styles for Synthesis/ReadMe +1 -0
- abdelazeem201_ASIC-Design-Roadmap/HDL Compiler for Verilog Reference Manual/ReadMe +2 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Memory_NDM_Generation.tcl +119 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/NDM_Creation.tcl +135 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/NDR_rule.pl +105 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/PnR.tcl +210 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/01_common_setup.tcl +36 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/02_mcmm_setup.tcl +60 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/03_PnR_setup.tcl +536 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Vpad.tcl +21 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler/01_design_planning.tcl +126 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler/02_preroute.tcl +85 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler/create_phy_cell.tcl +20 -0
- abdelazeem201_ASIC-Design-Roadmap/IC Compiler/io.tdf +140 -0
- abdelazeem201_ASIC-Design-Roadmap/LEF2FRAM/Readme.md +119 -0
- abdelazeem201_ASIC-Design-Roadmap/LEF2FRAM/lef_layer_tf_number_mapper.pl +198 -0
- abdelazeem201_ASIC-Design-Roadmap/LEF2FRAM/lef_layer_tf_number_mapper.tcl +185 -0
- abdelazeem201_ASIC-Design-Roadmap/LICENSE +21 -0
- abdelazeem201_ASIC-Design-Roadmap/Logo.pl +87 -0
- abdelazeem201_ASIC-Design-Roadmap/MY-Design/MY_DESIGN.v +71 -0
- abdelazeem201_ASIC-Design-Roadmap/MY-Design/My_Design.cons +141 -0
- abdelazeem201_ASIC-Design-Roadmap/PrimeTime/RUN.tcl +38 -0
- abdelazeem201_ASIC-Design-Roadmap/PrimeTime/UsefulScripts/report_case_propagation.tcl +118 -0
- abdelazeem201_ASIC-Design-Roadmap/PrimeTime/common_setup.tcl +86 -0
- abdelazeem201_ASIC-Design-Roadmap/PrimeTime/pt.tcl +116 -0
- abdelazeem201_ASIC-Design-Roadmap/PrimeTime/pt_setup.tcl +101 -0
- abdelazeem201_ASIC-Design-Roadmap/README.md +220 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/BLK_MEM_GEN_V7_1.v +0 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/blk_mem_zed.v +184 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_defs.v +61 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_pin_mux.v +213 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_system_zed.v +863 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/fpga_ram_top.v +66 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/fpga_rom_top.v +70 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/led_1second.v +108 -0
- abdelazeem201_ASIC-Design-Roadmap/cmsdk/tb_cmsdk_mcu_zed.v +161 -0
- abdelazeem201_ASIC-Design-Roadmap/good online sites and books for learning ASIC Design/README +1 -0
- abdelazeem201_ASIC-Design-Roadmap/lef_layer_tf_number_mapper.pl +198 -0
- abdelazeem201_ASIC-Design-Roadmap/low_power.upf +68 -0
- abdelazeem201_ASIC-Design-Roadmap/memories/cmsdk_ahb_ram.v +342 -0
- abdelazeem201_ASIC-Design-Roadmap/memories/cmsdk_ahb_rom.v +324 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/0_import.tcl +846 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/1_place.tcl +228 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/2_clock.tcl +233 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/3_route.tcl +167 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/4_export.tcl +246 -0
- abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/createpathgroup.tcl +9 -0
.gitattributes
CHANGED
|
@@ -504,3 +504,10 @@ omarelhedaby_CNN-FPGA/Screenshots[[:space:]]and[[:space:]]Reports/Part[[:space:]
|
|
| 504 |
omarelhedaby_CNN-FPGA/Screenshots[[:space:]]and[[:space:]]Reports/Part[[:space:]]3-[[:space:]]SoftMax[[:space:]]activation/Synthesis[[:space:]]Reports[[:space:]]and[[:space:]]Screenshots/SoftMax[[:space:]]Comparison[[:space:]]Report.docx filter=lfs diff=lfs merge=lfs -text
|
| 505 |
omarelhedaby_CNN-FPGA/Screenshots[[:space:]]and[[:space:]]Reports/Part[[:space:]]5-[[:space:]]Integration/FC[[:space:]]layer[[:space:]]Waveform.PNG filter=lfs diff=lfs merge=lfs -text
|
| 506 |
omarelhedaby_CNN-FPGA/Test.xlsx filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 504 |
omarelhedaby_CNN-FPGA/Screenshots[[:space:]]and[[:space:]]Reports/Part[[:space:]]3-[[:space:]]SoftMax[[:space:]]activation/Synthesis[[:space:]]Reports[[:space:]]and[[:space:]]Screenshots/SoftMax[[:space:]]Comparison[[:space:]]Report.docx filter=lfs diff=lfs merge=lfs -text
|
| 505 |
omarelhedaby_CNN-FPGA/Screenshots[[:space:]]and[[:space:]]Reports/Part[[:space:]]5-[[:space:]]Integration/FC[[:space:]]layer[[:space:]]Waveform.PNG filter=lfs diff=lfs merge=lfs -text
|
| 506 |
omarelhedaby_CNN-FPGA/Test.xlsx filter=lfs diff=lfs merge=lfs -text
|
| 507 |
+
quanzaihh_Neural-Network-Accelerator/compile/yolov8/simsun.ttc filter=lfs diff=lfs merge=lfs -text
|
| 508 |
+
quanzaihh_Neural-Network-Accelerator/fig/PPT论文图/机器学习深度学习绘图模板.pptx filter=lfs diff=lfs merge=lfs -text
|
| 509 |
+
quanzaihh_Neural-Network-Accelerator/fig/PPT论文图/机器学习绘图模板.pptx filter=lfs diff=lfs merge=lfs -text
|
| 510 |
+
quanzaihh_Neural-Network-Accelerator/fig/PPT论文图/论文总图.pptx filter=lfs diff=lfs merge=lfs -text
|
| 511 |
+
quanzaihh_Neural-Network-Accelerator/fig/系统框图.vsdx filter=lfs diff=lfs merge=lfs -text
|
| 512 |
+
schlae_graphics-gremlin/isabracket.stl filter=lfs diff=lfs merge=lfs -text
|
| 513 |
+
schlae_graphics-gremlin/verilog/isavideo.binm filter=lfs diff=lfs merge=lfs -text
|
abdelazeem201_ASIC-Design-Roadmap/.github/workflows/blank.yml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This is a basic workflow to help you get started with Actions
|
| 2 |
+
|
| 3 |
+
name: CI
|
| 4 |
+
|
| 5 |
+
# Controls when the workflow will run
|
| 6 |
+
on:
|
| 7 |
+
# Triggers the workflow on push or pull request events but only for the "main" branch
|
| 8 |
+
push:
|
| 9 |
+
branches: [ "main" ]
|
| 10 |
+
pull_request:
|
| 11 |
+
branches: [ "main" ]
|
| 12 |
+
|
| 13 |
+
# Allows you to run this workflow manually from the Actions tab
|
| 14 |
+
workflow_dispatch:
|
| 15 |
+
|
| 16 |
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
| 17 |
+
jobs:
|
| 18 |
+
# This workflow contains a single job called "build"
|
| 19 |
+
build:
|
| 20 |
+
# The type of runner that the job will run on
|
| 21 |
+
runs-on: ubuntu-latest
|
| 22 |
+
|
| 23 |
+
# Steps represent a sequence of tasks that will be executed as part of the job
|
| 24 |
+
steps:
|
| 25 |
+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
| 26 |
+
- uses: actions/checkout@v3
|
| 27 |
+
|
| 28 |
+
# Runs a single command using the runners shell
|
| 29 |
+
- name: Run a one-line script
|
| 30 |
+
run: echo Hello, world!
|
| 31 |
+
|
| 32 |
+
# Runs a set of commands using the runners shell
|
| 33 |
+
- name: Run a multi-line script
|
| 34 |
+
run: |
|
| 35 |
+
echo Add other actions to build,
|
| 36 |
+
echo test, and deploy your project.
|
abdelazeem201_ASIC-Design-Roadmap/Figures/Fig. Complex ASIC Design.jpeg
ADDED
|
Git LFS Details
|
abdelazeem201_ASIC-Design-Roadmap/Guide to HDL Coding Styles for Synthesis/ReadMe
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Guide to HDL Coding Styles for Synthesis
|
abdelazeem201_ASIC-Design-Roadmap/HDL Compiler for Verilog Reference Manual/ReadMe
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
HDL Compiler for Verilog Reference Manual
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Memory_NDM_Generation.tcl
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#--------------------------------------------------
|
| 2 |
+
# Script: Memory NDM Generation for Multiple SRAM Macros
|
| 3 |
+
# Description:
|
| 4 |
+
# - Reads LEF and multiple CCS timing DBs for each memory macro
|
| 5 |
+
# - Creates a workspace per macro
|
| 6 |
+
# - Generates corresponding NDM files
|
| 7 |
+
#--------------------------------------------------
|
| 8 |
+
|
| 9 |
+
#-------------------------------
|
| 10 |
+
# Configuration
|
| 11 |
+
#-------------------------------
|
| 12 |
+
|
| 13 |
+
# Technology file
|
| 14 |
+
set tech_file "xx.tf"
|
| 15 |
+
|
| 16 |
+
# List of memory macros to process
|
| 17 |
+
set MEM_LIST "
|
| 18 |
+
MEM1
|
| 19 |
+
MEM2
|
| 20 |
+
MEM3
|
| 21 |
+
MEM4
|
| 22 |
+
MEM5
|
| 23 |
+
MEM6
|
| 24 |
+
MEM7
|
| 25 |
+
MEM8
|
| 26 |
+
"
|
| 27 |
+
|
| 28 |
+
# Paths to required files
|
| 29 |
+
set lef_dir "SRAM/LEF"
|
| 30 |
+
set db_dir "SRAM/DB"
|
| 31 |
+
set mem_ndm_dir "./ndm"
|
| 32 |
+
|
| 33 |
+
# Bus delimiter configuration
|
| 34 |
+
set bus_delimiter {[]}
|
| 35 |
+
|
| 36 |
+
# Continue execution even if errors occur
|
| 37 |
+
set sh_continue_on_error true
|
| 38 |
+
|
| 39 |
+
#-------------------------------
|
| 40 |
+
# Set Common App Options
|
| 41 |
+
#-------------------------------
|
| 42 |
+
|
| 43 |
+
# General workspace and modeling options
|
| 44 |
+
set_app_options -as_user_default -name lib.workspace.group_libs_naming_strategies "common_prefix common_suffix common_prefix_and_common_suffix first_logical_lib_name"
|
| 45 |
+
set_app_options -as_user_default -name lib.workspace.group_libs_create_slg false
|
| 46 |
+
set_app_options -as_user_default -name lib.workspace.allow_missing_related_pg_pins true
|
| 47 |
+
set_app_options -as_user_default -name lib.workspace.remove_frame_bus_properties true
|
| 48 |
+
set_app_options -as_user_default -name lib.workspace.save_design_views true
|
| 49 |
+
set_app_options -as_user_default -name link.require_physical true
|
| 50 |
+
set_app_options -as_user_default -name design.bus_delimiters $bus_delimiter
|
| 51 |
+
set_app_options -as_user_default -name lib.logic_model.require_same_opt_attrs false
|
| 52 |
+
set_app_options -as_user_default -name lib.logic_model.use_db_rail_names true
|
| 53 |
+
set_app_options -as_user_default -name lib.logic_model.auto_remove_timing_only_designs true
|
| 54 |
+
set_app_options -as_user_default -name lib.physical_model.connect_within_pin true
|
| 55 |
+
set_app_options -as_user_default -name lib.physical_model.hierarchical true
|
| 56 |
+
set_app_options -as_user_default -name lib.physical_model.merge_metal_blockage false
|
| 57 |
+
set_app_options -as_user_default -name lib.physical_model.block_all auto
|
| 58 |
+
set_app_options -as_user_default -name lib.physical_model.preserve_metal_blockage auto
|
| 59 |
+
|
| 60 |
+
#-------------------------------
|
| 61 |
+
# Process Each Memory Macro
|
| 62 |
+
#-------------------------------
|
| 63 |
+
|
| 64 |
+
foreach mem $MEM_LIST {
|
| 65 |
+
puts "\n### Processing Memory: $mem"
|
| 66 |
+
|
| 67 |
+
# Create workspace for this memory
|
| 68 |
+
create_workspace $mem -tech $tech_file
|
| 69 |
+
|
| 70 |
+
# Locate LEF file
|
| 71 |
+
set lef_file "${lef_dir}/${mem}.lef"
|
| 72 |
+
if {![file exists $lef_file]} {
|
| 73 |
+
puts "Warning: LEF file not found for $mem: $lef_file"
|
| 74 |
+
continue
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
# Read LEF file
|
| 78 |
+
read_lef $lef_file
|
| 79 |
+
|
| 80 |
+
# Prepare DB file list for multiple PVTs
|
| 81 |
+
set db_files {}
|
| 82 |
+
foreach pattern {
|
| 83 |
+
"${mem}*ssgnp0p72vm40c.db"
|
| 84 |
+
"${mem}*ssgnp0p72v125c.db"
|
| 85 |
+
"${mem}*ffgnp0p88v125c.db"
|
| 86 |
+
"${mem}*ffgnp0p88vm40c.db"
|
| 87 |
+
"${mem}*tt0p8v85c.db"
|
| 88 |
+
} {
|
| 89 |
+
foreach db [glob -nocomplain "${db_dir}/$pattern"] {
|
| 90 |
+
lappend db_files $db
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
# Read all valid DB files
|
| 95 |
+
foreach db $db_files {
|
| 96 |
+
set db_name [file tail $db]
|
| 97 |
+
# Extract process_label from filename: MEMNAME_<view>_<label>.db
|
| 98 |
+
set tokens [split $db_name "_"]
|
| 99 |
+
if {[llength $tokens] >= 3} {
|
| 100 |
+
set label_token [lindex $tokens 2]
|
| 101 |
+
set label_name [lindex [split $label_token "."] 0]
|
| 102 |
+
puts " - Reading DB: $db (label: $label_name)"
|
| 103 |
+
read_db $db -process_label $label_name
|
| 104 |
+
} else {
|
| 105 |
+
puts " - Skipping unrecognized DB format: $db_name"
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
# Check and commit workspace
|
| 110 |
+
check_workspace -allow_missing
|
| 111 |
+
commit_workspace -output "${mem_ndm_dir}/${mem}.ndm"
|
| 112 |
+
remove_workspace
|
| 113 |
+
|
| 114 |
+
puts "✅ Finished: $mem"
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
#-------------------------------
|
| 118 |
+
# End of Script
|
| 119 |
+
#-------------------------------
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/NDM_Creation.tcl
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#---------------------------------------------------------------------
|
| 2 |
+
# Script to create a Synopsys NDM Workspace for a standard cell library
|
| 3 |
+
# with multiple PVT corners and physical data
|
| 4 |
+
#----------------------------------------------------------------------
|
| 5 |
+
|
| 6 |
+
#-------------------------------
|
| 7 |
+
# Configuration Section
|
| 8 |
+
#-------------------------------
|
| 9 |
+
|
| 10 |
+
# Technology file (defines layers, rules, etc.)
|
| 11 |
+
set tech_file "xxx.tf"
|
| 12 |
+
|
| 13 |
+
# Physical-only NDM file (contains placement, pin info, etc.)
|
| 14 |
+
set physical_ndm "_physicalonly.ndm"
|
| 15 |
+
|
| 16 |
+
# Directory paths
|
| 17 |
+
set lef_dir "LEF"
|
| 18 |
+
set db_dir "db"
|
| 19 |
+
|
| 20 |
+
# Library name
|
| 21 |
+
set lib_name "lib_name"
|
| 22 |
+
|
| 23 |
+
# Bus delimiter for naming convention
|
| 24 |
+
set bus_delimiter {[]}
|
| 25 |
+
|
| 26 |
+
# Ensure script continues even if errors occur
|
| 27 |
+
set sh_continue_on_error true
|
| 28 |
+
|
| 29 |
+
#-------------------------------
|
| 30 |
+
# App Options Setup
|
| 31 |
+
#-------------------------------
|
| 32 |
+
|
| 33 |
+
# Set workspace-related options for better library merging and naming
|
| 34 |
+
set_app_options -as_user_default -name lib.workspace.group_libs_naming_strategies "common_prefix common_suffix common_prefix_and_common_suffix first_logical_lib_name"
|
| 35 |
+
set_app_options -as_user_default -name lib.workspace.group_libs_create_slg false
|
| 36 |
+
set_app_options -as_user_default -name lib.workspace.allow_missing_related_pg_pins true
|
| 37 |
+
set_app_options -as_user_default -name lib.workspace.remove_frame_bus_properties true
|
| 38 |
+
set_app_options -as_user_default -name lib.workspace.save_design_views true
|
| 39 |
+
set_app_options -as_user_default -name link.require_physical true
|
| 40 |
+
|
| 41 |
+
# Set delimiter options for bus structures
|
| 42 |
+
set_app_options -as_user_default -name design.bus_delimiters $bus_delimiter
|
| 43 |
+
|
| 44 |
+
# Logic model configuration
|
| 45 |
+
set_app_options -as_user_default -name lib.logic_model.require_same_opt_attrs false
|
| 46 |
+
set_app_options -as_user_default -name lib.logic_model.use_db_rail_names true
|
| 47 |
+
set_app_options -as_user_default -name lib.logic_model.auto_remove_timing_only_designs true
|
| 48 |
+
|
| 49 |
+
# Physical model configuration
|
| 50 |
+
set_app_options -as_user_default -name lib.physical_model.connect_within_pin true
|
| 51 |
+
set_app_options -as_user_default -name lib.physical_model.hierarchical true
|
| 52 |
+
set_app_options -as_user_default -name lib.physical_model.merge_metal_blockage false
|
| 53 |
+
set_app_options -as_user_default -name lib.physical_model.block_all auto
|
| 54 |
+
set_app_options -as_user_default -name lib.physical_model.preserve_metal_blockage auto
|
| 55 |
+
|
| 56 |
+
#-------------------------------
|
| 57 |
+
# Workspace Initialization
|
| 58 |
+
#-------------------------------
|
| 59 |
+
|
| 60 |
+
# Create a new workspace using the tech file
|
| 61 |
+
create_workspace STD -tech $tech_file -flow normal
|
| 62 |
+
|
| 63 |
+
# Read physical-only NDM data
|
| 64 |
+
read_ndm $physical_ndm
|
| 65 |
+
|
| 66 |
+
#-------------------------------
|
| 67 |
+
# Read CCS Timing DB Files per PVT Corner
|
| 68 |
+
#-------------------------------
|
| 69 |
+
foreach pvt {pvt1 pvt2} {
|
| 70 |
+
set db_file [glob $db_dir/${lib_name}${pvt}_ccs.db]
|
| 71 |
+
if {[file exists $db_file]} {
|
| 72 |
+
read_db $db_file -process_label $pvt
|
| 73 |
+
} else {
|
| 74 |
+
puts "Warning: Missing DB file for $pvt: $db_file"
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
#-------------------------------
|
| 79 |
+
# Setup Site Attributes
|
| 80 |
+
#-------------------------------
|
| 81 |
+
|
| 82 |
+
# Set default site (typically used for placement grid)
|
| 83 |
+
set_attribute [get_site_defs unit] is_default true
|
| 84 |
+
set_attribute [get_site_defs unit] symmetry Y
|
| 85 |
+
|
| 86 |
+
#-------------------------------
|
| 87 |
+
# Routing Layer Direction Setup
|
| 88 |
+
#-------------------------------
|
| 89 |
+
|
| 90 |
+
# Define vertical and horizontal routing layers
|
| 91 |
+
set routing_layers_vertical {M0 M3 M5 M7 M9 M11}
|
| 92 |
+
set routing_layers_horizontal {M1 M2 M4 M6 M8 M10 AP}
|
| 93 |
+
|
| 94 |
+
# Set routing directions
|
| 95 |
+
set_attribute [get_layers $routing_layers_vertical] routing_direction vertical
|
| 96 |
+
set_attribute [get_layers $routing_layers_horizontal] routing_direction horizontal
|
| 97 |
+
|
| 98 |
+
#-------------------------------
|
| 99 |
+
# Power Pin Attributes
|
| 100 |
+
#-------------------------------
|
| 101 |
+
|
| 102 |
+
# Classify special VPP power pins as primary power
|
| 103 |
+
foreach pattern {"*/TAP*VPP*VSS*/VPP" "*/TAP*VPP*VBB*/VPP"} {
|
| 104 |
+
set_attribute -o [get_lib_pins $pattern] port_type power
|
| 105 |
+
set_attribute -o [get_lib_pins $pattern] pg_type primary
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
#-------------------------------
|
| 109 |
+
# Diode Cell Identification
|
| 110 |
+
#-------------------------------
|
| 111 |
+
|
| 112 |
+
# Identify antenna diode cells and mark accordingly
|
| 113 |
+
set diode_cells [get_object_name [get_lib_cells */ANTENNA*]]
|
| 114 |
+
foreach diode $diode_cells {
|
| 115 |
+
puts "Marking diode cell: $diode"
|
| 116 |
+
set_attr -q [get_lib_pins -q $diode/I] -name is_diode -value true
|
| 117 |
+
set_attr -q -o [get_lib_cells -q $diode] -name is_diode_cell -value true
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
#-------------------------------
|
| 121 |
+
# Final Workspace Checks and Commit
|
| 122 |
+
#-------------------------------
|
| 123 |
+
|
| 124 |
+
# Check workspace consistency, allow missing views
|
| 125 |
+
check_workspace -allow_missing
|
| 126 |
+
|
| 127 |
+
# Save the final workspace as an NDM file
|
| 128 |
+
commit_workspace -output "${lib_name}.ndm"
|
| 129 |
+
|
| 130 |
+
# Clean up
|
| 131 |
+
remove_workspace
|
| 132 |
+
|
| 133 |
+
#-------------------------------
|
| 134 |
+
# End of Script
|
| 135 |
+
#-------------------------------
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/NDR_rule.pl
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/perl
|
| 2 |
+
|
| 3 |
+
#----------------------------------------------------------------------------
|
| 4 |
+
# Script Name: NDR_rule.pl
|
| 5 |
+
#
|
| 6 |
+
# Description:
|
| 7 |
+
# This script is designed to help define **Nondefault Routing Rules (NDRs)**
|
| 8 |
+
# automatically in Synopsys **IC Compiler II (ICC2)**.
|
| 9 |
+
#
|
| 10 |
+
# In ICC2, nondefault routing rules define special constraints such as increased
|
| 11 |
+
# width and spacing for clock nets or other critical nets. Normally, these rules
|
| 12 |
+
# are defined manually for each metal layer, which can be tedious and error-prone.
|
| 13 |
+
#
|
| 14 |
+
# This script reads a Synopsys technology file (.tf), extracts the default
|
| 15 |
+
# `defaultWidth` and `minSpacing` for each metal layer (M1, M2, ..., M9), and applies
|
| 16 |
+
# user-specified multipliers to generate NDR-compliant values.
|
| 17 |
+
#
|
| 18 |
+
# It outputs two Tcl variables: WIDTH and SPACE, which can then be used inside ICC2
|
| 19 |
+
# to define routing rules automatically.
|
| 20 |
+
#
|
| 21 |
+
#----------------------------------------------------------------------------
|
| 22 |
+
# Example ICC2 Usage:
|
| 23 |
+
#
|
| 24 |
+
# icc2_shell> set NDR [sh ./NDR_rule.pl TECH_FILE 2 2]
|
| 25 |
+
# icc2_shell> eval $NDR
|
| 26 |
+
# icc2_shell> create_routing_rule 2Wx2S -default -widths $WIDTH -spacings $SPACE
|
| 27 |
+
#
|
| 28 |
+
#----------------------------------------------------------------------------
|
| 29 |
+
# Example Command Line Usage:
|
| 30 |
+
#
|
| 31 |
+
# perl NDR_rule.pl technology_file spacing_multiplier width_multiplier
|
| 32 |
+
#
|
| 33 |
+
# e.g. perl NDR_rule.pl saed32nm.tf 2 2
|
| 34 |
+
#
|
| 35 |
+
#----------------------------------------------------------------------------
|
| 36 |
+
# Output:
|
| 37 |
+
#
|
| 38 |
+
# set WIDTH {M9 0.84 M8 0.84 ... M1 0.24};
|
| 39 |
+
# set SPACE {M9 0.84 M8 0.84 ... M1 0.24};
|
| 40 |
+
#
|
| 41 |
+
# You can then use these Tcl variables directly in ICC2 to define a routing rule:
|
| 42 |
+
#
|
| 43 |
+
# create_routing_rule 2Wx2S -default -widths $WIDTH -spacings $SPACE
|
| 44 |
+
#
|
| 45 |
+
#----------------------------------------------------------------------------
|
| 46 |
+
|
| 47 |
+
use strict;
|
| 48 |
+
use warnings;
|
| 49 |
+
|
| 50 |
+
# Check for minimum number of arguments
|
| 51 |
+
die "Usage: NDR_rule.pl <techfile> <spacing_multiplier> <width_multiplier>\n"
|
| 52 |
+
if (@ARGV < 3);
|
| 53 |
+
|
| 54 |
+
# Read command-line arguments
|
| 55 |
+
my ($techfile, $SM, $WM) = @ARGV;
|
| 56 |
+
|
| 57 |
+
# Variables to store final WIDTH and SPACE strings
|
| 58 |
+
my ($W, $S) = ("", "");
|
| 59 |
+
|
| 60 |
+
# Open techfile for reading
|
| 61 |
+
open(my $TECH, "<", $techfile) or die "Cannot open file $techfile: $!";
|
| 62 |
+
|
| 63 |
+
# Layer processing
|
| 64 |
+
my ($found, $name, $width, $space);
|
| 65 |
+
|
| 66 |
+
while (my $line = <$TECH>) {
|
| 67 |
+
chomp $line;
|
| 68 |
+
|
| 69 |
+
# End of a layer definition
|
| 70 |
+
$found = 0 if $line =~ /\}/;
|
| 71 |
+
|
| 72 |
+
# Start of a new layer
|
| 73 |
+
if ($line =~ /^Layer\s+(\S+)/) {
|
| 74 |
+
$name = $1;
|
| 75 |
+
$name =~ s/[\"\s]//g;
|
| 76 |
+
$found = ($name =~ /^M\d+$/) ? 0 : -1; # Only process metal layers like M1, M2, etc.
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
# Extract defaultWidth
|
| 80 |
+
if ($line =~ /defaultWidth\s+([\d.]+)/) {
|
| 81 |
+
$width = $1;
|
| 82 |
+
$found++ if ($width > 0 && $width < 1);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
# Extract minSpacing
|
| 86 |
+
if ($line =~ /minSpacing\s+([\d.]+)/) {
|
| 87 |
+
$space = $1;
|
| 88 |
+
$found++ if ($space > 0 && $space < 1);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
# When all conditions are met
|
| 92 |
+
if ($found == 2) {
|
| 93 |
+
my $scaled_width = $width * $WM;
|
| 94 |
+
my $scaled_space = $space * $SM;
|
| 95 |
+
$W = "$name $scaled_width $W";
|
| 96 |
+
$S = "$name $scaled_space $S";
|
| 97 |
+
$found = 0;
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
close $TECH;
|
| 102 |
+
|
| 103 |
+
# Print out the TCL-style formatted outputs
|
| 104 |
+
print "set WIDTH \{$W\};\n";
|
| 105 |
+
print "set SPACE \{$S\};\n";
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/PnR.tcl
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_host_options -max_cores 16
|
| 2 |
+
source ./input/common_setup.tcl
|
| 3 |
+
|
| 4 |
+
set link_library $LINK_LIBRARY_FILES_MVT
|
| 5 |
+
set target_library $TARGET_LIBRARY_FILES_MVT
|
| 6 |
+
|
| 7 |
+
set power "VDD"
|
| 8 |
+
set ground "VSS"
|
| 9 |
+
create_lib -ref_libs $NDM_REFERENCE_LIB_DIRS_MVT -technology $TECH_FILE ../work/chiptop
|
| 10 |
+
|
| 11 |
+
read_parasitic_tech -tlup $TLUPLUS_MAX_FILE -layermap $MAP_FILE
|
| 12 |
+
read_parasitic_tech -tlup $TLUPLUS_MIN_FILE -layermap $MAP_FILE
|
| 13 |
+
|
| 14 |
+
set TOP_DESIGN ChipTop
|
| 15 |
+
set gate_verilog "../../dc/output/compile.v"
|
| 16 |
+
|
| 17 |
+
read_verilog -top $TOP_DESIGN $gate_verilog
|
| 18 |
+
current_design $TOP_DESIGN
|
| 19 |
+
|
| 20 |
+
set_attribute [get_layers M1] routing_direction vertical
|
| 21 |
+
set_attribute [get_layers M2] routing_direction horizontal
|
| 22 |
+
set_attribute [get_layers M3] routing_direction vertical
|
| 23 |
+
set_attribute [get_layers M4] routing_direction horizontal
|
| 24 |
+
set_attribute [get_layers M5] routing_direction vertical
|
| 25 |
+
set_attribute [get_layers M6] routing_direction horizontal
|
| 26 |
+
set_attribute [get_layers M7] routing_direction vertical
|
| 27 |
+
set_attribute [get_layers M8] routing_direction horizontal
|
| 28 |
+
set_attribute [get_layers M9] routing_direction vertical
|
| 29 |
+
set_attribute [get_layers MRDL] routing_direction horizontal
|
| 30 |
+
|
| 31 |
+
set_wire_track_pattern -site_def unit -layer M1 -mode uniform -mask_constraint{mask_two mask_one}
|
| 32 |
+
\-coord 0.037 -space 0.074 -direction vertical
|
| 33 |
+
|
| 34 |
+
source ../scripts/mcmm.tcl
|
| 35 |
+
|
| 36 |
+
#./output/ChipTop_pads.v
|
| 37 |
+
|
| 38 |
+
initialize_floorplan -flip_first_row true -boundary {{0 0} {400 400}} -core_offset {15 15 15 15}
|
| 39 |
+
|
| 40 |
+
place_pins -ports [get_ports *]
|
| 41 |
+
|
| 42 |
+
create_net -power $NDM_POWER_NET
|
| 43 |
+
create_net -ground $NDM_GROUND_NET
|
| 44 |
+
|
| 45 |
+
connect_pg_net -net $NDM_POWER_NET [get_pins -hierarchical "*/VDD"]
|
| 46 |
+
connect_pg_net -net $NDM_GROUND_NET [get_pins -hierarchical "*/VSS"]
|
| 47 |
+
|
| 48 |
+
#########################################SRAMs'Placement################################################################
|
| 49 |
+
set sram_width 54.468
|
| 50 |
+
set sram_space 40
|
| 51 |
+
set sram_start_x 55.4690
|
| 52 |
+
set sram_start_y 246.60
|
| 53 |
+
|
| 54 |
+
set_attribute [get_cells MemYHier_MemXb] orientation R0
|
| 55 |
+
set_attribute [get_cells MemYHier_MemXa] orientation R0
|
| 56 |
+
set_attribute [get_cells MemXHier_MemXb] orientation R0
|
| 57 |
+
set_attribute [get_cells MemXHier_MemXa] orientation R0
|
| 58 |
+
set_attribute [get_cells MemYHier_MemXb] origin "$sram_start_x $sram_start_y"
|
| 59 |
+
set_attribute [get_cells MemYHier_MemXa] origin "[expr $sram_start_x + $sram_width
|
| 60 |
+
+ $sram_space] $sram_start_y"
|
| 61 |
+
set_attribute [get_cells MemXHier_MemXb] origin "[expr $sram_start_x +
|
| 62 |
+
2*($sram_width + $sram_space)] $sram_start_y"
|
| 63 |
+
set_attribute [get_cells MemXHier_MemXa] origin "[expr $sram_start_x +
|
| 64 |
+
3*($sram_width + $sram_space)] $sram_start_y"
|
| 65 |
+
set_fixed_objects [get_cell MemXHier_MemXa]
|
| 66 |
+
set_fixed_objects [get_cell MemXHier_MemXb]
|
| 67 |
+
set_fixed_objects [get_cell MemYHier_MemXa]
|
| 68 |
+
set_fixed_objects [get_cell MemYHier_MemXb]
|
| 69 |
+
create_keepout_margin -type hard -outer {20 20 20 20} [get_cells Mem?Hier_MemX?]
|
| 70 |
+
|
| 71 |
+
###################################################################################
|
| 72 |
+
#########################################
|
| 73 |
+
create_placement -floorplan -timing_driven
|
| 74 |
+
legalize_placement
|
| 75 |
+
#########################################Routing Blockages On Macro
|
| 76 |
+
Cells################################################################
|
| 77 |
+
create_routing_blockage -layers {M1 M2 M3 M4 M5} -boundary [get_attribute
|
| 78 |
+
[get_cells MemXHier_MemXa] boundary]
|
| 79 |
+
create_routing_blockage -layers {M1 M2 M3 M4 M5} -boundary [get_attribute
|
| 80 |
+
[get_cells MemYHier_MemXa] boundary]
|
| 81 |
+
create_routing_blockage -layers {M1 M2 M3 M4 M5} -boundary [get_attribute
|
| 82 |
+
[get_cells MemXHier_MemXb] boundary]
|
| 83 |
+
create_routing_blockage -layers {M1 M2 M3 M4 M5} -boundary [get_attribute
|
| 84 |
+
[get_cells MemYHier_MemXb] boundary]
|
| 85 |
+
####Connect P/G Pins and Create Power Rails#################
|
| 86 |
+
create_pg_mesh_pattern P_top_two \
|
| 87 |
+
-layers { \
|
| 88 |
+
{ {horizontal_layer: M7} {width: 0.2} {spacing: interleaving} {pitch:
|
| 89 |
+
30} {offset: 0.856} {trim : true} } \
|
| 90 |
+
{ {vertical_layer: M6} {width: 0.2} {spacing: interleaving} {pitch:
|
| 91 |
+
30} {offset: 6.08} {trim : true} } \
|
| 92 |
+
}
|
| 93 |
+
set_pg_strategy S_default_vddvss \
|
| 94 |
+
-core \
|
| 95 |
+
-pattern { {name: P_top_two} {nets:{VSS VDD}} } \
|
| 96 |
+
-extension { {{stop:design_boundary_and_generate_pin}} }
|
| 97 |
+
compile_pg -strategies {S_default_vddvss}
|
| 98 |
+
remove_routing_blockages *
|
| 99 |
+
####Rings Creation Around Macro Cells#################
|
| 100 |
+
set macro_list {MemXHier_MemXa MemYHier_MemXa MemXHier_MemXb MemYHier_MemXb}
|
| 101 |
+
|
| 102 |
+
create_pg_ring_pattern P_HM_ring -horizontal_layer M7 -horizontal_width {1} -vertical_layer M6 -vertical_width {1} -corner_bridge false
|
| 103 |
+
set_pg_strategy S_HM_ring_top -macros $macro_list -pattern { {pattern:
|
| 104 |
+
P_HM_ring} {nets: {VSS VDD}} {offset: {0.1 0.1}} }
|
| 105 |
+
compile_pg -strategies {S_HM_ring_top }
|
| 106 |
+
create_routing_blockage -layers * -boundary { {45 425} {305 617} }
|
| 107 |
+
## Create std rail
|
| 108 |
+
#VDD VSS
|
| 109 |
+
create_pg_std_cell_conn_pattern std_rail_conn1 -rail_width 0.094 -layers M1
|
| 110 |
+
set_pg_strategy std_rail_1 -pattern {{name : std_rail_conn1} {nets: "VDD VSS"}} -core
|
| 111 |
+
compile_pg -strategies std_rail_1
|
| 112 |
+
#####################################################################################
|
| 113 |
+
####################Analyze IR drop##################################################
|
| 114 |
+
set die_llx [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 0]
|
| 115 |
+
set die_lly [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 1]
|
| 116 |
+
set die_urx [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 0]
|
| 117 |
+
set die_ury [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 1]
|
| 118 |
+
|
| 119 |
+
for {set i "[expr $die_llx + 20]"} {$i < "[expr $die_urx - 40]"} {set i [expr $i + 80]} {
|
| 120 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_lly]
|
| 121 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_lly]
|
| 122 |
+
|
| 123 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_ury]
|
| 124 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_ury]
|
| 125 |
+
}
|
| 126 |
+
for {set i "[expr $die_lly + 20]"} {$i < "[expr $die_ury - 40]"} {set i [expr $i + 80]} {
|
| 127 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_llx $i]
|
| 128 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_llx [expr $i + 40]]
|
| 129 |
+
|
| 130 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_urx $i]
|
| 131 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_urx [expr $i + 40] ]
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
analyze_power_plan -power_budget 250 -voltage 1.2 -nets {VDD VSS} -use_terminals_as_pads
|
| 135 |
+
###################################################################################
|
| 136 |
+
###########################
|
| 137 |
+
############place_opt#################################
|
| 138 |
+
set_app_options -name time.disable_recovery_removal_checks -value false
|
| 139 |
+
set_app_options -name time.disable_case_analysis -value false
|
| 140 |
+
set_app_options -name place.coarse.continue_on_missing_scandef -value true
|
| 141 |
+
place_opt
|
| 142 |
+
legalize_placement
|
| 143 |
+
report_placement
|
| 144 |
+
###################################################################################
|
| 145 |
+
#########################
|
| 146 |
+
## std filler
|
| 147 |
+
set pnr_std_fillers "SAEDRVT14_FILL*"
|
| 148 |
+
set std_fillers ""
|
| 149 |
+
foreach filler $pnr_std_fillers { lappend std_fillers "*/${filler}" }
|
| 150 |
+
create_stdcell_filler -lib_cell $std_fillers
|
| 151 |
+
connect_pg_net -net $power [get_pins -hierarchical "*/VDD"]
|
| 152 |
+
connect_pg_net -net $ground [get_pins -hierarchical "*/VSS"]
|
| 153 |
+
remove_cells [get_cells -filter ref_name=~"*FILL*" ]
|
| 154 |
+
#########################Setting CTS Options###############################
|
| 155 |
+
remove_routing_blockages *
|
| 156 |
+
create_routing_rule ROUTE_RULES_1 \
|
| 157 |
+
-widths {M3 0.2 M4 0.2 } \
|
| 158 |
+
-spacings {M3 0.42 M4 0.63 }
|
| 159 |
+
set_clock_routing_rules -rules CLK_SPACING -min_routing_layer M2 -max_routing_layer
|
| 160 |
+
M4
|
| 161 |
+
set_clock_tree_options -target_latency 0.000 -target_skew 0.000
|
| 162 |
+
###################################################################################
|
| 163 |
+
###########################
|
| 164 |
+
############clock_opt#################################
|
| 165 |
+
|
| 166 |
+
clock_opt
|
| 167 |
+
###################################################################################
|
| 168 |
+
#########################
|
| 169 |
+
|
| 170 |
+
############route_opt#################################
|
| 171 |
+
remove_ignored_layers -all
|
| 172 |
+
set_ignored_layers \
|
| 173 |
+
-min_routing_layer $MIN_ROUTING_LAYER \
|
| 174 |
+
-max_routing_layer $MAX_ROUTING_LAYER
|
| 175 |
+
route_opt
|
| 176 |
+
###################################################################################
|
| 177 |
+
#########################
|
| 178 |
+
## std filler
|
| 179 |
+
set pnr_std_fillers "SAEDRVT14_FILL*"
|
| 180 |
+
set std_fillers ""
|
| 181 |
+
foreach filler $pnr_std_fillers { lappend std_fillers "*/${filler}" }
|
| 182 |
+
create_stdcell_filler -lib_cell $std_fillers
|
| 183 |
+
connect_pg_net -net $NDM_POWER_NET [get_pins -hierarchical "*/VDD"]
|
| 184 |
+
connect_pg_net -net $NDM_GROUND_NET [get_pins -hierarchical "*/VSS"]
|
| 185 |
+
###########reports##########################
|
| 186 |
+
#report_area
|
| 187 |
+
report_design -all
|
| 188 |
+
report_timing
|
| 189 |
+
report_power
|
| 190 |
+
save_block -as "${TOP_DESIGN}_Final"
|
| 191 |
+
save_lib
|
| 192 |
+
change_names -rules verilog -verbose
|
| 193 |
+
write_parasitics -output {../output/${TOP_DESIGN}.spef}
|
| 194 |
+
write_verilog \
|
| 195 |
+
-include {pg_netlist unconnected_ports} \
|
| 196 |
+
../output/${TOP_DESIGN}_pg.v
|
| 197 |
+
write_verilog \
|
| 198 |
+
-exclude {pg_netlist} \
|
| 199 |
+
../output/${TOP_DESIGN}.v
|
| 200 |
+
write_gds -design ${TOP_DESIGN}_Final \
|
| 201 |
+
-layer_map $GDS_MAP_FILE \
|
| 202 |
+
-keep_data_type \
|
| 203 |
+
-fill include \
|
| 204 |
+
-output_pin all \
|
| 205 |
+
-merge_files [list $STD_CELL_GDS $SRAM_SINGLE_GDS] \
|
| 206 |
+
-long_names \
|
| 207 |
+
../output/${TOP_DESIGN}.gds
|
| 208 |
+
#close_block
|
| 209 |
+
#close_lib
|
| 210 |
+
#exit
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/01_common_setup.tcl
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##############################################################
|
| 2 |
+
# Common design settings
|
| 3 |
+
# Created by Ahmed Abdelazeem
|
| 4 |
+
##############################################################
|
| 5 |
+
set_host_options -max_cores 16
|
| 6 |
+
set_app_var sh_continue_on_error true
|
| 7 |
+
### design information
|
| 8 |
+
set DESIGN_NAME "pit_top";
|
| 9 |
+
|
| 10 |
+
set Design_LIBRARY "/home/abdelazeem/Desktop/Abdelazeem/PGDip/Project/StandardCell/NangateOpenCellLibrary_PDKv1_3_v2010_12";
|
| 11 |
+
set DESIGN_REF_PATH "$Design_LIBRARY/lib/Front_End/Liberty/NLDM"
|
| 12 |
+
set DESIGN_REF_TECH_PATH "$Design_LIBRARY/tech/techfile/milkyway"
|
| 13 |
+
set_app_var search_path "$Design_LIBRARY $DESIGN_REF_PATH $DESIGN_REF_TECH_PATH"
|
| 14 |
+
set NDM_REFERENCE_LIB_DIRS "$Design_LIBRARY/CLIBS/NangateOpenCellLibrary_ss0p95v125c.ndm \
|
| 15 |
+
$Design_LIBRARY/CLIBS/NangateOpenCellLibrary_ff1p25v0c.ndm"
|
| 16 |
+
|
| 17 |
+
set TECH_FILE "${DESIGN_REF_TECH_PATH}/FreePDK45_10m.tf"
|
| 18 |
+
set MAP_FILE "$Design_LIBRARY/tech/rcxt/FreePDK45_10m.map" ;# Mapping file for TLUplus
|
| 19 |
+
set TLUPLUS_MAX_FILE "$Design_LIBRARY/tech/rcxt/FreePDK45_10m_Cmax.tlup" ;# Max TLUplus file
|
| 20 |
+
set TLUPLUS_MIN_FILE "$Design_LIBRARY/tech/rcxt/FreePDK45_10m_Cmin.tlup" ;# Min TLUplus file
|
| 21 |
+
set GDS_MAP_FILE "$Design_LIBRARY/tech/strmout/FreePDK45_10m_gdsout.map"
|
| 22 |
+
set STD_CELL_GDS "$Design_LIBRARY/lib/Back_End/gds/NangateOpenCellLibrary.gds"
|
| 23 |
+
|
| 24 |
+
set ROUTING_LAYER_DIRECTION_OFFSET_LIST "{metal1 horizontal} {metal2 vertical} {metal3 horizontal} {metal4 vertical} {metal5 horizontal} {metal6 vertical} {metal7 horizontal} {metal8 vertical} {metal9 horizontal} {metal10 vertical}"
|
| 25 |
+
set MIN_ROUTING_LAYER "metal1" ;# Min routing layer name; normally should be specified; otherwise tool can use all metal layers
|
| 26 |
+
set MAX_ROUTING_LAYER "metal10" ;# Max routing layer name; normally should be specified; otherwise tool can use all metal layers
|
| 27 |
+
|
| 28 |
+
set NDM_POWER_NET "VDD" ;#
|
| 29 |
+
set NDM_POWER_PORT "VDD" ;#
|
| 30 |
+
set NDM_GROUND_NET "VSS" ;#
|
| 31 |
+
set NDM_GROUND_PORT "VSS" ;#
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
set SYN_DIR "/home/abdelazeem/Desktop/Abdelazeem/PGDip/Project/syn"
|
| 35 |
+
set VERILOG_NETLIST_FILES "$SYN_DIR/output/${DESIGN_NAME}.v" ;# Verilog netlist files;
|
| 36 |
+
set SDC_CONSTRAINTS "$SYN_DIR/output/${DESIGN_NAME}.sdc"
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/02_mcmm_setup.tcl
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##############################################################
|
| 2 |
+
# MCMM design settings
|
| 3 |
+
# Created by Ahmed Abdelazeem
|
| 4 |
+
##############################################################
|
| 5 |
+
########################################
|
| 6 |
+
## Variables
|
| 7 |
+
########################################
|
| 8 |
+
## Scenario constraints; expand the section as needed
|
| 9 |
+
set SDC_CONSTRAINTS "$SYN_DIR/output/${DESIGN_NAME}.sdc"
|
| 10 |
+
|
| 11 |
+
########################################
|
| 12 |
+
## Create modes, and corners
|
| 13 |
+
########################################
|
| 14 |
+
remove_modes -all;
|
| 15 |
+
remove_corners -all;
|
| 16 |
+
remove_scenarios -all
|
| 17 |
+
|
| 18 |
+
create_corner slow
|
| 19 |
+
create_corner fast
|
| 20 |
+
|
| 21 |
+
create_mode func
|
| 22 |
+
current_mode func
|
| 23 |
+
##############################################################################################
|
| 24 |
+
# The following is a sample script to read two TLU+ files,
|
| 25 |
+
# which you can expand to accomodate your design.
|
| 26 |
+
##############################################################################################
|
| 27 |
+
|
| 28 |
+
read_parasitic_tech \
|
| 29 |
+
-tlup $TLUPLUS_MAX_FILE \
|
| 30 |
+
-layermap $MAP_FILE \
|
| 31 |
+
-name tlup_max
|
| 32 |
+
|
| 33 |
+
read_parasitic_tech \
|
| 34 |
+
-tlup $TLUPLUS_MIN_FILE \
|
| 35 |
+
-layermap $MAP_FILE \
|
| 36 |
+
-name tlup_min
|
| 37 |
+
set_parasitics_parameters \
|
| 38 |
+
-early_spec tlup_min \
|
| 39 |
+
-late_spec tlup_min \
|
| 40 |
+
-corners {fast}
|
| 41 |
+
|
| 42 |
+
set_parasitics_parameters \
|
| 43 |
+
-early_spec tlup_max \
|
| 44 |
+
-late_spec tlup_max \
|
| 45 |
+
-corners {slow}
|
| 46 |
+
########################################
|
| 47 |
+
## Create scenario
|
| 48 |
+
########################################
|
| 49 |
+
create_scenario -mode func -corner fast -name func_fast
|
| 50 |
+
create_scenario -mode func -corner slow -name func_slow
|
| 51 |
+
|
| 52 |
+
current_scenario func_fast
|
| 53 |
+
source $SDC_CONSTRAINTS
|
| 54 |
+
|
| 55 |
+
current_scenario func_slow
|
| 56 |
+
source $SDC_CONSTRAINTS
|
| 57 |
+
########################################
|
| 58 |
+
## Configure analysis settings for scenarios
|
| 59 |
+
########################################
|
| 60 |
+
remove_duplicate_timing_contexts
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Scripts/03_PnR_setup.tcl
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##########################################################################################
|
| 2 |
+
# Tool: IC Compiler II
|
| 3 |
+
# Script: PnR.tcl (template)
|
| 4 |
+
# Version: P-2020.03-SP4
|
| 5 |
+
# Copyright (C) 2023-2024 Ahmed Abdelazeem, Inc. All rights reserved.
|
| 6 |
+
##########################################################################################
|
| 7 |
+
|
| 8 |
+
##############################################
|
| 9 |
+
########### 1. DESIGN SETUP ##################
|
| 10 |
+
##############################################
|
| 11 |
+
|
| 12 |
+
##################################
|
| 13 |
+
## Setup variables and settings
|
| 14 |
+
##################################
|
| 15 |
+
|
| 16 |
+
source -echo 01_common_setup.tcl
|
| 17 |
+
|
| 18 |
+
printvar search_path
|
| 19 |
+
printvar NDM_REFERENCE_LIB_DIRS
|
| 20 |
+
report_host_options
|
| 21 |
+
print_suppressed_messages
|
| 22 |
+
|
| 23 |
+
##################################
|
| 24 |
+
## Create the design library
|
| 25 |
+
## Load the netlist, SDC, and UPF
|
| 26 |
+
##################################
|
| 27 |
+
create_lib -technology $TECH_FILE -ref_libs $NDM_REFERENCE_LIB_DIRS ${DESIGN_NAME}.dlib
|
| 28 |
+
|
| 29 |
+
read_verilog -top ${DESIGN_NAME} $VERILOG_NETLIST_FILES
|
| 30 |
+
|
| 31 |
+
link_block
|
| 32 |
+
|
| 33 |
+
report_ref_libs
|
| 34 |
+
|
| 35 |
+
get_blocks $DESIGN_NAME
|
| 36 |
+
get_blocks ${DESIGN_NAME}.design
|
| 37 |
+
get_blocks ${DESIGN_NAME}.dlib:$DESIGN_NAME
|
| 38 |
+
get_blocks ${DESIGN_NAME}.dlib:${DESIGN_NAME}.design
|
| 39 |
+
|
| 40 |
+
##################################
|
| 41 |
+
## RC parasitics, placement site
|
| 42 |
+
## and routing layer setup
|
| 43 |
+
##################################
|
| 44 |
+
|
| 45 |
+
read_parasitic_tech -tlup $TLUPLUS_MAX_FILE -layermap $MAP_FILE -name tlup_max
|
| 46 |
+
|
| 47 |
+
read_parasitic_tech -tlup $TLUPLUS_MIN_FILE -layermap $MAP_FILE -name tlup_min
|
| 48 |
+
|
| 49 |
+
report_lib -parasitic_tech [current_lib]
|
| 50 |
+
|
| 51 |
+
get_site_defs
|
| 52 |
+
set_attribute [get_site_defs unit] symmetry Y
|
| 53 |
+
set_attribute [get_site_defs unit] is_default true
|
| 54 |
+
|
| 55 |
+
set_attribute [get_layers {metal1 metal3 metal5 metal7 metal9}] routing_direction horizontal
|
| 56 |
+
set_attribute [get_layers {metal2 metal4 metal6 metal8 metal10}] routing_direction vertical
|
| 57 |
+
get_attribute [get_layers metal?] routing_direction
|
| 58 |
+
|
| 59 |
+
report_ignored_layers
|
| 60 |
+
|
| 61 |
+
####################################
|
| 62 |
+
# Check Design: Pre-Floorplanning
|
| 63 |
+
####################################
|
| 64 |
+
check_design -checks dp_pre_floorplan
|
| 65 |
+
|
| 66 |
+
##################################
|
| 67 |
+
## Save the block
|
| 68 |
+
##################################
|
| 69 |
+
rename_block -to_block ${DESIGN_NAME}/init_design
|
| 70 |
+
save_block
|
| 71 |
+
close_blocks
|
| 72 |
+
##############################################
|
| 73 |
+
########### 2. Floorplan #####################
|
| 74 |
+
##############################################
|
| 75 |
+
|
| 76 |
+
open_block ${DESIGN_NAME}.dlib:${DESIGN_NAME}/init_design
|
| 77 |
+
# OR
|
| 78 |
+
#open_lib ${DESIGN_NAME}.dlib
|
| 79 |
+
#open_block ${DESIGN_NAME}/init_design
|
| 80 |
+
copy_block -from_block pit_top.dlib:pit_top/init_design -to pit_top.dlib:pit_top/floorplan_design
|
| 81 |
+
## Create Starting Floorplan
|
| 82 |
+
############################
|
| 83 |
+
##################################
|
| 84 |
+
## Load UPF, floorplan, scan-DEF
|
| 85 |
+
##################################
|
| 86 |
+
|
| 87 |
+
#load_upf ${DESIGN_NAME}.upf
|
| 88 |
+
#commit_upf
|
| 89 |
+
|
| 90 |
+
set_parasitic_parameters -late_spec tlup_max -early_spec tlup_min
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
source $SDC_CONSTRAINTS
|
| 94 |
+
source 02_mcmm_setup.tcl
|
| 95 |
+
|
| 96 |
+
## Create Starting Floorplan
|
| 97 |
+
############################
|
| 98 |
+
initialize_floorplan -core_utilization 0.25 -flip_first_row true -core_offset {10 10 10 10}
|
| 99 |
+
|
| 100 |
+
## CONSTRAINTS
|
| 101 |
+
##############
|
| 102 |
+
## Here, We define more constraints on your design that are related to floorplan stage.
|
| 103 |
+
#report_ignored_layers
|
| 104 |
+
#remove_ignored_layers -all
|
| 105 |
+
#set_ignored_layers -max_routing_layer metal6
|
| 106 |
+
|
| 107 |
+
## Initial Virtual Flat Placement
|
| 108 |
+
#################################
|
| 109 |
+
## Use the following command with any of its options to meet a specific target
|
| 110 |
+
# create_placement -floorplan -timing_driven -congestion -buffering_aware_timing_driven
|
| 111 |
+
place_pins -ports [get_ports *]
|
| 112 |
+
|
| 113 |
+
create_placement -floorplan
|
| 114 |
+
legalize_placement
|
| 115 |
+
set_block_pin_constraints -self -allowed_layers {M3 M4 M5 M6}
|
| 116 |
+
|
| 117 |
+
##AH## ## To show design-specific blocks
|
| 118 |
+
##AH## gui_set_highlight_options -current_color yellow
|
| 119 |
+
##AH## change_selection [get_cells wishbone_addr_latch_reg_0_
|
| 120 |
+
|
| 121 |
+
##AH## gui_set_highlight_options -current_color blue
|
| 122 |
+
##AH## change_selection [get_cells wishbone_addr_latch_reg_2_
|
| 123 |
+
|
| 124 |
+
##AH## gui_set_highlight_options -current_color green
|
| 125 |
+
##AH## change_selection [get_cells */*]
|
| 126 |
+
|
| 127 |
+
##AH## gui_set_highlight_options -current_color orange
|
| 128 |
+
##AH## change_selection [get_cells egs_mod_value_reg_1_]
|
| 129 |
+
|
| 130 |
+
## ASSESSMENT
|
| 131 |
+
#############
|
| 132 |
+
## Analyze Congestion
|
| 133 |
+
# report_congestion -rerun_global_router
|
| 134 |
+
route_global -congestion_map_only true -effort high
|
| 135 |
+
# View Congestion map : In GUI, > Global Route Congestion Map.
|
| 136 |
+
|
| 137 |
+
## Analyze Timing
|
| 138 |
+
# estimate_timing; # Improves accuracy of timing after updated GR.
|
| 139 |
+
|
| 140 |
+
#report_timing -nosplit; # For Worst Setup violation report
|
| 141 |
+
#report_timing -nosplit -delay_type min; # For Worst Hold violation report
|
| 142 |
+
|
| 143 |
+
#report_constraint -all_violators -nosplit -max_delay; # For all Setup violation report
|
| 144 |
+
#report_constraint -all_violators -nosplit -min_delay; # For all Hold violations report
|
| 145 |
+
|
| 146 |
+
##Based on your assessment, you may need to do any of the following fixes
|
| 147 |
+
|
| 148 |
+
## FIXES
|
| 149 |
+
########
|
| 150 |
+
## You can use one or all of the follwoing based on your need.
|
| 151 |
+
# estimate_timing
|
| 152 |
+
#
|
| 153 |
+
# create_bound -name "temp" -coordinate {55 0 270 270} datamem
|
| 154 |
+
# create_bound -name "temp1" -coordinate {0 0 104 270} reg_file
|
| 155 |
+
#
|
| 156 |
+
# set_congestion_options -max_util 0.4 -coordinate {x1 y1 x2 y2}; # if cell density is causing congestion.
|
| 157 |
+
#
|
| 158 |
+
# create_placement_blockage -name PB -type hard -bbox {x1 y1 x2 y2}
|
| 159 |
+
#
|
| 160 |
+
# create_placement -floorplan -congestion_effort high
|
| 161 |
+
#
|
| 162 |
+
## Then you need to re-run create_placement -floorplan
|
| 163 |
+
# create_placement -floorplan -incremental;
|
| 164 |
+
## Note: use -incremental option if you want to refine the current virtual placement. Don't use it if you want to re-place the design from scratch
|
| 165 |
+
|
| 166 |
+
## If there still congestion, change ignored layers, if it is still there, increase floorplan area.
|
| 167 |
+
|
| 168 |
+
#################################
|
| 169 |
+
## Perform timing sanity check
|
| 170 |
+
#################################
|
| 171 |
+
|
| 172 |
+
report_qor -summary -include setup
|
| 173 |
+
set_app_options -list {time.delay_calculation_style zero_interconnect}
|
| 174 |
+
report_qor -summary -include setup
|
| 175 |
+
|
| 176 |
+
set_app_options -list {time.high_fanout_net_pin_capacitance 0pF
|
| 177 |
+
time.high_fanout_net_threshold 50}
|
| 178 |
+
update_timing -full
|
| 179 |
+
report_qor -summary -include setup
|
| 180 |
+
|
| 181 |
+
view report_timing -max_paths 5
|
| 182 |
+
|
| 183 |
+
####################################
|
| 184 |
+
## PG Pin connections
|
| 185 |
+
#####################################
|
| 186 |
+
create_net -power $NDM_POWER_NET
|
| 187 |
+
create_net -ground $NDM_GROUND_NET
|
| 188 |
+
|
| 189 |
+
connect_pg_net -net $NDM_POWER_NET [get_pins -hierarchical "*/VDD"]
|
| 190 |
+
connect_pg_net -net $NDM_GROUND_NET [get_pins -hierarchical "*/VSS"]
|
| 191 |
+
|
| 192 |
+
check_mv_design
|
| 193 |
+
|
| 194 |
+
### Write floorplan for later re-use in ICC2
|
| 195 |
+
write_floorplan -net_types {power ground} \
|
| 196 |
+
-include_physical_status {fixed locked} \
|
| 197 |
+
-read_def_options {-add_def_only_objects all -no_incremental} \
|
| 198 |
+
-force -output ./output/{DESIGN_NAME}.fp/
|
| 199 |
+
|
| 200 |
+
### Write floorplan for DCG:
|
| 201 |
+
write_floorplan -net_types {power ground} \
|
| 202 |
+
-include_physical_status {fixed locked} \
|
| 203 |
+
-format icc \
|
| 204 |
+
-force -output ./output/${DESIGN_NAME}.fp.dc
|
| 205 |
+
|
| 206 |
+
##################################
|
| 207 |
+
## Save the block
|
| 208 |
+
##################################
|
| 209 |
+
|
| 210 |
+
save_block -as pit_top.dlib:pit_top/floorplan.design
|
| 211 |
+
save_block
|
| 212 |
+
# or:
|
| 213 |
+
# save_lib
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
##################################################
|
| 217 |
+
########### 3. POWER NETWORK #####################
|
| 218 |
+
##################################################
|
| 219 |
+
copy_block -from_block pit_top.dlib:pit_top/floorplan_design.design -to_block power_plan_1
|
| 220 |
+
current_block power_plan_1.design
|
| 221 |
+
## Defining Logical POWER/GROUND Connections
|
| 222 |
+
############################################
|
| 223 |
+
set_app_option -name plan.pgroute.auto_connect_pg_net -value true
|
| 224 |
+
set_app_option -name plan.pgroute.connect_user_route_shapes -value true
|
| 225 |
+
set_app_option -name plan.pgroute.disable_floating_removal -value true
|
| 226 |
+
set_app_option -name plan.pgroute.disable_trimming -value true
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
create_net -power $NDM_POWER_NET
|
| 230 |
+
create_net -ground $NDM_GROUND_NET
|
| 231 |
+
|
| 232 |
+
connect_pg_net -net $NDM_POWER_NET [get_pins -hierarchical "*/VDD"]
|
| 233 |
+
connect_pg_net -net $NDM_GROUND_NET [get_pins -hierarchical "*/VSS"]
|
| 234 |
+
check_mv_design
|
| 235 |
+
|
| 236 |
+
remove_pg_via_master_rules -all
|
| 237 |
+
remove_pg_patterns -all
|
| 238 |
+
remove_pg_strategies -all
|
| 239 |
+
remove_pg_strategy_via_rules -all
|
| 240 |
+
|
| 241 |
+
################################################################################
|
| 242 |
+
#-------------------------------------------------------------------------------
|
| 243 |
+
# P G R I N G C R E A T I O N
|
| 244 |
+
#-------------------------------------------------------------------------------
|
| 245 |
+
################################################################################
|
| 246 |
+
create_pg_ring_pattern ring_pattern -horizontal_layer metal9 \
|
| 247 |
+
-horizontal_width {5} -horizontal_spacing {0.8} \
|
| 248 |
+
-vertical_layer metal10 -vertical_width {5} \
|
| 249 |
+
-vertical_spacing {0.8} -corner_bridge false
|
| 250 |
+
set_pg_strategy core_ring -core -pattern \
|
| 251 |
+
{{pattern: ring_pattern}{nets: {VDD VSS}}{offset: {0.8 0.8}}} \
|
| 252 |
+
-extension {{stop: innermost_ring}}
|
| 253 |
+
|
| 254 |
+
compile_pg -strategies core_ring
|
| 255 |
+
################################################################################
|
| 256 |
+
#-------------------------------------------------------------------------------
|
| 257 |
+
# P G M E S H C R E A T I O N
|
| 258 |
+
#-------------------------------------------------------------------------------
|
| 259 |
+
################################################################################
|
| 260 |
+
|
| 261 |
+
create_pg_mesh_pattern pg_mesh1 \
|
| 262 |
+
-parameters {w1 p1 w2 p2 f t} \
|
| 263 |
+
-layers {{{vertical_layer: metal10} {width: @w1} {spacing: interleaving} \
|
| 264 |
+
{pitch: @p1} {offset: @f} {trim: @t}} \
|
| 265 |
+
{{horizontal_layer: metal9 } {width: @w2} {spacing: interleaving} \
|
| 266 |
+
{pitch: @p2} {offset: @f} {trim: @t}}}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
set_pg_strategy s_mesh1 \
|
| 270 |
+
-pattern {{pattern: pg_mesh1} {nets: {VDD VSS VSS VDD}} \
|
| 271 |
+
{offset_start: 5 5} {parameters: 5 80 5 120 5 false}} \
|
| 272 |
+
-core -extension {{stop: outermost_ring}}
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
compile_pg -strategies s_mesh1
|
| 276 |
+
################################################################################
|
| 277 |
+
#-------------------------------------------------------------------------------
|
| 278 |
+
# S T A N D A R D C E L L R A I L I N S E R T I O N
|
| 279 |
+
#-------------------------------------------------------------------------------
|
| 280 |
+
################################################################################
|
| 281 |
+
create_pg_std_cell_conn_pattern \
|
| 282 |
+
std_cell_rail \
|
| 283 |
+
-layers {metal1} \
|
| 284 |
+
-rail_width 0.06
|
| 285 |
+
|
| 286 |
+
set_pg_strategy rail_strat -core \
|
| 287 |
+
-pattern {{name: std_cell_rail} {nets: VDD VSS} }
|
| 288 |
+
|
| 289 |
+
compile_pg -strategies rail_strat
|
| 290 |
+
################################################################################
|
| 291 |
+
#-------------------------------------------------------------------------------
|
| 292 |
+
# IR Drop Map
|
| 293 |
+
#-------------------------------------------------------------------------------
|
| 294 |
+
################################################################################
|
| 295 |
+
set die_llx [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 0]
|
| 296 |
+
set die_lly [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 1]
|
| 297 |
+
set die_urx [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 0]
|
| 298 |
+
set die_ury [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 1]
|
| 299 |
+
|
| 300 |
+
for {set i "[expr $die_llx + 20]"} {$i < "[expr $die_urx - 40]"} {set i [expr $i + 80]} {
|
| 301 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_lly]
|
| 302 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_lly]
|
| 303 |
+
|
| 304 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_ury]
|
| 305 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_ury]
|
| 306 |
+
}
|
| 307 |
+
for {set i "[expr $die_lly + 20]"} {$i < "[expr $die_ury - 40]"} {set i [expr $i + 80]} {
|
| 308 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_llx $i]
|
| 309 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_llx [expr $i + 40]]
|
| 310 |
+
|
| 311 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_urx $i]
|
| 312 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_urx [expr $i + 40] ]
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
analyze_power_plan -power_budget 250 -voltage 1.2 -nets {VDD VSS} -use_terminals_as_pads
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
save_block
|
| 319 |
+
##############################################
|
| 320 |
+
########### 4. Placement #####################
|
| 321 |
+
##############################################
|
| 322 |
+
puts "start_place"
|
| 323 |
+
copy_block -from_block power_plan_1.design -to placement.design
|
| 324 |
+
current_block placement.design
|
| 325 |
+
|
| 326 |
+
set_app_options -name time.disable_recovery_removal_checks -value false
|
| 327 |
+
set_app_options -name time.disable_case_analysis -value false
|
| 328 |
+
set_app_options -name place.coarse.continue_on_missing_scandef -value true
|
| 329 |
+
set_app_options -name opt.common.user_instance_name_prefix -value place
|
| 330 |
+
|
| 331 |
+
set_app_options -list {time.delay_calculation_style auto}
|
| 332 |
+
set_voltage 0.95
|
| 333 |
+
place_opt
|
| 334 |
+
legalize_placement
|
| 335 |
+
check_legality -verbos
|
| 336 |
+
|
| 337 |
+
report_qor > ./report/placement/qor.rpt
|
| 338 |
+
report_utilization > ./report/placement/utilization.rpt
|
| 339 |
+
|
| 340 |
+
save_block
|
| 341 |
+
|
| 342 |
+
##############################################
|
| 343 |
+
########### 5. CTS #####################
|
| 344 |
+
##############################################
|
| 345 |
+
copy_block -from_block placement.design -to cts.design
|
| 346 |
+
current_block cts.design
|
| 347 |
+
|
| 348 |
+
puts "start_cts"
|
| 349 |
+
|
| 350 |
+
## CHECKS
|
| 351 |
+
#########
|
| 352 |
+
report_qor -summary
|
| 353 |
+
report_clocks
|
| 354 |
+
report_clocks -skew
|
| 355 |
+
report_clocks -groups
|
| 356 |
+
|
| 357 |
+
####################################
|
| 358 |
+
## Clock Tree Targets
|
| 359 |
+
|
| 360 |
+
set_clock_tree_options -target_skew 0.5 -clock [get_clocks *]
|
| 361 |
+
set_clock_tree_options -target_latency 0.1 -clock [get_clocks *]
|
| 362 |
+
|
| 363 |
+
report_clock_tree_options
|
| 364 |
+
|
| 365 |
+
####################################
|
| 366 |
+
## CTS Cell Selection
|
| 367 |
+
|
| 368 |
+
derive_clock_cell_references -output cts_leq_set.tcl > /dev/null
|
| 369 |
+
|
| 370 |
+
set CTS_CELLS [get_lib_cells */CLKBUF*]
|
| 371 |
+
set_dont_touch $CTS_CELLS false
|
| 372 |
+
set_lib_cell_purpose -exclude cts [get_lib_cells]
|
| 373 |
+
set_lib_cell_purpose -include cts $CTS_CELLS
|
| 374 |
+
|
| 375 |
+
report_lib_cells -objects [get_lib_cells] -columns {name:20 valid_purposes dont_touch}
|
| 376 |
+
|
| 377 |
+
## CTS NDRs
|
| 378 |
+
####################################
|
| 379 |
+
set CTS_NDR_MIN_ROUTING_LAYER "metal4"
|
| 380 |
+
set CTS_NDR_MAX_ROUTING_LAYER "metal5"
|
| 381 |
+
set CTS_LEAF_NDR_MIN_ROUTING_LAYER "metal1"
|
| 382 |
+
set CTS_LEAF_NDR_MAX_ROUTING_LAYER "metal5"
|
| 383 |
+
set CTS_NDR_RULE_NAME "cts_w2_s2_vlg"
|
| 384 |
+
set CTS_LEAF_NDR_RULE_NAME "cts_w1_s2"
|
| 385 |
+
|
| 386 |
+
create_routing_rule $CTS_NDR_RULE_NAME\
|
| 387 |
+
-default_reference_rule \
|
| 388 |
+
-taper_distance 0.4 \
|
| 389 |
+
-driver_taper_distance 0.4 \
|
| 390 |
+
-widths {metal3 0.14 metal4 0.28 metal5 0.28} \
|
| 391 |
+
-spacings {metal3 0.14 metal4 0.28 metal5 0.28}
|
| 392 |
+
|
| 393 |
+
set_clock_routing_rules -rules $CTS_NDR_RULE_NAME \
|
| 394 |
+
-min_routing_layer $CTS_NDR_MIN_ROUTING_LAYER \
|
| 395 |
+
-max_routing_layer $CTS_NDR_MAX_ROUTING_LAYER
|
| 396 |
+
|
| 397 |
+
report_routing_rules -verbose
|
| 398 |
+
|
| 399 |
+
report_clock_routing_rules
|
| 400 |
+
|
| 401 |
+
## Timing and DRC Setup
|
| 402 |
+
####################################
|
| 403 |
+
|
| 404 |
+
# Ensure that driving cells are specified on all clock ports
|
| 405 |
+
report_ports -verbose [get_ports *clk*]
|
| 406 |
+
set_driving_cell -scenarios [all_scenarios] -lib_cell CLKBUF_X3 [get_ports *clk*]
|
| 407 |
+
|
| 408 |
+
report_ports -verbose [get_ports *clk*]
|
| 409 |
+
|
| 410 |
+
report_clocks -skew
|
| 411 |
+
# Change the uncertainty for all clocks in all scenarios
|
| 412 |
+
foreach_in_collection scen [all_scenarios] {
|
| 413 |
+
current_scenario $scen
|
| 414 |
+
set_clock_uncertainty 0.1 -setup [all_clocks]
|
| 415 |
+
set_clock_uncertainty 0.05 -hold [all_clocks]
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
set_app_options -name time.remove_clock_reconvergence_pessimism -value true
|
| 419 |
+
|
| 420 |
+
report_clock_settings
|
| 421 |
+
|
| 422 |
+
set_app_options -name clock_opt.flow.enable_ccd -value false
|
| 423 |
+
clock_opt
|
| 424 |
+
|
| 425 |
+
report_qor -summary
|
| 426 |
+
|
| 427 |
+
report_timing
|
| 428 |
+
|
| 429 |
+
puts "finish_cts"
|
| 430 |
+
save_block
|
| 431 |
+
|
| 432 |
+
##############################################
|
| 433 |
+
########### 6. Routing #####################
|
| 434 |
+
##############################################
|
| 435 |
+
copy_block -from_block cts.design -to route.design
|
| 436 |
+
current_block route.design
|
| 437 |
+
puts "start_route"
|
| 438 |
+
|
| 439 |
+
# Design should have been loaded using load.tcl
|
| 440 |
+
|
| 441 |
+
report_qor -summary
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
# check for any issues that might cause problems during routing
|
| 445 |
+
# the app option allows for more detailed reporting
|
| 446 |
+
set_app_options -name route.common.verbose_level -value 1
|
| 447 |
+
check_design -checks pre_route_stage
|
| 448 |
+
set_app_options -name route.common.verbose_level -value 0
|
| 449 |
+
|
| 450 |
+
report_ignored_layers
|
| 451 |
+
update_timing
|
| 452 |
+
|
| 453 |
+
connect_pg_net -net $NDM_POWER_NET [get_pins -hierarchical "*/VDD"]
|
| 454 |
+
connect_pg_net -net $NDM_GROUND_NET [get_pins -hierarchical "*/VSS"]
|
| 455 |
+
connect_pg_net -net $NDM_POWER_NET [get_ports -physical_context "*/VDD"]
|
| 456 |
+
connect_pg_net -net $NDM_GROUND_NET [get_ports -physical_context "*/VSS"]
|
| 457 |
+
|
| 458 |
+
# Set application options for the specific routers
|
| 459 |
+
set_app_options -name route.global.timing_driven -value true
|
| 460 |
+
set_app_options -name route.global.crosstalk_driven -value false
|
| 461 |
+
set_app_options -name route.track.timing_driven -value true
|
| 462 |
+
set_app_options -name route.track.crosstalk_driven -value true
|
| 463 |
+
set_app_options -name route.detail.timing_driven -value true
|
| 464 |
+
set_app_options -name route.detail.force_max_number_iterations -value false
|
| 465 |
+
|
| 466 |
+
## Routing
|
| 467 |
+
####################################
|
| 468 |
+
route_auto
|
| 469 |
+
|
| 470 |
+
check_routes
|
| 471 |
+
|
| 472 |
+
route_opt
|
| 473 |
+
report_qor -summary
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
puts "finish_route"
|
| 477 |
+
save_block
|
| 478 |
+
##############################################
|
| 479 |
+
########### 7. Finishing #####################
|
| 480 |
+
##############################################
|
| 481 |
+
copy_block -from_block route.design -to finish.design
|
| 482 |
+
current_block finish.design
|
| 483 |
+
puts "start_finish"
|
| 484 |
+
|
| 485 |
+
##create_stdcell_fillers -lib_cells {*decap_?}
|
| 486 |
+
##connect_pg_net -automatic
|
| 487 |
+
##remove_stdcell_fillers_with_violation
|
| 488 |
+
create_stdcell_fillers -lib_cells {FILLCELL*}
|
| 489 |
+
connect_pg_net -automatic
|
| 490 |
+
remove_stdcell_fillers_with_violation
|
| 491 |
+
check_legality
|
| 492 |
+
check_lvs
|
| 493 |
+
puts "finish_finish"
|
| 494 |
+
save_block
|
| 495 |
+
|
| 496 |
+
##############################################
|
| 497 |
+
########### 8. Checks and Outputs ############
|
| 498 |
+
##############################################
|
| 499 |
+
|
| 500 |
+
write_verilog -include {pg_netlist unconnected_ports} ${DESIGN_NAME }.pg.v
|
| 501 |
+
|
| 502 |
+
write_verilog -exclude {physical_only_cells} -top_module_first ${DESIGN_NAME}.v
|
| 503 |
+
|
| 504 |
+
write_verilog -include "scalar_wire_declarations diode_cells spare_cells" ${DESIGN_NAME}.lvs.v
|
| 505 |
+
|
| 506 |
+
write_verilog -include {pg_netlist} ${DESIGN_NAME}_for_pt_v.v
|
| 507 |
+
|
| 508 |
+
######## SDC_OUT
|
| 509 |
+
write_sdc -output ${DESIGN_NAME}.out.sdc
|
| 510 |
+
######## SDC_OUT for primetime
|
| 511 |
+
write_sdc -output ${DESIGN_NAME}.pt.sdc.tcl -exclude {ideal_network pvt timing_derate}
|
| 512 |
+
write_sdc -output ${DESIGN_NAME}.pt_clock_latency.sdc.tcl -include {clock_latency}
|
| 513 |
+
####### SPEF_OUT
|
| 514 |
+
report_timing -crosstalk_delta
|
| 515 |
+
write_parasitics -format SPEF -output ${DESIGN_NAME}.out.spef
|
| 516 |
+
######DEF_OUT
|
| 517 |
+
write_def ${DESIGN_NAME}.out.def
|
| 518 |
+
##########GDS_OUT
|
| 519 |
+
write_gds \
|
| 520 |
+
-view design \
|
| 521 |
+
-lib_cell_view frame \
|
| 522 |
+
-output_pin all \
|
| 523 |
+
-fill include \
|
| 524 |
+
-exclude_empty_block \
|
| 525 |
+
-long_names \
|
| 526 |
+
-layer_map "$GDS_MAP_FILE" \
|
| 527 |
+
-keep_data_type \
|
| 528 |
+
-merge_files "$STD_CELL_GDS"\
|
| 529 |
+
./output/${DESIGN_NAME}.gds
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
save_block
|
| 534 |
+
save_lib
|
| 535 |
+
exit
|
| 536 |
+
close_block
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler II/Vpad.tcl
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set die_llx [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 0]
|
| 2 |
+
set die_lly [lindex [lindex [ get_attribute [get_core_area] bbox] 0] 1]
|
| 3 |
+
set die_urx [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 0]
|
| 4 |
+
set die_ury [lindex [lindex [ get_attribute [get_core_area] bbox] 1] 1]
|
| 5 |
+
|
| 6 |
+
for {set i "[expr $die_llx + 20]"} {$i < "[expr $die_urx - 40]"} {set i [expr $i + 80]} {
|
| 7 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_lly]
|
| 8 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_lly]
|
| 9 |
+
|
| 10 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $i $die_ury]
|
| 11 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} [expr $i + 40] $die_ury]
|
| 12 |
+
}
|
| 13 |
+
for {set i "[expr $die_lly + 20]"} {$i < "[expr $die_ury - 40]"} {set i [expr $i + 80]} {
|
| 14 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_llx $i]
|
| 15 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_llx [expr $i + 40]]
|
| 16 |
+
|
| 17 |
+
set_virtual_pad -net VSS -coordinate [format {%.1f %.1f} $die_urx $i]
|
| 18 |
+
set_virtual_pad -net VDD -coordinate [format {%.1f %.1f} $die_urx [expr $i + 40] ]
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
analyze_power_plan -power_budget 250 -voltage 1.2 -nets {VDD VSS} -use_terminals_as_pads
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler/01_design_planning.tcl
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 01_design_planning.tcl
|
| 2 |
+
set CHIP_LIB "CHIP_LIB"
|
| 3 |
+
set TOP "CHIP"
|
| 4 |
+
set CREATE_CELL_FILE "../script/create_phy_cell.tcl"
|
| 5 |
+
set TDF_FILE "../design_data/io.tdf"
|
| 6 |
+
set POWER "VDD"
|
| 7 |
+
set GROUND "VSS"
|
| 8 |
+
#======================================================================
|
| 9 |
+
# Open Design
|
| 10 |
+
#======================================================================
|
| 11 |
+
#open_mw_lib $CHIP_LIB
|
| 12 |
+
#open_mw_cel $TOP
|
| 13 |
+
#======================================================================
|
| 14 |
+
# Before reading io_constraints(*.TDF), you must create cell
|
| 15 |
+
# Create I/O Cells======================================================================
|
| 16 |
+
source $CREATE_CELL_FILE
|
| 17 |
+
#======================================================================
|
| 18 |
+
# Read a IO Constraint file
|
| 19 |
+
#======================================================================
|
| 20 |
+
set IO_SPACE 8.5 ; # 5~10
|
| 21 |
+
read_pin_pad_physical_constraints $TDF_FILE
|
| 22 |
+
#======================================================================
|
| 23 |
+
# Initialize the Floorplan
|
| 24 |
+
#======================================================================
|
| 25 |
+
set CORE_PAD_SPACE 90 ;
|
| 26 |
+
create_floorplan -core_aspect_ratio 1 -core_utilization 0.6 -flip_first_row -left_io2core $CORE_PAD_SPACE -right_io2core $CORE_PAD_SPACE -bottom_io2core $CORE_PAD_SPACE -top_io2core $CORE_PAD_SPACE
|
| 27 |
+
#=====================================================================
|
| 28 |
+
# Insert PAD Filler
|
| 29 |
+
#=====================================================================
|
| 30 |
+
insert_pad_filler -cell {PFILLER20 PFILLER10 PFILLER5 PFILLER1 PFILLER05 PFILLER0005} -overlap_cell {PFILLER0005} ; # overlap_cell means smallest filler cell
|
| 31 |
+
#=====================================================================
|
| 32 |
+
# Save Design
|
| 33 |
+
#=====================================================================
|
| 34 |
+
save_mw_cel $TOP
|
| 35 |
+
save_mw_cel -as "init_floor_plan"
|
| 36 |
+
#=====================================================================
|
| 37 |
+
# Set Macro Placement Constraints
|
| 38 |
+
# - Memory margin constraints
|
| 39 |
+
#======================================================================
|
| 40 |
+
#set_keepout_margin -all_macros -type hard -outer {20 20 20 20}
|
| 41 |
+
#======================================================================
|
| 42 |
+
# Set Routing Blockage
|
| 43 |
+
#=====================================================================
|
| 44 |
+
#create_route_guide -no_signal_layer {METAL5 METAL6} -coordinate {{20 20} {75 95}}
|
| 45 |
+
#=====================================================================
|
| 46 |
+
# Place Standard and Macro Cells
|
| 47 |
+
# 1st Compile
|
| 48 |
+
#=====================================================================
|
| 49 |
+
set_host_options -max_cores 4
|
| 50 |
+
create_fp_placement -timing_driven -effort high -num_cpus 4
|
| 51 |
+
#set_dont_touch_placement [all_macro_cells]
|
| 52 |
+
#=====================================================================
|
| 53 |
+
# Connect P/G Nets
|
| 54 |
+
#=====================================================================
|
| 55 |
+
derive_pg_connection -power_net $POWER -ground_net $GROUND -power_pin $POWER -ground_pin $GROUND
|
| 56 |
+
#=====================================================================
|
| 57 |
+
# Set Power Network Constraints
|
| 58 |
+
# set_fp_rail_constraints # set rail synthesis constraints
|
| 59 |
+
# -add_layer (add layer constraints) (strap)
|
| 60 |
+
# -set_ring (set ring constraints)
|
| 61 |
+
# -set_global (set global constraints)
|
| 62 |
+
#======================================================================
|
| 63 |
+
set H_LAYER M6
|
| 64 |
+
set V_LAYER M5
|
| 65 |
+
set STRAP_WIDTH 4
|
| 66 |
+
|
| 67 |
+
set_fp_rail_constraints -add_layer -layer $H_LAYER \
|
| 68 |
+
-direction horizontal \
|
| 69 |
+
-max_strap 15 -min_strap 10 \
|
| 70 |
+
-max_width $STRAP_WIDTH -min_width $STRAP_WIDTH \
|
| 71 |
+
-spacing minimum
|
| 72 |
+
|
| 73 |
+
set_fp_rail_constraints -add_layer -layer $V_LAYER \
|
| 74 |
+
-direction vertical \
|
| 75 |
+
-max_strap 15 -min_strap 10 \
|
| 76 |
+
-max_width $STRAP_WIDTH -min_width $STRAP_WIDTH \
|
| 77 |
+
-spacing minimum
|
| 78 |
+
|
| 79 |
+
set_fp_rail_constraints -set_ring -nets \
|
| 80 |
+
[format "%s %s %s %s %s %s %s %s" \
|
| 81 |
+
$POWER $GROUND $POWER $GROUND $POWER $GROUND $POWER $GROUND] \
|
| 82 |
+
-horizontal_ring_layer $H_LAYER \
|
| 83 |
+
-vertical_ring_layer $V_LAYER \
|
| 84 |
+
-ring_width 4 \
|
| 85 |
+
-ring_spacing 4 \
|
| 86 |
+
-ring_offset 4 \
|
| 87 |
+
-extend_strap core_ring
|
| 88 |
+
|
| 89 |
+
set_fp_rail_constraints -set_global \
|
| 90 |
+
-no_routing_over_hard_macros \
|
| 91 |
+
-no_same_width_sizing \
|
| 92 |
+
-keep_ring_outside_core
|
| 93 |
+
|
| 94 |
+
# For memory block
|
| 95 |
+
#set_fp_block_ring_constraints -add -horizontal_layer H_LAYER \
|
| 96 |
+
# -horizontal_width 8 \
|
| 97 |
+
# -horizontal_offset 1 \
|
| 98 |
+
# -vertical_layer V_LAYER \
|
| 99 |
+
# -vertical_width 8 \
|
| 100 |
+
# -vertical_offset 1 \
|
| 101 |
+
# -block_type master \
|
| 102 |
+
# -block {rom_128x12_t90} \
|
| 103 |
+
# -net {VDD VSS}
|
| 104 |
+
|
| 105 |
+
#======================================================================
|
| 106 |
+
# Running Power Network Synthesis
|
| 107 |
+
# -voltage_supply : 1V for T90 ; 0.9V for T40
|
| 108 |
+
# -power_budget : unit:mW
|
| 109 |
+
#======================================================================
|
| 110 |
+
synthesize_fp_rail -nets [list $POWER $GROUND] \
|
| 111 |
+
-voltage_supply 0.9 \
|
| 112 |
+
-synthesize_power_plan \
|
| 113 |
+
-power_budget 30
|
| 114 |
+
|
| 115 |
+
#======================================
|
| 116 |
+
# Note :
|
| 117 |
+
# check IR drop map after this command
|
| 118 |
+
#======================================================================
|
| 119 |
+
# Commit Power Plan
|
| 120 |
+
#======================================================================
|
| 121 |
+
commit_fp_rail
|
| 122 |
+
#======================================================================
|
| 123 |
+
# Save Design
|
| 124 |
+
#======================================================================
|
| 125 |
+
save_mw_cel -design [format "%s%s" $TOP ".CEL;1"]
|
| 126 |
+
save_mw_cel -design [format "%s%s" $TOP ".CEL;1"] -as "design_planning"
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler/02_preroute.tcl
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 02_preroute.tcl
|
| 2 |
+
set CHIP_LIB "CHIP_LIB"
|
| 3 |
+
set TOP "CHIP"
|
| 4 |
+
set SDC "../design_data/CHIP.sdc"
|
| 5 |
+
set RPT_PATH "../rpt/"
|
| 6 |
+
set PWR_NET_LYR [list M6 M5]
|
| 7 |
+
set POWER "VDD"
|
| 8 |
+
set GROUND "VSS"
|
| 9 |
+
#======================================================================
|
| 10 |
+
# Connect I/O PAD to P/G Ring
|
| 11 |
+
#======================================================================
|
| 12 |
+
preroute_instances -ignore_macros \
|
| 13 |
+
-ignore_cover_cells \
|
| 14 |
+
-primary_routing_layer pin \
|
| 15 |
+
-extend_for_multiple_connections \
|
| 16 |
+
-extension_gap 16
|
| 17 |
+
#======================================================================
|
| 18 |
+
# Connect Block Ring to P/G Ring
|
| 19 |
+
#======================================================================
|
| 20 |
+
preroute_instances -ignore_pads \
|
| 21 |
+
-ignore_cover_cells \
|
| 22 |
+
-primary_routing_layer pin
|
| 23 |
+
|
| 24 |
+
#preroute_instances -ignore_pads -ignore_cover_cells \
|
| 25 |
+
# -connect_instances specified \
|
| 26 |
+
# -macros $MEM -skip_bottom_side \
|
| 27 |
+
# -extension_gap 4
|
| 28 |
+
|
| 29 |
+
#==========================================
|
| 30 |
+
# Note :
|
| 31 |
+
# if you meet Double Via problem ( double via < 90% ) # File -> Task -> All Task
|
| 32 |
+
# cut_row -within {{1272.140 816.060} {1400.480 842.505}}
|
| 33 |
+
# cut_row -within {{1272.375 776.450} {1400.365 805.365}}
|
| 34 |
+
# cut_row -within {{183.110 797.725} {310.045 823.935}}
|
| 35 |
+
# cut_row -within {{181.700 756.355} {310.160 785.970}}
|
| 36 |
+
# create_power_straps -direction vertical -start_at 303.00 -nets {VDD VSS} -layer M8 -width 4
|
| 37 |
+
# create_power_straps -direction vertical -start_at 1275.00 -nets {VDD VSS} -layer M8 -width 4
|
| 38 |
+
#======================================================================
|
| 39 |
+
# Preroute Std Cell Rail
|
| 40 |
+
#======================================================================
|
| 41 |
+
#set_route_zrt_common_options -freeze_layer_by_layer_name {{AP true}} ; # don't use layer AP (metal 10) to avoid DRC violations
|
| 42 |
+
preroute_standard_cells -extend_for_multiple_connections \
|
| 43 |
+
-extension_gap 16 -connect horizontal \
|
| 44 |
+
-remove_floating_pieces \
|
| 45 |
+
-do_not_route_over_macros \
|
| 46 |
+
-fill_empty_rows \
|
| 47 |
+
-port_filter_mode off \
|
| 48 |
+
-cell_master_filter_mode off \
|
| 49 |
+
-cell_instance_filter_mode off \
|
| 50 |
+
-voltage_area_filter_mode off \
|
| 51 |
+
-route_type {P/G Std. Cell Pin Conn}
|
| 52 |
+
#======================================================================
|
| 53 |
+
# Create placement blockage
|
| 54 |
+
#======================================================================
|
| 55 |
+
#create_placement_blockage -coordinate {0.0 1.1} -name haha0 -type hadr -no_snap
|
| 56 |
+
#======================================================================
|
| 57 |
+
# Set PNET and Re-Compile
|
| 58 |
+
# -complete : no std cell on power net
|
| 59 |
+
# -partial : partial std cells on power net
|
| 60 |
+
#======================================================================
|
| 61 |
+
set_pnet_options -complete $PWR_NET_LYR
|
| 62 |
+
#set_pnet_options -partial $PWR_NET_LYR
|
| 63 |
+
create_fp_placement -timing_driven -congestion_driven -incremental all
|
| 64 |
+
derive_pg_connection -power_net $POWER -ground_net $GROUND -power_pin $POWER -ground_pin $GROUND
|
| 65 |
+
add_tap_cell_array -master_cell_name {FILLTIE4_A9TR} -distance 20 -no_tap_cell_under_layers {M1 M2} ; # insert well tap for TN40G
|
| 66 |
+
#=====================================================================
|
| 67 |
+
# Check clock constraints before CTS
|
| 68 |
+
#=====================================================================
|
| 69 |
+
read_sdc -echo -version Latest $SDC
|
| 70 |
+
report_clock > [format "%s%s%s" $RPT_PATH $TOP "_plan_clk.rpt"]
|
| 71 |
+
report_clock -skew > [format "%s%s%s" $RPT_PATH $TOP "_plan_clk_skew.rpt"]
|
| 72 |
+
#=====================================================================
|
| 73 |
+
# Check timing: if(slack is large) modify design planning
|
| 74 |
+
# else keep going
|
| 75 |
+
#=====================================================================
|
| 76 |
+
set_zero_interconnect_delay_mode true
|
| 77 |
+
report_timing > [format "%s%s%s" $RPT_PATH $TOP "_plan_timing.rpt" ]
|
| 78 |
+
#set_ideal_network [get_ports se]
|
| 79 |
+
report_constraint -all > [format "%s%s%s" $RPT_PATH $TOP "_plan_clk_con.rpt" ]
|
| 80 |
+
set_zero_interconnect_delay_mode false
|
| 81 |
+
#=====================================================================
|
| 82 |
+
# Save Design
|
| 83 |
+
#=====================================================================
|
| 84 |
+
save_mw_cel -design [format "%s%s" $TOP ".CEL;1"]
|
| 85 |
+
save_mw_cel -design [format "%s%s" $TOP ".CEL;1"] -as "preroute"
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler/create_phy_cell.tcl
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# create_phy_cell.tcl
|
| 2 |
+
set CORE_POWER_LIST [list core_vdd1 core_vdd2 core_vdd3 core_vdd4]
|
| 3 |
+
set CORE_GROUND_LIST [list core_vss1 core_vss2 core_vss3 core_vss4]
|
| 4 |
+
set PAD_POWER_LIST [list io_vdd01 io_vdd02 io_vdd03 io_vdd04 io_vdd05 \
|
| 5 |
+
io_vdd06 io_vdd07 io_vdd08 io_vdd09 io_vdd10 \
|
| 6 |
+
io_vdd11 io_vdd12 io_vdd13 io_vdd14 io_vdd15 \
|
| 7 |
+
io_vdd16 io_vdd17 io_vdd18 io_vdd19 ]
|
| 8 |
+
set PAD_GROUND_LIST [list io_vss01 io_vss02 io_vss03 io_vss04 io_vss05 \
|
| 9 |
+
io_vss06 io_vss07 io_vss08 io_vss09 io_vss10 \
|
| 10 |
+
io_vss11 io_vss12 io_vss13 io_vss14 io_vss15 \
|
| 11 |
+
io_vss16 io_vss17 io_vss18 io_vss19 io_vss20 ]
|
| 12 |
+
set CORNER_LIST [list cornerUL cornerUR cornerLR cornerLL]
|
| 13 |
+
set POC_LIST [list io_vdd20]
|
| 14 |
+
|
| 15 |
+
create_cell $CORE_POWER_LIST PVDD1DGZ
|
| 16 |
+
create_cell $CORE_GROUND_LIST PVSS1DGZ
|
| 17 |
+
create_cell $PAD_POWER_LIST PVDD2DGZ
|
| 18 |
+
create_cell $PAD_GROUND_LIST PVSS2DGZ
|
| 19 |
+
create_cell $CORNER_LIST PCORNER
|
| 20 |
+
create_cell $POC_LIST PVDD2POC
|
abdelazeem201_ASIC-Design-Roadmap/IC Compiler/io.tdf
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# io.tdf
|
| 2 |
+
set_pad_physical_constraints -side 1 -pad_name cornerUL
|
| 3 |
+
set_pad_physical_constraints -side 2 -pad_name cornerUR
|
| 4 |
+
set_pad_physical_constraints -side 3 -pad_name cornerLR
|
| 5 |
+
set_pad_physical_constraints -side 4 -pad_name cornerLL
|
| 6 |
+
|
| 7 |
+
# io_vdd20 is Power-on Control Power Pad for I/O Power Supply ( PVDD2POC )
|
| 8 |
+
# set IO_SPACE 8.5 ; # suggest 5~10
|
| 9 |
+
|
| 10 |
+
set_pad_physical_constraints -side 1 -pad_name io_vdd20 -order 1 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 11 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_12 -order 2 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 12 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_11 -order 3 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 13 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_10 -order 4 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 14 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_9 -order 5 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 15 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_8 -order 6 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 16 |
+
set_pad_physical_constraints -side 1 -pad_name io_vss20 -order 7 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 17 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_7 -order 8 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 18 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_6 -order 9 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 19 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_5 -order 10 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 20 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_4 -order 11 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 21 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_2 -order 12 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 22 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_3 -order 13 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 23 |
+
set_pad_physical_constraints -side 1 -pad_name io_vdd19 -order 14 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 24 |
+
set_pad_physical_constraints -side 1 -pad_name core_vdd1 -order 15 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 25 |
+
set_pad_physical_constraints -side 1 -pad_name core_vss1 -order 16 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 26 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_1 -order 17 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 27 |
+
set_pad_physical_constraints -side 1 -pad_name io_vss19 -order 18 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 28 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Im_0 -order 19 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 29 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_12 -order 20 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 30 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_11 -order 21 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 31 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_10 -order 22 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 32 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_9 -order 23 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 33 |
+
set_pad_physical_constraints -side 1 -pad_name io_vdd18 -order 24 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 34 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_8 -order 25 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 35 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_7 -order 26 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 36 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_6 -order 27 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 37 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_5 -order 28 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 38 |
+
set_pad_physical_constraints -side 1 -pad_name ipad_F_opt_Re_4 -order 29 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 39 |
+
set_pad_physical_constraints -side 1 -pad_name io_vss18 -order 30 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 40 |
+
#set_pad_physical_constraints -side 1 -pad_name iopad_98 -order 31 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 41 |
+
#set_pad_physical_constraints -side 1 -pad_name iopad_97 -order 32 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 42 |
+
|
| 43 |
+
set_pad_physical_constraints -side 2 -pad_name io_vdd17 -order 1 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 44 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_F_opt_Re_3 -order 2 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 45 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_F_opt_Re_2 -order 3 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 46 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_F_opt_Re_1 -order 4 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 47 |
+
set_pad_physical_constraints -side 2 -pad_name io_vss17 -order 5 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 48 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_F_opt_Re_0 -order 6 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 49 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_input_Valid -order 7 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 50 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_Ns_1 -order 8 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 51 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_Ns_0 -order 9 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 52 |
+
set_pad_physical_constraints -side 2 -pad_name io_vdd16 -order 10 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 53 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_start -order 11 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 54 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_clk -order 12 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 55 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_rst_n -order 13 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 56 |
+
set_pad_physical_constraints -side 2 -pad_name io_vss16 -order 14 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 57 |
+
set_pad_physical_constraints -side 2 -pad_name core_vdd2 -order 15 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 58 |
+
set_pad_physical_constraints -side 2 -pad_name core_vss2 -order 16 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 59 |
+
set_pad_physical_constraints -side 2 -pad_name ipad_se -order 17 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 60 |
+
set_pad_physical_constraints -side 2 -pad_name io_vdd15 -order 18 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 61 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_12 -order 19 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 62 |
+
set_pad_physical_constraints -side 2 -pad_name io_vss15 -order 20 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 63 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_11 -order 21 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 64 |
+
set_pad_physical_constraints -side 2 -pad_name io_vdd14 -order 22 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 65 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_10 -order 23 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 66 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_9 -order 24 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 67 |
+
set_pad_physical_constraints -side 2 -pad_name io_vss14 -order 25 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 68 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_8 -order 26 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 69 |
+
set_pad_physical_constraints -side 2 -pad_name io_vdd13 -order 27 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 70 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_7 -order 28 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 71 |
+
set_pad_physical_constraints -side 2 -pad_name opad_F_bb_6 -order 29 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 72 |
+
set_pad_physical_constraints -side 2 -pad_name io_vss13 -order 30 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 73 |
+
#set_pad_physical_constraints -side 2 -pad_name iopad_66 -order 31 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 74 |
+
#set_pad_physical_constraints -side 2 -pad_name iopad_65 -order 32 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 75 |
+
|
| 76 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss07 -order 1 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 77 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_3 -order 2 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 78 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_4 -order 3 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 79 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd07 -order 4 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 80 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_5 -order 5 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 81 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss08 -order 6 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 82 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_6 -order 7 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 83 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_7 -order 8 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 84 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd08 -order 9 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 85 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_8 -order 10 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 86 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_9 -order 11 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 87 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss09 -order 12 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 88 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_10 -order 13 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 89 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_11 -order 14 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 90 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd09 -order 15 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 91 |
+
set_pad_physical_constraints -side 3 -pad_name core_vdd3 -order 16 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 92 |
+
set_pad_physical_constraints -side 3 -pad_name core_vss3 -order 17 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 93 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss10 -order 18 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 94 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_rf_Im_12 -order 19 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 95 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd10 -order 20 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 96 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_Valid -order 21 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 97 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_0 -order 22 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 98 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss11 -order 23 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 99 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_1 -order 24 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 100 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_2 -order 25 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 101 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd11 -order 26 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 102 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_3 -order 27 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 103 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_4 -order 28 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 104 |
+
set_pad_physical_constraints -side 3 -pad_name io_vss12 -order 29 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 105 |
+
set_pad_physical_constraints -side 3 -pad_name opad_F_bb_5 -order 30 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 106 |
+
set_pad_physical_constraints -side 3 -pad_name io_vdd12 -order 31 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 107 |
+
#set_pad_physical_constraints -side 3 -pad_name iopad_64 -order 32 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 108 |
+
|
| 109 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss01 -order 1 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 110 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Valid -order 2 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 111 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_0 -order 3 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 112 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd01 -order 4 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 113 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_1 -order 5 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 114 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss02 -order 6 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 115 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_2 -order 7 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 116 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_3 -order 8 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 117 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd02 -order 9 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 118 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_4 -order 10 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 119 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_5 -order 11 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 120 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss03 -order 12 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 121 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_6 -order 13 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 122 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_7 -order 14 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 123 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd03 -order 15 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 124 |
+
set_pad_physical_constraints -side 4 -pad_name core_vdd4 -order 16 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 125 |
+
set_pad_physical_constraints -side 4 -pad_name core_vss4 -order 17 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 126 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss04 -order 18 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 127 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_8 -order 19 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 128 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd04 -order 20 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 129 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_9 -order 21 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 130 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_10 -order 22 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 131 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss05 -order 23 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 132 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_11 -order 24 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 133 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Re_12 -order 25 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 134 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd05 -order 26 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 135 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Im_0 -order 27 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 136 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Im_1 -order 28 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 137 |
+
set_pad_physical_constraints -side 4 -pad_name io_vss06 -order 29 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 138 |
+
set_pad_physical_constraints -side 4 -pad_name opad_F_rf_Im_2 -order 30 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 139 |
+
set_pad_physical_constraints -side 4 -pad_name io_vdd06 -order 31 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
| 140 |
+
#set_pad_physical_constraints -side 4 -pad_name iopad_32 -order 32 -min_left_iospace $IO_SPACE -min_right_iospace $IO_SPACE
|
abdelazeem201_ASIC-Design-Roadmap/LEF2FRAM/Readme.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEF Layer to Technology File Layer Mapper
|
| 2 |
+
|
| 3 |
+
This Perl script processes a technology file (.tf) and a Library Exchange Format (LEF) file to generate a mapping between the layers defined in these files.
|
| 4 |
+
|
| 5 |
+
# Overview
|
| 6 |
+
|
| 7 |
+
The script reads through the specified technology and LEF files, extracts layer information, and generates two output files:
|
| 8 |
+
|
| 9 |
+
A log file documenting the processing steps and any issues encountered.
|
| 10 |
+
A mapping file that correlates the layers in the LEF file with their corresponding layers in the technology file.
|
| 11 |
+
|
| 12 |
+
# Features
|
| 13 |
+
|
| 14 |
+
Automatic Layer Mapping: The script identifies and maps layers between the LEF and technology files based on predefined rules.
|
| 15 |
+
Logging: Detailed logging of the processing steps, aiding in troubleshooting and validation.
|
| 16 |
+
Configurable via Command Line Arguments: The input files are specified via command line arguments, allowing flexibility in usage.
|
| 17 |
+
|
| 18 |
+
# Usage
|
| 19 |
+
|
| 20 |
+
Command Line
|
| 21 |
+
|
| 22 |
+
````````````````````````````````````````````````
|
| 23 |
+
perl lef_layer_tf_number_map.pl Tech_file_name.tf Lef_file_name.lef
|
| 24 |
+
````````````````````````````````````````````````
|
| 25 |
+
|
| 26 |
+
* Tech_file_name.tf: The technology file containing layer definitions.
|
| 27 |
+
* Lef_file_name.lef: The LEF file containing layer definitions.
|
| 28 |
+
|
| 29 |
+
Output Files
|
| 30 |
+
|
| 31 |
+
* Lef_file_name_lef_Tech_file_name_tf.map: A file containing the mapping between LEF layers and technology file layers.
|
| 32 |
+
* Lef_file_name_lef_Tech_file_name_tf.log: A log file containing detailed logs of the processing steps.
|
| 33 |
+
|
| 34 |
+
# Script Explanation
|
| 35 |
+
## Argument Handling
|
| 36 |
+
|
| 37 |
+
The script expects two arguments: the technology file and the LEF file. If the correct number of arguments is not provided, it displays a usage message and exits.
|
| 38 |
+
|
| 39 |
+
## File Opening
|
| 40 |
+
The script opens the technology file, LEF file, and two output files: one for logging and one for the mapping.
|
| 41 |
+
|
| 42 |
+
## Processing the Technology File
|
| 43 |
+
The script processes the technology file to extract layer information:
|
| 44 |
+
|
| 45 |
+
Identifies layers, their numbers, and mask names.
|
| 46 |
+
Stores the extracted information in hashes for later use.
|
| 47 |
+
Processing the LEF File
|
| 48 |
+
The script processes the LEF file to extract layer information and derive mask names based on the layer types:
|
| 49 |
+
|
| 50 |
+
Uses predefined rules to derive mask names for various layer types.
|
| 51 |
+
Maps these derived mask names to the corresponding layer numbers from the technology file.
|
| 52 |
+
Generating the Mapping File
|
| 53 |
+
The script generates the mapping file by printing the layer names and their corresponding numbers from both the LEF and technology files.
|
| 54 |
+
|
| 55 |
+
## Logging and Helper Subroutines
|
| 56 |
+
The script includes helper subroutines for logging and printing the map file.
|
| 57 |
+
|
| 58 |
+
## Example
|
| 59 |
+
To run the script with example files:
|
| 60 |
+
``````````````````````````````````````````````
|
| 61 |
+
perl lef_layer_tf_number_map.pl example_tech.tf example_lef.lef
|
| 62 |
+
``````````````````````````````````````````````
|
| 63 |
+
This will generate example_lef_lef_example_tech_tf.map and example_lef_lef_example_tech_tf.log.
|
| 64 |
+
|
| 65 |
+
# LEF2FRAM
|
| 66 |
+
|
| 67 |
+
1. **1. Preparing the Map File**
|
| 68 |
+
|
| 69 |
+
Use the `lef_layer_tf_number_mapper.pl` script provided in the compressed package, and modify the first line to:
|
| 70 |
+
|
| 71 |
+
``````````````````````````
|
| 72 |
+
#!/usr/bin/perl -w
|
| 73 |
+
``````````````````````````
|
| 74 |
+
|
| 75 |
+
Change the file attributes to make it executable:
|
| 76 |
+
|
| 77 |
+
``````````````````````````````````````
|
| 78 |
+
chmod 755 lef_layer_tf_number_mapper.pl
|
| 79 |
+
```````````````````````````````````````
|
| 80 |
+
|
| 81 |
+
Prepare the technology file and the TECH LEF file. Note that the LEF file should be the process LEF file, not the LEF file generated by SRAM:
|
| 82 |
+
|
| 83 |
+
* `scc013u_8lm_1tm_thick.lef
|
| 84 |
+
* `smic13_hd_8lm_1tm_thick.tf
|
| 85 |
+
|
| 86 |
+
Tip: From my observation, in the given SMIC13 standard cell library, the process file and TECH LEF file are the same across various cell libraries. Therefore, you can select the one under RVT. However, the process file and TECH LEF file themselves are divided into two types: with RDL and without RDL. I used the `diff` command to check and found that it seems to add an RDL layer.
|
| 87 |
+
|
| 88 |
+
Place the above three files in the same directory, cd into that directory, and execute the following command:
|
| 89 |
+
|
| 90 |
+
```````````````````````````````````````````````````````````````````````````````````
|
| 91 |
+
./lef_layer_tf_number_mapper.pl smic13_hd_8lm_1tm_thick.tf scc013u_8lm_1tm_thick.lef
|
| 92 |
+
````````````````````````````````````````````````````````````````````````````````````
|
| 93 |
+
|
| 94 |
+
This will generate the map file from LEF to Milkyway.
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
2. **Automatically Create LEF to Milkyway Frame View**
|
| 98 |
+
|
| 99 |
+
In the current directory, create a `mw` directory and copy the `.lef`, `.tf`, and `.map` files mentioned above into this directory. Create a new `cell_lef` directory and copy the cell LEF files of the macros to be converted into this directory. Then, `cd` into the `mw` directory and open a terminal.
|
| 100 |
+
|
| 101 |
+
# To start the Milkyway tool, please follow these steps:
|
| 102 |
+
|
| 103 |
+
Open a terminal.
|
| 104 |
+
|
| 105 |
+
Enter the full path to the Milkyway executable file. For example:
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
``````````````````````````````````````````````````````````
|
| 109 |
+
/eda/Synopsys/mw_2018.06/bin/linux64/Milkyway
|
| 110 |
+
|
| 111 |
+
milkway
|
| 112 |
+
```````````````````````````````````````````````````````````
|
| 113 |
+
Replace `/eda/Synopsys/mw_2018.06/bin/linux64/Milkyway` with the actual full path to the Milkyway executable file on your system.
|
| 114 |
+
|
| 115 |
+
1. Press Enter to execute the command.
|
| 116 |
+
|
| 117 |
+
2. This should launch the Milkyway tool.
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/depot/perl-5.003/bin/perl5.003 -w
|
| 2 |
+
|
| 3 |
+
# Written by Ahmed Abdelazeem
|
| 4 |
+
# March 11, 2024
|
| 5 |
+
# Updated to cover more LEF cases
|
| 6 |
+
# July 1, 2024
|
| 7 |
+
# A Perl script processes a technology file (.tf) and an LEF (Library Exchange Format) file to generate a mapping between layers defined in these files.
|
| 8 |
+
#
|
| 9 |
+
#
|
| 10 |
+
|
| 11 |
+
$EXPECTED_COMMAND_ARGS = 2;
|
| 12 |
+
|
| 13 |
+
if ($#ARGV < $EXPECTED_COMMAND_ARGS -1 )
|
| 14 |
+
{
|
| 15 |
+
die "Usage: lef_layer_tf_number_map.pl Tech_file_name.tf Lef_file_name.lef\n";
|
| 16 |
+
}
|
| 17 |
+
else
|
| 18 |
+
{
|
| 19 |
+
$tech_file = $ARGV[0];
|
| 20 |
+
$lef_file = $ARGV[1];
|
| 21 |
+
$tmp_s1 = $ARGV[0];
|
| 22 |
+
$tmp_s1 =~ s/\.tf/_tf/;
|
| 23 |
+
$tmp_s2 = $ARGV[1];
|
| 24 |
+
$tmp_s2 =~ s/\.lef/_lef/;
|
| 25 |
+
$lef_tf_map_file = $tmp_s2."_".$tmp_s1.".map";
|
| 26 |
+
$lef_tf_log_file = $tmp_s2."_".$tmp_s1.".log";
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
open tech_file or die "Can't open $tech_file\n";
|
| 30 |
+
open lef_file or die "Can't open $lef_file\n";
|
| 31 |
+
open lef_tf_log_file, ">$lef_tf_log_file" or die "Can't open $lef_tf_log_file\n";
|
| 32 |
+
open lef_tf_map_file, ">$lef_tf_map_file" or die "Can't open $lef_tf_map_file\n";
|
| 33 |
+
|
| 34 |
+
print_log( "\n*** Beginning to process $tech_file tech file***\n");
|
| 35 |
+
$i=0;
|
| 36 |
+
|
| 37 |
+
%tf_layerMaskNames = ();
|
| 38 |
+
%tf_layerMaskLayerNumber = ();
|
| 39 |
+
%tf_layerName = ();
|
| 40 |
+
|
| 41 |
+
$processing_tf_layer = 0;
|
| 42 |
+
$found_maskName = 0;
|
| 43 |
+
$tf_masks = 0;
|
| 44 |
+
while ($line = <tech_file>)
|
| 45 |
+
{
|
| 46 |
+
chop $line;
|
| 47 |
+
if ( $line =~ /^[lL][aA][yY][eE][rR][\s]+\"([\w\W]+)\"[\s]+\{.*$/ )
|
| 48 |
+
{
|
| 49 |
+
if ($processing_tf_layer ==0)
|
| 50 |
+
{
|
| 51 |
+
$processing_tf_layer = 1;
|
| 52 |
+
$tf_layer_name = $1;
|
| 53 |
+
print_log( "\nBeginning to process $tf_layer_name layer...\n");
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
elsif ( $line =~ /^[\s]*\}.*$/)
|
| 57 |
+
{
|
| 58 |
+
if ($processing_tf_layer ==1)
|
| 59 |
+
{
|
| 60 |
+
if ($found_maskName == 1)
|
| 61 |
+
{
|
| 62 |
+
$tf_layerMaskNames{$tf_masks} = $tf_maskName;
|
| 63 |
+
$tf_layerMaskLayerNumber{$tf_maskName} = $tf_layerNumber;
|
| 64 |
+
$tf_layerName{$tf_maskName} = $tf_layer_name;
|
| 65 |
+
|
| 66 |
+
$tf_masks++;
|
| 67 |
+
$found_maskName =0;
|
| 68 |
+
}
|
| 69 |
+
print_log( "Completed the processing of $tf_layer_name layer.\n");
|
| 70 |
+
$processing_tf_layer = 0;
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
elsif ( $line =~ /^[\s]*layerNumber[\s]*\=[\s]*([\d]+).*$/)
|
| 74 |
+
{
|
| 75 |
+
$tf_layerNumber = $1;
|
| 76 |
+
print_log( "Found the layerNumber $tf_layerNumber for the $tf_layer_name!\n");
|
| 77 |
+
}
|
| 78 |
+
elsif ( $line =~ /^[\s]*maskName[\s]*\=[\s]*\"([\w]+)\".*$/)
|
| 79 |
+
{
|
| 80 |
+
$tf_maskName = $1;
|
| 81 |
+
$found_maskName = 1;
|
| 82 |
+
print_log( "Found the maskName $tf_maskName for the $tf_layer_name!\n");
|
| 83 |
+
}
|
| 84 |
+
$i++;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
#foreach $key (keys %tf_layerMaskNames)
|
| 88 |
+
# {
|
| 89 |
+
# print "tf_layerName=$tf_layerName{$tf_layerMaskNames{$key}} ";
|
| 90 |
+
# print "tf_mask_layerName=$tf_layerMaskNames{$key} ";
|
| 91 |
+
# print "tf_mask_layerNumber=$tf_layerMaskLayerNumber{$tf_layerMaskNames{$key}}\n";
|
| 92 |
+
# }
|
| 93 |
+
|
| 94 |
+
print_log( "\n*** Beginning to process $lef_file LEF file***\n");
|
| 95 |
+
|
| 96 |
+
%lef_layerDerivedMaskNames = ();
|
| 97 |
+
%lef_layerDerivedMaskLayerNumber = ();
|
| 98 |
+
%lef_layerName = ();
|
| 99 |
+
|
| 100 |
+
$i=0;
|
| 101 |
+
$lef_masks = 0;
|
| 102 |
+
$processing_lef_layer = 0;
|
| 103 |
+
$lef_prev_layerTYPE = "";
|
| 104 |
+
$metal_index = 0;
|
| 105 |
+
while ($line = <lef_file>)
|
| 106 |
+
{
|
| 107 |
+
chop $line;
|
| 108 |
+
# print "$line\n";
|
| 109 |
+
# print "$i th line:$line\n";
|
| 110 |
+
if ( $line =~ /^LAYER[\s]+([\w]+)[\s]*$/ )
|
| 111 |
+
{
|
| 112 |
+
if ($processing_lef_layer ==0)
|
| 113 |
+
{
|
| 114 |
+
$processing_lef_layer = 1;
|
| 115 |
+
$lef_layer_name = $1;
|
| 116 |
+
print_log( "\nBeginning to process $lef_layer_name layer...\n");
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
elsif ( $line =~ /^END[\s]+[\w]+[\s]*$/)
|
| 120 |
+
{
|
| 121 |
+
if ($processing_lef_layer ==1)
|
| 122 |
+
{
|
| 123 |
+
$lef_derivedmaskName = "";
|
| 124 |
+
if ( ($lef_layerTYPE eq "MASTERSLICE") && ($lef_masks == 0) )
|
| 125 |
+
{
|
| 126 |
+
$lef_derivedmaskName = "poly";
|
| 127 |
+
}
|
| 128 |
+
elsif ( ($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE eq "MASTERSLICE") )
|
| 129 |
+
{
|
| 130 |
+
$lef_derivedmaskName = "polyCont";
|
| 131 |
+
}
|
| 132 |
+
elsif ( ($lef_layerTYPE eq "ROUTING") )
|
| 133 |
+
{
|
| 134 |
+
if ( $metal_index == 0) { $metal_index = 1; }
|
| 135 |
+
else { $metal_index++; }
|
| 136 |
+
$lef_derivedmaskName = "metal".$metal_index;
|
| 137 |
+
}
|
| 138 |
+
elsif ( ($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE ne "MASTERSLICE"))
|
| 139 |
+
{
|
| 140 |
+
# print "lef_layerTYPE=$lef_layerTYPE;lef_masks=$lef_masks;lef_prev_layerTYPE=$lef_prev_layerTYPE\n";
|
| 141 |
+
$lef_derivedmaskName = "via".$metal_index;
|
| 142 |
+
}
|
| 143 |
+
elsif ( ($lef_layerTYPE eq "OVERLAP") )
|
| 144 |
+
{
|
| 145 |
+
print_log( "Skipping the OVERLAP Layer...\n");
|
| 146 |
+
}
|
| 147 |
+
else {
|
| 148 |
+
# print "lef_layerTYPE=$lef_layerTYPE;lef_masks=$lef_masks;lef_prev_layerTYPE=$lef_prev_layerTYPE\n";
|
| 149 |
+
die "Can not process due to issue...\n";
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if ($lef_derivedmaskName ne "" )
|
| 153 |
+
{
|
| 154 |
+
$lef_derivedlayerNumber = $tf_layerMaskLayerNumber{$lef_derivedmaskName};
|
| 155 |
+
|
| 156 |
+
$lef_layerDerivedMaskNames{$lef_masks} = $lef_derivedmaskName;
|
| 157 |
+
$lef_layerDerivedMaskLayerNumber{$lef_derivedmaskName} = $lef_derivedlayerNumber;
|
| 158 |
+
$lef_layerName{$lef_derivedmaskName} = $lef_layer_name;
|
| 159 |
+
$lef_masks++;
|
| 160 |
+
}
|
| 161 |
+
print_log( "Completed the processing of $lef_layer_name layer.\n");
|
| 162 |
+
$processing_lef_layer = 0;
|
| 163 |
+
$lef_prev_layerTYPE = $lef_layerTYPE;
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
elsif ( $line =~ /^[\s]*TYPE[\s]+([\w]+)[\s]*\;.*$/)
|
| 167 |
+
{
|
| 168 |
+
$lef_layerTYPE = $1;
|
| 169 |
+
print_log( "Found the TYPE $lef_layerTYPE for the $lef_layer_name!\n");
|
| 170 |
+
}
|
| 171 |
+
$i++;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
#foreach $key (keys %lef_layerDerivedMaskNames)
|
| 175 |
+
# {
|
| 176 |
+
# print "lef_layerName=$lef_layerName{$lef_layerDerivedMaskNames{$key}} ";
|
| 177 |
+
# print "lef_mask_layerName=$lef_layerDerivedMaskNames{$key} ";
|
| 178 |
+
# print "lef_mask_layerNumber=$lef_layerDerivedMaskLayerNumber{$lef_layerDerivedMaskNames{$key}}\n";
|
| 179 |
+
# }
|
| 180 |
+
|
| 181 |
+
print_log( "\n*** Printing the map file between $lef_file and $tech_file ***\n");
|
| 182 |
+
for ($j=0; $j < $lef_masks; $j++)
|
| 183 |
+
{
|
| 184 |
+
print_map("$lef_layerName{$lef_layerDerivedMaskNames{$j}}");
|
| 185 |
+
print_map(" $lef_layerDerivedMaskLayerNumber{$lef_layerDerivedMaskNames{$j}}\n");
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
close lef_tf_map_file;
|
| 189 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env wish
|
| 2 |
+
|
| 3 |
+
# Written by Ahmed Abdelazeem
|
| 4 |
+
# March 11, 2024
|
| 5 |
+
# Updated to cover more LEF cases
|
| 6 |
+
# July 1, 2024
|
| 7 |
+
# A TCL script processes a technology file (.tf) and an LEF (Library Exchange Format) file to generate a mapping between layers defined in these files.
|
| 8 |
+
|
| 9 |
+
set EXPECTED_COMMAND_ARGS 2
|
| 10 |
+
|
| 11 |
+
if {[llength $argv] < $EXPECTED_COMMAND_ARGS} {
|
| 12 |
+
puts "Usage: lef_layer_tf_number_map.tcl Tech_file_name.tf Lef_file_name.lef"
|
| 13 |
+
exit 1
|
| 14 |
+
} else {
|
| 15 |
+
set tech_file [lindex $argv 0]
|
| 16 |
+
set lef_file [lindex $argv 1]
|
| 17 |
+
set tmp_s1 [regsub {.tf} $tech_file {_tf}]
|
| 18 |
+
set tmp_s2 [regsub {.lef} $lef_file {_lef}]
|
| 19 |
+
set lef_tf_map_file "${tmp_s2}_${tmp_s1}.map"
|
| 20 |
+
set lef_tf_log_file "${tmp_s2}_${tmp_s1}.log"
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
set tech_file_id [open $tech_file r]
|
| 24 |
+
if {$tech_file_id == ""} {
|
| 25 |
+
puts "Can't open $tech_file"
|
| 26 |
+
exit 1
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
set lef_file_id [open $lef_file r]
|
| 30 |
+
if {$lef_file_id == ""} {
|
| 31 |
+
puts "Can't open $lef_file"
|
| 32 |
+
exit 1
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
set lef_tf_log_file_id [open $lef_tf_log_file w]
|
| 36 |
+
if {$lef_tf_log_file_id == ""} {
|
| 37 |
+
puts "Can't open $lef_tf_log_file"
|
| 38 |
+
exit 1
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
set lef_tf_map_file_id [open $lef_tf_map_file w]
|
| 42 |
+
if {$lef_tf_map_file_id == ""} {
|
| 43 |
+
puts "Can't open $lef_tf_map_file"
|
| 44 |
+
exit 1
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
proc print_log {message} {
|
| 48 |
+
puts $message
|
| 49 |
+
puts $::lef_tf_log_file_id $message
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
proc print_map {message} {
|
| 53 |
+
puts $message
|
| 54 |
+
puts $::lef_tf_map_file_id $message
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
print_log "\n*** Beginning to process $tech_file tech file***\n"
|
| 58 |
+
|
| 59 |
+
set i 0
|
| 60 |
+
array set tf_layerMaskNames {}
|
| 61 |
+
array set tf_layerMaskLayerNumber {}
|
| 62 |
+
array set tf_layerName {}
|
| 63 |
+
|
| 64 |
+
set processing_tf_layer 0
|
| 65 |
+
set found_maskName 0
|
| 66 |
+
set tf_masks 0
|
| 67 |
+
|
| 68 |
+
while {[gets $tech_file_id line] != -1} {
|
| 69 |
+
regsub -all {[\[\]]} $line {} line
|
| 70 |
+
regsub -all {\{\}} $line {} line
|
| 71 |
+
regsub -all {\[\]} $line {} line
|
| 72 |
+
regsub -all {\{\}} $line {} line
|
| 73 |
+
regsub -all {"} $line {} line
|
| 74 |
+
regsub -all {;} $line {} line
|
| 75 |
+
regsub -all {\;} $line {} line
|
| 76 |
+
regsub -all {[()]}} $line {} line
|
| 77 |
+
|
| 78 |
+
if {[regexp {^[lL][aA][yY][eE][rR][\s]+\"([\w\W]+)\"[\s]+\{.*$} $line match tf_layer_name]} {
|
| 79 |
+
if {$processing_tf_layer == 0} {
|
| 80 |
+
set processing_tf_layer 1
|
| 81 |
+
print_log "\nBeginning to process $tf_layer_name layer...\n"
|
| 82 |
+
}
|
| 83 |
+
} elseif {[regexp {^[\s]*\}.*$} $line]} {
|
| 84 |
+
if {$processing_tf_layer == 1} {
|
| 85 |
+
if {$found_maskName == 1} {
|
| 86 |
+
set tf_layerMaskNames($tf_masks) $tf_maskName
|
| 87 |
+
set tf_layerMaskLayerNumber($tf_maskName) $tf_layerNumber
|
| 88 |
+
set tf_layerName($tf_maskName) $tf_layer_name
|
| 89 |
+
|
| 90 |
+
incr tf_masks
|
| 91 |
+
set found_maskName 0
|
| 92 |
+
}
|
| 93 |
+
print_log "Completed the processing of $tf_layer_name layer.\n"
|
| 94 |
+
set processing_tf_layer 0
|
| 95 |
+
}
|
| 96 |
+
} elseif {[regexp {^[\s]*layerNumber[\s]*\=[\s]*([\d]+).*} $line match tf_layerNumber]} {
|
| 97 |
+
set tf_layerNumber [lindex $match 1]
|
| 98 |
+
print_log "Found the layerNumber $tf_layerNumber for the $tf_layer_name!\n"
|
| 99 |
+
} elseif {[regexp {^[\s]*maskName[\s]*\=[\s]*\"([\w]+)\".*} $line match tf_maskName]} {
|
| 100 |
+
set tf_maskName [lindex $match 1]
|
| 101 |
+
set found_maskName 1
|
| 102 |
+
print_log "Found the maskName $tf_maskName for the $tf_layer_name!\n"
|
| 103 |
+
}
|
| 104 |
+
incr i
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
print_log "\n*** Beginning to process $lef_file LEF file***\n"
|
| 108 |
+
|
| 109 |
+
set lef_masks 0
|
| 110 |
+
set processing_lef_layer 0
|
| 111 |
+
set lef_prev_layerTYPE ""
|
| 112 |
+
set metal_index 0
|
| 113 |
+
|
| 114 |
+
while {[gets $lef_file_id line] != -1} {
|
| 115 |
+
regsub -all {[\[\]]} $line {} line
|
| 116 |
+
regsub -all {\{\}} $line {} line
|
| 117 |
+
regsub -all {\[\]} $line {} line
|
| 118 |
+
regsub -all {\{\}} $line {} line
|
| 119 |
+
regsub -all {"} $line {} line
|
| 120 |
+
regsub -all {;} $line {} line
|
| 121 |
+
regsub -all {\;} $line {} line
|
| 122 |
+
regsub -all {[()]}} $line {} line
|
| 123 |
+
|
| 124 |
+
if {[regexp {^LAYER[\s]+([\w]+)[\s]*$} $line match lef_layer_name]} {
|
| 125 |
+
if {$processing_lef_layer == 0} {
|
| 126 |
+
set processing_lef_layer 1
|
| 127 |
+
print_log "\nBeginning to process $lef_layer_name layer...\n"
|
| 128 |
+
}
|
| 129 |
+
} elseif {[regexp {^END[\s]+[\w]+[\s]*$} $line]} {
|
| 130 |
+
if {$processing_lef_layer == 1} {
|
| 131 |
+
set lef_derivedmaskName ""
|
| 132 |
+
if {($lef_layerTYPE eq "MASTERSLICE") && ($lef_masks == 0)} {
|
| 133 |
+
set lef_derivedmaskName "poly"
|
| 134 |
+
} elseif {($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE eq "MASTERSLICE")} {
|
| 135 |
+
set lef_derivedmaskName "polyCont"
|
| 136 |
+
} elseif {($lef_layerTYPE eq "ROUTING")} {
|
| 137 |
+
if {$metal_index == 0} {incr metal_index}
|
| 138 |
+
else {incr metal_index}
|
| 139 |
+
set lef_derivedmaskName "metal$metal_index"
|
| 140 |
+
} elseif {($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE ne "MASTERSLICE")} {
|
| 141 |
+
set lef_derivedmaskName "via$metal_index"
|
| 142 |
+
} elseif {($lef_layerTYPE eq "OVERLAP")} {
|
| 143 |
+
print_log "Skipping the OVERLAP Layer...\n"
|
| 144 |
+
} else {
|
| 145 |
+
print_log "Can not process due to issue...\n"
|
| 146 |
+
exit 1
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
if {$lef_derivedmaskName ne ""} {
|
| 150 |
+
set lef_derivedlayerNumber $tf_layerMaskLayerNumber($lef_derivedmaskName)
|
| 151 |
+
|
| 152 |
+
set lef_layerDerivedMaskNames($lef_masks) $lef_derivedmaskName
|
| 153 |
+
set lef_layerDerivedMaskNames($lef_masks) $lef_derivedmaskName
|
| 154 |
+
set lef_layerDerivedMaskLayerNumber($lef_derivedmaskName) $lef_derivedlayerNumber
|
| 155 |
+
set lef_layerName($lef_derivedmaskName) $lef_layer_name
|
| 156 |
+
incr lef_masks
|
| 157 |
+
}
|
| 158 |
+
print_log "Completed the processing of $lef_layer_name layer.\n"
|
| 159 |
+
set processing_lef_layer 0
|
| 160 |
+
set lef_prev_layerTYPE $lef_layerTYPE
|
| 161 |
+
}
|
| 162 |
+
} elseif {[regexp {^[\s]*TYPE[\s]+([\w]+)[\s]*\;.*$} $line match lef_layerTYPE]} {
|
| 163 |
+
set lef_layerTYPE [lindex $match 1]
|
| 164 |
+
print_log "Found the TYPE $lef_layerTYPE for the $lef_layer_name!\n"
|
| 165 |
+
}
|
| 166 |
+
incr i
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
print_log "\n*** Printing the map file between $lef_file and $tech_file ***\n"
|
| 170 |
+
for {set j 0} {$j < $lef_masks} {incr j} {
|
| 171 |
+
print_map "$lef_layerName($lef_layerDerivedMaskNames($j))"
|
| 172 |
+
print_map " $lef_layerDerivedMaskLayerNumber($lef_layerDerivedMaskNames($j))\n"
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
close $lef_tf_map_file_id
|
| 176 |
+
|
| 177 |
+
proc print_log {message} {
|
| 178 |
+
puts $message
|
| 179 |
+
puts $::lef_tf_log_file_id $message
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
proc print_map {message} {
|
| 183 |
+
puts $message
|
| 184 |
+
puts $::lef_tf_map_file_id $message
|
| 185 |
+
}
|
abdelazeem201_ASIC-Design-Roadmap/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2021 Ahmed Abdelazeem
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
abdelazeem201_ASIC-Design-Roadmap/Logo.pl
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
|
| 3 |
+
*/
|
| 4 |
+
|
| 5 |
+
let((win cv bmpfile bmpSize WORD Wnum number Grid Layer row column max_column
|
| 6 |
+
i dot x y signature offset width height pixel ImageSize )
|
| 7 |
+
|
| 8 |
+
win = hiGetCurrentWindow()
|
| 9 |
+
cv = getEditRep(win)
|
| 10 |
+
|
| 11 |
+
bmpfile = "/home/abdelazeem/project_map/proj_lyra/lyra_logo/907.bmp" ;;; Input BMP File
|
| 12 |
+
Layer = list("M3" "drawing") ;;; Output Layer
|
| 13 |
+
Grid = 0.3 ;;; Rectangle Size
|
| 14 |
+
column = 0
|
| 15 |
+
|
| 16 |
+
procedure(MessageForm(text)
|
| 17 |
+
prog( ()
|
| 18 |
+
hiDisplayAppDBox(
|
| 19 |
+
?name 'JWDBox_Message
|
| 20 |
+
?dboxBanner "Message!!"
|
| 21 |
+
?buttonLayout 'Close
|
| 22 |
+
?dboxText text
|
| 23 |
+
)
|
| 24 |
+
);prog
|
| 25 |
+
);procedure
|
| 26 |
+
|
| 27 |
+
;Read BMP file
|
| 28 |
+
if(InFile = infile(bmpfile) then
|
| 29 |
+
bmpSize = fileLength(bmpfile)
|
| 30 |
+
declare(WORD[bmpSize])
|
| 31 |
+
for(Wnum 0 bmpSize-1 WORD[Wnum] = charToInt(getc(InFile)) )
|
| 32 |
+
close(InFile)
|
| 33 |
+
else
|
| 34 |
+
MessageForm("Input file does not exist!")
|
| 35 |
+
return()
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
sprintf(signature "%02x%02x" WORD[0] WORD[1])
|
| 39 |
+
offset = (WORD[0x0d]<<24) + (WORD[0x0c]<<16) + (WORD[0x0b]<<8) + WORD[0x0a]
|
| 40 |
+
width = (WORD[0x15]<<24) + (WORD[0x14]<<16) + (WORD[0x13]<<8) + WORD[0x12]
|
| 41 |
+
height = (WORD[0x19]<<24) + (WORD[0x18]<<16) + (WORD[0x17]<<8) + WORD[0x16]
|
| 42 |
+
pixel = (WORD[0x1d]<<8) + WORD[0x1c]
|
| 43 |
+
ImageSize = (WORD[0x25]<<24) + (WORD[0x24]<<16) + (WORD[0x23]<<8) + WORD[0x22]
|
| 44 |
+
|
| 45 |
+
printf("--- BMP2LAY Start --- %L\n" getCurrentTime())
|
| 46 |
+
printf("offset : 0x%x \n" offset)
|
| 47 |
+
printf("width : 0x%x \n" width)
|
| 48 |
+
printf("height : 0x%x \n" height)
|
| 49 |
+
printf("ImgSize : 0x%x \n" ImageSize)
|
| 50 |
+
|
| 51 |
+
;check bmp file
|
| 52 |
+
if(!equal(signature "424d") then
|
| 53 |
+
MessageForm("*ERROR* Standard Input is not a BMP file")
|
| 54 |
+
return()
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
;check mono bmp file
|
| 58 |
+
if(!equal(pixel 0x01) then
|
| 59 |
+
MessageForm("*ERROR* only supports mono bmp files")
|
| 60 |
+
return()
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
;BMP2LAY
|
| 64 |
+
max_column = ImageSize/height<<3
|
| 65 |
+
number = offset+ImageSize-1
|
| 66 |
+
|
| 67 |
+
for(Wnum offset number
|
| 68 |
+
row = fix((Wnum-offset)/(max_column>>3))
|
| 69 |
+
y = Grid*row
|
| 70 |
+
|
| 71 |
+
for(i 0 7
|
| 72 |
+
dot = bitfield1(WORD[Wnum] 7-i) ; bit<7> ~ bit<0>
|
| 73 |
+
x = Grid*column
|
| 74 |
+
if(zerop(dot) && column<width then
|
| 75 |
+
geSelectObject(dbCreateRect(cv Layer list(x:y x+Grid:y+Grid)))
|
| 76 |
+
)
|
| 77 |
+
column++
|
| 78 |
+
);for
|
| 79 |
+
if(equal(column max_column) column=0)
|
| 80 |
+
Wnum++
|
| 81 |
+
);for
|
| 82 |
+
|
| 83 |
+
hiZoomIn(win list(-10:-10 x+10:y+10))
|
| 84 |
+
printf("--- BMP2LAY End ----- %L\nt\n" getCurrentTime())
|
| 85 |
+
);let
|
| 86 |
+
|
| 87 |
+
;-------------------------------------------------------
|
abdelazeem201_ASIC-Design-Roadmap/MY-Design/MY_DESIGN.v
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
module MY_DESIGN ( Cin1, Cin2, Cout, data1, data2, sel, clk, out1, out2, out3);
|
| 3 |
+
input [4:0] Cin1, Cin2, data1, data2;
|
| 4 |
+
input sel, clk;
|
| 5 |
+
output [4:0] Cout, out1, out2, out3;
|
| 6 |
+
reg [4:0] R1, R2, R3, R4, out1, out2, out3;
|
| 7 |
+
wire [4:0] arth_o;
|
| 8 |
+
|
| 9 |
+
ARITH U1_ARITH ( .a(data1), .b(data2), .sel(sel), .out1(arth_o) );
|
| 10 |
+
COMBO U_COMBO ( .Cin1(Cin1), .Cin2(Cin2), .sel(sel), .Cout(Cout) );
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
always @ (posedge clk)
|
| 14 |
+
begin
|
| 15 |
+
R1 <= arth_o;
|
| 16 |
+
R2 <= data1 & data2;
|
| 17 |
+
R3 <= data1 + data2;
|
| 18 |
+
R4 <= R2 + R3;
|
| 19 |
+
end
|
| 20 |
+
|
| 21 |
+
always @ (out2, R1, R3, R4)
|
| 22 |
+
begin
|
| 23 |
+
out1 <= R1 + R3;
|
| 24 |
+
out2 <= R3 & R4;
|
| 25 |
+
out3 <= out2 - R3;
|
| 26 |
+
end
|
| 27 |
+
|
| 28 |
+
endmodule
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
module ARITH ( a, b, sel, out1 );
|
| 35 |
+
input [4:0] a, b;
|
| 36 |
+
input sel;
|
| 37 |
+
output [4:0] out1;
|
| 38 |
+
reg [4:0] out1;
|
| 39 |
+
|
| 40 |
+
always @(sel, a, b)
|
| 41 |
+
|
| 42 |
+
begin
|
| 43 |
+
case({sel})
|
| 44 |
+
1'b0: out1 <= a + b;
|
| 45 |
+
1'b1: out1 <= a - b;
|
| 46 |
+
endcase
|
| 47 |
+
end
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
endmodule
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
module COMBO ( Cin1, Cin2, sel, Cout );
|
| 57 |
+
input [4:0] Cin1, Cin2;
|
| 58 |
+
input sel;
|
| 59 |
+
output [4:0] Cout;
|
| 60 |
+
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###################################
|
| 2 |
+
# #
|
| 3 |
+
# UNITS #
|
| 4 |
+
# #
|
| 5 |
+
###################################
|
| 6 |
+
|
| 7 |
+
# The unit of time in this library is 1ns
|
| 8 |
+
# The unit of capacitance in this library is 1pF
|
| 9 |
+
#
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
###################################
|
| 13 |
+
# #
|
| 14 |
+
# CLEAN-UP #
|
| 15 |
+
# #
|
| 16 |
+
###################################
|
| 17 |
+
|
| 18 |
+
# Remove any existing constraints and attributes
|
| 19 |
+
#
|
| 20 |
+
reset_design
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
###################################
|
| 24 |
+
# #
|
| 25 |
+
# CLOCK DEFINITION #
|
| 26 |
+
# #
|
| 27 |
+
###################################
|
| 28 |
+
|
| 29 |
+
# A 333Mhz clock is a 3.0ns period:
|
| 30 |
+
#
|
| 31 |
+
create_clock -period 3.0 [get_ports clk]
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
# The maximum clock source latency is 700ps or 0.7ns
|
| 35 |
+
#
|
| 36 |
+
set_clock_latency -source -max 0.7 [get_clocks clk]
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
# The maximum clock network latency is 300ps or 0.3 ns:
|
| 40 |
+
#
|
| 41 |
+
set_clock_latency -max 0.3 [get_clocks clk]
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
# The +/-30ps clock insertion delay variation to register clock pins results in
|
| 45 |
+
# a 60ps worst case skew or uncertainty, if you launch late (+30ps) and
|
| 46 |
+
# capture early (-30ps)r; Add 40ps due to jitter and 50ps for setup margin;
|
| 47 |
+
# This equals 150ps or 0.15 ns of total uncertainty.
|
| 48 |
+
#
|
| 49 |
+
set_clock_uncertainty -setup 0.15 [get_clocks clk]
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
# The maximum clock transition is 120ps or 0.12ns
|
| 53 |
+
#
|
| 54 |
+
set_clock_transition -max 0.12 [get_clocks clk]
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
###################################
|
| 58 |
+
# #
|
| 59 |
+
# INPUT TIMING #
|
| 60 |
+
# #
|
| 61 |
+
###################################
|
| 62 |
+
|
| 63 |
+
# The maximum "input delay" (external) on ports data1 and data2 is:
|
| 64 |
+
# clock period - clock uncertainty - delay of S - register setup time =
|
| 65 |
+
# 3.0 - 0.15 - 2.2 - 0.2 = 0.45ns
|
| 66 |
+
#
|
| 67 |
+
set_input_delay -max 0.45 -clock clk [get_ports data*]
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
# The latest arrival time at port sel is 1.4ns (absolute time). The total clock insertion delay or latency to the external
|
| 71 |
+
# registers is 700ps + 300ps or 1.0ns. Therefore, the relative input delay on the port is 1.4 -1.0 = 0.4ns
|
| 72 |
+
#
|
| 73 |
+
set_input_delay -max 0.4 -clock clk [get_ports sel]
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
###################################
|
| 77 |
+
# #
|
| 78 |
+
# OUTPUT TIMING #
|
| 79 |
+
# #
|
| 80 |
+
###################################
|
| 81 |
+
|
| 82 |
+
# The output delay at port out1 is 420ps + 80ps = 500ps or 0.5ns
|
| 83 |
+
#
|
| 84 |
+
set_output_delay -max 0.5 -clock clk [get_ports out1]
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
# The internal delay to out2 is 810ps. The external capturing clock edge happens 3ns after the launch edge,
|
| 88 |
+
# minus the uncertainty of 0.15ns, or 2.85ns after launch. To constrain the internal delay to 0.81ns the
|
| 89 |
+
# output delay must therefore be constrained to 2.85ns - 0.81ns = 2.04ns.
|
| 90 |
+
#
|
| 91 |
+
set_output_delay -max 2.04 -clock clk [get_ports out2]
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
# The setup time requirement on port out3 is 400ps or 0.4ns with respect to the capturing register's clock.
|
| 95 |
+
# This is, by definition, the "set_output_delay" value
|
| 96 |
+
#
|
| 97 |
+
set_output_delay -max 0.4 -clock clk [get_ports out3]
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
###################################
|
| 101 |
+
# #
|
| 102 |
+
# COMBINATIONAL LOGIC TIMING #
|
| 103 |
+
# #
|
| 104 |
+
###################################
|
| 105 |
+
|
| 106 |
+
# The maximum delay through the combinational logic is 2.45ns. This can be constrained by pretending that there are
|
| 107 |
+
# launching registers on the input ports Cin1 and Cin2 and capturing registers on the output port Cout, and applying
|
| 108 |
+
# corresponding input and output delays. The sum of the external input and output delay values must be equal to the
|
| 109 |
+
# clock period minus the clock uncertainty minus the maximum combo delay = 3ns - 0.15ns - 2.45ns = 0.4ns.
|
| 110 |
+
# This means that the input and output delay values can be 0.4 and 0.0, or 0.2 and 0.2, or 0.1 and 0.3, etc., respectively.
|
| 111 |
+
#
|
| 112 |
+
set_input_delay -max 0.3 -clock clk [get_ports Cin*]
|
| 113 |
+
set_output_delay -max 0.1 -clock clk [get_ports Cout]
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
###################################
|
| 117 |
+
# #
|
| 118 |
+
# ENVIRONMENTAL ATTRIBUTES #
|
| 119 |
+
# #
|
| 120 |
+
###################################
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
# All input ports, except clk and Cin, are driven by bufbd1 buffers
|
| 124 |
+
#
|
| 125 |
+
set_driving_cell -max -lib_cell bufbd1 \
|
| 126 |
+
[remove_from_collection [all_inputs] [get_ports "clk Cin*"]]
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
# Port Cin is a chip level input and has an input transition of 120ps or 0.12 ns
|
| 130 |
+
#
|
| 131 |
+
set_input_transition -max 0.12 [get_ports Cin*]
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
# All outputs, except Cout, drive 2x bufbd7 loads
|
| 135 |
+
#
|
| 136 |
+
set_load -max [expr {2 * [load_of cb13fs120_tsmc_max/bufbd7/I]}] [get_ports out*]
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
# Cout drives 25fF, or .025 pF
|
| 140 |
+
#
|
| 141 |
+
set_load -max 0.025 [get_ports Cout*]
|
abdelazeem201_ASIC-Design-Roadmap/PrimeTime/RUN.tcl
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 2 |
+
# PrimeTime STA run script for ORCA
|
| 3 |
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 4 |
+
|
| 5 |
+
########################
|
| 6 |
+
# Setup
|
| 7 |
+
|
| 8 |
+
source ./common_setup.tcl
|
| 9 |
+
source ./pt_setup.tcl
|
| 10 |
+
|
| 11 |
+
# Allow source to use search_path
|
| 12 |
+
set sh_source_uses_search_path true
|
| 13 |
+
|
| 14 |
+
# Do not allow black boxes for unresolved references
|
| 15 |
+
set link_create_black_boxes false
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
########################
|
| 19 |
+
# READ and LINK
|
| 20 |
+
|
| 21 |
+
read_verilog orca_routed.v.gz
|
| 22 |
+
link_design ORCA
|
| 23 |
+
|
| 24 |
+
read_parasitics ../ref/design_data/ORCA.SPEF.gz
|
| 25 |
+
|
| 26 |
+
########################
|
| 27 |
+
# Apply constraints
|
| 28 |
+
|
| 29 |
+
source -echo -verbose orca_pt_constraints.tcl
|
| 30 |
+
report_analysis_coverage
|
| 31 |
+
|
| 32 |
+
########################
|
| 33 |
+
# Save session
|
| 34 |
+
|
| 35 |
+
file delete -force orca_savesession
|
| 36 |
+
save_session orca_savesession
|
| 37 |
+
|
| 38 |
+
quit
|
abdelazeem201_ASIC-Design-Roadmap/PrimeTime/UsefulScripts/report_case_propagation.tcl
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# report_case_propagation.tcl - trace case analysis back to source(s)
|
| 2 |
+
# abdelazeem@synopsys.com
|
| 3 |
+
#
|
| 4 |
+
# v1.0 05/25/2024 abdelazeem
|
| 5 |
+
# initial release
|
| 6 |
+
# v1.01 05/31/2024 abdelazeem
|
| 7 |
+
# fix bug with parallel arcs between two pins
|
| 8 |
+
|
| 9 |
+
proc report_case_propagation {args} {
|
| 10 |
+
parse_proc_arguments -args $args results
|
| 11 |
+
|
| 12 |
+
set objects {}
|
| 13 |
+
append_to_collection objects [get_pins -quiet $results(pins_ports)]
|
| 14 |
+
append_to_collection objects [get_ports -quiet $results(pins_ports)]
|
| 15 |
+
|
| 16 |
+
# make a list of startpoint contexts to queue up
|
| 17 |
+
# (I use a flat context list instead of succumbing to the lure of recursion...)
|
| 18 |
+
set queued_contexts {}
|
| 19 |
+
foreach_in_collection object $objects {
|
| 20 |
+
lappend queued_contexts [list $object 0]
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
array unset visited_from_pins
|
| 24 |
+
array unset visited_pairs
|
| 25 |
+
while {$queued_contexts ne {}} {
|
| 26 |
+
|
| 27 |
+
# pop next to_pin off list
|
| 28 |
+
set context [lindex $queued_contexts 0]
|
| 29 |
+
foreach {to_pin indent_level} $context {}
|
| 30 |
+
set queued_contexts [lrange $queued_contexts 1 end]
|
| 31 |
+
set to_pin_name [get_object_name $to_pin]
|
| 32 |
+
|
| 33 |
+
# get list of valid from_pins with case values
|
| 34 |
+
set valid_from_pins {}
|
| 35 |
+
if {[set user_case_value [get_attribute -quiet $to_pin user_case_value]] eq {}} {
|
| 36 |
+
foreach_in_collection arc [get_timing_arcs -quiet -to $to_pin] {
|
| 37 |
+
if {[set from_pin [filter_collection [get_attribute $arc from_pin] {defined(case_value)}]] ne {}} {
|
| 38 |
+
append_to_collection -unique valid_from_pins $from_pin
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
# from the valid from_pins, get list of the from_pins for all the
|
| 44 |
+
# unvisited backwards *arcs* ending at this pin
|
| 45 |
+
# (the visited_pairs() array contains all the backwards arcs we've been down before)
|
| 46 |
+
set unvisited_from_pins {}
|
| 47 |
+
foreach_in_collection from_pin $valid_from_pins {
|
| 48 |
+
set from_pin_name [get_object_name $from_pin]
|
| 49 |
+
if {![info exists visited_pairs([list $from_pin_name $to_pin_name])]} {
|
| 50 |
+
append_to_collection unvisited_from_pins $from_pin
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
# print information about this to_pin
|
| 55 |
+
switch [get_attribute $to_pin object_class] {
|
| 56 |
+
pin {
|
| 57 |
+
if {[set ref_info [get_object_name [get_lib_cells -quiet -of [get_cells -quiet -of $to_pin]]]] eq {}} {
|
| 58 |
+
set ref_info [get_attribute [get_cells -quiet -of $to_pin] ref_name]
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
port {set ref_info "[get_attribute $to_pin port_direction] port"}
|
| 62 |
+
}
|
| 63 |
+
if {[sizeof_collection $valid_from_pins] >= 1 && [sizeof_collection $unvisited_from_pins]==0} {
|
| 64 |
+
# in this branch, we arrived at this to_pin but all backwards arcs have previously been visited
|
| 65 |
+
set branch_info " (previously covered path)"
|
| 66 |
+
} elseif {[sizeof_collection $valid_from_pins] > 1} {
|
| 67 |
+
# multiple backwards arcs exist, so there are multiple branches to trace back
|
| 68 |
+
set branch_info " (branch [expr {1+[sizeof_collection $valid_from_pins]-[sizeof_collection $unvisited_from_pins]}] of [sizeof_collection $valid_from_pins] follows)"
|
| 69 |
+
} else {
|
| 70 |
+
# just a single unambiguous path to trace back
|
| 71 |
+
set branch_info {}
|
| 72 |
+
}
|
| 73 |
+
if {$user_case_value ne {}} {
|
| 74 |
+
set case_info "user-defined case=$user_case_value"
|
| 75 |
+
} else {
|
| 76 |
+
set case_info "case=[get_attribute -quiet $to_pin case_value]"
|
| 77 |
+
}
|
| 78 |
+
echo "[string repeat { } $indent_level][get_object_name $to_pin] ($ref_info) $case_info${branch_info}"
|
| 79 |
+
|
| 80 |
+
# restart loop with next to_pin context if there's nothing to trace back
|
| 81 |
+
# (nothing to queue up)
|
| 82 |
+
if {$unvisited_from_pins eq {}} {
|
| 83 |
+
continue
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
# first, grab the first from_pin on the list
|
| 87 |
+
set from_pin [index_collection $unvisited_from_pins 0]
|
| 88 |
+
set from_pin_name [get_object_name $from_pin]
|
| 89 |
+
set unvisited_from_pins [remove_from_collection $unvisited_from_pins $from_pin]
|
| 90 |
+
|
| 91 |
+
# if there are any additional remaining from_pins, queue *this* to_pin up again
|
| 92 |
+
# so that we can trace back those other branches too
|
| 93 |
+
if {$unvisited_from_pins ne {}} {
|
| 94 |
+
set queued_contexts [linsert $queued_contexts 0 [list $to_pin $indent_level]]
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
# now, push our first unvisited from_pin onto the list of to_pins to visit next
|
| 98 |
+
# (this moves us backwards down this path, and the fact that we push it last
|
| 99 |
+
# causes the depth-first backtrace)
|
| 100 |
+
if {[sizeof_collection $valid_from_pins] > 1} {
|
| 101 |
+
incr indent_level
|
| 102 |
+
}
|
| 103 |
+
set queued_contexts [linsert $queued_contexts 0 [list $from_pin $indent_level]]
|
| 104 |
+
|
| 105 |
+
# mark this arc as visited (so we never propagate past it in the future)
|
| 106 |
+
set visited_pairs([list $from_pin_name $to_pin_name]) 1
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
echo ""
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
define_proc_attributes report_case_propagation \
|
| 113 |
+
-info "trace case analysis back to source(s)" \
|
| 114 |
+
-define_args \
|
| 115 |
+
{
|
| 116 |
+
{pins_ports {pin(s)/port(s) where case value is present} pins_ports string required}
|
| 117 |
+
}
|
| 118 |
+
|
abdelazeem201_ASIC-Design-Roadmap/PrimeTime/common_setup.tcl
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##########################################################################################
|
| 2 |
+
# common variables
|
| 3 |
+
# Script: common_setup.tcl
|
| 4 |
+
# Version: O-2018.06 (Oct. 3, 2022)
|
| 5 |
+
# Copyright (C) 2022, 2024 abdelazeem.
|
| 6 |
+
##########################################################################################
|
| 7 |
+
|
| 8 |
+
set DESIGN_NAME "ORCA" ;# The name of the top-level design
|
| 9 |
+
|
| 10 |
+
set DESIGN_REF_DATA_PATH "../ref" ;# Absolute path prefix variable for library/design data.
|
| 11 |
+
# Use this variable to prefix the common absolute path to
|
| 12 |
+
# the common variables defined below.
|
| 13 |
+
# Absolute paths are mandatory for hierarchical RM flow.
|
| 14 |
+
|
| 15 |
+
##########################################################################################
|
| 16 |
+
# Library Setup Variables
|
| 17 |
+
##########################################################################################
|
| 18 |
+
|
| 19 |
+
# For the following variables, use a blank space to separate multiple entries
|
| 20 |
+
# Example: set TARGET_LIBRARY_FILES "lib1.db lib2.db lib3.db"
|
| 21 |
+
|
| 22 |
+
set ADDITIONAL_SEARCH_PATH "$DESIGN_REF_DATA_PATH/design_data $DESIGN_REF_DATA_PATH/libs $DESIGN_REF_DATA_PATH/scripts $DESIGN_REF_DATA_PATH/tcl_procs ./pt_scripts" ; # Additional search path to be added to the default search path
|
| 23 |
+
|
| 24 |
+
set TARGET_LIBRARY_FILES "sc_max.db" ;# Target technology logical libraries
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
set ADDITIONAL_LINK_LIB_FILES "io_max.db \
|
| 28 |
+
special.db \
|
| 29 |
+
mem_max.db " ;# Extra link logical libraries not included in TARGET_LIBRARY_FILES
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
set MIN_LIBRARY_FILES "";# List of max min library pairs "max1 min1 max2 min2 max3 min3"...
|
| 34 |
+
|
| 35 |
+
set MW_REFERENCE_LIB_DIRS "" ;# Milkyway reference libraries
|
| 36 |
+
|
| 37 |
+
set MW_REFERENCE_CONTROL_FILE "" ;# Reference Control file to define the MW ref libs
|
| 38 |
+
|
| 39 |
+
set TECH_FILE "${DESIGN_REF_DATA_PATH}/libs/tech/cb13_6m.tf" ;# Milkyway technology file
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
set MAP_FILE "${DESIGN_REF_DATA_PATH}/libs/tlup/cb13_6m.map" ;# Mapping file for TLUplus
|
| 43 |
+
|
| 44 |
+
set TLUPLUS_MAX_FILE "${DESIGN_REF_DATA_PATH}/libs/tlup/cb13_6m_max.tluplus" ;# Max TLUplus file
|
| 45 |
+
|
| 46 |
+
set TLUPLUS_MIN_FILE "${DESIGN_REF_DATA_PATH}/libs/tlup/cb13_6m_min.tluplus" ;# Min TLUplus file
|
| 47 |
+
|
| 48 |
+
set MW_POWER_NET "VDD" ;#
|
| 49 |
+
set MW_POWER_PORT "VDD" ;#
|
| 50 |
+
set MW_GROUND_NET "VSS" ;#
|
| 51 |
+
set MW_GROUND_PORT "VSS" ;#
|
| 52 |
+
|
| 53 |
+
set MIN_ROUTING_LAYER "" ;# Min routing layer
|
| 54 |
+
set MAX_ROUTING_LAYER "METAL2" ;# Max routing layer
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
##########################################################################################
|
| 58 |
+
# Multi-Voltage Common Variables
|
| 59 |
+
#
|
| 60 |
+
# Define the following MV common variables for the RM scripts for multi-voltage flows.
|
| 61 |
+
# Use as few or as many of the following definitions as needed by your design.
|
| 62 |
+
##########################################################################################
|
| 63 |
+
|
| 64 |
+
set PD1 "" ;# Name of power domain/voltage area 1
|
| 65 |
+
set PD1_CELLS "" ;# Instances to include in power domain/voltage area 1
|
| 66 |
+
set VA1_COORDINATES {} ;# Coordinates for voltage area 1
|
| 67 |
+
set MW_POWER_NET1 "VDD1" ;# Power net for voltage area 1
|
| 68 |
+
set MW_POWER_PORT1 "VDD" ;# Power port for voltage area 1
|
| 69 |
+
|
| 70 |
+
set PD2 "" ;# Name of power domain/voltage area 2
|
| 71 |
+
set PD2_CELLS "" ;# Instances to include in power domain/voltage area 2
|
| 72 |
+
set VA2_COORDINATES {} ;# Coordinates for voltage area 2
|
| 73 |
+
set MW_POWER_NET2 "VDD2" ;# Power net for voltage area 2
|
| 74 |
+
set MW_POWER_PORT2 "VDD" ;# Power port for voltage area 2
|
| 75 |
+
|
| 76 |
+
set PD3 "" ;# Name of power domain/voltage area 3
|
| 77 |
+
set PD3_CELLS "" ;# Instances to include in power domain/voltage area 3
|
| 78 |
+
set VA3_COORDINATES {} ;# Coordinates for voltage area 3
|
| 79 |
+
set MW_POWER_NET3 "VDD3" ;# Power net for voltage area 3
|
| 80 |
+
set MW_POWER_PORT3 "VDD" ;# Power port for voltage area 3
|
| 81 |
+
|
| 82 |
+
set PD4 "" ;# Name of power domain/voltage area 4
|
| 83 |
+
set PD4_CELLS "" ;# Instances to include in power domain/voltage area 4
|
| 84 |
+
set VA4_COORDINATES {} ;# Coordinates for voltage area 4
|
| 85 |
+
set MW_POWER_NET4 "VDD4" ;# Power net for voltage area 4
|
| 86 |
+
set MW_POWER_PORT4 "VDD" ;# Power port for voltage area 4
|
abdelazeem201_ASIC-Design-Roadmap/PrimeTime/pt.tcl
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
################################################################################
|
| 2 |
+
start_profile
|
| 3 |
+
set timing_update_status_level high
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
################################################################################
|
| 7 |
+
set sh_source_emits_line_numbers E
|
| 8 |
+
set sh_continue_on_error true
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
#################################################################################
|
| 12 |
+
# PrimeTime Script
|
| 13 |
+
# Script: pt.tcl
|
| 14 |
+
# Version: O-2018.06-SP2 (September. 28, 2018)
|
| 15 |
+
# Copyright (C) 2022-2024 abdelazeem.
|
| 16 |
+
#################################################################################
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
##################################################################
|
| 20 |
+
# Source common and pt_setup.tcl File #
|
| 21 |
+
##################################################################
|
| 22 |
+
|
| 23 |
+
# Allow source to use search_path
|
| 24 |
+
set sh_source_uses_search_path true
|
| 25 |
+
source ./common_setup.tcl
|
| 26 |
+
source ./pt_setup.tcl
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
##################################################################
|
| 30 |
+
# Search Path, Library and Operating Condition Section #
|
| 31 |
+
##################################################################
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
set report_default_significant_digits 3 ;
|
| 35 |
+
set sh_source_uses_search_path true
|
| 36 |
+
set search_path " $search_path" ;
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
##################################################################
|
| 40 |
+
# Netlist Reading Section #
|
| 41 |
+
##################################################################
|
| 42 |
+
|
| 43 |
+
set link_path " $link_path"
|
| 44 |
+
|
| 45 |
+
read_verilog $NETLIST_FILES
|
| 46 |
+
|
| 47 |
+
current_design $DESIGN_NAME
|
| 48 |
+
link_design -verbose
|
| 49 |
+
|
| 50 |
+
##################################################################
|
| 51 |
+
# Back Annotation Section #
|
| 52 |
+
##################################################################
|
| 53 |
+
|
| 54 |
+
read_parasitics $PARASITIC_FILES
|
| 55 |
+
|
| 56 |
+
report_annotated_parasitics -check > $REPORTS_DIR/rap.report
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
##################################################################
|
| 60 |
+
# Reading Constraints Section #
|
| 61 |
+
##################################################################
|
| 62 |
+
if {[info exists CONSTRAINT_FILES]} {
|
| 63 |
+
foreach constraint_file $CONSTRAINT_FILES {
|
| 64 |
+
if {[file extension $constraint_file] eq ".sdc"} {
|
| 65 |
+
read_sdc -echo $constraint_file
|
| 66 |
+
} else {
|
| 67 |
+
source -echo $constraint_file
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
##################################################################
|
| 74 |
+
# Clock Tree Synthesis Section #
|
| 75 |
+
##################################################################
|
| 76 |
+
|
| 77 |
+
set_propagated_clock [all_clocks]
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
##################################################################
|
| 81 |
+
# Update_timing and check_timing Section #
|
| 82 |
+
##################################################################
|
| 83 |
+
|
| 84 |
+
update_timing -full
|
| 85 |
+
|
| 86 |
+
# Ensure design is properly constrained
|
| 87 |
+
check_timing -verbose > $REPORTS_DIR/ct.report
|
| 88 |
+
|
| 89 |
+
##################################################################
|
| 90 |
+
# Report_timing Section #
|
| 91 |
+
##################################################################
|
| 92 |
+
# Report Timing
|
| 93 |
+
report_timing -slack_lesser_than 0.0 -delay min_max -nosplit -input -net -sign 4 > $REPORTS_DIR/rt.report
|
| 94 |
+
report_clock -skew -attribute > $REPORTS_DIR/rc.report
|
| 95 |
+
report_analysis_coverage > $REPORTS_DIR/rac.report
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
#################################################################
|
| 99 |
+
# Save Session #
|
| 100 |
+
#################################################################
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
##########################################################################
|
| 112 |
+
stop_profile
|
| 113 |
+
save_session my_savesession
|
| 114 |
+
print_message_info
|
| 115 |
+
exit
|
| 116 |
+
##########################################################################
|
abdelazeem201_ASIC-Design-Roadmap/PrimeTime/pt_setup.tcl
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
### pt_setup.tcl file ###
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
### Start of PrimeTime Runtime Variables ###
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
##########################################################################################
|
| 12 |
+
# PrimeTime Variables PrimeTime script
|
| 13 |
+
# Script: pt_setup.tcl
|
| 14 |
+
# Version: O-2018.06-SP2 (April. 28, 2024)
|
| 15 |
+
# Copyright (C) 2022-2024 abdelazeem.
|
| 16 |
+
##########################################################################################
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
######################################
|
| 20 |
+
# Report and Results directories
|
| 21 |
+
######################################
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
set REPORTS_DIR "reports"
|
| 25 |
+
file mkdir $REPORTS_DIR
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
######################################
|
| 29 |
+
# Library & Design Setup
|
| 30 |
+
######################################
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
### Mode : Generic
|
| 34 |
+
|
| 35 |
+
set search_path ". $ADDITIONAL_SEARCH_PATH $search_path"
|
| 36 |
+
set target_library $TARGET_LIBRARY_FILES
|
| 37 |
+
set link_path "* $target_library $ADDITIONAL_LINK_LIB_FILES"
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
# Provide list of Verilog netlist file. It can be compressed ---example "A.v B.v C.v"
|
| 41 |
+
set NETLIST_FILES "orca_routed.v.gz"
|
| 42 |
+
|
| 43 |
+
# DESIGN_NAME will be checked for existence from common_setup.tcl
|
| 44 |
+
if {[string length $DESIGN_NAME] > 0} {
|
| 45 |
+
} else {
|
| 46 |
+
set DESIGN_NAME "" ;# The name of the top-level design
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
######################################
|
| 64 |
+
# Back Annotation File Section
|
| 65 |
+
######################################
|
| 66 |
+
|
| 67 |
+
#PARASITIC Files --- example "top.sbpf A.sbpf"
|
| 68 |
+
#The path (instance name) and name of the parasitic file --- example "top.spef A.spef"
|
| 69 |
+
#Each PARASITIC_PATH entry corresponds to the related PARASITIC_FILE for the specific block"
|
| 70 |
+
#For a single toplevel PARASITIC file please use the toplevel design name in PARASITIC_PATHS variable."
|
| 71 |
+
set PARASITIC_PATHS "ORCA"
|
| 72 |
+
set PARASITIC_FILES "ORCA.SPEF.gz"
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
######################################
|
| 77 |
+
# Constraint Section Setup
|
| 78 |
+
######################################
|
| 79 |
+
# Provide one or a list of constraint files. for example "top.sdc" or "clock.sdc io.sdc te.sdc"
|
| 80 |
+
set CONSTRAINT_FILES "var_Day1.tcl orca_pt_constraints.tcl"
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
######################################
|
| 96 |
+
# End
|
| 97 |
+
######################################
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### End of PrimeTime Runtime Variables ###
|
abdelazeem201_ASIC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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🧠 ASIC Design Roadmap
|
| 2 |
+
|
| 3 |
+
> Empowering students worldwide with a complete roadmap to learn **Application Specific Integrated Circuit (ASIC)** Design — from logic to layout, RTL to GDSII.
|
| 4 |
+
|
| 5 |
+
<div align="center">بِسْمِ اللهِ الرَّحْمنِ الرَّحِيم</div>
|
| 6 |
+
<div align="center">“وَمَا أُوتِيتُمْ مِنَ الْعِلْمِ إِلَّا قَلِيلًا”</div>
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
The journey of designing an ASIC (Application Specific Integrated Circuit) is long and deeply technical — transforming an idea into silicon requires precision, planning, and patience. Despite the final chip being only a few nanometers in scale, the design process includes multiple sophisticated steps filled with engineering challenges and opportunities for learning.
|
| 11 |
+
|
| 12 |
+
ASICs are purpose-built chips tailored for specific applications. Unlike general-purpose processors or FPGAs, they are optimized for power, performance, and area (PPA), making them ideal for mass production. Their circuits, built from permanent gates and flip-flops, are described using hardware description languages such as Verilog, SystemVerilog, or VHDL.
|
| 13 |
+
|
| 14 |
+
> ✅ More power-efficient than FPGAs
|
| 15 |
+
> ✅ Capable of higher frequencies
|
| 16 |
+
> ✅ Ideal for high-volume production
|
| 17 |
+
> ⚠️ Not suitable for frequent upgrades
|
| 18 |
+
> ⚠️ Bugs after tape-out are costly
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# 📌 Why This Roadmap?
|
| 24 |
+
Many students and entry-level engineers want to break into the world of IC design but are unsure where to begin or how to build strong fundamentals. When you search for resources online, the flood of random posts and YouTube videos can leave you even more lost and overwhelmed. That’s why I decided to build this open-source roadmap — to make the learning process smoother and more organized for anyone looking to enter the industry.
|
| 25 |
+
|
| 26 |
+
# 🎯 Who Is This For?
|
| 27 |
+
Whether you’re a student, fresh graduate, or an engineer transitioning into VLSI, this roadmap is tailored to help you navigate Physical Design — one of the most critical and challenging domains in ASIC development.
|
| 28 |
+
|
| 29 |
+
# 🚀 What’s Inside?
|
| 30 |
+
This roadmap is not just a list of tools or topics. It’s a carefully structured guide with:
|
| 31 |
+
|
| 32 |
+
> * Step-by-step learning paths from basic concepts to industry-level knowledge
|
| 33 |
+
> * Hands-on projects and scripts to give you practical experience
|
| 34 |
+
> * Tips and insights from real-world Physical Design workflows
|
| 35 |
+
> * Links to trusted resources — not just random Google or YouTube results
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## 📘 Table of Contents
|
| 41 |
+
|
| 42 |
+
- [Introduction](#introduction)
|
| 43 |
+
- [Fundamentals](#fundamentals)
|
| 44 |
+
- [ASIC Design Flow](#asic-design-flow)
|
| 45 |
+
- [Awesome Digital IC Resources](#awesome-digital-ic-resources)
|
| 46 |
+
- [Project Repositories and IPs](#project-repositories-and-ips)
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## 🧾 Introduction
|
| 51 |
+
|
| 52 |
+
The aim of this roadmap is to provide aspiring ASIC and Digital IC designers a clear path to follow — with carefully selected courses, resources, and projects that balance theory and practice. Whether you're a beginner or transitioning from FPGA/Embedded design, this roadmap is crafted to guide you through every phase of ASIC development.
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## 🧱 Fundamentals
|
| 57 |
+
|
| 58 |
+
### 1. **Digital Electronics & CMOS Basics**
|
| 59 |
+
- [Digital Electronics (Playlist)](https://www.youtube.com/playlist?list=PLMSBalys69yzp1vrmnYAmpRFiptbuGuaj) 📽
|
| 60 |
+
*Focus: Logic gates, FFs, CMOS inverter, MOSFET switching.*
|
| 61 |
+
|
| 62 |
+
### 2. **Digital Logic Design / Frontend**
|
| 63 |
+
- [Digital Design – CS221 by Dr. Waleed Youssef](https://youtube.com/playlist?list=PLoK2Lr1miEm8b6Vv5zAfsbMEPZ1C7fCQw) 📽
|
| 64 |
+
- [Verilog Modeling – Dr. Indranil Sen Gupta](https://www.youtube.com/playlist?list=PLJ5C_6qdAvBELELTSPgzYkQg3HgclQh-5) 📽
|
| 65 |
+
|
| 66 |
+
### 3. **Computer Architecture**
|
| 67 |
+
- [Digital Design and Computer Architecture (YouTube)](https://www.youtube.com/playlist?list=PL5Q2soXY2Zi_FRrloMa2fUYWPGiZUBQo2) 📽
|
| 68 |
+
|
| 69 |
+
### 4. **Digital IC Design (RTL to ASIC)**
|
| 70 |
+
> Based on "CMOS VLSI Design" by Weste & Harris
|
| 71 |
+
- [Part 1](https://youtube.com/playlist?list=PLMSBalys69yzvAKErDt7tT7O-iIKPlOCP) 📽
|
| 72 |
+
- [Part 2](https://youtube.com/playlist?list=PLMSBalys69yxoIjeZ2Q3fxs69cGCU14B1) 📽
|
| 73 |
+
- [Part 3](https://youtube.com/playlist?list=PLMSBalys69yw1tSoF42QW9jbbC0-UeCAy) 📽
|
| 74 |
+
|
| 75 |
+
---
|
| 76 |
+
|
| 77 |
+
## 🔧 ASIC Design Flow
|
| 78 |
+
|
| 79 |
+
### Logic Synthesis & Timing Closure
|
| 80 |
+
- [Advanced Logic Synthesis by Dhiraj Taneja](https://www.youtube.com/playlist?list=PLbMVogVj5nJQe0_9YJlN9S7ktkA8DI-fL) 📽
|
| 81 |
+
*Includes Synopsys DC/PT Labs – skip first 12 videos if needed*
|
| 82 |
+
|
| 83 |
+
### Physical Design
|
| 84 |
+
- [Physical Design – Prof. Indranil Sengupta](https://www.youtube.com/playlist?list=PLU8VFS-HdvKtKswbcvvA8yVhzleTV7OE8) 📽
|
| 85 |
+
*Covers Floorplanning, Placement, CTS, Routing, DRC/LVS*
|
| 86 |
+
|
| 87 |
+
- [RTL to GDSII (by Adi Teman)](https://www.youtube.com/playlist?list=PLZU5hLL_713x0_AV_rVbay0pWmED7992G) 📽
|
| 88 |
+
*Very recommended* ✅
|
| 89 |
+
|
| 90 |
+
- [My Slideshare RTL2GDSII Notes](https://www.slideshare.net/AhmedAbdelazeem28/presentations) 📚
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## 🌍 Awesome Digital IC Resources
|
| 95 |
+
|
| 96 |
+
> Curated lists and tools for ASIC/VLSI/FPGA engineers
|
| 97 |
+
|
| 98 |
+
| Name | Type | Description |
|
| 99 |
+
|------|------|-------------|
|
| 100 |
+
| [Awesome FPGA](https://github.com/Vitorian/awesome-fpga) | 📍⭐ | FPGA resources and boards |
|
| 101 |
+
| [Awesome HDL](https://github.com/drom/awesome-hdl) | 📍⭐ | Hardware description languages |
|
| 102 |
+
| [Awesome Open Source EDA](https://github.com/clin99/awesome-eda) | 📍 | Open-source EDA tools |
|
| 103 |
+
| [Awesome Hardware Verification](https://github.com/ben-marshall/awesome-open-hardware-verification) | 📍 | Verification tools |
|
| 104 |
+
| [Awesome HWD Tools](https://github.com/TM90/awesome-hwd-tools) | 📍 | Open-source IC design tools |
|
| 105 |
+
| [Awesome Lattice FPGAs](https://github.com/kelu124/awesome-latticeFPGAs) | 📍 | Lattice FPGA board list |
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## 📦 Project Repositories and IPs
|
| 110 |
+
|
| 111 |
+
### Core IPs and Repos
|
| 112 |
+
- [OpenCores](https://opencores.org/) ⭐ - IP Cores Archive
|
| 113 |
+
- [FreeCores](http://freecores.github.io/) 📍 - Legacy IPs from OpenCores
|
| 114 |
+
- [Basic Verilog Modules](https://github.com/pConst/basic_verilog) 📍 - Synthesizable Verilog modules
|
| 115 |
+
- [32 Mini Projects (Verilog)](https://github.com/sudhamshu091/32-Verilog-Mini-Projects) 📍👶
|
| 116 |
+
|
| 117 |
+
### Communication Protocols
|
| 118 |
+
- [Alex Forencich's IPs](http://alexforencich.com/wiki/en/verilog/start) - PCIe, Ethernet, I2C, UART and more
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
### Information Technology
|
| 122 |
+
|
| 123 |
+
#### RISC-V
|
| 124 |
+
|
| 125 |
+
- [RISC-V Instruction Set Manual](https://github.com/riscv/riscv-isa-manual) - This repository contains the LaTeX source for the draft RISC-V Instruction Set Manual.
|
| 126 |
+
|
| 127 |
+
- [RISC-V Exchange: Cores & SoCs](https://riscv.org/exchanges/cores-socs/) - A list of RICS-V cores and SoCs.
|
| 128 |
+
- [PULP](https://github.com/pulp-platform/pulp) - Open source Parallel Ultra-Low-Power RISC-V core.
|
| 129 |
+
- [openc910](https://github.com/T-head-Semi/openc910) 📍 - OpenXuantie C910 Core.
|
| 130 |
+
- [XiangShan](https://github.com/OpenXiangShan/XiangShan) 📍 - Open-source high-performance RISC-V processor.
|
| 131 |
+
- [riscv-starship](https://github.com/riscv-zju/riscv-starship) 📍 - Run rocket-chip on FPGA(Xilinx Virtex-7 VC707).
|
| 132 |
+
- [Wujian100](https://github.com/T-head-Semi/wujian100_open) 📍 - A MCU base SoC.
|
| 133 |
+
- [picorv32](https://github.com/YosysHQ/picorv32) 📍 - A Size-Optimized RISC-V CPU.
|
| 134 |
+
- [Hummingbirdv2 E203 Core and SoC](https://github.com/riscv-mcu/e203_hbirdv2) 📍 [Docs](https://doc.nucleisys.com/hbirdv2/) - A Ultra-Low Power RISC-V Core.
|
| 135 |
+
- [darkriscv](https://github.com/darklife/darkriscv) 📍 - A proof of concept for the opensource RISC-V instruction set.
|
| 136 |
+
- [CVA6 RISC-V CPU](https://github.com/openhwgroup/cva6) 📍 - An application class 6-stage RISC-V CPU capable of booting Linux.
|
| 137 |
+
- [VexRiscv](https://github.com/SpinalHDL/VexRiscv) 📍 - A FPGA friendly 32 bit RISC-V CPU implementation.
|
| 138 |
+
|
| 139 |
+
#### Others
|
| 140 |
+
|
| 141 |
+
- [zipcpu](https://github.com/ZipCPU/zipcpu) ⭐📍 - with detailed comments.
|
| 142 |
+
- [openmsp430](https://opencores.org/projects/openmsp430) - The openMSP430 is a synthesizable 16bit microcontroller core written in Verilog.
|
| 143 |
+
- [Nyuzi Processor](https://github.com/jbush001/NyuziProcessor) 📍 - GPGPU microprocessor architecture.
|
| 144 |
+
|
| 145 |
+
## Tutorials and Courses 💬[Intro](./Tutorials%20and%20Courses/README.md)
|
| 146 |
+
|
| 147 |
+
- [zipcpu](http://zipcpu.com/tutorial/) 👶 - Verilog, Formal Verification and Verilator Beginner's Tutorial
|
| 148 |
+
- [WORLD OF ASIC](http://asic-world.com/) ⭐ - A great source of detailed VLSI tutorials and examples.
|
| 149 |
+
|
| 150 |
+
### HDL
|
| 151 |
+
|
| 152 |
+
- More information about hardware description language on [Awesome HDL](https://github.com/drom/awesome-hdl)
|
| 153 |
+
|
| 154 |
+
#### Verilog Grammar
|
| 155 |
+
|
| 156 |
+
- [Verilog TUTORIAL for beginners](http://www.referencedesigner.com/tutorials/verilog/verilog_01.php) 👶 - A tutorial based upon free Icarus Verilog compiler.
|
| 157 |
+
- [ChipVerify: Verilog Tutorial](https://www.chipverify.com/verilog/verilog-tutorial) - A guide for someone new to Verilog.
|
| 158 |
+
- [Verilog/SystemVerilog Guide](https://github.com/mikeroyal/Verilog-SystemVerilog-Guide) 📍 - A guide covering Verilog & SystemVerilog.
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
#### VHDL Grammar
|
| 162 |
+
|
| 163 |
+
- [VHDL Guide](https://github.com/mikeroyal/VHDL-Guide) 📍 - A guide covering VHDL.
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
### Verification
|
| 167 |
+
|
| 168 |
+
- [Verification Academy](https://verificationacademy.com/) - The most comprehensive resource for verification training.
|
| 169 |
+
- [Verification Guide](https://www.verificationguide.com/p/home.html) - Tutorials with links to example codes on EDA Playground.
|
| 170 |
+
- [Doulos](https://www.doulos.com) - Global training solutions for engineers creating the world's electronics products.
|
| 171 |
+
- [testbench](http://www.testbench.in/) - Some training articals for systemverilog.
|
| 172 |
+
- [ClueLogic](http://cluelogic.com) - Providing the clues to solve your verification problems.
|
| 173 |
+
- [ChipVerify](https://www.chipverify.com/) - A simple and complete set of verilog/System Verilog/UVM tutorials.
|
| 174 |
+
|
| 175 |
+
### Build a CPU
|
| 176 |
+
|
| 177 |
+
- [RISC-V Guide](https://github.com/mikeroyal/RISC-V-Guide) 📍 - A guide covering the RISC-V Architecture.
|
| 178 |
+
- [ARM Guide](https://github.com/mikeroyal/ARM-Guide) 📍 - A guide covering ARM architecture.
|
| 179 |
+
- [nand2tetris](https://www.nand2tetris.org/) - Build an advanced computer from nand gate.
|
| 180 |
+
- [Building a RISC-V CPU Core - edX](https://www.edx.org/course/building-a-risc-v-cpu-core) 📽 - Build a RISC-V cpu core. No prior knowledge of digital logic design is required.
|
| 181 |
+
- [Build a Modern Computer from First Principles: From Nand to Tetris - coursera](https://www.coursera.org/learn/build-a-computer "依据基本原理构建现代计算机:从与非门到俄罗斯方块(基于项目的课程)") 📽 - Build a modern computer system.
|
| 182 |
+
|
| 183 |
+
### FPGA
|
| 184 |
+
|
| 185 |
+
- [FPGA Tutorial](https://github.com/LeiWang1999/FPGA)
|
| 186 |
+
- [Complex Programmable Logic Device (CPLD) Guide](https://github.com/mikeroyal/CPLD-Guide) 📍 - A guide covering CPLD.
|
| 187 |
+
|
| 188 |
+
## Tools
|
| 189 |
+
|
| 190 |
+
- [EDA Playground](https://www.edaplayground.com/) - Edit, save, simulate, synthesize SystemVerilog, Verilog, VHDL and other HDLs from your web browser.
|
| 191 |
+
- [tree-core-ide](https://github.com/microdynamics-cpu/tree-core-ide) 📍- A VSCode-based HDL extension.
|
| 192 |
+
- [WaveDrom](https://wavedrom.com/) - Digital Timing Diagram everywhere
|
| 193 |
+
- [Icarus Verilog](http://iverilog.icarus.com/) 📍[Github](https://github.com/steveicarus/iverilog) - A Verilog simulation and synthesis tool.
|
| 194 |
+
- [GTKWave](http://gtkwave.sourceforge.net/) - GTKWave is a fully featured GTK+ based wave viewer.
|
| 195 |
+
- [OpenROAD](https://theopenroadproject.org/) 💬[Doc](https://openroad.readthedocs.io/en/latest/main/README.html) 📍[Github](https://github.com/The-OpenROAD-Project/OpenROAD) - An RTL-to-GDS Flow
|
| 196 |
+
- More information about hardware dv tools on [Awesome Open Hardware Verification - Tools](https://github.com/ben-marshall/awesome-open-hardware-verification#Tools) and [Awesome HWD Tools](https://github.com/TM90/awesome-hwd-tools)
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
## Online Judge Platforms
|
| 201 |
+
|
| 202 |
+
- [HDL bits](https://hdlbits.01xz.net/wiki/Main_Page) - A collection of small circuit design exercises for practicing digital hardware design using Verilog Hardware Description Language (HDL).
|
| 203 |
+
- [nowcoder - Verilog Part](https://www.nowcoder.com/exam/oj?page=1&tab=Verilog%E7%AF%87&topicId=301) - A verilog oj platform.
|
| 204 |
+
---
|
| 205 |
+
|
| 206 |
+
## 🧠 Final Thoughts
|
| 207 |
+
|
| 208 |
+
🔹 Start slow, stay consistent.
|
| 209 |
+
🔹 Simulate everything before synthesizing.
|
| 210 |
+
🔹 Join VLSI communities and open-source projects.
|
| 211 |
+
🔹 Learn by doing – replicate designs, break them, and fix them.
|
| 212 |
+
|
| 213 |
+
If this roadmap helped you, consider sharing it with others or contributing back to the repo!
|
| 214 |
+
📬 For inquiries or collaborations: [a.abdelazeem201@gmail.com](mailto:a.abdelazeem201@gmail.com)
|
| 215 |
+
|
| 216 |
+
---
|
| 217 |
+
|
| 218 |
+
> _“Whoever treads a path in search of knowledge, Allah will make easy for him the path to Paradise.” – Prophet Muhammad ﷺ_
|
| 219 |
+
|
| 220 |
+
|
abdelaze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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*******************************************************************************
|
| 2 |
+
* This file is owned and controlled by Xilinx and must be used solely *
|
| 3 |
+
* for design, simulation, implementation and creation of design files *
|
| 4 |
+
* limited to Xilinx devices or technologies. Use with non-Xilinx *
|
| 5 |
+
* devices or technologies is expressly prohibited and immediately *
|
| 6 |
+
* terminates your license. *
|
| 7 |
+
* *
|
| 8 |
+
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" SOLELY *
|
| 9 |
+
* FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX DEVICES. BY *
|
| 10 |
+
* PROVIDING THIS DESIGN, CODE, OR INFORMATION AS ONE POSSIBLE *
|
| 11 |
+
* IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, XILINX IS *
|
| 12 |
+
* MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE FROM ANY *
|
| 13 |
+
* CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING ANY *
|
| 14 |
+
* RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY *
|
| 15 |
+
* DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE *
|
| 16 |
+
* IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR *
|
| 17 |
+
* REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF *
|
| 18 |
+
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
| 19 |
+
* PARTICULAR PURPOSE. *
|
| 20 |
+
* *
|
| 21 |
+
* Xilinx products are not intended for use in life support appliances, *
|
| 22 |
+
* devices, or systems. Use in such applications are expressly *
|
| 23 |
+
* prohibited. *
|
| 24 |
+
* *
|
| 25 |
+
* (c) Copyright 1995-2023 Xilinx, Inc. *
|
| 26 |
+
* All rights reserved. *
|
| 27 |
+
*******************************************************************************/
|
| 28 |
+
// You must compile the wrapper file blk_mem_zed.v when simulating
|
| 29 |
+
// the core, blk_mem_zed. When compiling the wrapper file, be sure to
|
| 30 |
+
// reference the XilinxCoreLib Verilog simulation library. For detailed
|
| 31 |
+
// instructions, please refer to the "CORE Generator Help".
|
| 32 |
+
|
| 33 |
+
// The synthesis directives "translate_off/translate_on" specified below are
|
| 34 |
+
// supported by Xilinx, Mentor Graphics and Synplicity synthesis
|
| 35 |
+
// tools. Ensure they are correct for your synthesis tool(s).
|
| 36 |
+
|
| 37 |
+
`timescale 1ns/1ps
|
| 38 |
+
|
| 39 |
+
module blk_mem_zed #(
|
| 40 |
+
parameter filename = "mem0.mif")
|
| 41 |
+
(
|
| 42 |
+
clka,
|
| 43 |
+
ena,
|
| 44 |
+
wea,
|
| 45 |
+
addra,
|
| 46 |
+
dina,
|
| 47 |
+
douta
|
| 48 |
+
);
|
| 49 |
+
|
| 50 |
+
input clka;
|
| 51 |
+
input ena;
|
| 52 |
+
input [0 : 0] wea;
|
| 53 |
+
input [13 : 0] addra;
|
| 54 |
+
input [7 : 0] dina;
|
| 55 |
+
output [7 : 0] douta;
|
| 56 |
+
|
| 57 |
+
// synthesis translate_off
|
| 58 |
+
|
| 59 |
+
BLK_MEM_GEN_V7_1 #(
|
| 60 |
+
.C_ADDRA_WIDTH(14),
|
| 61 |
+
.C_ADDRB_WIDTH(14),
|
| 62 |
+
.C_ALGORITHM(1),
|
| 63 |
+
.C_AXI_ID_WIDTH(4),
|
| 64 |
+
.C_AXI_SLAVE_TYPE(0),
|
| 65 |
+
.C_AXI_TYPE(1),
|
| 66 |
+
.C_BYTE_SIZE(9),
|
| 67 |
+
.C_COMMON_CLK(0),
|
| 68 |
+
.C_DEFAULT_DATA(""),
|
| 69 |
+
.C_DISABLE_WARN_BHV_COLL(0),
|
| 70 |
+
.C_DISABLE_WARN_BHV_RANGE(0),
|
| 71 |
+
.C_ENABLE_32BIT_ADDRESS(0),
|
| 72 |
+
.C_FAMILY("zynq"),
|
| 73 |
+
.C_HAS_AXI_ID(0),
|
| 74 |
+
.C_HAS_ENA(1),
|
| 75 |
+
.C_HAS_ENB(0),
|
| 76 |
+
.C_HAS_INJECTERR(0),
|
| 77 |
+
.C_HAS_MEM_OUTPUT_REGS_A(0),
|
| 78 |
+
.C_HAS_MEM_OUTPUT_REGS_B(0),
|
| 79 |
+
.C_HAS_MUX_OUTPUT_REGS_A(0),
|
| 80 |
+
.C_HAS_MUX_OUTPUT_REGS_B(0),
|
| 81 |
+
.C_HAS_REGCEA(0),
|
| 82 |
+
.C_HAS_REGCEB(0),
|
| 83 |
+
.C_HAS_RSTA(0),
|
| 84 |
+
.C_HAS_RSTB(0),
|
| 85 |
+
.C_HAS_SOFTECC_INPUT_REGS_A(0),
|
| 86 |
+
.C_HAS_SOFTECC_OUTPUT_REGS_B(0),
|
| 87 |
+
.C_INIT_FILE_NAME(filename),
|
| 88 |
+
//.C_INIT_FILE_NAME(""),
|
| 89 |
+
.C_INITA_VAL(""),
|
| 90 |
+
.C_INITB_VAL(""),
|
| 91 |
+
.C_INTERFACE_TYPE(0),
|
| 92 |
+
.C_LOAD_INIT_FILE(1),
|
| 93 |
+
//.C_LOAD_INIT_FILE(0),
|
| 94 |
+
.C_MEM_TYPE(0),
|
| 95 |
+
.C_MUX_PIPELINE_STAGES(0),
|
| 96 |
+
.C_PRIM_TYPE(1),
|
| 97 |
+
.C_READ_DEPTH_A(16384),
|
| 98 |
+
.C_READ_DEPTH_B(16384),
|
| 99 |
+
.C_READ_WIDTH_A(8),
|
| 100 |
+
.C_READ_WIDTH_B(8),
|
| 101 |
+
.C_RST_PRIORITY_A("CE"),
|
| 102 |
+
.C_RST_PRIORITY_B("CE"),
|
| 103 |
+
.C_RST_TYPE("SYNC"),
|
| 104 |
+
.C_RSTRAM_A(0),
|
| 105 |
+
.C_RSTRAM_B(0),
|
| 106 |
+
.C_SIM_COLLISION_CHECK("ALL"),
|
| 107 |
+
.C_USE_BYTE_WEA(0),
|
| 108 |
+
.C_USE_BYTE_WEB(0),
|
| 109 |
+
.C_USE_DEFAULT_DATA(0),
|
| 110 |
+
.C_USE_ECC(0),
|
| 111 |
+
.C_USE_SOFTECC(0),
|
| 112 |
+
.C_WEA_WIDTH(1),
|
| 113 |
+
.C_WEB_WIDTH(1),
|
| 114 |
+
.C_WRITE_DEPTH_A(16384),
|
| 115 |
+
.C_WRITE_DEPTH_B(16384),
|
| 116 |
+
.C_WRITE_MODE_A("READ_FIRST"),
|
| 117 |
+
.C_WRITE_MODE_B("WRITE_FIRST"),
|
| 118 |
+
.C_WRITE_WIDTH_A(8),
|
| 119 |
+
.C_WRITE_WIDTH_B(8),
|
| 120 |
+
.C_XDEVICEFAMILY("zynq")
|
| 121 |
+
)
|
| 122 |
+
inst (
|
| 123 |
+
.CLKA(clka),
|
| 124 |
+
.ENA(ena),
|
| 125 |
+
.WEA(wea),
|
| 126 |
+
.ADDRA(addra),
|
| 127 |
+
.DINA(dina),
|
| 128 |
+
.DOUTA(douta),
|
| 129 |
+
.RSTA(),
|
| 130 |
+
.REGCEA(),
|
| 131 |
+
.CLKB(),
|
| 132 |
+
.RSTB(),
|
| 133 |
+
.ENB(),
|
| 134 |
+
.REGCEB(),
|
| 135 |
+
.WEB(),
|
| 136 |
+
.ADDRB(),
|
| 137 |
+
.DINB(),
|
| 138 |
+
.DOUTB(),
|
| 139 |
+
.INJECTSBITERR(),
|
| 140 |
+
.INJECTDBITERR(),
|
| 141 |
+
.SBITERR(),
|
| 142 |
+
.DBITERR(),
|
| 143 |
+
.RDADDRECC(),
|
| 144 |
+
.S_ACLK(),
|
| 145 |
+
.S_ARESETN(),
|
| 146 |
+
.S_AXI_AWID(),
|
| 147 |
+
.S_AXI_AWADDR(),
|
| 148 |
+
.S_AXI_AWLEN(),
|
| 149 |
+
.S_AXI_AWSIZE(),
|
| 150 |
+
.S_AXI_AWBURST(),
|
| 151 |
+
.S_AXI_AWVALID(),
|
| 152 |
+
.S_AXI_AWREADY(),
|
| 153 |
+
.S_AXI_WDATA(),
|
| 154 |
+
.S_AXI_WSTRB(),
|
| 155 |
+
.S_AXI_WLAST(),
|
| 156 |
+
.S_AXI_WVALID(),
|
| 157 |
+
.S_AXI_WREADY(),
|
| 158 |
+
.S_AXI_BID(),
|
| 159 |
+
.S_AXI_BRESP(),
|
| 160 |
+
.S_AXI_BVALID(),
|
| 161 |
+
.S_AXI_BREADY(),
|
| 162 |
+
.S_AXI_ARID(),
|
| 163 |
+
.S_AXI_ARADDR(),
|
| 164 |
+
.S_AXI_ARLEN(),
|
| 165 |
+
.S_AXI_ARSIZE(),
|
| 166 |
+
.S_AXI_ARBURST(),
|
| 167 |
+
.S_AXI_ARVALID(),
|
| 168 |
+
.S_AXI_ARREADY(),
|
| 169 |
+
.S_AXI_RID(),
|
| 170 |
+
.S_AXI_RDATA(),
|
| 171 |
+
.S_AXI_RRESP(),
|
| 172 |
+
.S_AXI_RLAST(),
|
| 173 |
+
.S_AXI_RVALID(),
|
| 174 |
+
.S_AXI_RREADY(),
|
| 175 |
+
.S_AXI_INJECTSBITERR(),
|
| 176 |
+
.S_AXI_INJECTDBITERR(),
|
| 177 |
+
.S_AXI_SBITERR(),
|
| 178 |
+
.S_AXI_DBITERR(),
|
| 179 |
+
.S_AXI_RDADDRECC()
|
| 180 |
+
);
|
| 181 |
+
|
| 182 |
+
// synthesis translate_on
|
| 183 |
+
|
| 184 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_defs.v
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//------------------------------------------------------------------------------
|
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited or its affiliates.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2015 ARM Limited or its affiliates.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited or its affiliates.
|
| 13 |
+
//
|
| 14 |
+
// Version and Release Control Information:
|
| 15 |
+
//
|
| 16 |
+
// File Revision : $Revision: 368442 $
|
| 17 |
+
// File Date : $Date: 2017-07-25 15:07:59 +0100 (Tue, 25 Jul 2017) $
|
| 18 |
+
//
|
| 19 |
+
// Release Information : Cortex-M0 DesignStart-r2p0-00rel0
|
| 20 |
+
//
|
| 21 |
+
//------------------------------------------------------------------------------
|
| 22 |
+
// Verilog-2001 (IEEE Std 1364-2001)
|
| 23 |
+
//------------------------------------------------------------------------------
|
| 24 |
+
//
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// Abstract : System configurations for Cortex-M0 example system
|
| 27 |
+
//-----------------------------------------------------------------------------
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
// ============= MCU System options ===========
|
| 31 |
+
|
| 32 |
+
//------------------------------------------------------------------------------
|
| 33 |
+
// Option for debug protocol
|
| 34 |
+
// It can either be SWD (Serial Wire Debug protocol) or JTAG
|
| 35 |
+
// These options specified here cannot be controlled purely by parameters
|
| 36 |
+
// due to impact on I/O ports
|
| 37 |
+
//
|
| 38 |
+
//`define ARM_CMSDK_INCLUDE_JTAG
|
| 39 |
+
|
| 40 |
+
//------------------------------------------------------------------------------
|
| 41 |
+
// Memory types
|
| 42 |
+
//------------------------------------------------------------------------------
|
| 43 |
+
|
| 44 |
+
//`include "cmsdk_ahb_memory_models_defs.v"
|
| 45 |
+
|
| 46 |
+
// Memory types used in the Example system
|
| 47 |
+
|
| 48 |
+
// Memory wait state parameters - used by behaviorial model if applicable*/
|
| 49 |
+
// Boot ROM non-sequential and sequential waitstate
|
| 50 |
+
`define ARM_CMSDK_BOOT_MEM_WS_N 0
|
| 51 |
+
`define ARM_CMSDK_BOOT_MEM_WS_S 0
|
| 52 |
+
|
| 53 |
+
// ROM non-sequential and sequential waitstate
|
| 54 |
+
`define ARM_CMSDK_ROM_MEM_WS_N 0
|
| 55 |
+
`define ARM_CMSDK_ROM_MEM_WS_S 0
|
| 56 |
+
|
| 57 |
+
// RAM non-sequential and sequential waitstate
|
| 58 |
+
`define ARM_CMSDK_RAM_MEM_WS_N 0
|
| 59 |
+
`define ARM_CMSDK_RAM_MEM_WS_S 0
|
| 60 |
+
|
| 61 |
+
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_pin_mux.v
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//------------------------------------------------------------------------------
|
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited or its affiliates.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2015 ARM Limited or its affiliates.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited or its affiliates.
|
| 13 |
+
//
|
| 14 |
+
// Version and Release Control Information:
|
| 15 |
+
//
|
| 16 |
+
// File Revision : $Revision: 368442 $
|
| 17 |
+
// File Date : $Date: 2017-07-25 15:07:59 +0100 (Tue, 25 Jul 2017) $
|
| 18 |
+
//
|
| 19 |
+
// Release Information : Cortex-M0 DesignStart-r2p0-00rel0
|
| 20 |
+
//
|
| 21 |
+
//------------------------------------------------------------------------------
|
| 22 |
+
// Verilog-2001 (IEEE Std 1364-2001)
|
| 23 |
+
//------------------------------------------------------------------------------
|
| 24 |
+
//
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// Abstract : Pin multiplexing control for example Cortex-M0/Cortex-M0+
|
| 27 |
+
// microcontroller
|
| 28 |
+
//-----------------------------------------------------------------------------
|
| 29 |
+
//
|
| 30 |
+
module cmsdk_mcu_pin_mux (
|
| 31 |
+
//-------------------------------------------
|
| 32 |
+
// I/O ports
|
| 33 |
+
//-------------------------------------------
|
| 34 |
+
|
| 35 |
+
// UART
|
| 36 |
+
output wire uart0_rxd,
|
| 37 |
+
input wire uart0_txd,
|
| 38 |
+
input wire uart0_txen,
|
| 39 |
+
output wire uart1_rxd,
|
| 40 |
+
input wire uart1_txd,
|
| 41 |
+
input wire uart1_txen,
|
| 42 |
+
output wire uart2_rxd,
|
| 43 |
+
input wire uart2_txd,
|
| 44 |
+
input wire uart2_txen,
|
| 45 |
+
|
| 46 |
+
// Timer
|
| 47 |
+
output wire timer0_extin,
|
| 48 |
+
output wire timer1_extin,
|
| 49 |
+
|
| 50 |
+
// IO Ports
|
| 51 |
+
output wire [15:0] p0_in,
|
| 52 |
+
input wire [15:0] p0_out,
|
| 53 |
+
input wire [15:0] p0_outen,
|
| 54 |
+
input wire [15:0] p0_altfunc,
|
| 55 |
+
|
| 56 |
+
output wire [15:0] p1_in,
|
| 57 |
+
input wire [15:0] p1_out,
|
| 58 |
+
input wire [15:0] p1_outen,
|
| 59 |
+
input wire [15:0] p1_altfunc,
|
| 60 |
+
|
| 61 |
+
// Processor debug interface
|
| 62 |
+
output wire i_trst_n,
|
| 63 |
+
output wire i_swditms,
|
| 64 |
+
output wire i_swclktck,
|
| 65 |
+
output wire i_tdi,
|
| 66 |
+
input wire i_tdo,
|
| 67 |
+
input wire i_tdoen_n,
|
| 68 |
+
input wire i_swdo,
|
| 69 |
+
input wire i_swdoen,
|
| 70 |
+
|
| 71 |
+
// IO pads
|
| 72 |
+
inout wire [15:0] P0,
|
| 73 |
+
inout wire [15:0] P1,
|
| 74 |
+
|
| 75 |
+
input wire nTRST, // Not needed if serial-wire debug is used
|
| 76 |
+
input wire TDI, // Not needed if serial-wire debug is used
|
| 77 |
+
inout wire SWDIOTMS,
|
| 78 |
+
input wire SWCLKTCK,
|
| 79 |
+
output wire TDO); // Not needed if serial-wire debug is used
|
| 80 |
+
|
| 81 |
+
//-------------------------------------------
|
| 82 |
+
// Internal wires
|
| 83 |
+
//-------------------------------------------
|
| 84 |
+
wire [15:0] p0_out_mux;
|
| 85 |
+
wire [15:0] p1_out_mux;
|
| 86 |
+
|
| 87 |
+
wire [15:0] p0_out_en_mux;
|
| 88 |
+
wire [15:0] p1_out_en_mux;
|
| 89 |
+
|
| 90 |
+
//-------------------------------------------
|
| 91 |
+
// Beginning of main code
|
| 92 |
+
//-------------------------------------------
|
| 93 |
+
// inputs
|
| 94 |
+
assign uart0_rxd = p1_in[0];
|
| 95 |
+
assign uart1_rxd = p1_in[2];
|
| 96 |
+
assign uart2_rxd = p1_in[4];
|
| 97 |
+
assign timer0_extin = p1_in[8];
|
| 98 |
+
assign timer1_extin = p1_in[9];
|
| 99 |
+
|
| 100 |
+
assign p0_in = P0;
|
| 101 |
+
assign p1_in = P1;
|
| 102 |
+
|
| 103 |
+
// Output function mux
|
| 104 |
+
assign p0_out_mux = p0_out; // No function muxing for Port 0
|
| 105 |
+
|
| 106 |
+
assign p1_out_mux[0] = p1_out[0];
|
| 107 |
+
assign p1_out_mux[1] = (p1_altfunc[1]) ? uart0_txd : p1_out[1];
|
| 108 |
+
assign p1_out_mux[2] = p1_out[2];
|
| 109 |
+
assign p1_out_mux[3] = (p1_altfunc[3]) ? uart1_txd : p1_out[3];
|
| 110 |
+
assign p1_out_mux[4] = p1_out[4];
|
| 111 |
+
assign p1_out_mux[5] = (p1_altfunc[5]) ? uart2_txd : p1_out[5];
|
| 112 |
+
assign p1_out_mux[15:6] = p1_out[15:6];
|
| 113 |
+
|
| 114 |
+
// Output enable mux
|
| 115 |
+
assign p0_out_en_mux = p0_outen; // No function muxing for Port 0
|
| 116 |
+
|
| 117 |
+
assign p1_out_en_mux[0] = p1_outen[0];
|
| 118 |
+
assign p1_out_en_mux[1] = (p1_altfunc[1]) ? uart0_txen : p1_outen[1];
|
| 119 |
+
assign p1_out_en_mux[2] = p1_outen[2];
|
| 120 |
+
assign p1_out_en_mux[3] = (p1_altfunc[3]) ? uart1_txen : p1_outen[3];
|
| 121 |
+
assign p1_out_en_mux[4] = p1_outen[4];
|
| 122 |
+
assign p1_out_en_mux[5] = (p1_altfunc[5]) ? uart2_txen : p1_outen[5];
|
| 123 |
+
assign p1_out_en_mux[15:6] = p1_outen[15:6];
|
| 124 |
+
|
| 125 |
+
// Output tristate
|
| 126 |
+
assign P0[ 0] = p0_out_en_mux[ 0] ? p0_out_mux[ 0] : 1'bz;
|
| 127 |
+
assign P0[ 1] = p0_out_en_mux[ 1] ? p0_out_mux[ 1] : 1'bz;
|
| 128 |
+
assign P0[ 2] = p0_out_en_mux[ 2] ? p0_out_mux[ 2] : 1'bz;
|
| 129 |
+
assign P0[ 3] = p0_out_en_mux[ 3] ? p0_out_mux[ 3] : 1'bz;
|
| 130 |
+
assign P0[ 4] = p0_out_en_mux[ 4] ? p0_out_mux[ 4] : 1'bz;
|
| 131 |
+
assign P0[ 5] = p0_out_en_mux[ 5] ? p0_out_mux[ 5] : 1'bz;
|
| 132 |
+
assign P0[ 6] = p0_out_en_mux[ 6] ? p0_out_mux[ 6] : 1'bz;
|
| 133 |
+
assign P0[ 7] = p0_out_en_mux[ 7] ? p0_out_mux[ 7] : 1'bz;
|
| 134 |
+
assign P0[ 8] = p0_out_en_mux[ 8] ? p0_out_mux[ 8] : 1'bz;
|
| 135 |
+
assign P0[ 9] = p0_out_en_mux[ 9] ? p0_out_mux[ 9] : 1'bz;
|
| 136 |
+
assign P0[10] = p0_out_en_mux[10] ? p0_out_mux[10] : 1'bz;
|
| 137 |
+
assign P0[11] = p0_out_en_mux[11] ? p0_out_mux[11] : 1'bz;
|
| 138 |
+
assign P0[12] = p0_out_en_mux[12] ? p0_out_mux[12] : 1'bz;
|
| 139 |
+
assign P0[13] = p0_out_en_mux[13] ? p0_out_mux[13] : 1'bz;
|
| 140 |
+
assign P0[14] = p0_out_en_mux[14] ? p0_out_mux[14] : 1'bz;
|
| 141 |
+
assign P0[15] = p0_out_en_mux[15] ? p0_out_mux[15] : 1'bz;
|
| 142 |
+
|
| 143 |
+
assign P1[ 0] = p1_out_en_mux[ 0] ? p1_out_mux[ 0] : 1'bz;
|
| 144 |
+
assign P1[ 1] = p1_out_en_mux[ 1] ? p1_out_mux[1] : 1'bz;
|
| 145 |
+
assign P1[ 2] = p1_out_en_mux[ 2] ? p1_out_mux[ 2] : 1'bz;
|
| 146 |
+
assign P1[ 3] = p1_out_en_mux[ 3] ? p1_out_mux[ 3] : 1'bz;
|
| 147 |
+
assign P1[ 4] = p1_out_en_mux[ 4] ? p1_out_mux[ 4] : 1'bz;
|
| 148 |
+
assign P1[ 5] = p1_out_en_mux[ 5] ? p1_out_mux[ 5] : 1'bz;
|
| 149 |
+
assign P1[ 6] = p1_out_en_mux[ 6] ? p1_out_mux[ 6] : 1'bz;
|
| 150 |
+
assign P1[ 7] = p1_out_en_mux[ 7] ? p1_out_mux[ 7] : 1'bz;
|
| 151 |
+
assign P1[ 8] = p1_out_en_mux[ 8] ? p1_out_mux[ 8] : 1'bz;
|
| 152 |
+
assign P1[ 9] = p1_out_en_mux[ 9] ? p1_out_mux[ 9] : 1'bz;
|
| 153 |
+
assign P1[10] = p1_out_en_mux[10] ? p1_out_mux[10] : 1'bz;
|
| 154 |
+
assign P1[11] = p1_out_en_mux[11] ? p1_out_mux[11] : 1'bz;
|
| 155 |
+
assign P1[12] = p1_out_en_mux[12] ? p1_out_mux[12] : 1'bz;
|
| 156 |
+
assign P1[13] = p1_out_en_mux[13] ? p1_out_mux[13] : 1'bz;
|
| 157 |
+
assign P1[14] = p1_out_en_mux[14] ? p1_out_mux[14] : 1'bz;
|
| 158 |
+
assign P1[15] = p1_out_en_mux[15] ? p1_out_mux[15] : 1'bz;
|
| 159 |
+
|
| 160 |
+
// synopsys translate_off
|
| 161 |
+
|
| 162 |
+
// Pullup
|
| 163 |
+
pullup(P0[ 0]);
|
| 164 |
+
pullup(P0[ 1]);
|
| 165 |
+
pullup(P0[ 2]);
|
| 166 |
+
pullup(P0[ 3]);
|
| 167 |
+
pullup(P0[ 4]);
|
| 168 |
+
pullup(P0[ 5]);
|
| 169 |
+
pullup(P0[ 6]);
|
| 170 |
+
pullup(P0[ 7]);
|
| 171 |
+
pullup(P0[ 8]);
|
| 172 |
+
pullup(P0[ 9]);
|
| 173 |
+
pullup(P0[10]);
|
| 174 |
+
pullup(P0[11]);
|
| 175 |
+
pullup(P0[12]);
|
| 176 |
+
pullup(P0[13]);
|
| 177 |
+
pullup(P0[14]);
|
| 178 |
+
pullup(P0[15]);
|
| 179 |
+
|
| 180 |
+
pullup(P1[ 0]);
|
| 181 |
+
pullup(P1[ 1]);
|
| 182 |
+
pullup(P1[ 2]);
|
| 183 |
+
pullup(P1[ 3]);
|
| 184 |
+
pullup(P1[ 4]);
|
| 185 |
+
pullup(P1[ 5]);
|
| 186 |
+
pullup(P1[ 6]);
|
| 187 |
+
pullup(P1[ 7]);
|
| 188 |
+
pullup(P1[ 8]);
|
| 189 |
+
pullup(P1[ 9]);
|
| 190 |
+
pullup(P1[10]);
|
| 191 |
+
pullup(P1[11]);
|
| 192 |
+
pullup(P1[12]);
|
| 193 |
+
pullup(P1[13]);
|
| 194 |
+
pullup(P1[14]);
|
| 195 |
+
pullup(P1[15]);
|
| 196 |
+
|
| 197 |
+
// synopsys translate_on
|
| 198 |
+
|
| 199 |
+
//-------------------------------------------
|
| 200 |
+
// Debug connections
|
| 201 |
+
//-------------------------------------------
|
| 202 |
+
|
| 203 |
+
assign i_trst_n = nTRST;
|
| 204 |
+
assign i_tdi = TDI;
|
| 205 |
+
assign i_swclktck = SWCLKTCK;
|
| 206 |
+
assign i_swditms = SWDIOTMS;
|
| 207 |
+
|
| 208 |
+
// Tristate buffers for debug output signals
|
| 209 |
+
// bufif1 (SWDIOTMS, i_swdo, i_swdoen);
|
| 210 |
+
assign SWDIOTMS = i_swdoen ? i_swdo : 1'bz;
|
| 211 |
+
bufif0 (TDO, i_tdo, i_tdoen_n);
|
| 212 |
+
|
| 213 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/cmsdk_mcu_system_zed.v
ADDED
|
@@ -0,0 +1,863 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
| 1 |
+
//------------------------------------------------------------------------------
|
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited or its affiliates.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2017 ARM Limited or its affiliates.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited or its affiliates.
|
| 13 |
+
//
|
| 14 |
+
// Version and Release Control Information:
|
| 15 |
+
//
|
| 16 |
+
// File Revision : $Revision: 368442 $
|
| 17 |
+
// File Date : $Date: 2017-07-25 15:07:59 +0100 (Tue, 25 Jul 2017) $
|
| 18 |
+
//
|
| 19 |
+
// Release Information : Cortex-M0 DesignStart-r2p0-00rel0
|
| 20 |
+
//
|
| 21 |
+
//------------------------------------------------------------------------------
|
| 22 |
+
// Verilog-2001 (IEEE Std 1364-2001)
|
| 23 |
+
//------------------------------------------------------------------------------
|
| 24 |
+
//
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// Abstract : System level design for the example Cortex-M0 system
|
| 27 |
+
//-----------------------------------------------------------------------------
|
| 28 |
+
// Cortex-M0 DesignStart Eval
|
| 29 |
+
//
|
| 30 |
+
// Supports mostly 'standard' CMDSK configuration, or an FPGA version
|
| 31 |
+
// which includes additional peripherals as determined by
|
| 32 |
+
// ARM_DESIGNSTART_FPGA.
|
| 33 |
+
|
| 34 |
+
// The RTL configuration differs with respect to the base BP210 version in
|
| 35 |
+
// UART configuration and interrupt assignments
|
| 36 |
+
|
| 37 |
+
`include "cmsdk_mcu_defs.v"
|
| 38 |
+
|
| 39 |
+
module cmsdk_mcu_system #(
|
| 40 |
+
parameter BASEADDR_GPIO0 = 32'h4001_0000, // GPIO0 peripheral base address
|
| 41 |
+
parameter BASEADDR_GPIO1 = 32'h4001_1000, // GPIO1 peripheral base address
|
| 42 |
+
parameter BE = 0, // 1: Big endian 0: little endian
|
| 43 |
+
parameter BKPT = 4, // Number of breakpoint comparators
|
| 44 |
+
parameter DBG = 1, // Debug configuration
|
| 45 |
+
parameter NUMIRQ = 32, // NUM of IRQ
|
| 46 |
+
parameter SMUL = 0, // Multiplier configuration
|
| 47 |
+
parameter SYST = 1, // SysTick
|
| 48 |
+
parameter WIC = 0, // Wake-up interrupt controller support
|
| 49 |
+
parameter WICLINES = 34, // Supported WIC lines
|
| 50 |
+
parameter WPT = 2, // Number of DWT comparators
|
| 51 |
+
|
| 52 |
+
// Location of the System ROM Table.
|
| 53 |
+
parameter BASEADDR_SYSROMTABLE = 32'hF000_0000
|
| 54 |
+
|
| 55 |
+
)
|
| 56 |
+
(
|
| 57 |
+
input wire FCLK, // Free running clock
|
| 58 |
+
input wire HCLK, // AHB clock(from PMU)
|
| 59 |
+
input wire DCLK, // Debug system clock (from PMU)
|
| 60 |
+
input wire SCLK, // System clock
|
| 61 |
+
input wire HRESETn, // AHB and System reset
|
| 62 |
+
input wire PORESETn, // Power on reset
|
| 63 |
+
input wire DBGRESETn, // Debug reset
|
| 64 |
+
input wire PCLK, // Peripheral clock
|
| 65 |
+
input wire PCLKG, // Gated Peripheral bus clock
|
| 66 |
+
input wire PRESETn, // Peripheral system and APB reset
|
| 67 |
+
input wire PCLKEN, // Clock divide control for AHB to APB bridge
|
| 68 |
+
|
| 69 |
+
`ifdef ARM_DESIGNSTART_FPGA
|
| 70 |
+
input wire zbt_boot_ctrl, // FPGA Only: Set to 1 to boot from ZBT SRAM
|
| 71 |
+
`endif
|
| 72 |
+
output wire [31:0] HADDR, // AHB to memory blocks - address
|
| 73 |
+
output wire [1:0] HTRANS, // AHB to memory blocks - transfer ctrl
|
| 74 |
+
output wire [2:0] HSIZE, // AHB to memory blocks - transfer size
|
| 75 |
+
output wire HWRITE, // AHB to memory blocks - write ctrl
|
| 76 |
+
output wire [31:0] HWDATA, // AHB to memory blocks - write data
|
| 77 |
+
output wire HREADY, // AHB to memory blocks - AHB ready
|
| 78 |
+
|
| 79 |
+
output wire flash_hsel, // AHB to flash memory - select
|
| 80 |
+
input wire flash_hreadyout, // AHB from flash blocks - ready
|
| 81 |
+
input wire [31:0] flash_hrdata, // AHB from flash blocks - read data
|
| 82 |
+
input wire flash_hresp, // AHB from flash blocks - response
|
| 83 |
+
|
| 84 |
+
output wire sram_hsel, // AHB to SRAM - select
|
| 85 |
+
input wire sram_hreadyout, // AHB from SRAM - ready
|
| 86 |
+
input wire [31:0] sram_hrdata, // AHB from SRAM - read data
|
| 87 |
+
input wire sram_hresp, // AHB from SRAM - response
|
| 88 |
+
|
| 89 |
+
// Optional : only if BOOT_MEM_TYPE!=0
|
| 90 |
+
output wire boot_hsel, // AHB to boot loader - select
|
| 91 |
+
input wire boot_hreadyout, // AHB from boot loader - ready
|
| 92 |
+
input wire [31:0] boot_hrdata, // AHB from boot loader - read data
|
| 93 |
+
input wire boot_hresp, // AHB from boot loader - response
|
| 94 |
+
|
| 95 |
+
output wire APBACTIVE, // APB bus active (for clock gating of PCLKG)
|
| 96 |
+
output wire SLEEPING, // Processor status - sleeping
|
| 97 |
+
output wire SLEEPDEEP, // Processor status - deep sleep
|
| 98 |
+
output wire SYSRESETREQ, // Processor control - system reset request
|
| 99 |
+
output wire WDOGRESETREQ, // Watchdog reset request
|
| 100 |
+
output wire LOCKUP, // Processor status - Locked up
|
| 101 |
+
output wire LOCKUPRESET, // System Controller cfg - reset if lockup
|
| 102 |
+
output wire PMUENABLE, // System Controller cfg - Enable PMU
|
| 103 |
+
|
| 104 |
+
input wire nTRST, // JTAG - Test reset (active low)
|
| 105 |
+
input wire SWDITMS, // JTAG/SWD - TMS / SWD data input
|
| 106 |
+
input wire SWCLKTCK, // JTAG/SWD - TCK / SWCLK
|
| 107 |
+
input wire TDI, // JTAG - Test data in
|
| 108 |
+
output wire TDO, // JTAG - Test data out
|
| 109 |
+
output wire nTDOEN, // JTAG - Test data out enable (active low)
|
| 110 |
+
output wire SWDO, // SWD - SWD data output
|
| 111 |
+
output wire SWDOEN, // SWD - SWD data output enable
|
| 112 |
+
|
| 113 |
+
input wire uart0_rxd, // Uart 0 receive data
|
| 114 |
+
output wire uart0_txd, // Uart 0 transmit data
|
| 115 |
+
output wire uart0_txen, // Uart 0 transmit data enable
|
| 116 |
+
input wire uart1_rxd, // Uart 1 receive data
|
| 117 |
+
output wire uart1_txd, // Uart 1 transmit data
|
| 118 |
+
output wire uart1_txen, // Uart 1 transmit data enable
|
| 119 |
+
input wire uart2_rxd, // Uart 2 receive data
|
| 120 |
+
output wire uart2_txd, // Uart 2 transmit data
|
| 121 |
+
output wire uart2_txen, // Uart 2 transmit data enable
|
| 122 |
+
|
| 123 |
+
input wire timer0_extin, // Timer 0 external input
|
| 124 |
+
input wire timer1_extin, // Timer 1 external input
|
| 125 |
+
|
| 126 |
+
input wire [15:0] p0_in, // GPIO 0 inputs
|
| 127 |
+
output wire [15:0] p0_out, // GPIO 0 outputs
|
| 128 |
+
output wire [15:0] p0_outen, // GPIO 0 output enables
|
| 129 |
+
output wire [15:0] p0_altfunc, // GPIO 0 alternate function (pin mux)
|
| 130 |
+
input wire [15:0] p1_in, // GPIO 1 inputs
|
| 131 |
+
output wire [15:0] p1_out, // GPIO 1 outputs
|
| 132 |
+
output wire [15:0] p1_outen, // GPIO 1 output enables
|
| 133 |
+
output wire [15:0] p1_altfunc, // GPIO 1 alternate function (pin mux)
|
| 134 |
+
|
| 135 |
+
`ifdef ARM_DESIGNSTART_FPGA
|
| 136 |
+
input wire spi_interrupt, // FPGA Only: V2M-MPS2 SPI interrupt
|
| 137 |
+
input wire i2s_interrupt, // FPGA Only: V2M-MPS2 I2S interrupt
|
| 138 |
+
input wire eth_interrupt, // FPGA Only: V2M-MPS2 Ethernet interrupt
|
| 139 |
+
input wire ts_interrupt, // FPGA Only: V2M-MPS2 Touch screen interrupt
|
| 140 |
+
input wire gpio2_interrupt, // FPGA Only: V2M-MPS2 GPIO 2
|
| 141 |
+
input wire gpio3_interrupt, // FPGA Only: V2M-MPS2 GPIO 3
|
| 142 |
+
`endif
|
| 143 |
+
input wire DFTSE); // dummy scan enable port for synthesis
|
| 144 |
+
|
| 145 |
+
// -------------------------------
|
| 146 |
+
// Internal signals
|
| 147 |
+
// -------------------------------
|
| 148 |
+
wire HCLKSYS; // System AHB clock
|
| 149 |
+
|
| 150 |
+
// System bus from processor
|
| 151 |
+
wire [31:0] cm0_haddr;
|
| 152 |
+
wire [1:0] cm0_htrans;
|
| 153 |
+
wire [2:0] cm0_hsize;
|
| 154 |
+
wire [2:0] cm0_hburst;
|
| 155 |
+
wire [3:0] cm0_hprot;
|
| 156 |
+
wire cm0_hmaster;
|
| 157 |
+
wire cm0_hmastlock;
|
| 158 |
+
wire cm0_hwrite;
|
| 159 |
+
wire [31:0] cm0_hwdata;
|
| 160 |
+
wire [31:0] cm0_hrdata;
|
| 161 |
+
wire cm0_hready;
|
| 162 |
+
wire cm0_hresp;
|
| 163 |
+
|
| 164 |
+
// Bit band wrapper bus between CPU and the reset of the system
|
| 165 |
+
wire [31:0] cm_haddr;
|
| 166 |
+
wire [1:0] cm_htrans;
|
| 167 |
+
wire [2:0] cm_hsize;
|
| 168 |
+
wire [2:0] cm_hburst;
|
| 169 |
+
wire [3:0] cm_hprot;
|
| 170 |
+
wire cm_hmastlock;
|
| 171 |
+
wire cm_hmaster;
|
| 172 |
+
wire cm_hwrite;
|
| 173 |
+
wire [31:0] cm_hwdata;
|
| 174 |
+
wire [31:0] cm_hrdata;
|
| 175 |
+
wire cm_hready;
|
| 176 |
+
wire cm_hreadyout;
|
| 177 |
+
wire cm_hresp;
|
| 178 |
+
|
| 179 |
+
// System bus
|
| 180 |
+
wire sys_hselm; // Note: the sys_hselm signal is for protocol checking only.
|
| 181 |
+
wire [31:0] sys_haddr;
|
| 182 |
+
wire [1:0] sys_htrans;
|
| 183 |
+
wire [2:0] sys_hsize;
|
| 184 |
+
wire [2:0] sys_hburst;
|
| 185 |
+
wire [3:0] sys_hprot;
|
| 186 |
+
wire sys_hmaster;
|
| 187 |
+
wire sys_hmastlock;
|
| 188 |
+
wire sys_hwrite;
|
| 189 |
+
wire [31:0] sys_hwdata;
|
| 190 |
+
wire [31:0] sys_hrdata;
|
| 191 |
+
wire sys_hready;
|
| 192 |
+
wire sys_hreadyout;
|
| 193 |
+
wire sys_hresp;
|
| 194 |
+
|
| 195 |
+
wire defslv_hsel; // AHB default slave signals
|
| 196 |
+
wire defslv_hreadyout;
|
| 197 |
+
wire [31:0] defslv_hrdata;
|
| 198 |
+
wire defslv_hresp;
|
| 199 |
+
|
| 200 |
+
wire apbsys_hsel; // APB subsystem AHB interface signals
|
| 201 |
+
wire apbsys_hreadyout;
|
| 202 |
+
wire [31:0] apbsys_hrdata;
|
| 203 |
+
wire apbsys_hresp;
|
| 204 |
+
|
| 205 |
+
wire gpio0_hsel; // AHB GPIO bus interface signals
|
| 206 |
+
wire gpio0_hreadyout;
|
| 207 |
+
wire [31:0] gpio0_hrdata;
|
| 208 |
+
wire gpio0_hresp;
|
| 209 |
+
|
| 210 |
+
wire gpio1_hsel; // AHB GPIO bus interface signals
|
| 211 |
+
wire gpio1_hreadyout;
|
| 212 |
+
wire [31:0] gpio1_hrdata;
|
| 213 |
+
wire gpio1_hresp;
|
| 214 |
+
|
| 215 |
+
wire sysctrl_hsel; // System control bus interface signals
|
| 216 |
+
wire sysctrl_hreadyout;
|
| 217 |
+
wire [31:0] sysctrl_hrdata;
|
| 218 |
+
wire sysctrl_hresp;
|
| 219 |
+
|
| 220 |
+
// MTB (Only available to the Cortex-M0+)
|
| 221 |
+
wire HSELMTB;
|
| 222 |
+
wire HREADYOUTMTB;
|
| 223 |
+
wire [31:0] HRDATAMTB;
|
| 224 |
+
wire HRESPMTB;
|
| 225 |
+
wire HSELSFR;
|
| 226 |
+
wire HSELRAM;
|
| 227 |
+
|
| 228 |
+
// System ROM Table
|
| 229 |
+
wire sysrom_hsel; // AHB to System ROM Table - select
|
| 230 |
+
wire sysrom_hreadyout; // AHB from System ROM Table - ready
|
| 231 |
+
wire [31:0] sysrom_hrdata; // AHB from System ROM Table - read data
|
| 232 |
+
wire sysrom_hresp; // AHB from System ROM Table - response
|
| 233 |
+
|
| 234 |
+
wire [1:0] sys_hmaster_i;
|
| 235 |
+
|
| 236 |
+
// APB expansion port signals
|
| 237 |
+
wire [11:0] exp_paddr;
|
| 238 |
+
wire [31:0] exp_pwdata;
|
| 239 |
+
wire exp_pwrite;
|
| 240 |
+
wire exp_penable;
|
| 241 |
+
|
| 242 |
+
wire [33:0] WICSENSE;
|
| 243 |
+
wire CDBGPWRUPREQ;
|
| 244 |
+
wire remap_ctrl;
|
| 245 |
+
|
| 246 |
+
// Interrupt request
|
| 247 |
+
wire [31:0] intisr_cm0;
|
| 248 |
+
wire intnmi_cm0;
|
| 249 |
+
wire [15:0] gpio0_intr;
|
| 250 |
+
wire gpio0_combintr;
|
| 251 |
+
wire gpio1_combintr;
|
| 252 |
+
wire [31:0] apbsubsys_interrupt;
|
| 253 |
+
wire watchdog_interrupt;
|
| 254 |
+
|
| 255 |
+
// I/O Port
|
| 256 |
+
wire IOMATCH;
|
| 257 |
+
wire [31:0] IORDATA;
|
| 258 |
+
wire IOTRANS;
|
| 259 |
+
wire IOWRITE;
|
| 260 |
+
wire [31:0] IOCHECK;
|
| 261 |
+
wire [31:0] IOADDR;
|
| 262 |
+
wire [ 1:0] IOSIZE;
|
| 263 |
+
wire IOMASTER;
|
| 264 |
+
wire IOPRIV;
|
| 265 |
+
wire [31:0] IOWDATA;
|
| 266 |
+
|
| 267 |
+
// event signals
|
| 268 |
+
wire TXEV;
|
| 269 |
+
wire RXEV;
|
| 270 |
+
|
| 271 |
+
// SysTick timer signals
|
| 272 |
+
wire STCLKEN;
|
| 273 |
+
wire [25:0] STCALIB;
|
| 274 |
+
|
| 275 |
+
// Processor debug signals
|
| 276 |
+
wire DBGRESTART;
|
| 277 |
+
wire DBGRESTARTED;
|
| 278 |
+
wire EDBGRQ;
|
| 279 |
+
|
| 280 |
+
// Processor status
|
| 281 |
+
wire HALTED;
|
| 282 |
+
wire SPECHTRANS;
|
| 283 |
+
wire CODENSEQ;
|
| 284 |
+
wire SHAREABLE;
|
| 285 |
+
|
| 286 |
+
// Only used in FPGA configuration, tie-off in RTL version
|
| 287 |
+
`ifndef ARM_DESIGNSTART_FPGA
|
| 288 |
+
wire spi_interrupt = 1'b0;
|
| 289 |
+
wire i2s_interrupt = 1'b0;
|
| 290 |
+
wire eth_interrupt = 1'b0;
|
| 291 |
+
wire ts_interrupt = 1'b0;
|
| 292 |
+
wire gpio2_interrupt = 1'b0;
|
| 293 |
+
wire gpio3_interrupt = 1'b0;
|
| 294 |
+
`endif
|
| 295 |
+
|
| 296 |
+
assign HCLKSYS = HCLK;
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
//instantiate the DesignStart Cortex M0 Integration Layer
|
| 300 |
+
CORTEXM0INTEGRATION
|
| 301 |
+
u_cortexm0integration
|
| 302 |
+
(
|
| 303 |
+
// CLOCK AND RESETS
|
| 304 |
+
.FCLK (FCLK),
|
| 305 |
+
.SCLK (SCLK),
|
| 306 |
+
.HCLK (HCLK),
|
| 307 |
+
.DCLK (DCLK),
|
| 308 |
+
.PORESETn (PORESETn),
|
| 309 |
+
.DBGRESETn (DBGRESETn),
|
| 310 |
+
.HRESETn (HRESETn),
|
| 311 |
+
.SWCLKTCK (SWCLKTCK),
|
| 312 |
+
.nTRST (nTRST),
|
| 313 |
+
|
| 314 |
+
// AHB-LITE MASTER PORT
|
| 315 |
+
.HADDR (cm0_haddr),
|
| 316 |
+
.HBURST (cm0_hburst),
|
| 317 |
+
.HMASTLOCK (cm0_hmastlock),
|
| 318 |
+
.HPROT (cm0_hprot),
|
| 319 |
+
.HSIZE (cm0_hsize),
|
| 320 |
+
.HTRANS (cm0_htrans),
|
| 321 |
+
.HWDATA (cm0_hwdata),
|
| 322 |
+
.HWRITE (cm0_hwrite),
|
| 323 |
+
.HRDATA (cm0_hrdata),
|
| 324 |
+
.HREADY (cm0_hready),
|
| 325 |
+
.HRESP (cm0_hresp),
|
| 326 |
+
.HMASTER (),
|
| 327 |
+
|
| 328 |
+
// CODE SEQUENTIALITY AND SPECULATION
|
| 329 |
+
.CODENSEQ (CODENSEQ),
|
| 330 |
+
.CODEHINTDE (),
|
| 331 |
+
.SPECHTRANS (),
|
| 332 |
+
|
| 333 |
+
// DEBUG
|
| 334 |
+
.SWDITMS (SWDITMS),
|
| 335 |
+
.TDI (1'b0),
|
| 336 |
+
.SWDO (SWDO),
|
| 337 |
+
.SWDOEN (SWDOEN),
|
| 338 |
+
.TDO (TDO),
|
| 339 |
+
.nTDOEN (nTDOEN),
|
| 340 |
+
.DBGRESTART (1'b0),
|
| 341 |
+
.DBGRESTARTED (DBGRESTARTED),
|
| 342 |
+
.EDBGRQ (1'b0),
|
| 343 |
+
.HALTED (HALTED),
|
| 344 |
+
|
| 345 |
+
// MISC
|
| 346 |
+
.NMI (1'b0), // Non-maskable interrupt input
|
| 347 |
+
.IRQ (32'h00000000), // Interrupt request inputs
|
| 348 |
+
.TXEV (TXEV), // Event output (SEV executed)
|
| 349 |
+
.RXEV (1'b0), // Event input
|
| 350 |
+
.LOCKUP (LOCKUP), // Core is locked-up
|
| 351 |
+
.SYSRESETREQ (SYSRESETREQ), // System reset request
|
| 352 |
+
.STCALIB (STCALIB), // SysTick calibration register value
|
| 353 |
+
.STCLKEN (STCLKEN), // SysTick SCLK clock enable
|
| 354 |
+
.IRQLATENCY (8'h00),
|
| 355 |
+
.ECOREVNUM (28'haa),
|
| 356 |
+
|
| 357 |
+
// POWER MANAGEMENT
|
| 358 |
+
.GATEHCLK (),
|
| 359 |
+
.SLEEPING (SLEEPING), // Core and NVIC sleeping
|
| 360 |
+
.SLEEPDEEP (SLEEPDEEP),
|
| 361 |
+
.WAKEUP (),
|
| 362 |
+
.WICSENSE (WICSENSE),
|
| 363 |
+
.SLEEPHOLDREQn (1'b1),
|
| 364 |
+
.SLEEPHOLDACKn (),
|
| 365 |
+
.WICENREQ (1'b0),
|
| 366 |
+
.WICENACK (),
|
| 367 |
+
.CDBGPWRUPREQ (CDBGPWRUPREQ),
|
| 368 |
+
.CDBGPWRUPACK (CDBGPWRUPREQ),
|
| 369 |
+
|
| 370 |
+
// SCAN IO
|
| 371 |
+
.SE (1'b1),
|
| 372 |
+
.RSTBYPASS (1'b0)
|
| 373 |
+
);
|
| 374 |
+
|
| 375 |
+
// Force connect some signals to 0 or 1
|
| 376 |
+
assign cm0_hmaster = 1'b0;
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
// Unused debug feature
|
| 380 |
+
assign DBGRESTART = 1'b0; // multi-core synchronous restart from halt
|
| 381 |
+
assign EDBGRQ = 1'b0; // multi-core synchronous halt request
|
| 382 |
+
|
| 383 |
+
assign RXEV = 1'b0;
|
| 384 |
+
|
| 385 |
+
// No MTB in Cortex-M0
|
| 386 |
+
assign HRDATAMTB = {32{1'b0}};
|
| 387 |
+
assign HREADYOUTMTB = 1'b0;
|
| 388 |
+
assign HRESPMTB = 1'b0;
|
| 389 |
+
|
| 390 |
+
// -------------------------------
|
| 391 |
+
// AHB system
|
| 392 |
+
// -------------------------------
|
| 393 |
+
|
| 394 |
+
// No bitband wrapper, direct signal connections
|
| 395 |
+
assign cm_haddr[31:0] = cm0_haddr[31:0];
|
| 396 |
+
assign cm_htrans[1:0] = cm0_htrans[1:0];
|
| 397 |
+
assign cm_hsize[2:0] = cm0_hsize[2:0];
|
| 398 |
+
assign cm_hburst[2:0] = cm0_hburst[2:0];
|
| 399 |
+
assign cm_hprot[3:0] = cm0_hprot[3:0];
|
| 400 |
+
assign cm_hmaster = cm0_hmaster;
|
| 401 |
+
assign cm_hmastlock = cm0_hmastlock;
|
| 402 |
+
assign cm_hwrite = cm0_hwrite;
|
| 403 |
+
assign cm_hwdata[31:0] = cm0_hwdata[31:0];
|
| 404 |
+
assign cm_hready = cm0_hready;
|
| 405 |
+
assign cm0_hrdata[31:0]= cm_hrdata[31:0];
|
| 406 |
+
assign cm0_hready = cm_hreadyout;
|
| 407 |
+
assign cm0_hresp = cm_hresp;
|
| 408 |
+
|
| 409 |
+
// No DMA controller - no need to have master multiplexer
|
| 410 |
+
// direct connection from cpu to system bus if DMA is not presented
|
| 411 |
+
assign sys_haddr[31:0] = cm_haddr[31:0];
|
| 412 |
+
assign sys_htrans[1:0] = cm_htrans[1:0];
|
| 413 |
+
assign sys_hsize[2:0] = cm_hsize[2:0];
|
| 414 |
+
assign sys_hburst[2:0] = cm_hburst[2:0];
|
| 415 |
+
assign sys_hprot[3:0] = cm_hprot[3:0];
|
| 416 |
+
assign sys_hmaster = cm_hmaster;
|
| 417 |
+
assign sys_hmastlock = cm_hmastlock;
|
| 418 |
+
assign sys_hwrite = cm_hwrite;
|
| 419 |
+
assign sys_hwdata[31:0]= cm_hwdata[31:0];
|
| 420 |
+
assign sys_hready = cm_hready;
|
| 421 |
+
assign cm_hrdata[31:0] = sys_hrdata[31:0];
|
| 422 |
+
assign cm_hreadyout = sys_hreadyout;
|
| 423 |
+
assign cm_hresp = sys_hresp;
|
| 424 |
+
assign sys_hmaster_i = 2'b00;
|
| 425 |
+
|
| 426 |
+
// AHB address decode
|
| 427 |
+
cmsdk_mcu_addr_decode #(
|
| 428 |
+
.BASEADDR_GPIO0 (BASEADDR_GPIO0),
|
| 429 |
+
.BASEADDR_GPIO1 (BASEADDR_GPIO1),
|
| 430 |
+
.BOOT_LOADER_PRESENT (1'b0),
|
| 431 |
+
.BASEADDR_SYSROMTABLE (BASEADDR_SYSROMTABLE)
|
| 432 |
+
)
|
| 433 |
+
u_addr_decode (
|
| 434 |
+
// System Address
|
| 435 |
+
.haddr (sys_haddr),
|
| 436 |
+
.remap_ctrl (remap_ctrl),
|
| 437 |
+
`ifdef ARM_DESIGNSTART_FPGA
|
| 438 |
+
.zbt_boot_ctrl (zbt_boot_ctrl),
|
| 439 |
+
`endif
|
| 440 |
+
.boot_hsel (boot_hsel),
|
| 441 |
+
.flash_hsel (flash_hsel),
|
| 442 |
+
.sram_hsel (sram_hsel),
|
| 443 |
+
.apbsys_hsel (apbsys_hsel),
|
| 444 |
+
.gpio0_hsel (gpio0_hsel),
|
| 445 |
+
.gpio1_hsel (gpio1_hsel),
|
| 446 |
+
.sysctrl_hsel (sysctrl_hsel),
|
| 447 |
+
.sysrom_hsel (sysrom_hsel),
|
| 448 |
+
.defslv_hsel (defslv_hsel),
|
| 449 |
+
.hselmtb (HSELMTB),
|
| 450 |
+
.hselram (HSELRAM),
|
| 451 |
+
.hselsfr (HSELSFR)
|
| 452 |
+
);
|
| 453 |
+
|
| 454 |
+
|
| 455 |
+
// AHB slave multiplexer
|
| 456 |
+
cmsdk_ahb_slave_mux #(
|
| 457 |
+
.PORT0_ENABLE (1),
|
| 458 |
+
.PORT1_ENABLE (1),
|
| 459 |
+
.PORT2_ENABLE (0),
|
| 460 |
+
.PORT3_ENABLE (1),
|
| 461 |
+
.PORT4_ENABLE (1),
|
| 462 |
+
.PORT5_ENABLE (1),
|
| 463 |
+
.PORT6_ENABLE (1),
|
| 464 |
+
.PORT7_ENABLE (1),
|
| 465 |
+
.PORT8_ENABLE (1),
|
| 466 |
+
.PORT9_ENABLE (0),
|
| 467 |
+
.DW (32)
|
| 468 |
+
)
|
| 469 |
+
u_ahb_slave_mux_sys_bus (
|
| 470 |
+
.HCLK (HCLKSYS),
|
| 471 |
+
.HRESETn (HRESETn),
|
| 472 |
+
.HREADY (sys_hready),
|
| 473 |
+
.HSEL0 (flash_hsel), // Input Port 0
|
| 474 |
+
.HREADYOUT0 (flash_hreadyout),
|
| 475 |
+
.HRESP0 (flash_hresp),
|
| 476 |
+
.HRDATA0 (flash_hrdata),
|
| 477 |
+
.HSEL1 (sram_hsel), // Input Port 1
|
| 478 |
+
.HREADYOUT1 (sram_hreadyout),
|
| 479 |
+
.HRESP1 (sram_hresp),
|
| 480 |
+
.HRDATA1 (sram_hrdata),
|
| 481 |
+
.HSEL2 (boot_hsel), // Input Port 2
|
| 482 |
+
.HREADYOUT2 (boot_hreadyout),
|
| 483 |
+
.HRESP2 (boot_hresp),
|
| 484 |
+
.HRDATA2 (boot_hrdata),
|
| 485 |
+
.HSEL3 (defslv_hsel), // Input Port 3
|
| 486 |
+
.HREADYOUT3 (defslv_hreadyout),
|
| 487 |
+
.HRESP3 (defslv_hresp),
|
| 488 |
+
.HRDATA3 (defslv_hrdata),
|
| 489 |
+
.HSEL4 (apbsys_hsel), // Input Port 4
|
| 490 |
+
.HREADYOUT4 (apbsys_hreadyout),
|
| 491 |
+
.HRESP4 (apbsys_hresp),
|
| 492 |
+
.HRDATA4 (apbsys_hrdata),
|
| 493 |
+
.HSEL5 (gpio0_hsel), // Input Port 5
|
| 494 |
+
.HREADYOUT5 (gpio0_hreadyout),
|
| 495 |
+
.HRESP5 (gpio0_hresp),
|
| 496 |
+
.HRDATA5 (gpio0_hrdata),
|
| 497 |
+
.HSEL6 (gpio1_hsel), // Input Port 6
|
| 498 |
+
.HREADYOUT6 (gpio1_hreadyout),
|
| 499 |
+
.HRESP6 (gpio1_hresp),
|
| 500 |
+
.HRDATA6 (gpio1_hrdata),
|
| 501 |
+
.HSEL7 (sysctrl_hsel), // Input Port 7
|
| 502 |
+
.HREADYOUT7 (sysctrl_hreadyout),
|
| 503 |
+
.HRESP7 (sysctrl_hresp),
|
| 504 |
+
.HRDATA7 (sysctrl_hrdata),
|
| 505 |
+
.HSEL8 (sysrom_hsel), // Input Port 8
|
| 506 |
+
.HREADYOUT8 (sysrom_hreadyout),
|
| 507 |
+
.HRESP8 (sysrom_hresp),
|
| 508 |
+
.HRDATA8 (sysrom_hrdata),
|
| 509 |
+
.HSEL9 (HSELMTB), // Input Port 9
|
| 510 |
+
.HREADYOUT9 (HREADYOUTMTB),
|
| 511 |
+
.HRESP9 (HRESPMTB),
|
| 512 |
+
.HRDATA9 (HRDATAMTB),
|
| 513 |
+
|
| 514 |
+
.HREADYOUT (sys_hreadyout), // Outputs
|
| 515 |
+
.HRESP (sys_hresp),
|
| 516 |
+
.HRDATA (sys_hrdata)
|
| 517 |
+
);
|
| 518 |
+
|
| 519 |
+
// Default slave
|
| 520 |
+
cmsdk_ahb_default_slave u_ahb_default_slave_1 (
|
| 521 |
+
.HCLK (HCLKSYS),
|
| 522 |
+
.HRESETn (HRESETn),
|
| 523 |
+
.HSEL (defslv_hsel),
|
| 524 |
+
.HTRANS (sys_htrans),
|
| 525 |
+
.HREADY (sys_hready),
|
| 526 |
+
.HREADYOUT (defslv_hreadyout),
|
| 527 |
+
.HRESP (defslv_hresp)
|
| 528 |
+
);
|
| 529 |
+
|
| 530 |
+
assign defslv_hrdata = 32'h00000000; // Default slave do not have read data
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
// -------------------------------
|
| 534 |
+
// System ROM Table
|
| 535 |
+
// -------------------------------
|
| 536 |
+
cmsdk_ahb_cs_rom_table
|
| 537 |
+
#(//.JEPID (),
|
| 538 |
+
//.JEPCONTINUATION (),
|
| 539 |
+
//.PARTNUMBER (),
|
| 540 |
+
//.REVISION (),
|
| 541 |
+
.BASE (BASEADDR_SYSROMTABLE),
|
| 542 |
+
// Entry 0 = Cortex-M0+ Processor
|
| 543 |
+
.ENTRY0BASEADDR (32'hE00FF000),
|
| 544 |
+
.ENTRY0PRESENT (1'b1),
|
| 545 |
+
// Entry 1 = CoreSight MTB-M0+
|
| 546 |
+
.ENTRY1BASEADDR (32'hF0200000),
|
| 547 |
+
.ENTRY1PRESENT (0))
|
| 548 |
+
u_system_rom_table
|
| 549 |
+
(//Outputs
|
| 550 |
+
.HRDATA (sysrom_hrdata[31:0]),
|
| 551 |
+
.HREADYOUT (sysrom_hreadyout),
|
| 552 |
+
.HRESP (sysrom_hresp),
|
| 553 |
+
//Inputs
|
| 554 |
+
.HCLK (HCLKSYS),
|
| 555 |
+
.HSEL (sysrom_hsel),
|
| 556 |
+
.HADDR (sys_haddr[31:0]),
|
| 557 |
+
.HBURST (sys_hburst[2:0]),
|
| 558 |
+
.HMASTLOCK (sys_hmastlock),
|
| 559 |
+
.HPROT (sys_hprot[3:0]),
|
| 560 |
+
.HSIZE (sys_hsize[2:0]),
|
| 561 |
+
.HTRANS (sys_htrans[1:0]),
|
| 562 |
+
.HWDATA (sys_hwdata[31:0]),
|
| 563 |
+
.HWRITE (sys_hwrite),
|
| 564 |
+
.HREADY (sys_hready),
|
| 565 |
+
.ECOREVNUM (4'h0));
|
| 566 |
+
|
| 567 |
+
// -------------------------------
|
| 568 |
+
// Peripherals
|
| 569 |
+
// -------------------------------
|
| 570 |
+
|
| 571 |
+
cmsdk_mcu_sysctrl #(.BE (BE))
|
| 572 |
+
u_cmsdk_mcu_sysctrl
|
| 573 |
+
(
|
| 574 |
+
// AHB Inputs
|
| 575 |
+
.HCLK (HCLKSYS),
|
| 576 |
+
.HRESETn (HRESETn),
|
| 577 |
+
.FCLK (FCLK),
|
| 578 |
+
.PORESETn (PORESETn),
|
| 579 |
+
.HSEL (sysctrl_hsel),
|
| 580 |
+
.HREADY (sys_hready),
|
| 581 |
+
.HTRANS (sys_htrans),
|
| 582 |
+
.HSIZE (sys_hsize),
|
| 583 |
+
.HWRITE (sys_hwrite),
|
| 584 |
+
.HADDR (sys_haddr[11:0]),
|
| 585 |
+
.HWDATA (sys_hwdata),
|
| 586 |
+
// AHB Outputs
|
| 587 |
+
.HREADYOUT (sysctrl_hreadyout),
|
| 588 |
+
.HRESP (sysctrl_hresp),
|
| 589 |
+
.HRDATA (sysctrl_hrdata),
|
| 590 |
+
// Reset information
|
| 591 |
+
.SYSRESETREQ (SYSRESETREQ),
|
| 592 |
+
.WDOGRESETREQ (WDOGRESETREQ),
|
| 593 |
+
.LOCKUP (LOCKUP),
|
| 594 |
+
// Engineering-change-order revision bits
|
| 595 |
+
.ECOREVNUM (4'h0),
|
| 596 |
+
// System control signals
|
| 597 |
+
.REMAP (remap_ctrl),
|
| 598 |
+
.PMUENABLE (PMUENABLE),
|
| 599 |
+
.LOCKUPRESET (LOCKUPRESET)
|
| 600 |
+
);
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
// GPIO is driven from the AHB
|
| 604 |
+
cmsdk_ahb_gpio #(
|
| 605 |
+
.ALTERNATE_FUNC_MASK (16'h0000), // No pin muxing for Port #0
|
| 606 |
+
.ALTERNATE_FUNC_DEFAULT (16'h0000), // All pins default to GPIO
|
| 607 |
+
.BE (BE)
|
| 608 |
+
)
|
| 609 |
+
u_ahb_gpio_0 (
|
| 610 |
+
// AHB Inputs
|
| 611 |
+
.HCLK (HCLKSYS),
|
| 612 |
+
.HRESETn (HRESETn),
|
| 613 |
+
.FCLK (FCLK),
|
| 614 |
+
.HSEL (gpio0_hsel),
|
| 615 |
+
.HREADY (sys_hready),
|
| 616 |
+
.HTRANS (sys_htrans),
|
| 617 |
+
.HSIZE (sys_hsize),
|
| 618 |
+
.HWRITE (sys_hwrite),
|
| 619 |
+
.HADDR (sys_haddr[11:0]),
|
| 620 |
+
.HWDATA (sys_hwdata),
|
| 621 |
+
// AHB Outputs
|
| 622 |
+
.HREADYOUT (gpio0_hreadyout),
|
| 623 |
+
.HRESP (gpio0_hresp),
|
| 624 |
+
.HRDATA (gpio0_hrdata),
|
| 625 |
+
|
| 626 |
+
.ECOREVNUM (4'h0),// Engineering-change-order revision bits
|
| 627 |
+
|
| 628 |
+
.PORTIN (p0_in), // GPIO Interface inputs
|
| 629 |
+
.PORTOUT (p0_out), // GPIO Interface outputs
|
| 630 |
+
.PORTEN (p0_outen),
|
| 631 |
+
.PORTFUNC (p0_altfunc), // Alternate function control
|
| 632 |
+
|
| 633 |
+
.GPIOINT (gpio0_intr[15:0]), // Interrupt outputs
|
| 634 |
+
.COMBINT (gpio0_combintr)
|
| 635 |
+
);
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
cmsdk_ahb_gpio #(
|
| 639 |
+
.ALTERNATE_FUNC_MASK (16'h002A), // pin muxing for Port #1
|
| 640 |
+
.ALTERNATE_FUNC_DEFAULT (16'h0000), // All pins default to GPIO
|
| 641 |
+
.BE (BE)
|
| 642 |
+
)
|
| 643 |
+
u_ahb_gpio_1 (
|
| 644 |
+
// AHB Inputs
|
| 645 |
+
.HCLK (HCLKSYS),
|
| 646 |
+
.HRESETn (HRESETn),
|
| 647 |
+
.FCLK (FCLK),
|
| 648 |
+
.HSEL (gpio1_hsel),
|
| 649 |
+
.HREADY (sys_hready),
|
| 650 |
+
.HTRANS (sys_htrans),
|
| 651 |
+
.HSIZE (sys_hsize),
|
| 652 |
+
.HWRITE (sys_hwrite),
|
| 653 |
+
.HADDR (sys_haddr[11:0]),
|
| 654 |
+
.HWDATA (sys_hwdata),
|
| 655 |
+
// AHB Outputs
|
| 656 |
+
.HREADYOUT (gpio1_hreadyout),
|
| 657 |
+
.HRESP (gpio1_hresp),
|
| 658 |
+
.HRDATA (gpio1_hrdata),
|
| 659 |
+
|
| 660 |
+
.ECOREVNUM (4'h0),// Engineering-change-order revision bits
|
| 661 |
+
|
| 662 |
+
.PORTIN (p1_in), // GPIO Interface inputs
|
| 663 |
+
.PORTOUT (p1_out), // GPIO Interface outputs
|
| 664 |
+
.PORTEN (p1_outen),
|
| 665 |
+
.PORTFUNC (p1_altfunc), // Alternate function control
|
| 666 |
+
|
| 667 |
+
.GPIOINT (), // Interrupt outputs
|
| 668 |
+
.COMBINT (gpio1_combintr)
|
| 669 |
+
);
|
| 670 |
+
|
| 671 |
+
assign IOMATCH = 1'b0;
|
| 672 |
+
assign IORDATA = {32{(1'b0)}};
|
| 673 |
+
|
| 674 |
+
// APB subsystem for timers, UARTs
|
| 675 |
+
cmsdk_apb_subsystem #(
|
| 676 |
+
.APB_EXT_PORT12_ENABLE (0),
|
| 677 |
+
.APB_EXT_PORT13_ENABLE (0),
|
| 678 |
+
.APB_EXT_PORT14_ENABLE (0),
|
| 679 |
+
.APB_EXT_PORT15_ENABLE (0),
|
| 680 |
+
.INCLUDE_IRQ_SYNCHRONIZER(0),
|
| 681 |
+
.INCLUDE_APB_TEST_SLAVE (0),
|
| 682 |
+
.INCLUDE_APB_TIMER0 (0), // Include simple timer #0
|
| 683 |
+
.INCLUDE_APB_TIMER1 (0), // Include simple timer #1
|
| 684 |
+
.INCLUDE_APB_DUALTIMER0 (0), // Include dual timer module
|
| 685 |
+
.INCLUDE_APB_UART0 (1), // Include simple UART #0
|
| 686 |
+
.INCLUDE_APB_UART1 (0), // Include simple UART #1
|
| 687 |
+
.INCLUDE_APB_UART2 (0), // Include simple UART #2.
|
| 688 |
+
.INCLUDE_APB_WATCHDOG (0), // Include APB watchdog module
|
| 689 |
+
.BE (BE)
|
| 690 |
+
)
|
| 691 |
+
u_apb_subsystem(
|
| 692 |
+
|
| 693 |
+
// AHB interface for AHB to APB bridge
|
| 694 |
+
.HCLK (HCLKSYS),
|
| 695 |
+
.HRESETn (HRESETn),
|
| 696 |
+
|
| 697 |
+
.HSEL (apbsys_hsel),
|
| 698 |
+
.HADDR (sys_haddr[15:0]),
|
| 699 |
+
.HTRANS (sys_htrans[1:0]),
|
| 700 |
+
.HWRITE (sys_hwrite),
|
| 701 |
+
.HSIZE (sys_hsize),
|
| 702 |
+
.HPROT (sys_hprot),
|
| 703 |
+
.HREADY (sys_hready),
|
| 704 |
+
.HWDATA (sys_hwdata[31:0]),
|
| 705 |
+
|
| 706 |
+
.HREADYOUT (apbsys_hreadyout),
|
| 707 |
+
.HRDATA (apbsys_hrdata),
|
| 708 |
+
.HRESP (apbsys_hresp),
|
| 709 |
+
|
| 710 |
+
// APB clock and reset
|
| 711 |
+
.PCLK (PCLK),
|
| 712 |
+
.PCLKG (PCLKG),
|
| 713 |
+
.PCLKEN (PCLKEN),
|
| 714 |
+
.PRESETn (PRESETn),
|
| 715 |
+
|
| 716 |
+
// APB extension ports
|
| 717 |
+
.PADDR (exp_paddr[11:0]),
|
| 718 |
+
.PWRITE (exp_pwrite),
|
| 719 |
+
.PWDATA (exp_pwdata[31:0]),
|
| 720 |
+
.PENABLE (exp_penable),
|
| 721 |
+
|
| 722 |
+
.ext12_psel (),
|
| 723 |
+
.ext13_psel (),
|
| 724 |
+
.ext14_psel (),
|
| 725 |
+
.ext15_psel (),
|
| 726 |
+
|
| 727 |
+
// Input from APB devices on APB expansion ports
|
| 728 |
+
.ext12_prdata (32'h00000000),
|
| 729 |
+
.ext12_pready (1'b1),
|
| 730 |
+
.ext12_pslverr (1'b0),
|
| 731 |
+
|
| 732 |
+
.ext13_prdata (32'h00000000),
|
| 733 |
+
.ext13_pready (1'b1),
|
| 734 |
+
.ext13_pslverr (1'b0),
|
| 735 |
+
|
| 736 |
+
.ext14_prdata (32'h00000000),
|
| 737 |
+
.ext14_pready (1'b1),
|
| 738 |
+
.ext14_pslverr (1'b0),
|
| 739 |
+
|
| 740 |
+
.ext15_prdata (32'h00000000),
|
| 741 |
+
.ext15_pready (1'b1),
|
| 742 |
+
.ext15_pslverr (1'b0),
|
| 743 |
+
|
| 744 |
+
.APBACTIVE (APBACTIVE), // Status Output for clock gating
|
| 745 |
+
|
| 746 |
+
// Peripherals
|
| 747 |
+
// UART
|
| 748 |
+
.uart0_rxd (uart0_rxd),
|
| 749 |
+
.uart0_txd (uart0_txd),
|
| 750 |
+
.uart0_txen (uart0_txen),
|
| 751 |
+
|
| 752 |
+
.uart1_rxd (uart1_rxd),
|
| 753 |
+
.uart1_txd (uart1_txd),
|
| 754 |
+
.uart1_txen (uart1_txen),
|
| 755 |
+
|
| 756 |
+
.uart2_rxd (uart2_rxd),
|
| 757 |
+
.uart2_txd (uart2_txd),
|
| 758 |
+
.uart2_txen (uart2_txen),
|
| 759 |
+
|
| 760 |
+
// Timer
|
| 761 |
+
.timer0_extin (timer0_extin),
|
| 762 |
+
.timer1_extin (timer1_extin),
|
| 763 |
+
|
| 764 |
+
// Interrupt outputs
|
| 765 |
+
.apbsubsys_interrupt (apbsubsys_interrupt),
|
| 766 |
+
.watchdog_interrupt (watchdog_interrupt),
|
| 767 |
+
// reset output
|
| 768 |
+
.watchdog_reset (WDOGRESETREQ)
|
| 769 |
+
);
|
| 770 |
+
|
| 771 |
+
// Connect system bus to external
|
| 772 |
+
assign HADDR = sys_haddr;
|
| 773 |
+
assign HTRANS = sys_htrans;
|
| 774 |
+
assign HSIZE = sys_hsize;
|
| 775 |
+
assign HWRITE = sys_hwrite;
|
| 776 |
+
assign HWDATA = sys_hwdata;
|
| 777 |
+
assign HREADY = sys_hready;
|
| 778 |
+
|
| 779 |
+
// -------------------------------
|
| 780 |
+
// Interrupt assignment
|
| 781 |
+
// -------------------------------
|
| 782 |
+
// Changed from CMSDK:
|
| 783 |
+
// IRQ[12] is used as combined UART overflow interrupt
|
| 784 |
+
|
| 785 |
+
assign intnmi_cm0 = watchdog_interrupt;
|
| 786 |
+
assign intisr_cm0[ 5: 0] = apbsubsys_interrupt[ 5: 0];
|
| 787 |
+
assign intisr_cm0[ 6] = apbsubsys_interrupt[ 6] | gpio0_combintr | gpio2_interrupt;
|
| 788 |
+
assign intisr_cm0[ 7] = apbsubsys_interrupt[ 7] | gpio1_combintr | gpio3_interrupt;
|
| 789 |
+
assign intisr_cm0[10: 8] = apbsubsys_interrupt[10: 8];
|
| 790 |
+
assign intisr_cm0[11] = apbsubsys_interrupt[11] | spi_interrupt;
|
| 791 |
+
assign intisr_cm0[12] = |apbsubsys_interrupt[14: 12]; // UART Overflow interrupts
|
| 792 |
+
assign intisr_cm0[13] = eth_interrupt; // V2M-MPS2 Ethernet
|
| 793 |
+
assign intisr_cm0[14] = i2s_interrupt; // V2M-MPS2 Ethernet
|
| 794 |
+
assign intisr_cm0[15] = apbsubsys_interrupt[15] | ts_interrupt; // Also DMA if integrated
|
| 795 |
+
assign intisr_cm0[31:16] = apbsubsys_interrupt[31:16]| gpio0_intr;
|
| 796 |
+
|
| 797 |
+
// -------------------------------
|
| 798 |
+
// SysTick signals
|
| 799 |
+
// -------------------------------
|
| 800 |
+
cmsdk_mcu_stclkctrl
|
| 801 |
+
#(.DIV_RATIO (18'd01000))
|
| 802 |
+
u_cmsdk_mcu_stclkctrl (
|
| 803 |
+
.FCLK (FCLK),
|
| 804 |
+
.SYSRESETn (HRESETn),
|
| 805 |
+
|
| 806 |
+
.STCLKEN (STCLKEN),
|
| 807 |
+
.STCALIB (STCALIB)
|
| 808 |
+
);
|
| 809 |
+
|
| 810 |
+
// --------------------------------------------------------------------------------
|
| 811 |
+
// Verification components
|
| 812 |
+
// --------------------------------------------------------------------------------
|
| 813 |
+
`ifdef ARM_AHB_ASSERT_ON
|
| 814 |
+
// AHB protocol checker for process bus
|
| 815 |
+
AhbLitePC #(
|
| 816 |
+
.ADDR_WIDTH (32),
|
| 817 |
+
.DATA_WIDTH (32),
|
| 818 |
+
.BIG_ENDIAN (BE),
|
| 819 |
+
.MASTER_TO_INTERCONNECT ( 1),
|
| 820 |
+
.EARLY_BURST_TERMINATION ( 0),
|
| 821 |
+
// Property type (0=prove, 1=assume, 2=ignore)
|
| 822 |
+
.MASTER_REQUIREMENT_PROPTYPE ( 0),
|
| 823 |
+
.MASTER_RECOMMENDATION_PROPTYPE ( 0),
|
| 824 |
+
.MASTER_XCHECK_PROPTYPE ( 0),
|
| 825 |
+
.SLAVE_REQUIREMENT_PROPTYPE ( 0),
|
| 826 |
+
.SLAVE_RECOMMENDATION_PROPTYPE ( 0),
|
| 827 |
+
.SLAVE_XCHECK_PROPTYPE ( 0),
|
| 828 |
+
.INTERCONNECT_REQUIREMENT_PROPTYPE ( 0),
|
| 829 |
+
.INTERCONNECT_RECOMMENDATION_PROPTYPE ( 0),
|
| 830 |
+
.INTERCONNECT_XCHECK_PROPTYPE ( 0)
|
| 831 |
+
) u_AhbLitePC_processor
|
| 832 |
+
(
|
| 833 |
+
// clock
|
| 834 |
+
.HCLK (HCLKSYS),
|
| 835 |
+
|
| 836 |
+
// active low reset
|
| 837 |
+
.HRESETn (HRESETn),
|
| 838 |
+
|
| 839 |
+
// Main Master signals
|
| 840 |
+
.HADDR (cm0_haddr),
|
| 841 |
+
.HTRANS (cm0_htrans),
|
| 842 |
+
.HWRITE (cm0_hwrite),
|
| 843 |
+
.HSIZE (cm0_hsize),
|
| 844 |
+
.HBURST (cm0_hburst),
|
| 845 |
+
.HPROT (cm0_hprot),
|
| 846 |
+
.HWDATA (cm0_hwdata),
|
| 847 |
+
|
| 848 |
+
// Main Decoder signals
|
| 849 |
+
.HSELx (1'bx), // Ignored for this instance
|
| 850 |
+
|
| 851 |
+
// Main Slave signals
|
| 852 |
+
.HRDATA (cm0_hrdata),
|
| 853 |
+
.HREADY (cm0_hready),
|
| 854 |
+
.HREADYOUT (1'bx), // Ignored for this instance
|
| 855 |
+
.HRESP (cm0_hresp),
|
| 856 |
+
|
| 857 |
+
// HMASTER, // NOTE: not used
|
| 858 |
+
|
| 859 |
+
.HMASTLOCK (cm0_hmastlock)
|
| 860 |
+
);
|
| 861 |
+
`endif
|
| 862 |
+
|
| 863 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/fpga_ram_top.v
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//-----------------------------------------------------------------------------
|
| 2 |
+
// Abstract : FPGA BlockRam/OnChip RAM
|
| 3 |
+
// ----------------------------------------------------------------------------
|
| 4 |
+
|
| 5 |
+
module fpga_ram_top #(
|
| 6 |
+
// --------------------------------------------------------------------------
|
| 7 |
+
// Parameter Declarations
|
| 8 |
+
// --------------------------------------------------------------------------
|
| 9 |
+
parameter AW = 16,
|
| 10 |
+
parameter filename = ""
|
| 11 |
+
)
|
| 12 |
+
(
|
| 13 |
+
// Inputs
|
| 14 |
+
input wire CLK,
|
| 15 |
+
input wire [AW-1:2] ADDR,
|
| 16 |
+
input wire [31:0] WDATA,
|
| 17 |
+
input wire [3:0] WREN,
|
| 18 |
+
input wire CS,
|
| 19 |
+
|
| 20 |
+
// Outputs
|
| 21 |
+
output wire [31:0] RDATA
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
blk_mem_zed //#(
|
| 25 |
+
//.filename("mem0.coe"))
|
| 26 |
+
blk_mem0
|
| 27 |
+
(
|
| 28 |
+
.clka (CLK),
|
| 29 |
+
.ena (CS),
|
| 30 |
+
.wea (WREN[0]),
|
| 31 |
+
.addra(ADDR[15:2]),
|
| 32 |
+
.dina (WDATA[7:0]),
|
| 33 |
+
.douta(RDATA[7:0])
|
| 34 |
+
);
|
| 35 |
+
blk_mem_zed// #(
|
| 36 |
+
// .filename("mem1.coe"))
|
| 37 |
+
blk_mem1 (
|
| 38 |
+
.clka (CLK),
|
| 39 |
+
.ena (CS),
|
| 40 |
+
.wea (WREN[1]),
|
| 41 |
+
.addra(ADDR[15:2]),
|
| 42 |
+
.dina (WDATA[15:8]),
|
| 43 |
+
.douta(RDATA[15:8])
|
| 44 |
+
);
|
| 45 |
+
blk_mem_zed //#(
|
| 46 |
+
// .filename("mem2.coe"))
|
| 47 |
+
blk_mem2 (
|
| 48 |
+
.clka (CLK),
|
| 49 |
+
.ena (CS),
|
| 50 |
+
.wea (WREN[2]),
|
| 51 |
+
.addra(ADDR[15:2]),
|
| 52 |
+
.dina (WDATA[23:16]),
|
| 53 |
+
.douta(RDATA[23:16])
|
| 54 |
+
);
|
| 55 |
+
blk_mem_zed //#(
|
| 56 |
+
//.filename("mem3.coe"))
|
| 57 |
+
blk_mem3 (
|
| 58 |
+
.clka (CLK),
|
| 59 |
+
.ena (CS),
|
| 60 |
+
.wea (WREN[3]),
|
| 61 |
+
.addra(ADDR[15:2]),
|
| 62 |
+
.dina (WDATA[31:24]),
|
| 63 |
+
.douta(RDATA[31:24])
|
| 64 |
+
);
|
| 65 |
+
|
| 66 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/fpga_rom_top.v
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//-----------------------------------------------------------------------------
|
| 2 |
+
// Abstract : FPGA BlockRam/OnChip ROM
|
| 3 |
+
// ----------------------------------------------------------------------------
|
| 4 |
+
|
| 5 |
+
module fpga_rom_top #(
|
| 6 |
+
// --------------------------------------------------------------------------
|
| 7 |
+
// Parameter Declarations
|
| 8 |
+
// --------------------------------------------------------------------------
|
| 9 |
+
parameter AW = 16,
|
| 10 |
+
parameter filename = "image.hex"
|
| 11 |
+
)
|
| 12 |
+
(
|
| 13 |
+
// Inputs
|
| 14 |
+
input wire CLK,
|
| 15 |
+
input wire [AW-1:2] ADDR,
|
| 16 |
+
input wire [31:0] WDATA,
|
| 17 |
+
input wire [3:0] WREN,
|
| 18 |
+
input wire CS,
|
| 19 |
+
|
| 20 |
+
// Outputs
|
| 21 |
+
output wire [31:0] RDATA
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
blk_mem_zed
|
| 25 |
+
#(
|
| 26 |
+
.filename("mem0.mif"))
|
| 27 |
+
blk_mem0
|
| 28 |
+
(
|
| 29 |
+
.clka (CLK),
|
| 30 |
+
.ena (1'b1),
|
| 31 |
+
.wea (WREN[0]),
|
| 32 |
+
.addra(ADDR[15:2]),
|
| 33 |
+
.dina (WDATA[7:0]),
|
| 34 |
+
.douta(RDATA[7:0])
|
| 35 |
+
);
|
| 36 |
+
blk_mem_zed
|
| 37 |
+
#(
|
| 38 |
+
.filename("mem1.mif"))
|
| 39 |
+
blk_mem1 (
|
| 40 |
+
.clka (CLK),
|
| 41 |
+
.ena (1'b1),
|
| 42 |
+
.wea (WREN[1]),
|
| 43 |
+
.addra(ADDR[15:2]),
|
| 44 |
+
.dina (WDATA[15:8]),
|
| 45 |
+
.douta(RDATA[15:8])
|
| 46 |
+
);
|
| 47 |
+
blk_mem_zed
|
| 48 |
+
#(
|
| 49 |
+
.filename("mem2.mif"))
|
| 50 |
+
blk_mem2 (
|
| 51 |
+
.clka (CLK),
|
| 52 |
+
.ena (1'b1),
|
| 53 |
+
.wea (WREN[2]),
|
| 54 |
+
.addra(ADDR[15:2]),
|
| 55 |
+
.dina (WDATA[23:16]),
|
| 56 |
+
.douta(RDATA[23:16])
|
| 57 |
+
);
|
| 58 |
+
blk_mem_zed
|
| 59 |
+
#(
|
| 60 |
+
.filename("mem3.mif"))
|
| 61 |
+
blk_mem3 (
|
| 62 |
+
.clka (CLK),
|
| 63 |
+
.ena (1'b1),
|
| 64 |
+
.wea (WREN[3]),
|
| 65 |
+
.addra(ADDR[15:2]),
|
| 66 |
+
.dina (WDATA[31:24]),
|
| 67 |
+
.douta(RDATA[31:24])
|
| 68 |
+
);
|
| 69 |
+
|
| 70 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/led_1second.v
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// 1second_test
|
| 2 |
+
`timescale 1 ns / 1 ns
|
| 3 |
+
|
| 4 |
+
module led_1second(
|
| 5 |
+
clk,
|
| 6 |
+
reset,
|
| 7 |
+
led_a
|
| 8 |
+
);
|
| 9 |
+
input clk;
|
| 10 |
+
input reset;
|
| 11 |
+
output led_a;
|
| 12 |
+
|
| 13 |
+
reg reg_led_a;
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
reg reg_1s_flag;
|
| 17 |
+
reg reg_ms_flag;
|
| 18 |
+
reg reg_us_flag;
|
| 19 |
+
//reg reg_1m_flag;
|
| 20 |
+
//reg [5:0] reg_s_count;
|
| 21 |
+
reg [9:0] reg_ms_count;
|
| 22 |
+
reg [9:0] reg_us_count;
|
| 23 |
+
reg [5:0] reg_clk_count;
|
| 24 |
+
|
| 25 |
+
//��������������������������������������������begin ���´���Ĺ��ܣ�ʵ��1���Ӽ�����������һ��һ���ӱ�־��������������������������������
|
| 26 |
+
|
| 27 |
+
//clk�����������Ƶ�50 ��ʱ�ӣ�50MHZ��ʱ�ӣ�������20ns��ʱ���㣬Ҳ����1000ms = 1��
|
| 28 |
+
always @(posedge clk or negedge reset)
|
| 29 |
+
begin
|
| 30 |
+
if (~reset)
|
| 31 |
+
reg_clk_count <= 6'b00000;
|
| 32 |
+
else if( reg_clk_count == 49) reg_clk_count <= 6'b00000;
|
| 33 |
+
else reg_clk_count <= reg_clk_count + 1;
|
| 34 |
+
end
|
| 35 |
+
|
| 36 |
+
//����1us��־ reg_us_flag
|
| 37 |
+
always @(posedge clk or negedge reset)
|
| 38 |
+
begin
|
| 39 |
+
if (~reset)
|
| 40 |
+
reg_us_flag <= 0;
|
| 41 |
+
else if( reg_clk_count == 49) reg_us_flag <= 1;
|
| 42 |
+
else reg_us_flag <= 0;
|
| 43 |
+
end
|
| 44 |
+
//us �����������Ƶ�1000us ʱ���㣬Ҳ����1����
|
| 45 |
+
always @(posedge clk or negedge reset)
|
| 46 |
+
begin
|
| 47 |
+
if (~reset)
|
| 48 |
+
reg_us_count <= 0;
|
| 49 |
+
else if( reg_us_count == 999) reg_us_count <= 10'h000;
|
| 50 |
+
else if( reg_us_flag) reg_us_count <= reg_us_count + 1;
|
| 51 |
+
end
|
| 52 |
+
|
| 53 |
+
//����1ms��־ reg_ms_flag
|
| 54 |
+
always @(posedge clk or negedge reset)
|
| 55 |
+
begin
|
| 56 |
+
if (~reset)
|
| 57 |
+
reg_ms_flag <= 0;
|
| 58 |
+
else if( reg_us_count == 999) reg_ms_flag <= 1;
|
| 59 |
+
else reg_ms_flag <= 0;
|
| 60 |
+
end
|
| 61 |
+
//ms �����������Ƶ�1000ms ʱ���㣬Ҳ����1����
|
| 62 |
+
always @(posedge clk or negedge reset)
|
| 63 |
+
begin
|
| 64 |
+
if (~reset)
|
| 65 |
+
reg_ms_count <= 0;
|
| 66 |
+
else if( reg_ms_count == 999) reg_ms_count <= 10'h000;
|
| 67 |
+
else if( reg_ms_flag) reg_ms_count <= reg_ms_count + 1;
|
| 68 |
+
end
|
| 69 |
+
|
| 70 |
+
//����1s ��־reg_1s_flag
|
| 71 |
+
always @(posedge clk or negedge reset)
|
| 72 |
+
begin
|
| 73 |
+
if (~reset)
|
| 74 |
+
reg_1s_flag <= 0;
|
| 75 |
+
else if( reg_ms_count == 999) reg_1s_flag <= 1;
|
| 76 |
+
else reg_1s_flag <= 0;
|
| 77 |
+
end
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
always @(posedge clk or negedge reset)
|
| 81 |
+
begin
|
| 82 |
+
if (~reset)
|
| 83 |
+
reg_led_a <= 0;
|
| 84 |
+
else if( reg_1s_flag == 1) reg_led_a <= ~reg_led_a;
|
| 85 |
+
else reg_led_a <= reg_led_a;
|
| 86 |
+
end
|
| 87 |
+
|
| 88 |
+
assign led_a = reg_led_a ;
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
endmodule
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
|
abdelazeem201_ASIC-Design-Roadmap/cmsdk/tb_cmsdk_mcu_zed.v
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//------------------------------------------------------------------------------
|
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited or its affiliates.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2015 ARM Limited or its affiliates.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited or its affiliates.
|
| 13 |
+
//
|
| 14 |
+
// Version and Release Control Information:
|
| 15 |
+
//
|
| 16 |
+
// File Revision : $Revision: 368442 $
|
| 17 |
+
// File Date : $Date: 2017-07-25 15:07:59 +0100 (Tue, 25 Jul 2017) $
|
| 18 |
+
//
|
| 19 |
+
// Release Information : Cortex-M0 DesignStart-r2p0-00rel0
|
| 20 |
+
//
|
| 21 |
+
//------------------------------------------------------------------------------
|
| 22 |
+
// Verilog-2001 (IEEE Std 1364-2001)
|
| 23 |
+
//------------------------------------------------------------------------------
|
| 24 |
+
//
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// Abstract : Testbench for the Cortex-M0 example system
|
| 27 |
+
//-----------------------------------------------------------------------------
|
| 28 |
+
//
|
| 29 |
+
`timescale 1ns/1ps
|
| 30 |
+
`include "cmsdk_mcu_defs.v"
|
| 31 |
+
|
| 32 |
+
module tb_cmsdk_mcu_zed;
|
| 33 |
+
|
| 34 |
+
reg XTAL1; // crystal pin 1
|
| 35 |
+
wire XTAL2; // crystal pin 2
|
| 36 |
+
reg NRST; // active low reset
|
| 37 |
+
|
| 38 |
+
wire [15:0] P0; // Port 0
|
| 39 |
+
wire [15:0] P1; // Port 1
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
//Debug tester signals
|
| 43 |
+
wire nTRST;
|
| 44 |
+
wire TDI;
|
| 45 |
+
wire SWDIOTMS;
|
| 46 |
+
wire SWCLKTCK;
|
| 47 |
+
wire TDO;
|
| 48 |
+
|
| 49 |
+
wire PCLK; // Clock for UART capture device
|
| 50 |
+
wire [5:0] debug_command; // used to drive debug tester
|
| 51 |
+
wire debug_running; // indicate debug test is running
|
| 52 |
+
wire debug_err; // indicate debug test has error
|
| 53 |
+
|
| 54 |
+
wire debug_test_en; // To enable the debug tester connection to MCU GPIO P0
|
| 55 |
+
// This signal is controlled by software,
|
| 56 |
+
// Use "UartPutc((char) 0x1B)" to send ESCAPE code to start
|
| 57 |
+
// the command, use "UartPutc((char) 0x11)" to send debug test
|
| 58 |
+
// enable command, use "UartPutc((char) 0x12)" to send debug test
|
| 59 |
+
// disable command. Refer to tb_uart_capture.v file for detail
|
| 60 |
+
|
| 61 |
+
parameter BE = 0; // Big or little endian
|
| 62 |
+
|
| 63 |
+
parameter BKPT = 4; // Number of breakpoint comparators
|
| 64 |
+
parameter DBG = 1; // Debug configuration
|
| 65 |
+
parameter NUMIRQ = 32; // NUM of IRQ
|
| 66 |
+
parameter SMUL = 0; // Multiplier configuration
|
| 67 |
+
parameter SYST = 1; // SysTick
|
| 68 |
+
parameter WIC = 1; // Wake-up interrupt controller support
|
| 69 |
+
parameter WICLINES = 34; // Supported WIC lines
|
| 70 |
+
parameter WPT = 2; // Number of DWT comparators
|
| 71 |
+
|
| 72 |
+
// --------------------------------------------------------------------------------
|
| 73 |
+
// Cortex-M0/Cortex-M0+ Microcontroller
|
| 74 |
+
// --------------------------------------------------------------------------------
|
| 75 |
+
wire uart0_txd ;
|
| 76 |
+
// cmsdk_mcu
|
| 77 |
+
cmsdk_mcu_zed
|
| 78 |
+
#(.BE (BE),
|
| 79 |
+
.BKPT (BKPT), // Number of breakpoint comparators
|
| 80 |
+
.DBG (DBG), // Debug configuration
|
| 81 |
+
.NUMIRQ (NUMIRQ), // NUMIRQ
|
| 82 |
+
.SMUL (SMUL), // Multiplier configuration
|
| 83 |
+
.SYST (SYST), // SysTick
|
| 84 |
+
.WIC (WIC), // Wake-up interrupt controller support
|
| 85 |
+
.WICLINES (WICLINES), // Supported WIC lines
|
| 86 |
+
.WPT (WPT) // Number of DWT comparators
|
| 87 |
+
)
|
| 88 |
+
u_cmsdk_mcu_zed (
|
| 89 |
+
.XTAL1 (XTAL1), // input
|
| 90 |
+
// .i_clk (XTAL1),
|
| 91 |
+
// .XTAL2 (XTAL2), // output
|
| 92 |
+
.RST (NRST), // active low reset
|
| 93 |
+
.uartf_TXD (uart0_txd),
|
| 94 |
+
.o_led (),
|
| 95 |
+
//.P0_O (),
|
| 96 |
+
//.P1 (P1),
|
| 97 |
+
// .nTRST (nTRST), // Not needed if serial-wire debug is used
|
| 98 |
+
//.TDI (TDI), // Not needed if serial-wire debug is used
|
| 99 |
+
//.TDO (TDO), // Not needed if serial-wire debug is used
|
| 100 |
+
.SWDIOTMS (SWDIOTMS),
|
| 101 |
+
.SWCLKTCK (SWCLKTCK)
|
| 102 |
+
);
|
| 103 |
+
|
| 104 |
+
// --------------------------------------------------------------------------------
|
| 105 |
+
// Source for clock and reset
|
| 106 |
+
// --------------------------------------------------------------------------------
|
| 107 |
+
// cmsdk_clkreset u_cmsdk_clkreset(
|
| 108 |
+
// .CLK (XTAL1),
|
| 109 |
+
// .NRST (NRST)
|
| 110 |
+
// );
|
| 111 |
+
always #10 XTAL1 =~ XTAL1;
|
| 112 |
+
// --------------------------------------------------------------------------------
|
| 113 |
+
// UART output capture
|
| 114 |
+
// --------------------------------------------------------------------------------
|
| 115 |
+
assign PCLK = XTAL1;
|
| 116 |
+
|
| 117 |
+
cmsdk_uart_capture u_cmsdk_uart_capture(
|
| 118 |
+
.RESETn (~NRST),
|
| 119 |
+
.CLK (PCLK),
|
| 120 |
+
.RXD (uart0_txd), // UART 0 used for StdOut
|
| 121 |
+
.DEBUG_TESTER_ENABLE (debug_test_en),
|
| 122 |
+
.SIMULATIONEND (), // This signal set to 1 at the end of simulation.
|
| 123 |
+
.AUXCTRL ()
|
| 124 |
+
);
|
| 125 |
+
|
| 126 |
+
// UART connection cross over for UART test
|
| 127 |
+
assign P1[2] = P1[5]; // UART 1 RXD = UART 2 TXD
|
| 128 |
+
assign P1[4] = P1[3]; // UART 2 RXD = UART 1 TXD
|
| 129 |
+
|
| 130 |
+
// --------------------------------------------------------------------------------
|
| 131 |
+
// Debug tester connection -
|
| 132 |
+
// --------------------------------------------------------------------------------
|
| 133 |
+
|
| 134 |
+
// No debug connection for Cortex-M0 DesignStart
|
| 135 |
+
assign nTRST = NRST;
|
| 136 |
+
assign TDI = 1'b1;
|
| 137 |
+
assign SWDIOTMS = 1'b1;
|
| 138 |
+
assign SWCLKTCK = 1'b1;
|
| 139 |
+
|
| 140 |
+
bufif1 (P0[31-16], debug_running, debug_test_en);
|
| 141 |
+
bufif1 (P0[30-16], debug_err, debug_test_en);
|
| 142 |
+
|
| 143 |
+
pullup (debug_running);
|
| 144 |
+
pullup (debug_err);
|
| 145 |
+
|
| 146 |
+
// --------------------------------------------------------------------------------
|
| 147 |
+
// Misc
|
| 148 |
+
// --------------------------------------------------------------------------------
|
| 149 |
+
|
| 150 |
+
// Format for time reporting
|
| 151 |
+
initial $timeformat(-9, 0, " ns", 0);
|
| 152 |
+
initial
|
| 153 |
+
begin
|
| 154 |
+
XTAL1 = 0;
|
| 155 |
+
NRST = 1;
|
| 156 |
+
#1000;
|
| 157 |
+
NRST = 0;
|
| 158 |
+
|
| 159 |
+
#100000;
|
| 160 |
+
end
|
| 161 |
+
endmodule
|
abdelazeem201_ASIC-Design-Roadmap/good online sites and books for learning ASIC Design/README
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
abdelazeem201_ASIC-Design-Roadmap/lef_layer_tf_number_mapper.pl
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 3 |
+
# Written by Ahmed Abdelazeem
|
| 4 |
+
# March 11, 2024
|
| 5 |
+
# Updated to cover more LEF cases
|
| 6 |
+
# July 1, 2024
|
| 7 |
+
# A Perl script processes a technology file (.tf) and an LEF (Library Exchange Format) file to generate a mapping between layers defined in these files.
|
| 8 |
+
#
|
| 9 |
+
#
|
| 10 |
+
|
| 11 |
+
$EXPECTED_COMMAND_ARGS = 2;
|
| 12 |
+
|
| 13 |
+
if ($#ARGV < $EXPECTED_COMMAND_ARGS -1 )
|
| 14 |
+
{
|
| 15 |
+
die "Usage: lef_layer_tf_number_map.pl Tech_file_name.tf Lef_file_name.lef\n";
|
| 16 |
+
}
|
| 17 |
+
else
|
| 18 |
+
{
|
| 19 |
+
$tech_file = $ARGV[0];
|
| 20 |
+
$lef_file = $ARGV[1];
|
| 21 |
+
$tmp_s1 = $ARGV[0];
|
| 22 |
+
$tmp_s1 =~ s/\.tf/_tf/;
|
| 23 |
+
$tmp_s2 = $ARGV[1];
|
| 24 |
+
$tmp_s2 =~ s/\.lef/_lef/;
|
| 25 |
+
$lef_tf_map_file = $tmp_s2."_".$tmp_s1.".map";
|
| 26 |
+
$lef_tf_log_file = $tmp_s2."_".$tmp_s1.".log";
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
open tech_file or die "Can't open $tech_file\n";
|
| 30 |
+
open lef_file or die "Can't open $lef_file\n";
|
| 31 |
+
open lef_tf_log_file, ">$lef_tf_log_file" or die "Can't open $lef_tf_log_file\n";
|
| 32 |
+
open lef_tf_map_file, ">$lef_tf_map_file" or die "Can't open $lef_tf_map_file\n";
|
| 33 |
+
|
| 34 |
+
print_log( "\n*** Beginning to process $tech_file tech file***\n");
|
| 35 |
+
$i=0;
|
| 36 |
+
|
| 37 |
+
%tf_layerMaskNames = ();
|
| 38 |
+
%tf_layerMaskLayerNumber = ();
|
| 39 |
+
%tf_layerName = ();
|
| 40 |
+
|
| 41 |
+
$processing_tf_layer = 0;
|
| 42 |
+
$found_maskName = 0;
|
| 43 |
+
$tf_masks = 0;
|
| 44 |
+
while ($line = <tech_file>)
|
| 45 |
+
{
|
| 46 |
+
chop $line;
|
| 47 |
+
if ( $line =~ /^[lL][aA][yY][eE][rR][\s]+\"([\w\W]+)\"[\s]+\{.*$/ )
|
| 48 |
+
{
|
| 49 |
+
if ($processing_tf_layer ==0)
|
| 50 |
+
{
|
| 51 |
+
$processing_tf_layer = 1;
|
| 52 |
+
$tf_layer_name = $1;
|
| 53 |
+
print_log( "\nBeginning to process $tf_layer_name layer...\n");
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
elsif ( $line =~ /^[\s]*\}.*$/)
|
| 57 |
+
{
|
| 58 |
+
if ($processing_tf_layer ==1)
|
| 59 |
+
{
|
| 60 |
+
if ($found_maskName == 1)
|
| 61 |
+
{
|
| 62 |
+
$tf_layerMaskNames{$tf_masks} = $tf_maskName;
|
| 63 |
+
$tf_layerMaskLayerNumber{$tf_maskName} = $tf_layerNumber;
|
| 64 |
+
$tf_layerName{$tf_maskName} = $tf_layer_name;
|
| 65 |
+
|
| 66 |
+
$tf_masks++;
|
| 67 |
+
$found_maskName =0;
|
| 68 |
+
}
|
| 69 |
+
print_log( "Completed the processing of $tf_layer_name layer.\n");
|
| 70 |
+
$processing_tf_layer = 0;
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
elsif ( $line =~ /^[\s]*layerNumber[\s]*\=[\s]*([\d]+).*$/)
|
| 74 |
+
{
|
| 75 |
+
$tf_layerNumber = $1;
|
| 76 |
+
print_log( "Found the layerNumber $tf_layerNumber for the $tf_layer_name!\n");
|
| 77 |
+
}
|
| 78 |
+
elsif ( $line =~ /^[\s]*maskName[\s]*\=[\s]*\"([\w]+)\".*$/)
|
| 79 |
+
{
|
| 80 |
+
$tf_maskName = $1;
|
| 81 |
+
$found_maskName = 1;
|
| 82 |
+
print_log( "Found the maskName $tf_maskName for the $tf_layer_name!\n");
|
| 83 |
+
}
|
| 84 |
+
$i++;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
#foreach $key (keys %tf_layerMaskNames)
|
| 88 |
+
# {
|
| 89 |
+
# print "tf_layerName=$tf_layerName{$tf_layerMaskNames{$key}} ";
|
| 90 |
+
# print "tf_mask_layerName=$tf_layerMaskNames{$key} ";
|
| 91 |
+
# print "tf_mask_layerNumber=$tf_layerMaskLayerNumber{$tf_layerMaskNames{$key}}\n";
|
| 92 |
+
# }
|
| 93 |
+
|
| 94 |
+
print_log( "\n*** Beginning to process $lef_file LEF file***\n");
|
| 95 |
+
|
| 96 |
+
%lef_layerDerivedMaskNames = ();
|
| 97 |
+
%lef_layerDerivedMaskLayerNumber = ();
|
| 98 |
+
%lef_layerName = ();
|
| 99 |
+
|
| 100 |
+
$i=0;
|
| 101 |
+
$lef_masks = 0;
|
| 102 |
+
$processing_lef_layer = 0;
|
| 103 |
+
$lef_prev_layerTYPE = "";
|
| 104 |
+
$metal_index = 0;
|
| 105 |
+
while ($line = <lef_file>)
|
| 106 |
+
{
|
| 107 |
+
chop $line;
|
| 108 |
+
# print "$line\n";
|
| 109 |
+
# print "$i th line:$line\n";
|
| 110 |
+
if ( $line =~ /^LAYER[\s]+([\w]+)[\s]*$/ )
|
| 111 |
+
{
|
| 112 |
+
if ($processing_lef_layer ==0)
|
| 113 |
+
{
|
| 114 |
+
$processing_lef_layer = 1;
|
| 115 |
+
$lef_layer_name = $1;
|
| 116 |
+
print_log( "\nBeginning to process $lef_layer_name layer...\n");
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
elsif ( $line =~ /^END[\s]+[\w]+[\s]*$/)
|
| 120 |
+
{
|
| 121 |
+
if ($processing_lef_layer ==1)
|
| 122 |
+
{
|
| 123 |
+
$lef_derivedmaskName = "";
|
| 124 |
+
if ( ($lef_layerTYPE eq "MASTERSLICE") && ($lef_masks == 0) )
|
| 125 |
+
{
|
| 126 |
+
$lef_derivedmaskName = "poly";
|
| 127 |
+
}
|
| 128 |
+
elsif ( ($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE eq "MASTERSLICE") )
|
| 129 |
+
{
|
| 130 |
+
$lef_derivedmaskName = "polyCont";
|
| 131 |
+
}
|
| 132 |
+
elsif ( ($lef_layerTYPE eq "ROUTING") )
|
| 133 |
+
{
|
| 134 |
+
if ( $metal_index == 0) { $metal_index = 1; }
|
| 135 |
+
else { $metal_index++; }
|
| 136 |
+
$lef_derivedmaskName = "metal".$metal_index;
|
| 137 |
+
}
|
| 138 |
+
elsif ( ($lef_layerTYPE eq "CUT") && ($lef_prev_layerTYPE ne "MASTERSLICE"))
|
| 139 |
+
{
|
| 140 |
+
# print "lef_layerTYPE=$lef_layerTYPE;lef_masks=$lef_masks;lef_prev_layerTYPE=$lef_prev_layerTYPE\n";
|
| 141 |
+
$lef_derivedmaskName = "via".$metal_index;
|
| 142 |
+
}
|
| 143 |
+
elsif ( ($lef_layerTYPE eq "OVERLAP") )
|
| 144 |
+
{
|
| 145 |
+
print_log( "Skipping the OVERLAP Layer...\n");
|
| 146 |
+
}
|
| 147 |
+
else {
|
| 148 |
+
# print "lef_layerTYPE=$lef_layerTYPE;lef_masks=$lef_masks;lef_prev_layerTYPE=$lef_prev_layerTYPE\n";
|
| 149 |
+
die "Can not process due to issue...\n";
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if ($lef_derivedmaskName ne "" )
|
| 153 |
+
{
|
| 154 |
+
$lef_derivedlayerNumber = $tf_layerMaskLayerNumber{$lef_derivedmaskName};
|
| 155 |
+
|
| 156 |
+
$lef_layerDerivedMaskNames{$lef_masks} = $lef_derivedmaskName;
|
| 157 |
+
$lef_layerDerivedMaskLayerNumber{$lef_derivedmaskName} = $lef_derivedlayerNumber;
|
| 158 |
+
$lef_layerName{$lef_derivedmaskName} = $lef_layer_name;
|
| 159 |
+
$lef_masks++;
|
| 160 |
+
}
|
| 161 |
+
print_log( "Completed the processing of $lef_layer_name layer.\n");
|
| 162 |
+
$processing_lef_layer = 0;
|
| 163 |
+
$lef_prev_layerTYPE = $lef_layerTYPE;
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
elsif ( $line =~ /^[\s]*TYPE[\s]+([\w]+)[\s]*\;.*$/)
|
| 167 |
+
{
|
| 168 |
+
$lef_layerTYPE = $1;
|
| 169 |
+
print_log( "Found the TYPE $lef_layerTYPE for the $lef_layer_name!\n");
|
| 170 |
+
}
|
| 171 |
+
$i++;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
#foreach $key (keys %lef_layerDerivedMaskNames)
|
| 175 |
+
# {
|
| 176 |
+
# print "lef_layerName=$lef_layerName{$lef_layerDerivedMaskNames{$key}} ";
|
| 177 |
+
# print "lef_mask_layerName=$lef_layerDerivedMaskNames{$key} ";
|
| 178 |
+
# print "lef_mask_layerNumber=$lef_layerDerivedMaskLayerNumber{$lef_layerDerivedMaskNames{$key}}\n";
|
| 179 |
+
# }
|
| 180 |
+
|
| 181 |
+
print_log( "\n*** Printing the map file between $lef_file and $tech_file ***\n");
|
| 182 |
+
for ($j=0; $j < $lef_masks; $j++)
|
| 183 |
+
{
|
| 184 |
+
print_map("$lef_layerName{$lef_layerDerivedMaskNames{$j}}");
|
| 185 |
+
print_map(" $lef_layerDerivedMaskLayerNumber{$lef_layerDerivedMaskNames{$j}}\n");
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
close lef_tf_map_file;
|
| 189 |
+
|
| 190 |
+
sub print_log {
|
| 191 |
+
print "$_[0]";
|
| 192 |
+
print lef_tf_log_file "$_[0]";
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
sub print_map {
|
| 196 |
+
print "$_[0]";
|
| 197 |
+
print lef_tf_map_file "$_[0]";
|
| 198 |
+
}
|
abdelazeem201_ASIC-Design-Roadmap/low_power.upf
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#Scope: RISC_CORE_1
|
| 2 |
+
|
| 3 |
+
#Domain: TOP
|
| 4 |
+
create_power_domain TOP
|
| 5 |
+
|
| 6 |
+
create_supply_net VDDH -domain TOP
|
| 7 |
+
create_supply_port VDDH -domain TOP -direction in
|
| 8 |
+
|
| 9 |
+
create_supply_net VDDL -domain TOP
|
| 10 |
+
create_supply_port VDDL -domain TOP -direction in
|
| 11 |
+
connect_supply_net VDDL -ports {VDDL}
|
| 12 |
+
|
| 13 |
+
create_supply_net VSS -domain TOP
|
| 14 |
+
create_supply_port VSS -domain TOP -direction in
|
| 15 |
+
connect_supply_net VSS -ports {VSS}
|
| 16 |
+
|
| 17 |
+
set_domain_supply_net TOP -primary_power_net VDDH -primary_ground_net VSS
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
add_port_state VSS -state {state1 0.000000}
|
| 21 |
+
add_port_state VDDL -state {state1 0.800000}
|
| 22 |
+
add_port_state VDDH -state {state1 1.200000}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
#Domain: PD2
|
| 26 |
+
create_power_domain PD2 \
|
| 27 |
+
-elements {I_DATA_PATH I_CONTROL I_STACK_TOP I_REG_FILE I_PRGRM_CNT_TOP I_INSTRN_LAT}
|
| 28 |
+
create_supply_net VDDL -domain PD2 -reuse
|
| 29 |
+
create_supply_net VSS -domain PD2 -reuse
|
| 30 |
+
set_domain_supply_net PD2 -primary_power_net VDDL -primary_ground_net VSS
|
| 31 |
+
|
| 32 |
+
add_port_state VSS \
|
| 33 |
+
-state {state1 0.000000}
|
| 34 |
+
|
| 35 |
+
#Scope: I_ALU
|
| 36 |
+
|
| 37 |
+
#Domain: PD1
|
| 38 |
+
create_power_domain PD1 -scope I_ALU \
|
| 39 |
+
-elements {I_ALU}
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
create_supply_port VSS -domain I_ALU/PD1 -direction in
|
| 43 |
+
create_supply_net VSS -domain I_ALU/PD1
|
| 44 |
+
connect_supply_net I_ALU/VSS -ports {I_ALU/VSS}
|
| 45 |
+
|
| 46 |
+
create_supply_port PD1_VDD -domain I_ALU/PD1 -direction in
|
| 47 |
+
create_supply_net PD1_VDD -domain I_ALU/PD1
|
| 48 |
+
connect_supply_net I_ALU/PD1_VDD -ports {I_ALU/PD1_VDD}
|
| 49 |
+
|
| 50 |
+
set_domain_supply_net I_ALU/PD1 -primary_power_net I_ALU/PD1_VDD -primary_ground_net I_ALU/VSS
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
add_port_state I_ALU/VSS -state {state1 0.000000}
|
| 55 |
+
add_port_state I_ALU/PD1_VDD -state {state1 1.200000}
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
connect_supply_net VDDH -ports {VDDH I_ALU/PD1_VDD}
|
| 61 |
+
connect_supply_net VSS -ports {I_ALU/VSS}
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
set_level_shifter shift_up -domain {PD2} -applies_to both -location automatic -rule both
|
| 65 |
+
set_level_shifter shift_up -domain {I_ALU/PD1} -applies_to both -location automatic -rule both
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
abdelazeem201_ASIC-Design-Roadmap/memories/cmsdk_ahb_ram.v
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2013 ARM Limited.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited.
|
| 13 |
+
//
|
| 14 |
+
// SVN Information
|
| 15 |
+
//
|
| 16 |
+
// Checked In : $Date: 2013-04-10 15:27:13 +0100 (Wed, 10 Apr 2013) $
|
| 17 |
+
//
|
| 18 |
+
// Revision : $Revision: 243506 $
|
| 19 |
+
//
|
| 20 |
+
// Release Information : Cortex-M System Design Kit-r1p0-00rel0
|
| 21 |
+
//
|
| 22 |
+
//-----------------------------------------------------------------------------
|
| 23 |
+
//-----------------------------------------------------------------------------
|
| 24 |
+
// Abstract : Simple AHB RAM model wrapper
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// This RAM wrapper allows various types of RAM to be instantiated by
|
| 27 |
+
// simply changing MEM_TYPE parameter.
|
| 28 |
+
//
|
| 29 |
+
// Select one of the following
|
| 30 |
+
//
|
| 31 |
+
// MEM_TYPE = 0 : AHB_ROM_NONE
|
| 32 |
+
// - Memory not present
|
| 33 |
+
//
|
| 34 |
+
// MEM_TYPE = 1 : AHB_RAM_BEH_MODEL
|
| 35 |
+
// - Simple behavioral model (default)
|
| 36 |
+
//
|
| 37 |
+
// MEM_TYPE = 2 : AHB_RAM_FPGA_SRAM_MODEL
|
| 38 |
+
// - behavioral model of simple ASIC/FPGA SRAM model with AHB wrapper
|
| 39 |
+
//
|
| 40 |
+
// MEM_TYPE = 3 : AHB_RAM_EXT_SRAM16_MODEL
|
| 41 |
+
// - behavioral model of simple 16-bit external SRAM model with external memory interface
|
| 42 |
+
//
|
| 43 |
+
// MEM_TYPE = 4 : AHB_RAM_EXT_SRAM8_MODEL
|
| 44 |
+
// - behavioral model of simple 8-bit external SRAM model with external memory interface
|
| 45 |
+
//
|
| 46 |
+
`include "cmsdk_ahb_memory_models_defs.v"
|
| 47 |
+
|
| 48 |
+
module cmsdk_ahb_ram #(
|
| 49 |
+
parameter MEM_TYPE = 2, // Memory Type : Default to behavioral memory
|
| 50 |
+
parameter AW = 16,// Address width
|
| 51 |
+
parameter filename = "",
|
| 52 |
+
parameter WS_N = 0, // First access wait state
|
| 53 |
+
parameter WS_S = 0 // Subsequent access wait state
|
| 54 |
+
)
|
| 55 |
+
(
|
| 56 |
+
input wire HCLK, // Clock
|
| 57 |
+
input wire HRESETn, // Reset
|
| 58 |
+
// AHB inputs
|
| 59 |
+
input wire HSEL, // Device select
|
| 60 |
+
input wire [AW-1:0] HADDR, // Address
|
| 61 |
+
input wire [1:0] HTRANS, // Transfer control
|
| 62 |
+
input wire [2:0] HSIZE, // Transfer size
|
| 63 |
+
input wire HWRITE, // Write control
|
| 64 |
+
input wire [31:0] HWDATA, // Write data
|
| 65 |
+
input wire HREADY, // Transfer phase done
|
| 66 |
+
// AHB Outputs
|
| 67 |
+
output wire HREADYOUT, // Device ready
|
| 68 |
+
output wire [31:0] HRDATA, // Read data output
|
| 69 |
+
output wire HRESP); // Device response (always OKAY)
|
| 70 |
+
|
| 71 |
+
// parameter MEM_TYPE = 2;
|
| 72 |
+
//----------------------------------------------------------------
|
| 73 |
+
// AHB_RAM_NONE : Memory not present
|
| 74 |
+
/*
|
| 75 |
+
generate if (MEM_TYPE == `AHB_RAM_NONE) begin
|
| 76 |
+
assign HREADYOUT = 1'b1;
|
| 77 |
+
assign HRDATA = {32{1'b0}};
|
| 78 |
+
assign HRESP = 1'b0;
|
| 79 |
+
end endgenerate
|
| 80 |
+
|
| 81 |
+
//----------------------------------------------------------------
|
| 82 |
+
// AHB_RAM_BEH_MODEL : Simple behavioral model (default)
|
| 83 |
+
|
| 84 |
+
generate if (MEM_TYPE == `AHB_RAM_BEH_MODEL) begin
|
| 85 |
+
// Behavioral SRAM model
|
| 86 |
+
cmsdk_ahb_ram_beh
|
| 87 |
+
#(.AW(AW),
|
| 88 |
+
.filename(filename),
|
| 89 |
+
.WS_N(WS_N),
|
| 90 |
+
.WS_S(WS_S)
|
| 91 |
+
)
|
| 92 |
+
u_ahb_ram_beh (
|
| 93 |
+
.HCLK (HCLK),
|
| 94 |
+
.HRESETn (HRESETn),
|
| 95 |
+
.HSEL (HSEL), // AHB inputs
|
| 96 |
+
.HADDR (HADDR),
|
| 97 |
+
.HTRANS (HTRANS),
|
| 98 |
+
.HSIZE (HSIZE),
|
| 99 |
+
.HWRITE (HWRITE),
|
| 100 |
+
.HWDATA (HWDATA),
|
| 101 |
+
.HREADY (HREADY),
|
| 102 |
+
|
| 103 |
+
.HREADYOUT (HREADYOUT), // Outputs
|
| 104 |
+
.HRDATA (HRDATA),
|
| 105 |
+
.HRESP (HRESP)
|
| 106 |
+
);
|
| 107 |
+
end endgenerate
|
| 108 |
+
*/
|
| 109 |
+
//----------------------------------------------------------------
|
| 110 |
+
// AHB_RAM_FPGA_SRAM_MODEL :
|
| 111 |
+
// behavioral model of simple ASIC/FPGA SRAM model with AHB wrapper
|
| 112 |
+
|
| 113 |
+
//generate if (MEM_TYPE == `AHB_RAM_FPGA_SRAM_MODEL) begin
|
| 114 |
+
// wires for SRAM interface
|
| 115 |
+
wire [AW-3:0] SRAMADDR;
|
| 116 |
+
wire [31:0] SRAMWDATA;
|
| 117 |
+
wire [31:0] SRAMRDATA;
|
| 118 |
+
wire [3:0] SRAMWEN;
|
| 119 |
+
wire SRAMCS;
|
| 120 |
+
|
| 121 |
+
// AHB to SRAM bridge
|
| 122 |
+
cmsdk_ahb_to_sram #(.AW(AW)) u_ahb_to_sram
|
| 123 |
+
(
|
| 124 |
+
// AHB Inputs
|
| 125 |
+
.HCLK (HCLK),
|
| 126 |
+
.HRESETn (HRESETn),
|
| 127 |
+
.HSEL (HSEL), // AHB inputs
|
| 128 |
+
.HADDR (HADDR),
|
| 129 |
+
.HTRANS (HTRANS),
|
| 130 |
+
.HSIZE (HSIZE),
|
| 131 |
+
.HWRITE (HWRITE),
|
| 132 |
+
.HWDATA (HWDATA),
|
| 133 |
+
.HREADY (HREADY),
|
| 134 |
+
|
| 135 |
+
// AHB Outputs
|
| 136 |
+
.HREADYOUT (HREADYOUT), // Outputs
|
| 137 |
+
.HRDATA (HRDATA),
|
| 138 |
+
.HRESP (HRESP),
|
| 139 |
+
|
| 140 |
+
// SRAM input
|
| 141 |
+
.SRAMRDATA (SRAMRDATA),
|
| 142 |
+
// SRAM Outputs
|
| 143 |
+
.SRAMADDR (SRAMADDR),
|
| 144 |
+
.SRAMWDATA (SRAMWDATA),
|
| 145 |
+
.SRAMWEN (SRAMWEN),
|
| 146 |
+
.SRAMCS (SRAMCS)
|
| 147 |
+
);
|
| 148 |
+
|
| 149 |
+
// SRAM model
|
| 150 |
+
// cmsdk_fpga_sram #(.AW(AW)) u_fpga_sram
|
| 151 |
+
fpga_ram_top #(.AW(AW)) fpga_ram_top
|
| 152 |
+
(
|
| 153 |
+
// SRAM Inputs
|
| 154 |
+
.CLK (HCLK),
|
| 155 |
+
.ADDR (SRAMADDR),
|
| 156 |
+
.WDATA (SRAMWDATA),
|
| 157 |
+
.WREN (SRAMWEN),
|
| 158 |
+
.CS (SRAMCS),
|
| 159 |
+
// SRAM Outputs
|
| 160 |
+
.RDATA (SRAMRDATA)
|
| 161 |
+
);
|
| 162 |
+
// end endgenerate
|
| 163 |
+
|
| 164 |
+
//----------------------------------------------------------------
|
| 165 |
+
// AHB_RAM_EXT_SRAM16_MODEL :
|
| 166 |
+
// behavioral model of 16-bit external SRAM with AHB to external RAM interface
|
| 167 |
+
//
|
| 168 |
+
// Note : for benchmarking using 16-bit external asynchronous SRAM.
|
| 169 |
+
// In real application the 16-bit external SRAM will be off chip
|
| 170 |
+
//
|
| 171 |
+
/*
|
| 172 |
+
generate if (MEM_TYPE == `AHB_RAM_EXT_SRAM16_MODEL) begin
|
| 173 |
+
// wires for external SRAM interface
|
| 174 |
+
wire [AW-1:0] EMIADDR; // External memory interface address
|
| 175 |
+
wire [15:0] EMIDATA; // External memory interface data (bi-directional)
|
| 176 |
+
wire [15:0] EMIDATAIN;
|
| 177 |
+
wire [15:0] EMIDATAOUT;
|
| 178 |
+
wire EMIDATAOEn;
|
| 179 |
+
wire EMIWEn; // Write enable (active low)
|
| 180 |
+
wire EMIOEn; // Output enable (active low)
|
| 181 |
+
wire EMICEn; // Chip enable (active low)
|
| 182 |
+
wire EMILBn; // Lower byte strobe (active low)
|
| 183 |
+
wire EMIUBn; // Upper byte strobe (active low)
|
| 184 |
+
|
| 185 |
+
wire [2:0] CFGREADCYCLE;
|
| 186 |
+
wire [2:0] CFGWRITECYCLE;
|
| 187 |
+
wire [2:0] CFGTURNAROUNDCYCLE;
|
| 188 |
+
wire CFGSIZE;
|
| 189 |
+
|
| 190 |
+
assign CFGSIZE = 1'b1; // 16-bit
|
| 191 |
+
assign CFGREADCYCLE = WS_N;
|
| 192 |
+
assign CFGWRITECYCLE = WS_N;
|
| 193 |
+
assign CFGTURNAROUNDCYCLE = WS_N;
|
| 194 |
+
|
| 195 |
+
// interface to external SRAM
|
| 196 |
+
cmsdk_ahb_to_extmem16
|
| 197 |
+
#(.AW (AW))
|
| 198 |
+
u_ahb_to_extmem16 (
|
| 199 |
+
.HCLK (HCLK),
|
| 200 |
+
.HRESETn (HRESETn),
|
| 201 |
+
|
| 202 |
+
.HSEL (HSEL), // AHB inputs
|
| 203 |
+
.HADDR (HADDR[AW-1:0]),
|
| 204 |
+
.HTRANS (HTRANS),
|
| 205 |
+
.HSIZE (HSIZE),
|
| 206 |
+
.HWRITE (HWRITE),
|
| 207 |
+
.HWDATA (HWDATA),
|
| 208 |
+
.HREADY (HREADY),
|
| 209 |
+
|
| 210 |
+
.HREADYOUT (HREADYOUT), // AHB Outputs
|
| 211 |
+
.HRDATA (HRDATA),
|
| 212 |
+
.HRESP (HRESP),
|
| 213 |
+
|
| 214 |
+
// Configuration signals
|
| 215 |
+
.CFGREADCYCLE (CFGREADCYCLE), // Read cycle
|
| 216 |
+
.CFGWRITECYCLE (CFGWRITECYCLE), // Write cycle
|
| 217 |
+
.CFGTURNAROUNDCYCLE(CFGTURNAROUNDCYCLE), // Turn around cycle
|
| 218 |
+
.CFGSIZE (CFGSIZE), // Size (0 = 8-bit, 1 = 16-bit)
|
| 219 |
+
|
| 220 |
+
// External memory
|
| 221 |
+
.DATAIN (EMIDATAIN), // data input
|
| 222 |
+
|
| 223 |
+
.ADDR (EMIADDR[AW-1:0]), // address output
|
| 224 |
+
.DATAOUT (EMIDATAOUT), // data output
|
| 225 |
+
.DATAOEn (EMIDATAOEn), // output enable (active low)
|
| 226 |
+
.WEn (EMIWEn), // write control (active low)
|
| 227 |
+
.OEn (EMIOEn), // read control (active low)
|
| 228 |
+
.CEn (EMICEn), // Chip Enable (active low)
|
| 229 |
+
.LBn (EMILBn), // Lower Byte (active low)
|
| 230 |
+
.UBn (EMIUBn) // Upper Byte (active low)
|
| 231 |
+
);
|
| 232 |
+
|
| 233 |
+
// Tristate buffer for data
|
| 234 |
+
assign EMIDATAIN = EMIDATA;
|
| 235 |
+
assign EMIDATA = (EMIDATAOEn==1'b0) ? EMIDATAOUT : {16{1'bz}};
|
| 236 |
+
|
| 237 |
+
// 16-bit SRAM model
|
| 238 |
+
cmsdk_sram256x16
|
| 239 |
+
#(.AW(AW))
|
| 240 |
+
u_sram256x16 (
|
| 241 |
+
.Address (EMIADDR[AW-1:0]),
|
| 242 |
+
.DataIO (EMIDATA),
|
| 243 |
+
.WEn (EMIWEn),
|
| 244 |
+
.OEn (EMIOEn),
|
| 245 |
+
.CEn (EMICEn),
|
| 246 |
+
.LBn (EMILBn),
|
| 247 |
+
.UBn (EMIUBn)
|
| 248 |
+
);
|
| 249 |
+
|
| 250 |
+
end endgenerate
|
| 251 |
+
|
| 252 |
+
//----------------------------------------------------------------
|
| 253 |
+
// AHB_RAM_EXT_SRAM8_MODEL :
|
| 254 |
+
// behavioral model of 8-bit external SRAM with AHB to external RAM interface
|
| 255 |
+
//
|
| 256 |
+
// Note : for benchmarking using 8-bit external asynchronous SRAM.
|
| 257 |
+
// In real application the 8-bit external SRAM will be off chip
|
| 258 |
+
//
|
| 259 |
+
|
| 260 |
+
generate if (MEM_TYPE == `AHB_RAM_EXT_SRAM8_MODEL) begin
|
| 261 |
+
// wires for external SRAM interface
|
| 262 |
+
wire [AW-1:0] EMIADDR; // External memory interface address
|
| 263 |
+
wire [15:0] EMIDATA; // External memory interface data (bi-directional)
|
| 264 |
+
wire [15:0] EMIDATAIN;
|
| 265 |
+
wire [15:0] EMIDATAOUT;
|
| 266 |
+
wire EMIDATAOEn;
|
| 267 |
+
wire EMIWEn; // Write enable (active low)
|
| 268 |
+
wire EMIOEn; // Output enable (active low)
|
| 269 |
+
wire EMICEn; // Chip enable (active low)
|
| 270 |
+
wire EMILBn; // Lower byte strobe (active low)
|
| 271 |
+
wire EMIUBn; // Upper byte strobe (active low)
|
| 272 |
+
|
| 273 |
+
wire [2:0] CFGREADCYCLE;
|
| 274 |
+
wire [2:0] CFGWRITECYCLE;
|
| 275 |
+
wire [2:0] CFGTURNAROUNDCYCLE;
|
| 276 |
+
wire CFGSIZE;
|
| 277 |
+
|
| 278 |
+
assign CFGSIZE = 1'b0; // 8-bit
|
| 279 |
+
assign CFGREADCYCLE = WS_N;
|
| 280 |
+
assign CFGWRITECYCLE = WS_N;
|
| 281 |
+
assign CFGTURNAROUNDCYCLE = WS_N;
|
| 282 |
+
|
| 283 |
+
// interface to external SRAM
|
| 284 |
+
cmsdk_ahb_to_extmem16
|
| 285 |
+
#(.AW (AW))
|
| 286 |
+
u_ahb_to_extmem16 (
|
| 287 |
+
.HCLK (HCLK),
|
| 288 |
+
.HRESETn (HRESETn),
|
| 289 |
+
|
| 290 |
+
.HSEL (HSEL), // AHB inputs
|
| 291 |
+
.HADDR (HADDR[AW-1:0]),
|
| 292 |
+
.HTRANS (HTRANS),
|
| 293 |
+
.HSIZE (HSIZE),
|
| 294 |
+
.HWRITE (HWRITE),
|
| 295 |
+
.HWDATA (HWDATA),
|
| 296 |
+
.HREADY (HREADY),
|
| 297 |
+
|
| 298 |
+
.HREADYOUT (HREADYOUT), // AHB Outputs
|
| 299 |
+
.HRDATA (HRDATA),
|
| 300 |
+
.HRESP (HRESP),
|
| 301 |
+
|
| 302 |
+
// Configuration signals
|
| 303 |
+
.CFGREADCYCLE (CFGREADCYCLE), // Read cycle
|
| 304 |
+
.CFGWRITECYCLE (CFGWRITECYCLE), // Write cycle
|
| 305 |
+
.CFGTURNAROUNDCYCLE(CFGTURNAROUNDCYCLE), // Turn around cycle
|
| 306 |
+
.CFGSIZE (CFGSIZE), // Size (0 = 8-bit, 1 = 16-bit)
|
| 307 |
+
|
| 308 |
+
// External memory
|
| 309 |
+
.DATAIN (EMIDATAIN), // data input
|
| 310 |
+
|
| 311 |
+
.ADDR (EMIADDR[AW-1:0]),// address output
|
| 312 |
+
.DATAOUT (EMIDATAOUT), // data output
|
| 313 |
+
.DATAOEn (EMIDATAOEn), // output enable (active low)
|
| 314 |
+
.WEn (EMIWEn), // write control (active low)
|
| 315 |
+
.OEn (EMIOEn), // read control (active low)
|
| 316 |
+
.CEn (EMICEn), // Chip Enable (active low)
|
| 317 |
+
.LBn (EMILBn), // Lower Byte (active low)
|
| 318 |
+
.UBn (EMIUBn) // Upper Byte (active low)
|
| 319 |
+
);
|
| 320 |
+
|
| 321 |
+
// Tristate buffer for data
|
| 322 |
+
assign EMIDATAIN = {8'h00, EMIDATA[7:0]};
|
| 323 |
+
assign EMIDATA = (EMIDATAOEn==1'b0) ? EMIDATAOUT : {16{1'bz}};
|
| 324 |
+
|
| 325 |
+
// 8-bit SRAM model
|
| 326 |
+
cmsdk_sram256x8
|
| 327 |
+
#(.AW(AW))
|
| 328 |
+
u_sram256x8 (
|
| 329 |
+
.Address (EMIADDR[AW-1:0]),
|
| 330 |
+
.DataIO (EMIDATA[7:0]),
|
| 331 |
+
.WEn (EMIWEn),
|
| 332 |
+
.OEn (EMIOEn),
|
| 333 |
+
.CEn (EMICEn)
|
| 334 |
+
);
|
| 335 |
+
|
| 336 |
+
end endgenerate
|
| 337 |
+
*/
|
| 338 |
+
//----------------------------------------------------------------
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
endmodule
|
| 342 |
+
|
abdelazeem201_ASIC-Design-Roadmap/memories/cmsdk_ahb_rom.v
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//-----------------------------------------------------------------------------
|
| 2 |
+
// The confidential and proprietary information contained in this file may
|
| 3 |
+
// only be used by a person authorised under and to the extent permitted
|
| 4 |
+
// by a subsisting licensing agreement from ARM Limited.
|
| 5 |
+
//
|
| 6 |
+
// (C) COPYRIGHT 2010-2013 ARM Limited.
|
| 7 |
+
// ALL RIGHTS RESERVED
|
| 8 |
+
//
|
| 9 |
+
// This entire notice must be reproduced on all copies of this file
|
| 10 |
+
// and copies of this file may only be made by a person if such person is
|
| 11 |
+
// permitted to do so under the terms of a subsisting license agreement
|
| 12 |
+
// from ARM Limited.
|
| 13 |
+
//
|
| 14 |
+
// SVN Information
|
| 15 |
+
//
|
| 16 |
+
// Checked In : $Date: 2013-03-22 11:05:41 +0000 (Fri, 22 Mar 2013) $
|
| 17 |
+
//
|
| 18 |
+
// Revision : $Revision: 242013 $
|
| 19 |
+
//
|
| 20 |
+
// Release Information : Cortex-M System Design Kit-r1p0-00rel0
|
| 21 |
+
//
|
| 22 |
+
//-----------------------------------------------------------------------------
|
| 23 |
+
//-----------------------------------------------------------------------------
|
| 24 |
+
// Abstract : Simple AHB ROM model wrapper
|
| 25 |
+
//-----------------------------------------------------------------------------
|
| 26 |
+
// This ROM wrapper allows various types of memory to be instantiated by
|
| 27 |
+
// simply changing MEM_TYPE parameter.
|
| 28 |
+
//
|
| 29 |
+
// Select one of the following
|
| 30 |
+
//
|
| 31 |
+
// MEM_TYPE = 0 : AHB_ROM_NONE
|
| 32 |
+
// - Memory not present
|
| 33 |
+
//
|
| 34 |
+
// MEM_TYPE = 1 : AHB_ROM_BEH_MODEL
|
| 35 |
+
// - Simple behavioral model (default)
|
| 36 |
+
//
|
| 37 |
+
// MEM_TYPE = 2 : AHB_ROM_FPGA_SRAM_MODEL
|
| 38 |
+
// - behavioral model of simple ASIC/FPGA ROM/SRAM model with wrapper
|
| 39 |
+
//
|
| 40 |
+
// MEM_TYPE = 3 : AHB_ROM_FLASH32_MODEL
|
| 41 |
+
// - 32-bit flash model
|
| 42 |
+
//
|
| 43 |
+
// MEM_TYPE = 4 : AHB_ROM_FLASH16_MODEL
|
| 44 |
+
// - 16-bit flash model
|
| 45 |
+
//
|
| 46 |
+
|
| 47 |
+
`include "cmsdk_ahb_memory_models_defs.v"
|
| 48 |
+
//`define MEM_TYPE 2
|
| 49 |
+
module cmsdk_ahb_rom #(
|
| 50 |
+
// --------------------------------------------------------------------------
|
| 51 |
+
// Parameter Declarations
|
| 52 |
+
// --------------------------------------------------------------------------
|
| 53 |
+
//parameter MEM_TYPE = 1, // Memory Type : Default to behavioral memory
|
| 54 |
+
parameter MEM_TYPE = 2, // Memory Type : Default to behavioral memory
|
| 55 |
+
parameter AW = 16, // Address width
|
| 56 |
+
parameter filename = "",
|
| 57 |
+
parameter WS_N = 0, // First access wait state
|
| 58 |
+
parameter WS_S = 0, // Subsequent access wait state
|
| 59 |
+
parameter BE = 0 // Big endian
|
| 60 |
+
)
|
| 61 |
+
(
|
| 62 |
+
input wire HCLK, // Clock
|
| 63 |
+
input wire HRESETn, // Reset
|
| 64 |
+
input wire HSEL, // Device select
|
| 65 |
+
input wire [AW-1:0] HADDR, // Address
|
| 66 |
+
input wire [1:0] HTRANS, // Transfer control
|
| 67 |
+
input wire [2:0] HSIZE, // Transfer size
|
| 68 |
+
input wire HWRITE, // Write control
|
| 69 |
+
input wire [31:0] HWDATA, // Write data
|
| 70 |
+
input wire HREADY, // Transfer phase done
|
| 71 |
+
|
| 72 |
+
output wire HREADYOUT, // Device ready
|
| 73 |
+
output wire [31:0] HRDATA, // Read data output
|
| 74 |
+
output wire HRESP // Device response (always OKAY)
|
| 75 |
+
);
|
| 76 |
+
|
| 77 |
+
//----------------------------------------------------------------
|
| 78 |
+
// AHB_ROM_NONE : Memory not present
|
| 79 |
+
|
| 80 |
+
generate if (MEM_TYPE == `AHB_ROM_NONE) begin
|
| 81 |
+
assign HREADYOUT = 1'b1;
|
| 82 |
+
assign HRDATA = {32{1'b0}};
|
| 83 |
+
assign HRESP = 1'b0;
|
| 84 |
+
end endgenerate
|
| 85 |
+
|
| 86 |
+
//----------------------------------------------------------------
|
| 87 |
+
// AHB_ROM_BEH_MODEL : Simple behavioral model (default)
|
| 88 |
+
/*
|
| 89 |
+
generate if (MEM_TYPE == `AHB_ROM_BEH_MODEL) begin
|
| 90 |
+
// Behavioral memory model
|
| 91 |
+
cmsdk_ahb_ram_beh
|
| 92 |
+
#(.AW(AW),
|
| 93 |
+
.filename(filename),
|
| 94 |
+
.WS_N(WS_N),
|
| 95 |
+
.WS_S(WS_S)
|
| 96 |
+
)
|
| 97 |
+
u_ahb_ram_beh (
|
| 98 |
+
.HCLK (HCLK),
|
| 99 |
+
.HRESETn (HRESETn),
|
| 100 |
+
.HSEL (HSEL), // AHB inputs
|
| 101 |
+
.HADDR (HADDR),
|
| 102 |
+
.HTRANS (HTRANS),
|
| 103 |
+
.HSIZE (HSIZE),
|
| 104 |
+
.HWRITE (1'b0), // write disabled
|
| 105 |
+
.HWDATA (32'h00000000),
|
| 106 |
+
.HREADY (HREADY),
|
| 107 |
+
|
| 108 |
+
.HREADYOUT (HREADYOUT), // Outputs
|
| 109 |
+
.HRDATA (HRDATA),
|
| 110 |
+
.HRESP (HRESP)
|
| 111 |
+
);
|
| 112 |
+
end endgenerate
|
| 113 |
+
*/
|
| 114 |
+
//----------------------------------------------------------------
|
| 115 |
+
// AHB_ROM_FPGA_SRAM_MODEL :
|
| 116 |
+
// behavioral model of simple ASIC/FPGA ROM/SRAM model with wrapper
|
| 117 |
+
|
| 118 |
+
// generate if (MEM_TYPE == `AHB_ROM_FPGA_SRAM_MODEL) begin
|
| 119 |
+
// wires for ROM/SRAM interface
|
| 120 |
+
wire [AW-3:0] SRAMADDR;
|
| 121 |
+
wire [31:0] SRAMWDATA;
|
| 122 |
+
wire [31:0] SRAMRDATA;
|
| 123 |
+
wire [3:0] SRAMWEN;
|
| 124 |
+
wire SRAMCS;
|
| 125 |
+
|
| 126 |
+
// AHB to SRAM bridge
|
| 127 |
+
cmsdk_ahb_to_sram
|
| 128 |
+
#(.AW(AW)
|
| 129 |
+
) u_ahb_to_sram
|
| 130 |
+
(
|
| 131 |
+
// AHB Inputs
|
| 132 |
+
.HCLK (HCLK),
|
| 133 |
+
.HRESETn (HRESETn),
|
| 134 |
+
.HSEL (HSEL), // AHB inputs
|
| 135 |
+
.HADDR (HADDR),
|
| 136 |
+
.HTRANS (HTRANS),
|
| 137 |
+
.HSIZE (HSIZE),
|
| 138 |
+
.HWRITE (HWRITE),
|
| 139 |
+
.HWDATA (HWDATA),
|
| 140 |
+
.HREADY (HREADY),
|
| 141 |
+
|
| 142 |
+
// AHB Outputs
|
| 143 |
+
.HREADYOUT (HREADYOUT), // Outputs
|
| 144 |
+
.HRDATA (HRDATA),
|
| 145 |
+
.HRESP (HRESP),
|
| 146 |
+
|
| 147 |
+
// SRAM input
|
| 148 |
+
.SRAMRDATA (SRAMRDATA),
|
| 149 |
+
// SRAM Outputs
|
| 150 |
+
.SRAMADDR (SRAMADDR),
|
| 151 |
+
.SRAMWDATA (SRAMWDATA),
|
| 152 |
+
.SRAMWEN (SRAMWEN),
|
| 153 |
+
.SRAMCS (SRAMCS)
|
| 154 |
+
);
|
| 155 |
+
|
| 156 |
+
// RAM model
|
| 157 |
+
// cmsdk_fpga_rom #(.AW(AW), .filename(filename)) u_fpga_rom
|
| 158 |
+
fpga_rom_top #(.AW(AW), .filename(filename)) fpga_rom_top
|
| 159 |
+
(
|
| 160 |
+
// SRAM Inputs
|
| 161 |
+
.CLK (HCLK),
|
| 162 |
+
.ADDR (SRAMADDR),
|
| 163 |
+
.WDATA (SRAMWDATA),
|
| 164 |
+
.WREN (SRAMWEN),
|
| 165 |
+
.CS (SRAMCS),
|
| 166 |
+
// SRAM Outputs
|
| 167 |
+
.RDATA (SRAMRDATA)
|
| 168 |
+
);
|
| 169 |
+
// end endgenerate
|
| 170 |
+
|
| 171 |
+
/*
|
| 172 |
+
//----------------------------------------------------------------
|
| 173 |
+
// AHB_ROM_FLASH32_MODEL : 32-bit flash model (no pre-fetcher)
|
| 174 |
+
|
| 175 |
+
generate if (MEM_TYPE == `AHB_ROM_FLASH32_MODEL) begin
|
| 176 |
+
// wires for Flash interface
|
| 177 |
+
wire [AW-3:0] FLASHADDR;
|
| 178 |
+
wire [31:0] FLASHRDATA;
|
| 179 |
+
|
| 180 |
+
// flash memory wrapper
|
| 181 |
+
cmsdk_ahb_to_flash32
|
| 182 |
+
#(
|
| 183 |
+
.AW (AW),
|
| 184 |
+
.WS (WS_N)
|
| 185 |
+
) u_ahb_to_flash32 (
|
| 186 |
+
.HCLK (HCLK),
|
| 187 |
+
.HRESETn (HRESETn),
|
| 188 |
+
.HSEL (HSEL), // AHB inputs
|
| 189 |
+
.HADDR (HADDR),
|
| 190 |
+
.HTRANS (HTRANS),
|
| 191 |
+
.HPROT (4'h8), // Always cacheable
|
| 192 |
+
.HSIZE (HSIZE),
|
| 193 |
+
.HWRITE (HWRITE),
|
| 194 |
+
.HWDATA (32'h00000000), // not used
|
| 195 |
+
.HREADY (HREADY),
|
| 196 |
+
|
| 197 |
+
.HREADYOUT (HREADYOUT), // Outputs
|
| 198 |
+
.HRDATA (HRDATA),
|
| 199 |
+
.HRESP (HRESP),
|
| 200 |
+
|
| 201 |
+
.FLASHADDR (FLASHADDR),
|
| 202 |
+
.FLASHRDATA (FLASHRDATA)
|
| 203 |
+
);
|
| 204 |
+
|
| 205 |
+
// 32-bit flash
|
| 206 |
+
cmsdk_flash_rom32
|
| 207 |
+
#(
|
| 208 |
+
.AW (AW),
|
| 209 |
+
.WS (WS_N),
|
| 210 |
+
.filename (filename)
|
| 211 |
+
) u_flash_rom32(
|
| 212 |
+
.rst_n (HRESETn), // for emulation of timing
|
| 213 |
+
.clk (HCLK), // for emulation of timing
|
| 214 |
+
.addr (FLASHADDR), // address
|
| 215 |
+
.rdata (FLASHRDATA) // data
|
| 216 |
+
);
|
| 217 |
+
|
| 218 |
+
end endgenerate
|
| 219 |
+
|
| 220 |
+
//----------------------------------------------------------------
|
| 221 |
+
// AHB_ROM_FLASH16_MODEL : 16-bit flash model (no pre-fetcher)
|
| 222 |
+
|
| 223 |
+
generate if (MEM_TYPE == `AHB_ROM_FLASH16_MODEL) begin
|
| 224 |
+
// wires for Flash interface
|
| 225 |
+
wire [AW-2:0] FLASHADDR;
|
| 226 |
+
wire [15:0] FLASHRDATA;
|
| 227 |
+
|
| 228 |
+
wire [AW-1:0] MHADDR;
|
| 229 |
+
wire [1:0] MHTRANS;
|
| 230 |
+
wire [3:0] MHPROT;
|
| 231 |
+
wire [2:0] MHSIZE;
|
| 232 |
+
wire MHWRITE;
|
| 233 |
+
wire [15:0] MHRDATA;
|
| 234 |
+
wire MHREADY;
|
| 235 |
+
wire MHRESP;
|
| 236 |
+
|
| 237 |
+
// Down sizer for 16-bit memory
|
| 238 |
+
cm0p_32to16_dnsize #(
|
| 239 |
+
.AW (AW)
|
| 240 |
+
) u_cm0p_32to16_dnsize (
|
| 241 |
+
.HCLK (HCLK),
|
| 242 |
+
.HRESETn (HRESETn),
|
| 243 |
+
|
| 244 |
+
// Inputs
|
| 245 |
+
.SHADDR (HADDR),
|
| 246 |
+
.SHTRANS (HTRANS),
|
| 247 |
+
.SHPROT (4'h8),
|
| 248 |
+
.SHBURST (3'h0),
|
| 249 |
+
.SHMASTLOCK (1'b0),
|
| 250 |
+
.SHSIZE (HSIZE),
|
| 251 |
+
.SHWRITE (HWRITE),
|
| 252 |
+
.SHWDATA (HWDATA),
|
| 253 |
+
.SHREADY (HREADY),
|
| 254 |
+
.SHSEL (HSEL),
|
| 255 |
+
|
| 256 |
+
.SHMASTER (1'b0),
|
| 257 |
+
|
| 258 |
+
// Outputs
|
| 259 |
+
.SHREADYOUT (HREADYOUT),
|
| 260 |
+
.SHRDATA (HRDATA),
|
| 261 |
+
.SHRESP (HRESP),
|
| 262 |
+
|
| 263 |
+
.MHADDR (MHADDR),
|
| 264 |
+
.MHTRANS (MHTRANS),
|
| 265 |
+
.MHPROT (MHPROT),
|
| 266 |
+
.MHBURST (), // not used
|
| 267 |
+
.MHMASTLOCK (), // not used
|
| 268 |
+
.MHSIZE (MHSIZE),
|
| 269 |
+
.MHWRITE (MHWRITE),
|
| 270 |
+
.MHWDATA (), // not used
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
.MHMASTER (), // not used
|
| 274 |
+
|
| 275 |
+
// Inputs
|
| 276 |
+
.MHREADY (MHREADY),
|
| 277 |
+
.MHRDATA (MHRDATA),
|
| 278 |
+
.MHRESP (MHRESP));
|
| 279 |
+
|
| 280 |
+
// flash memory wrapper
|
| 281 |
+
cmsdk_ahb_to_flash16
|
| 282 |
+
#(
|
| 283 |
+
.AW (AW),
|
| 284 |
+
.WS (WS_N)
|
| 285 |
+
) u_ahb_to_flash16 (
|
| 286 |
+
.HCLK (HCLK),
|
| 287 |
+
.HRESETn (HRESETn),
|
| 288 |
+
// AHB inputs
|
| 289 |
+
.HSEL (1'b1),
|
| 290 |
+
.HADDR (MHADDR),
|
| 291 |
+
.HTRANS (MHTRANS),
|
| 292 |
+
.HPROT (MHPROT), // Always cacheable
|
| 293 |
+
.HSIZE (MHSIZE),
|
| 294 |
+
.HWRITE (MHWRITE),
|
| 295 |
+
.HWDATA (16'h0000), // not used
|
| 296 |
+
.HREADY (MHREADY),
|
| 297 |
+
|
| 298 |
+
.HREADYOUT (MHREADY), // Outputs
|
| 299 |
+
.HRDATA (MHRDATA),
|
| 300 |
+
.HRESP (MHRESP),
|
| 301 |
+
|
| 302 |
+
.FLASHADDR (FLASHADDR),
|
| 303 |
+
.FLASHRDATA (FLASHRDATA)
|
| 304 |
+
);
|
| 305 |
+
|
| 306 |
+
// 16-bit flash
|
| 307 |
+
cmsdk_flash_rom16
|
| 308 |
+
#(
|
| 309 |
+
.AW (AW),
|
| 310 |
+
.WS (WS_N),
|
| 311 |
+
.filename (filename)
|
| 312 |
+
) u_flash_rom16(
|
| 313 |
+
.rst_n (HRESETn), // for emulation of timing
|
| 314 |
+
.clk (HCLK), // for emulation of timing
|
| 315 |
+
.addr (FLASHADDR), // address
|
| 316 |
+
.rdata (FLASHRDATA) // data
|
| 317 |
+
);
|
| 318 |
+
|
| 319 |
+
end endgenerate
|
| 320 |
+
*/
|
| 321 |
+
//----------------------------------------------------------------
|
| 322 |
+
|
| 323 |
+
endmodule
|
| 324 |
+
|
abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/0_import.tcl
ADDED
|
@@ -0,0 +1,846 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#####################################################
|
| 2 |
+
## Copyright Mentor, A Siemens Business ##
|
| 3 |
+
## All Rights Reserved ##
|
| 4 |
+
## ##
|
| 5 |
+
## THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY ##
|
| 6 |
+
## INFORMATION WHICH ARE THE PROPERTY OF MENTOR ##
|
| 7 |
+
## GRAPHICS CORPORATION OR ITS LICENSORS AND IS ##
|
| 8 |
+
## SUBJECT TO LICENSE TERMS. ##
|
| 9 |
+
#####################################################
|
| 10 |
+
puts "
|
| 11 |
+
#####################################################
|
| 12 |
+
## Nitro Reference Flow : Import Stage ##
|
| 13 |
+
## ##
|
| 14 |
+
## Imports technology & design info to prepare ##
|
| 15 |
+
## design for NRF place and route. ##
|
| 16 |
+
#####################################################
|
| 17 |
+
"
|
| 18 |
+
fk_msg -set_prompt NRF
|
| 19 |
+
#config_units -value_type distance -units micro
|
| 20 |
+
config_shell -echo_script false
|
| 21 |
+
|
| 22 |
+
# ==============
|
| 23 |
+
# Read libraries and variables
|
| 24 |
+
# ==============
|
| 25 |
+
if { [info exists MGC_tanner_flow] && $MGC_tanner_flow eq "true"} {
|
| 26 |
+
fk_msg -type info "Running Nitro-AMS : Import Stage"
|
| 27 |
+
} else {
|
| 28 |
+
source import_variables.tcl
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
set tmpdir [file dirname $sierra_tcl_dir]
|
| 32 |
+
set nrf_dir ${tmpdir}/ref_flows/tcl
|
| 33 |
+
|
| 34 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl] } {
|
| 35 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl"
|
| 36 |
+
source $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl
|
| 37 |
+
} else {
|
| 38 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/kit_utils.tcl"
|
| 39 |
+
source $nrf_dir/scr/kit_utils.tcl
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
set MGC_flowStage import
|
| 43 |
+
|
| 44 |
+
load_utils -name nrf_utils
|
| 45 |
+
load_utils -name save_nrf_import_vars -force
|
| 46 |
+
|
| 47 |
+
## make sure that user input is valid for all stages
|
| 48 |
+
set num_errors [nrf_utils::check_import_variables]
|
| 49 |
+
if { $num_errors > 0 } {
|
| 50 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 51 |
+
return -code error
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
nrf_utils::save_nrf_import_vars
|
| 55 |
+
|
| 56 |
+
# ==========
|
| 57 |
+
# Multi CPUs
|
| 58 |
+
# ==========
|
| 59 |
+
config_application -cpus $MGC_cpus
|
| 60 |
+
config_timing -cpus $MGC_cpus
|
| 61 |
+
|
| 62 |
+
# If resuming import after manual floorplanning, skip to post-floorplan for resuming execution
|
| 63 |
+
|
| 64 |
+
if { ![info exists MGC_resume_import] || !$MGC_resume_import } {
|
| 65 |
+
|
| 66 |
+
# Read in technology libraries if no library DB exists, else read library DB
|
| 67 |
+
|
| 68 |
+
if {$MGC_libDbPath =="" || ![file exists $MGC_libDbPath]} {
|
| 69 |
+
fk_msg "MGC_libDbPath : $MGC_libDbPath doesn't exist, Running library setup part of import stage and generate libs.db"
|
| 70 |
+
|
| 71 |
+
# Source the rules.tcl file if provided
|
| 72 |
+
if {$MGC_tech_rules !="" && [file exists $MGC_tech_rules]} {
|
| 73 |
+
fk_msg "Reading TECHNO RULES File"
|
| 74 |
+
source $MGC_tech_rules
|
| 75 |
+
} else {
|
| 76 |
+
fk_msg "Since TECHNO RULE File is not provided or does not exist, technology rules must come from tech lef"
|
| 77 |
+
}
|
| 78 |
+
# Source the vias.tcl file if provided
|
| 79 |
+
if {$MGC_tech_vias !="" && [file exists $MGC_tech_vias]} {
|
| 80 |
+
source $MGC_tech_vias
|
| 81 |
+
}
|
| 82 |
+
# Source the dfm_vias.tcl file if provided
|
| 83 |
+
if {$MGC_tech_dfm_vias !="" && [file exists $MGC_tech_dfm_vias]} {
|
| 84 |
+
source $MGC_tech_dfm_vias
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
# Tech lef is used instead of rules.tcl for technologies 40nm and above
|
| 88 |
+
if {$MGC_physical_library_tech !="" && [file exists $MGC_physical_library_tech]} {
|
| 89 |
+
fk_msg "Reading TECH LEF File"
|
| 90 |
+
read_lef -file $MGC_physical_library_tech
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
if {$MGC_physical_libraries !=""} {
|
| 94 |
+
fk_msg "Reading Cell LEF Files"
|
| 95 |
+
read_lef -files "$MGC_physical_libraries"
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
# Read the ptf files
|
| 99 |
+
foreach parasiticsCorner [array name MGC_parasitic_library] {
|
| 100 |
+
fk_msg "Load $parasiticsCorner technology .PTF"
|
| 101 |
+
read_lib $MGC_parasitic_library($parasiticsCorner) -layer_map_file $MGC_itf_to_lef_layer_map -name_prefix $parasiticsCorner
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
# Read the lib files
|
| 105 |
+
foreach lib_corner [array name MGC_timing_library] {
|
| 106 |
+
read_library -skip_ccs $MGC_skip_ccs -files $MGC_timing_library($lib_corner) -name_prefix $lib_corner
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
# Perform preprocess lib : it has internal check for node won't do any pre-processing for node > 20
|
| 110 |
+
if { [info exists MGC_tanner_flow] && $MGC_tanner_flow eq "true"} {
|
| 111 |
+
#continue
|
| 112 |
+
} else {
|
| 113 |
+
preprocess_library -categories auto
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
# ====================
|
| 117 |
+
# Save intermediate db
|
| 118 |
+
# ====================
|
| 119 |
+
|
| 120 |
+
if {$MGC_split_db} {
|
| 121 |
+
write_db -data lib -file dbs/libs.db
|
| 122 |
+
} else {
|
| 123 |
+
write_db -data all -file dbs/import_libs.db
|
| 124 |
+
}
|
| 125 |
+
} else {
|
| 126 |
+
fk_msg "Reading Library Database : $MGC_libDbPath : skipping lib gen step"
|
| 127 |
+
if { [file isfile $MGC_libDbPath] } {
|
| 128 |
+
# Old DB -- Convert to 2.5
|
| 129 |
+
load_utils -name db_utils
|
| 130 |
+
util::update_lib_db -lib_db $MGC_libDbPath
|
| 131 |
+
} else {
|
| 132 |
+
read_db -file $MGC_libDbPath
|
| 133 |
+
}
|
| 134 |
+
file mkdir dbs
|
| 135 |
+
if {![file exists dbs/libs.db]} {
|
| 136 |
+
fk_msg "Creating link dbs/libs.db : $MGC_libDbPath"
|
| 137 |
+
file link -symbolic dbs/libs.db $MGC_libDbPath
|
| 138 |
+
} else {
|
| 139 |
+
fk_msg -type warning "dbs/libs.db path already exists, make sure MGC_libDbPath is pointing to the same file. All following flow step will use dbs/lib.db"
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
set_analysis_corner fast -enable false
|
| 144 |
+
set_analysis_corner slow -enable false
|
| 145 |
+
foreach corner $MGC_corners {
|
| 146 |
+
set_analysis_corner -corner $corner \
|
| 147 |
+
-enable true \
|
| 148 |
+
-setup true \
|
| 149 |
+
-hold true \
|
| 150 |
+
-crpr setup_hold \
|
| 151 |
+
-library [get_objects electrical_lib *$MGC_CornerTiming($corner)*] \
|
| 152 |
+
-process [get_libs -type process -filter file=="[string trim $MGC_parasitic_library($MGC_CornerParasitic($corner))]"] \
|
| 153 |
+
-rc_temp $MGC_CornerTemperature($corner)
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
report_analysis_corner
|
| 157 |
+
|
| 158 |
+
# ==============
|
| 159 |
+
# Import netlist
|
| 160 |
+
# ==============
|
| 161 |
+
fk_msg "Reading netlist $MGC_importVerilogNetlist"
|
| 162 |
+
# to handle correctly tie-up/tie-low connections in a multi-supply design
|
| 163 |
+
#TODO: workaround till conver_supply_nets_to_pg is true default
|
| 164 |
+
config_default_value -command read_verilog -argument convert_supply_nets_to_pg -value true
|
| 165 |
+
if {[info exists MGC_mxdb_flow] && $MGC_mxdb_flow } {
|
| 166 |
+
if {[info exists MGC_mxdb_path] && $MGC_mxdb_path !=""} {
|
| 167 |
+
#read_mxdb -skip { def directives library netlist scandef SDC } -file $MGC_mxdb_path
|
| 168 |
+
read_mxdb -skip { library SDC } -file $MGC_mxdb_path
|
| 169 |
+
} else {
|
| 170 |
+
fk_msg -type error "MGC_mxdb_flow is set to true : Provide valid path to mxdb by setting MGC_mxdb_path or set MGC_mxdb_flow to false"
|
| 171 |
+
}
|
| 172 |
+
} else {
|
| 173 |
+
read_verilog $MGC_importVerilogNetlist
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
if { [info exists MGC_topDesign] && $MGC_topDesign != "" } {
|
| 177 |
+
current_design $MGC_topDesign
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
# ============
|
| 181 |
+
# Avoid assign
|
| 182 |
+
# ============
|
| 183 |
+
config_optimize -dont_create_assign
|
| 184 |
+
|
| 185 |
+
# ==========
|
| 186 |
+
# Enable ccs
|
| 187 |
+
# ==========
|
| 188 |
+
|
| 189 |
+
if {!$MGC_skip_ccs} {
|
| 190 |
+
fk_msg "Info: Setting delay model to current"
|
| 191 |
+
set_delay_model -base_model current
|
| 192 |
+
} else {
|
| 193 |
+
fk_msg "Info: Setting delay model to voltage"
|
| 194 |
+
set_delay_model -base_model voltage
|
| 195 |
+
}
|
| 196 |
+
report_delay_model
|
| 197 |
+
|
| 198 |
+
# ===========================
|
| 199 |
+
# Define implementation modes
|
| 200 |
+
# ===========================
|
| 201 |
+
foreach mode $MGC_modes {
|
| 202 |
+
define_design_mode $mode
|
| 203 |
+
}
|
| 204 |
+
foreach mode $MGC_modes {
|
| 205 |
+
set_design_mode $mode -enable true -corners $MGC_cornersPerMode($mode)
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
set_design_mode default -enable false
|
| 209 |
+
report_design_mode
|
| 210 |
+
|
| 211 |
+
# =============
|
| 212 |
+
# Read def file
|
| 213 |
+
# ============
|
| 214 |
+
|
| 215 |
+
if { [info exists MGC_floorLoadDefFile] && $MGC_floorLoadDefFile != "" } {
|
| 216 |
+
read_def -skip {regions} $MGC_floorLoadDefFile
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
if { [info exists MGC_nrf_floorplanning] && $MGC_nrf_floorplanning eq "auto"} {
|
| 220 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl] } {
|
| 221 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl\n"
|
| 222 |
+
source $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl
|
| 223 |
+
} else {
|
| 224 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/floorplan.tcl\n"
|
| 225 |
+
source $nrf_dir/scr/floorplan.tcl
|
| 226 |
+
}
|
| 227 |
+
} elseif { $MGC_nrf_floorplanning eq "manual" } {
|
| 228 |
+
fk_msg "###############################################################"
|
| 229 |
+
fk_msg "# NRF Import suspended for manual floorplanning. #"
|
| 230 |
+
fk_msg "# Perform floorplanning as desired. When complete, execute: #"
|
| 231 |
+
fk_msg "# resume_nrf_import #"
|
| 232 |
+
fk_msg "# to resume NRF import flow. #"
|
| 233 |
+
fk_msg "###############################################################\n"
|
| 234 |
+
return
|
| 235 |
+
} elseif { $MGC_nrf_floorplanning eq "none" } {
|
| 236 |
+
fk_msg "Skipping NRF floorplanning.\n"
|
| 237 |
+
} else {
|
| 238 |
+
fk_msg -type warning "MGC_nrf_floorplanning setting $MGC_nrf_floorplanning is invalid. Valid values: auto | manual | none. Skipping NRF floorplanning.\n"
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
} ; # If manually floorplanning, we will resume import execution here
|
| 242 |
+
|
| 243 |
+
# Read additional floorplan script if provided
|
| 244 |
+
|
| 245 |
+
if {[info exists MGC_floorplan_tcl_file] && $MGC_floorplan_tcl_file != ""} {
|
| 246 |
+
if { [file exists $MGC_floorplan_tcl_file] } {
|
| 247 |
+
fk_msg "Sourcing floorplan Tcl file $MGC_floorplan_tcl_file"
|
| 248 |
+
source $MGC_floorplan_tcl_file
|
| 249 |
+
} elseif { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file] } {
|
| 250 |
+
fk_msg "Sourcing floorplan Tcl file $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file"
|
| 251 |
+
source $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file
|
| 252 |
+
} else {
|
| 253 |
+
fk_msg -type warning "Could not find file $MGC_floorplan_tcl_file. Check MGC_floorplan_tcl_file setting."
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
# Read scan DEF file if provided
|
| 258 |
+
|
| 259 |
+
if {[info exists MGC_scan_def_file] && [string trim $MGC_scan_def_file] !=""} {
|
| 260 |
+
if {[info exists MGC_mxdb_flow] && $MGC_mxdb_flow } {
|
| 261 |
+
fk_msg -type info "Scan DEF is already loaded from mxdb"
|
| 262 |
+
} else {
|
| 263 |
+
read_def -sections {scan_chains} -skip {} -file $MGC_scan_def_file
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
# =================================
|
| 268 |
+
# Check design for unresolved cells
|
| 269 |
+
# =================================
|
| 270 |
+
check_design -check cells
|
| 271 |
+
set unresolved_cells [get_cells -of_objects [get_objects -type error -filter @name==unresolved]]
|
| 272 |
+
if {[llength $unresolved_cells] > 0} {
|
| 273 |
+
fk_msg -type error "Design has [llength $unresolved_cells] unresolved cells that must be fixed before proceeding."
|
| 274 |
+
foreach c $unresolved_cells {
|
| 275 |
+
puts "\t$c of cell type [get_lib_cell -of $c]"
|
| 276 |
+
}
|
| 277 |
+
exit -1
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
# =======================
|
| 281 |
+
# Check for top partition
|
| 282 |
+
# =======================
|
| 283 |
+
|
| 284 |
+
if {[llength [get_top_partition]] == 0} {
|
| 285 |
+
fk_msg -type error "No partition has been created. Check floorplan and/or input DEF file.\n"
|
| 286 |
+
exit -1
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
# ================
|
| 290 |
+
# Check and Re-create tracks
|
| 291 |
+
# ================
|
| 292 |
+
set node [get_config -name process -param node]
|
| 293 |
+
if {$node > 22 || $node=="unknown"} {
|
| 294 |
+
## Create tracks for nodes above 22nm.
|
| 295 |
+
fk_msg "Creating new tracks on all layers"
|
| 296 |
+
remove_objects -objects [get_objects -type track]
|
| 297 |
+
create_tracks
|
| 298 |
+
} else {
|
| 299 |
+
check_floorplan -check no_tracks
|
| 300 |
+
set track_errs [get_objects -type error -filter (@category==floorplan)&&(@name==no_tracks)]
|
| 301 |
+
if {[llength $track_errs] } {
|
| 302 |
+
fk_msg -type error "No preferred direction routing tracks on the layers: [get_objects -type layer -of_objects $track_errs]"
|
| 303 |
+
fk_msg "Review and create tracks on missing layers : using command create_tracks"
|
| 304 |
+
return -code error
|
| 305 |
+
}
|
| 306 |
+
}
|
| 307 |
+
# Control generated vias based on user setting or node
|
| 308 |
+
if { [info exists MGC_disable_SDA_vias_creation] && $MGC_disable_SDA_vias_creation } {
|
| 309 |
+
config_lib_vias -use_generated false -create false -select true -use_asymmetrical true -use_4cut true
|
| 310 |
+
} elseif {$node > 28 || $node=="unknown"} {
|
| 311 |
+
config_lib_vias -use_generated true -create true -select true -use_asymmetrical true -use_4cut true
|
| 312 |
+
} else {
|
| 313 |
+
config_lib_vias -use_generate false
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
# Merge net shapes to avoid having false LVS violations
|
| 317 |
+
config_lvs -merge_ports true
|
| 318 |
+
|
| 319 |
+
# =======================
|
| 320 |
+
# Read design constraints
|
| 321 |
+
# =======================
|
| 322 |
+
config_units -value_type time -units nano
|
| 323 |
+
fk_msg "Reading constraints"
|
| 324 |
+
|
| 325 |
+
foreach mode $MGC_modes {
|
| 326 |
+
fk_msg "Loading ${mode} Constraints"
|
| 327 |
+
fk_msg "PT file path $MGC_importConstraintsFile($mode)"
|
| 328 |
+
if {[file extension $MGC_importConstraintsFile($mode)] == ".mxdb" } {
|
| 329 |
+
fk_msg "Reading Constraints from MXDB for Mode $mode"
|
| 330 |
+
read_mxdb -skip { def directives library netlist scandef } -file $MGC_importConstraintsFile($mode) -nitro_mode $mode
|
| 331 |
+
} else {
|
| 332 |
+
read_constraints \
|
| 333 |
+
-modes $mode \
|
| 334 |
+
-file $MGC_importConstraintsFile($mode) \
|
| 335 |
+
-clock_suffix _${mode}
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
# If no power domains yet exist, read UPF or create default power domain
|
| 340 |
+
|
| 341 |
+
# check for propagated clocks
|
| 342 |
+
nrf_utils::check_for_propagated_clocks
|
| 343 |
+
|
| 344 |
+
set re_write_lib false
|
| 345 |
+
|
| 346 |
+
if { [llength [get_objects -type power_domain]] == 0 } {
|
| 347 |
+
if {$MGC_MultiVoltage} {
|
| 348 |
+
fk_msg -type info "Design is multivoltage; setting up MV environment."
|
| 349 |
+
if {[info exists MGC_UPF_File] && $MGC_UPF_File != ""} {
|
| 350 |
+
source $MGC_UPF_File
|
| 351 |
+
} else {
|
| 352 |
+
fk_msg -type error "No UPF file found for MV setup."
|
| 353 |
+
}
|
| 354 |
+
if {[info exists MGC_additional_MV_Setup_File] && $MGC_additional_MV_Setup_File != ""} {
|
| 355 |
+
source $MGC_additional_MV_Setup_File
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
config_mv -name enable_pgsite_mode -value false
|
| 359 |
+
config_mv -name const_net_tie_to_related_supply -value true
|
| 360 |
+
enable_mv
|
| 361 |
+
check_mv
|
| 362 |
+
|
| 363 |
+
# Re-save libs in case lib cell updates were made in UPF
|
| 364 |
+
set re_write_lib true
|
| 365 |
+
} elseif {[info exists MGC_UPF_File] && $MGC_UPF_File != ""} {
|
| 366 |
+
fk_msg -type info "Design is not MV, but reading UPF file for power intent."
|
| 367 |
+
source $MGC_UPF_File
|
| 368 |
+
|
| 369 |
+
# Re-save libs in case lib cell updates were made in UPF
|
| 370 |
+
set re_write_lib true
|
| 371 |
+
} else {
|
| 372 |
+
if {$MGC_primary_power_net == "" || $MGC_primary_ground_net == ""} {
|
| 373 |
+
puts ""
|
| 374 |
+
fk_msg -type error "Variables MGC_primary_power_net & MGC_primary_ground_net must be defined in import_variables.tcl.\n"
|
| 375 |
+
exit -1
|
| 376 |
+
}
|
| 377 |
+
fk_msg -type info "Creating default power domain to identify primary power and ground supplies."
|
| 378 |
+
create_power_domain -domain DEFAULT_PD
|
| 379 |
+
create_supply_net $MGC_primary_power_net -domain DEFAULT_PD -power_net true
|
| 380 |
+
create_supply_net $MGC_primary_ground_net -domain DEFAULT_PD -power_net false
|
| 381 |
+
set_domain_supply_net -domain DEFAULT_PD -primary_power_net $MGC_primary_power_net -primary_ground_net $MGC_primary_ground_net
|
| 382 |
+
}
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
if {[lpp::create_cell_edge_constraints]} {
|
| 386 |
+
set re_write_lib true
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
set pgb_lcells [prepare_cell_pg_blockages]
|
| 390 |
+
if {[llength $pgb_lcells]} {
|
| 391 |
+
set re_write_lib true
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
# =======
|
| 395 |
+
# Save DB
|
| 396 |
+
# =======
|
| 397 |
+
if {$MGC_split_db} {
|
| 398 |
+
if {$re_write_lib} {
|
| 399 |
+
write_db -data lib -file dbs/libs.db
|
| 400 |
+
}
|
| 401 |
+
write_db -data design -file dbs/import.db
|
| 402 |
+
} else {
|
| 403 |
+
write_db -data all -file dbs/import.db
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
# =======
|
| 407 |
+
# RUN Import design checks
|
| 408 |
+
# =======
|
| 409 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl] } {
|
| 410 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl"
|
| 411 |
+
source $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl
|
| 412 |
+
} else {
|
| 413 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/import_checks.tcl"
|
| 414 |
+
source $nrf_dir/scr/import_checks.tcl
|
| 415 |
+
}
|
| 416 |
+
report_messages
|
| 417 |
+
|
| 418 |
+
#if { [info exists MGC_no_exit] && $MGC_no_exit } {
|
| 419 |
+
# #continue
|
| 420 |
+
#} else {
|
| 421 |
+
# exit
|
| 422 |
+
#}
|
| 423 |
+
|
| 424 |
+
#####################################################
|
| 425 |
+
## Copyright Mentor, A Siemens Business ##
|
| 426 |
+
## All Rights Reserved ##
|
| 427 |
+
## ##
|
| 428 |
+
## THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY ##
|
| 429 |
+
## INFORMATION WHICH ARE THE PROPERTY OF MENTOR ##
|
| 430 |
+
## GRAPHICS CORPORATION OR ITS LICENSORS AND IS ##
|
| 431 |
+
## SUBJECT TO LICENSE TERMS. ##
|
| 432 |
+
#####################################################
|
| 433 |
+
puts "
|
| 434 |
+
#####################################################
|
| 435 |
+
## Nitro Reference Flow : Import Stage ##
|
| 436 |
+
## ##
|
| 437 |
+
## Imports technology & design info to prepare ##
|
| 438 |
+
## design for NRF place and route. ##
|
| 439 |
+
#####################################################
|
| 440 |
+
"
|
| 441 |
+
fk_msg -set_prompt NRF
|
| 442 |
+
#config_units -value_type distance -units micro
|
| 443 |
+
config_shell -echo_script false
|
| 444 |
+
|
| 445 |
+
# ==============
|
| 446 |
+
# Read libraries and variables
|
| 447 |
+
# ==============
|
| 448 |
+
if { [info exists MGC_tanner_flow] && $MGC_tanner_flow eq "true"} {
|
| 449 |
+
fk_msg -type info "Running Nitro-AMS : Import Stage"
|
| 450 |
+
} else {
|
| 451 |
+
source import_variables.tcl
|
| 452 |
+
}
|
| 453 |
+
|
| 454 |
+
set tmpdir [file dirname $sierra_tcl_dir]
|
| 455 |
+
set nrf_dir ${tmpdir}/ref_flows/tcl
|
| 456 |
+
|
| 457 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl] } {
|
| 458 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl"
|
| 459 |
+
source $MGC_nrf_custom_scripts_dir/scr/kit_utils.tcl
|
| 460 |
+
} else {
|
| 461 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/kit_utils.tcl"
|
| 462 |
+
source $nrf_dir/scr/kit_utils.tcl
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
set MGC_flowStage import
|
| 466 |
+
|
| 467 |
+
load_utils -name nrf_utils
|
| 468 |
+
load_utils -name save_nrf_import_vars -force
|
| 469 |
+
|
| 470 |
+
## make sure that user input is valid for all stages
|
| 471 |
+
set num_errors [nrf_utils::check_import_variables]
|
| 472 |
+
if { $num_errors > 0 } {
|
| 473 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 474 |
+
return -code error
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
nrf_utils::save_nrf_import_vars
|
| 478 |
+
|
| 479 |
+
# ==========
|
| 480 |
+
# Multi CPUs
|
| 481 |
+
# ==========
|
| 482 |
+
config_application -cpus $MGC_cpus
|
| 483 |
+
config_timing -cpus $MGC_cpus
|
| 484 |
+
|
| 485 |
+
# If resuming import after manual floorplanning, skip to post-floorplan for resuming execution
|
| 486 |
+
|
| 487 |
+
if { ![info exists MGC_resume_import] || !$MGC_resume_import } {
|
| 488 |
+
|
| 489 |
+
# Read in technology libraries if no library DB exists, else read library DB
|
| 490 |
+
|
| 491 |
+
if {$MGC_libDbPath =="" || ![file exists $MGC_libDbPath]} {
|
| 492 |
+
fk_msg "MGC_libDbPath : $MGC_libDbPath doesn't exist, Running library setup part of import stage and generate libs.db"
|
| 493 |
+
|
| 494 |
+
# Source the rules.tcl file if provided
|
| 495 |
+
if {$MGC_tech_rules !="" && [file exists $MGC_tech_rules]} {
|
| 496 |
+
fk_msg "Reading TECHNO RULES File"
|
| 497 |
+
source $MGC_tech_rules
|
| 498 |
+
} else {
|
| 499 |
+
fk_msg "Since TECHNO RULE File is not provided or does not exist, technology rules must come from tech lef"
|
| 500 |
+
}
|
| 501 |
+
# Source the vias.tcl file if provided
|
| 502 |
+
if {$MGC_tech_vias !="" && [file exists $MGC_tech_vias]} {
|
| 503 |
+
source $MGC_tech_vias
|
| 504 |
+
}
|
| 505 |
+
# Source the dfm_vias.tcl file if provided
|
| 506 |
+
if {$MGC_tech_dfm_vias !="" && [file exists $MGC_tech_dfm_vias]} {
|
| 507 |
+
source $MGC_tech_dfm_vias
|
| 508 |
+
}
|
| 509 |
+
|
| 510 |
+
# Tech lef is used instead of rules.tcl for technologies 40nm and above
|
| 511 |
+
if {$MGC_physical_library_tech !="" && [file exists $MGC_physical_library_tech]} {
|
| 512 |
+
fk_msg "Reading TECH LEF File"
|
| 513 |
+
read_lef -file $MGC_physical_library_tech
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
if {$MGC_physical_libraries !=""} {
|
| 517 |
+
fk_msg "Reading Cell LEF Files"
|
| 518 |
+
read_lef -files "$MGC_physical_libraries"
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
# Read the ptf files
|
| 522 |
+
foreach parasiticsCorner [array name MGC_parasitic_library] {
|
| 523 |
+
fk_msg "Load $parasiticsCorner technology .PTF"
|
| 524 |
+
read_lib $MGC_parasitic_library($parasiticsCorner) -layer_map_file $MGC_itf_to_lef_layer_map -name_prefix $parasiticsCorner
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
# Read the lib files
|
| 528 |
+
foreach lib_corner [array name MGC_timing_library] {
|
| 529 |
+
read_library -skip_ccs $MGC_skip_ccs -files $MGC_timing_library($lib_corner) -name_prefix $lib_corner
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
# Perform preprocess lib : it has internal check for node won't do any pre-processing for node > 20
|
| 533 |
+
if { [info exists MGC_tanner_flow] && $MGC_tanner_flow eq "true"} {
|
| 534 |
+
#continue
|
| 535 |
+
} else {
|
| 536 |
+
preprocess_library -categories auto
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
# ====================
|
| 540 |
+
# Save intermediate db
|
| 541 |
+
# ====================
|
| 542 |
+
|
| 543 |
+
if {$MGC_split_db} {
|
| 544 |
+
write_db -data lib -file dbs/libs.db
|
| 545 |
+
} else {
|
| 546 |
+
write_db -data all -file dbs/import_libs.db
|
| 547 |
+
}
|
| 548 |
+
} else {
|
| 549 |
+
fk_msg "Reading Library Database : $MGC_libDbPath : skipping lib gen step"
|
| 550 |
+
if { [file isfile $MGC_libDbPath] } {
|
| 551 |
+
# Old DB -- Convert to 2.5
|
| 552 |
+
load_utils -name db_utils
|
| 553 |
+
util::update_lib_db -lib_db $MGC_libDbPath
|
| 554 |
+
} else {
|
| 555 |
+
read_db -file $MGC_libDbPath
|
| 556 |
+
}
|
| 557 |
+
file mkdir dbs
|
| 558 |
+
if {![file exists dbs/libs.db]} {
|
| 559 |
+
fk_msg "Creating link dbs/libs.db : $MGC_libDbPath"
|
| 560 |
+
file link -symbolic dbs/libs.db $MGC_libDbPath
|
| 561 |
+
} else {
|
| 562 |
+
fk_msg -type warning "dbs/libs.db path already exists, make sure MGC_libDbPath is pointing to the same file. All following flow step will use dbs/lib.db"
|
| 563 |
+
}
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
set_analysis_corner fast -enable false
|
| 567 |
+
set_analysis_corner slow -enable false
|
| 568 |
+
foreach corner $MGC_corners {
|
| 569 |
+
set_analysis_corner -corner $corner \
|
| 570 |
+
-enable true \
|
| 571 |
+
-setup true \
|
| 572 |
+
-hold true \
|
| 573 |
+
-crpr setup_hold \
|
| 574 |
+
-library [get_objects electrical_lib *$MGC_CornerTiming($corner)*] \
|
| 575 |
+
-process [get_libs -type process -filter file=="[string trim $MGC_parasitic_library($MGC_CornerParasitic($corner))]"] \
|
| 576 |
+
-rc_temp $MGC_CornerTemperature($corner)
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
report_analysis_corner
|
| 580 |
+
|
| 581 |
+
# ==============
|
| 582 |
+
# Import netlist
|
| 583 |
+
# ==============
|
| 584 |
+
fk_msg "Reading netlist $MGC_importVerilogNetlist"
|
| 585 |
+
# to handle correctly tie-up/tie-low connections in a multi-supply design
|
| 586 |
+
#TODO: workaround till conver_supply_nets_to_pg is true default
|
| 587 |
+
config_default_value -command read_verilog -argument convert_supply_nets_to_pg -value true
|
| 588 |
+
if {[info exists MGC_mxdb_flow] && $MGC_mxdb_flow } {
|
| 589 |
+
if {[info exists MGC_mxdb_path] && $MGC_mxdb_path !=""} {
|
| 590 |
+
#read_mxdb -skip { def directives library netlist scandef SDC } -file $MGC_mxdb_path
|
| 591 |
+
read_mxdb -skip { library SDC } -file $MGC_mxdb_path
|
| 592 |
+
} else {
|
| 593 |
+
fk_msg -type error "MGC_mxdb_flow is set to true : Provide valid path to mxdb by setting MGC_mxdb_path or set MGC_mxdb_flow to false"
|
| 594 |
+
}
|
| 595 |
+
} else {
|
| 596 |
+
read_verilog $MGC_importVerilogNetlist
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
if { [info exists MGC_topDesign] && $MGC_topDesign != "" } {
|
| 600 |
+
current_design $MGC_topDesign
|
| 601 |
+
}
|
| 602 |
+
|
| 603 |
+
# ============
|
| 604 |
+
# Avoid assign
|
| 605 |
+
# ============
|
| 606 |
+
config_optimize -dont_create_assign
|
| 607 |
+
|
| 608 |
+
# ==========
|
| 609 |
+
# Enable ccs
|
| 610 |
+
# ==========
|
| 611 |
+
|
| 612 |
+
if {!$MGC_skip_ccs} {
|
| 613 |
+
fk_msg "Info: Setting delay model to current"
|
| 614 |
+
set_delay_model -base_model current
|
| 615 |
+
} else {
|
| 616 |
+
fk_msg "Info: Setting delay model to voltage"
|
| 617 |
+
set_delay_model -base_model voltage
|
| 618 |
+
}
|
| 619 |
+
report_delay_model
|
| 620 |
+
|
| 621 |
+
# ===========================
|
| 622 |
+
# Define implementation modes
|
| 623 |
+
# ===========================
|
| 624 |
+
foreach mode $MGC_modes {
|
| 625 |
+
define_design_mode $mode
|
| 626 |
+
}
|
| 627 |
+
foreach mode $MGC_modes {
|
| 628 |
+
set_design_mode $mode -enable true -corners $MGC_cornersPerMode($mode)
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
set_design_mode default -enable false
|
| 632 |
+
report_design_mode
|
| 633 |
+
|
| 634 |
+
# =============
|
| 635 |
+
# Read def file
|
| 636 |
+
# ============
|
| 637 |
+
|
| 638 |
+
if { [info exists MGC_floorLoadDefFile] && $MGC_floorLoadDefFile != "" } {
|
| 639 |
+
read_def -skip {regions} $MGC_floorLoadDefFile
|
| 640 |
+
}
|
| 641 |
+
|
| 642 |
+
if { [info exists MGC_nrf_floorplanning] && $MGC_nrf_floorplanning eq "auto"} {
|
| 643 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl] } {
|
| 644 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl\n"
|
| 645 |
+
source $MGC_nrf_custom_scripts_dir/scr/floorplan.tcl
|
| 646 |
+
} else {
|
| 647 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/floorplan.tcl\n"
|
| 648 |
+
source $nrf_dir/scr/floorplan.tcl
|
| 649 |
+
}
|
| 650 |
+
} elseif { $MGC_nrf_floorplanning eq "manual" } {
|
| 651 |
+
fk_msg "###############################################################"
|
| 652 |
+
fk_msg "# NRF Import suspended for manual floorplanning. #"
|
| 653 |
+
fk_msg "# Perform floorplanning as desired. When complete, execute: #"
|
| 654 |
+
fk_msg "# resume_nrf_import #"
|
| 655 |
+
fk_msg "# to resume NRF import flow. #"
|
| 656 |
+
fk_msg "###############################################################\n"
|
| 657 |
+
return
|
| 658 |
+
} elseif { $MGC_nrf_floorplanning eq "none" } {
|
| 659 |
+
fk_msg "Skipping NRF floorplanning.\n"
|
| 660 |
+
} else {
|
| 661 |
+
fk_msg -type warning "MGC_nrf_floorplanning setting $MGC_nrf_floorplanning is invalid. Valid values: auto | manual | none. Skipping NRF floorplanning.\n"
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
} ; # If manually floorplanning, we will resume import execution here
|
| 665 |
+
|
| 666 |
+
# Read additional floorplan script if provided
|
| 667 |
+
|
| 668 |
+
if {[info exists MGC_floorplan_tcl_file] && $MGC_floorplan_tcl_file != ""} {
|
| 669 |
+
if { [file exists $MGC_floorplan_tcl_file] } {
|
| 670 |
+
fk_msg "Sourcing floorplan Tcl file $MGC_floorplan_tcl_file"
|
| 671 |
+
source $MGC_floorplan_tcl_file
|
| 672 |
+
} elseif { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file] } {
|
| 673 |
+
fk_msg "Sourcing floorplan Tcl file $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file"
|
| 674 |
+
source $MGC_nrf_custom_scripts_dir/$MGC_floorplan_tcl_file
|
| 675 |
+
} else {
|
| 676 |
+
fk_msg -type warning "Could not find file $MGC_floorplan_tcl_file. Check MGC_floorplan_tcl_file setting."
|
| 677 |
+
}
|
| 678 |
+
}
|
| 679 |
+
|
| 680 |
+
# Read scan DEF file if provided
|
| 681 |
+
|
| 682 |
+
if {[info exists MGC_scan_def_file] && [string trim $MGC_scan_def_file] !=""} {
|
| 683 |
+
if {[info exists MGC_mxdb_flow] && $MGC_mxdb_flow } {
|
| 684 |
+
fk_msg -type info "Scan DEF is already loaded from mxdb"
|
| 685 |
+
} else {
|
| 686 |
+
read_def -sections {scan_chains} -skip {} -file $MGC_scan_def_file
|
| 687 |
+
}
|
| 688 |
+
}
|
| 689 |
+
|
| 690 |
+
# =================================
|
| 691 |
+
# Check design for unresolved cells
|
| 692 |
+
# =================================
|
| 693 |
+
check_design -check cells
|
| 694 |
+
set unresolved_cells [get_cells -of_objects [get_objects -type error -filter @name==unresolved]]
|
| 695 |
+
if {[llength $unresolved_cells] > 0} {
|
| 696 |
+
fk_msg -type error "Design has [llength $unresolved_cells] unresolved cells that must be fixed before proceeding."
|
| 697 |
+
foreach c $unresolved_cells {
|
| 698 |
+
puts "\t$c of cell type [get_lib_cell -of $c]"
|
| 699 |
+
}
|
| 700 |
+
exit -1
|
| 701 |
+
}
|
| 702 |
+
|
| 703 |
+
# =======================
|
| 704 |
+
# Check for top partition
|
| 705 |
+
# =======================
|
| 706 |
+
|
| 707 |
+
if {[llength [get_top_partition]] == 0} {
|
| 708 |
+
fk_msg -type error "No partition has been created. Check floorplan and/or input DEF file.\n"
|
| 709 |
+
exit -1
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
# ================
|
| 713 |
+
# Check and Re-create tracks
|
| 714 |
+
# ================
|
| 715 |
+
set node [get_config -name process -param node]
|
| 716 |
+
if {$node > 22 || $node=="unknown"} {
|
| 717 |
+
## Create tracks for nodes above 22nm.
|
| 718 |
+
fk_msg "Creating new tracks on all layers"
|
| 719 |
+
remove_objects -objects [get_objects -type track]
|
| 720 |
+
create_tracks
|
| 721 |
+
} else {
|
| 722 |
+
check_floorplan -check no_tracks
|
| 723 |
+
set track_errs [get_objects -type error -filter (@category==floorplan)&&(@name==no_tracks)]
|
| 724 |
+
if {[llength $track_errs] } {
|
| 725 |
+
fk_msg -type error "No preferred direction routing tracks on the layers: [get_objects -type layer -of_objects $track_errs]"
|
| 726 |
+
fk_msg "Review and create tracks on missing layers : using command create_tracks"
|
| 727 |
+
return -code error
|
| 728 |
+
}
|
| 729 |
+
}
|
| 730 |
+
# Control generated vias based on user setting or node
|
| 731 |
+
if { [info exists MGC_disable_SDA_vias_creation] && $MGC_disable_SDA_vias_creation } {
|
| 732 |
+
config_lib_vias -use_generated false -create false -select true -use_asymmetrical true -use_4cut true
|
| 733 |
+
} elseif {$node > 28 || $node=="unknown"} {
|
| 734 |
+
config_lib_vias -use_generated true -create true -select true -use_asymmetrical true -use_4cut true
|
| 735 |
+
} else {
|
| 736 |
+
config_lib_vias -use_generate false
|
| 737 |
+
}
|
| 738 |
+
|
| 739 |
+
# Merge net shapes to avoid having false LVS violations
|
| 740 |
+
config_lvs -merge_ports true
|
| 741 |
+
|
| 742 |
+
# =======================
|
| 743 |
+
# Read design constraints
|
| 744 |
+
# =======================
|
| 745 |
+
config_units -value_type time -units nano
|
| 746 |
+
fk_msg "Reading constraints"
|
| 747 |
+
|
| 748 |
+
foreach mode $MGC_modes {
|
| 749 |
+
fk_msg "Loading ${mode} Constraints"
|
| 750 |
+
fk_msg "PT file path $MGC_importConstraintsFile($mode)"
|
| 751 |
+
if {[file extension $MGC_importConstraintsFile($mode)] == ".mxdb" } {
|
| 752 |
+
fk_msg "Reading Constraints from MXDB for Mode $mode"
|
| 753 |
+
read_mxdb -skip { def directives library netlist scandef } -file $MGC_importConstraintsFile($mode) -nitro_mode $mode
|
| 754 |
+
} else {
|
| 755 |
+
read_constraints \
|
| 756 |
+
-modes $mode \
|
| 757 |
+
-file $MGC_importConstraintsFile($mode) \
|
| 758 |
+
-clock_suffix _${mode}
|
| 759 |
+
}
|
| 760 |
+
}
|
| 761 |
+
|
| 762 |
+
# If no power domains yet exist, read UPF or create default power domain
|
| 763 |
+
|
| 764 |
+
# check for propagated clocks
|
| 765 |
+
nrf_utils::check_for_propagated_clocks
|
| 766 |
+
|
| 767 |
+
set re_write_lib false
|
| 768 |
+
|
| 769 |
+
if { [llength [get_objects -type power_domain]] == 0 } {
|
| 770 |
+
if {$MGC_MultiVoltage} {
|
| 771 |
+
fk_msg -type info "Design is multivoltage; setting up MV environment."
|
| 772 |
+
if {[info exists MGC_UPF_File] && $MGC_UPF_File != ""} {
|
| 773 |
+
source $MGC_UPF_File
|
| 774 |
+
} else {
|
| 775 |
+
fk_msg -type error "No UPF file found for MV setup."
|
| 776 |
+
}
|
| 777 |
+
if {[info exists MGC_additional_MV_Setup_File] && $MGC_additional_MV_Setup_File != ""} {
|
| 778 |
+
source $MGC_additional_MV_Setup_File
|
| 779 |
+
}
|
| 780 |
+
|
| 781 |
+
config_mv -name enable_pgsite_mode -value false
|
| 782 |
+
config_mv -name const_net_tie_to_related_supply -value true
|
| 783 |
+
enable_mv
|
| 784 |
+
check_mv
|
| 785 |
+
|
| 786 |
+
# Re-save libs in case lib cell updates were made in UPF
|
| 787 |
+
set re_write_lib true
|
| 788 |
+
} elseif {[info exists MGC_UPF_File] && $MGC_UPF_File != ""} {
|
| 789 |
+
fk_msg -type info "Design is not MV, but reading UPF file for power intent."
|
| 790 |
+
source $MGC_UPF_File
|
| 791 |
+
|
| 792 |
+
# Re-save libs in case lib cell updates were made in UPF
|
| 793 |
+
set re_write_lib true
|
| 794 |
+
} else {
|
| 795 |
+
if {$MGC_primary_power_net == "" || $MGC_primary_ground_net == ""} {
|
| 796 |
+
puts ""
|
| 797 |
+
fk_msg -type error "Variables MGC_primary_power_net & MGC_primary_ground_net must be defined in import_variables.tcl.\n"
|
| 798 |
+
exit -1
|
| 799 |
+
}
|
| 800 |
+
fk_msg -type info "Creating default power domain to identify primary power and ground supplies."
|
| 801 |
+
create_power_domain -domain DEFAULT_PD
|
| 802 |
+
create_supply_net $MGC_primary_power_net -domain DEFAULT_PD -power_net true
|
| 803 |
+
create_supply_net $MGC_primary_ground_net -domain DEFAULT_PD -power_net false
|
| 804 |
+
set_domain_supply_net -domain DEFAULT_PD -primary_power_net $MGC_primary_power_net -primary_ground_net $MGC_primary_ground_net
|
| 805 |
+
}
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
if {[lpp::create_cell_edge_constraints]} {
|
| 809 |
+
set re_write_lib true
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
set pgb_lcells [prepare_cell_pg_blockages]
|
| 813 |
+
if {[llength $pgb_lcells]} {
|
| 814 |
+
set re_write_lib true
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
# =======
|
| 818 |
+
# Save DB
|
| 819 |
+
# =======
|
| 820 |
+
if {$MGC_split_db} {
|
| 821 |
+
if {$re_write_lib} {
|
| 822 |
+
write_db -data lib -file dbs/libs.db
|
| 823 |
+
}
|
| 824 |
+
write_db -data design -file dbs/import.db
|
| 825 |
+
} else {
|
| 826 |
+
write_db -data all -file dbs/import.db
|
| 827 |
+
}
|
| 828 |
+
|
| 829 |
+
# =======
|
| 830 |
+
# RUN Import design checks
|
| 831 |
+
# =======
|
| 832 |
+
if { [info exists MGC_nrf_custom_scripts_dir] && $MGC_nrf_custom_scripts_dir != "" && [file exists $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl] } {
|
| 833 |
+
fk_msg "Sourcing custom NRF script $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl"
|
| 834 |
+
source $MGC_nrf_custom_scripts_dir/scr/import_checks.tcl
|
| 835 |
+
} else {
|
| 836 |
+
fk_msg "Sourcing standard NRF script $nrf_dir/scr/import_checks.tcl"
|
| 837 |
+
source $nrf_dir/scr/import_checks.tcl
|
| 838 |
+
}
|
| 839 |
+
report_messages
|
| 840 |
+
|
| 841 |
+
#if { [info exists MGC_no_exit] && $MGC_no_exit } {
|
| 842 |
+
# #continue
|
| 843 |
+
#} else {
|
| 844 |
+
# exit
|
| 845 |
+
#}
|
| 846 |
+
|
abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/1_place.tcl
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#####################################################
|
| 2 |
+
## Copyright Mentor, A Siemens Business ##
|
| 3 |
+
## All Rights Reserved ##
|
| 4 |
+
## ##
|
| 5 |
+
## THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY ##
|
| 6 |
+
## INFORMATION WHICH ARE THE PROPERTY OF MENTOR ##
|
| 7 |
+
## GRAPHICS CORPORATION OR ITS LICENSORS AND IS ##
|
| 8 |
+
## SUBJECT TO LICENSE TERMS. ##
|
| 9 |
+
#####################################################
|
| 10 |
+
puts "
|
| 11 |
+
#####################################################
|
| 12 |
+
## Nitro Reference Flow : Place Stage ##
|
| 13 |
+
## ##
|
| 14 |
+
## Loads design from import stage, prepares for ##
|
| 15 |
+
## and then runs run_place_timing ##
|
| 16 |
+
#####################################################
|
| 17 |
+
"
|
| 18 |
+
set MGC_flowStage place
|
| 19 |
+
fk_msg -set_prompt NRF
|
| 20 |
+
|
| 21 |
+
###Setting design and technology variables
|
| 22 |
+
source flow_variables.tcl
|
| 23 |
+
source scr/kit_utils.tcl
|
| 24 |
+
load_utils -name nrf_utils
|
| 25 |
+
load_utils -name save_vars
|
| 26 |
+
load_utils -name db_utils
|
| 27 |
+
|
| 28 |
+
config_application -cpus $MGC_cpus
|
| 29 |
+
config_timing -cpus $MGC_cpus
|
| 30 |
+
|
| 31 |
+
# Read db
|
| 32 |
+
if {![string length [get_top_partition]]} {
|
| 33 |
+
if { [file exists dbs/libs.db] } {
|
| 34 |
+
## split_db is true
|
| 35 |
+
if { [file isfile dbs/libs.db] } {
|
| 36 |
+
# Old DB -- Convert to 2.5
|
| 37 |
+
util::update_split_db -lib_db dbs/libs.db -design_db dbs/import.db
|
| 38 |
+
} else {
|
| 39 |
+
read_db -file dbs/libs.db
|
| 40 |
+
read_db -file dbs/import.db
|
| 41 |
+
}
|
| 42 |
+
config_default_value -command write_db -argument data -value design
|
| 43 |
+
} else {
|
| 44 |
+
if { [file isfile dbs/import.db] } {
|
| 45 |
+
# Old DB -- Convert to 2.5
|
| 46 |
+
util::update_full_db -design_db dbs/import.db
|
| 47 |
+
} else {
|
| 48 |
+
read_db -file dbs/import.db
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
#Source Custom NDR file before checks
|
| 54 |
+
if { [info exist MGC_customNdrFile] && $MGC_customNdrFile != "" } {
|
| 55 |
+
fk_msg -type info "Using Custom NDR File : $MGC_customNdrFile. Please ensure to include set_cts_routing_rule as well in the file."
|
| 56 |
+
source $MGC_customNdrFile
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
## make sure that user input is valid for all stages
|
| 61 |
+
set num_errors 0
|
| 62 |
+
incr num_errors [nrf_utils::check_flow_variables $MGC_flowStage]
|
| 63 |
+
if { $num_errors > 0 } {
|
| 64 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 65 |
+
return -code error
|
| 66 |
+
}
|
| 67 |
+
util::save_vars
|
| 68 |
+
|
| 69 |
+
# ===========================================================================================
|
| 70 |
+
# START of PLACE STAGE
|
| 71 |
+
# ==========================================================================================
|
| 72 |
+
check_design
|
| 73 |
+
config_shell -echo_script true
|
| 74 |
+
|
| 75 |
+
# Target Scenario Management : saving curent scenarios, enabling modes and corners for a stage
|
| 76 |
+
nrf_utils::save_scenarios
|
| 77 |
+
nrf_utils::configure_scenarios $MGC_flowStage
|
| 78 |
+
nrf_utils::check_for_propagated_clocks
|
| 79 |
+
|
| 80 |
+
# For now only set power corner if user defined
|
| 81 |
+
if { $MGC_powerCorner != "" } {
|
| 82 |
+
config_nitro_flow -name power_corner -value $MGC_powerCorner
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
# Target Library Management: preparing and setting dont use cell list : # This Proc is in scr/kit_utils.tcl
|
| 86 |
+
nrf_utils::configure_target_libs $MGC_flowStage
|
| 87 |
+
|
| 88 |
+
# Set routing layers:
|
| 89 |
+
if { ![nrf_utils::configure_routing_layers] } {
|
| 90 |
+
return -code error
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
lpp::create_cell_edge_constraints
|
| 94 |
+
|
| 95 |
+
# Generic configs:
|
| 96 |
+
set_crpr_spec -method margin_based
|
| 97 |
+
config_default -command compile_scan -argument cross_chain_optimization -value false
|
| 98 |
+
config_place_detail -name min_filler_space -value $MGC_min_filler_space
|
| 99 |
+
|
| 100 |
+
# Use this file to source the needed files to set OCV derates. Can be either "regular OCV" or "AOCV"
|
| 101 |
+
# In case of POCV we recommend to use it starting from POST-CTS stage
|
| 102 |
+
source scr/ocv.tcl
|
| 103 |
+
if {$MGC_OCV == "aocv"} {
|
| 104 |
+
fk_msg "Enabling AOCV; please make sure you sourced appropraite AOCV files/settings using src/ocv.tcl"
|
| 105 |
+
config_timing -advanced_ocv true
|
| 106 |
+
}
|
| 107 |
+
## get_config_value is proc in scr/kit_utils.tcl
|
| 108 |
+
if {[get_config_value config_timing parametric_ocv]} {
|
| 109 |
+
fk_msg -type info "POCV is enabled in import database. Enabling graph based CRPR which is needed for POCV. Pleaase ensure POCV setup is done properly."
|
| 110 |
+
set_crpr_spec -method graph_based
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
# Prepare path groups
|
| 114 |
+
nrf_utils::configure_path_groups
|
| 115 |
+
|
| 116 |
+
### Avoid assign
|
| 117 |
+
config_optimize -dont_create_assign
|
| 118 |
+
|
| 119 |
+
#############################################################
|
| 120 |
+
### Apply NDR to clock nets for congestion estimation
|
| 121 |
+
### Priority: 1) MGC_customNdrFile; 2) MGC_CLOCK_NDR_NAME 3) Default, MGC_NdrSpaceMultiplier & MGC_NdrWidthMultiplier
|
| 122 |
+
### MGC_NdrWidthMultiplier and MGC_NdrSpaceMultiplier are prefered way of defining clock NDR
|
| 123 |
+
### If MGC_CLOCK_NDR_NAME is set : NDR with this name must exist
|
| 124 |
+
### NDR setup uses layers: MGC_CtsBottomPreferredLayer, MGC_CtsTopPreferredLayer, and $MGC_MaxRouteLayer
|
| 125 |
+
### and special vias: MGC_clock_route_ndr_vias
|
| 126 |
+
### Shielding is controlled by MGC_applyShield, and it uses MGC_clock_shield_net
|
| 127 |
+
if { $MGC_customNdrFile == "" } {
|
| 128 |
+
fk_msg -type info "Deriving Clock NDR from technology."
|
| 129 |
+
if { ![nrf_utils::setup_clock_ndr_and_shield] } {
|
| 130 |
+
return -code error
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
set_rcd_models -stage pre_cts
|
| 135 |
+
# Source Timer & Extractor configs
|
| 136 |
+
source scr/config.tcl
|
| 137 |
+
|
| 138 |
+
config_optimize -allow_reroute true -nondef_rule ""
|
| 139 |
+
config_timing -disable_clock_gating_checks false
|
| 140 |
+
|
| 141 |
+
if {$MGC_place_high_effort_congestion} {
|
| 142 |
+
config_place_timing -name congestion_effort -value high
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
# Clock offset optimization
|
| 146 |
+
if { [info exists MGC_activeCorners(place:hold)] && $MGC_activeCorners(place:hold) != "" } {
|
| 147 |
+
config_clockdata_optimize -name hold_corners -value $MGC_activeCorners(place:hold)
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
# WARNING!: Following flow config are not stored in the DB" #
|
| 151 |
+
config_flows -preserve_rcd true
|
| 152 |
+
|
| 153 |
+
### Max Length Constraint to be honored during optimization
|
| 154 |
+
set_max_length -length_threshold $MGC_maxLengthParam
|
| 155 |
+
fk_msg "Max Length Set to [report_max_length]"
|
| 156 |
+
|
| 157 |
+
# constrain the clock maximum transition for better SI results later
|
| 158 |
+
nrf_utils::set_clock_based_max_transition
|
| 159 |
+
|
| 160 |
+
### Define Low power effort OPT effort for RPT
|
| 161 |
+
if { $MGC_powerEffort != "none" } {
|
| 162 |
+
config_place_timing -name low_power_effort -value $MGC_powerEffort
|
| 163 |
+
if { $MGC_saifFile == "" } {
|
| 164 |
+
fk_msg -type warning "Please provide SAIF file when running low power flow. Power analysis will be inaccurate otherwise."
|
| 165 |
+
} else {
|
| 166 |
+
read_saif -file $MGC_saifFile
|
| 167 |
+
#TODO: Check how to find saif annotation : add it in checks
|
| 168 |
+
}
|
| 169 |
+
## create leakage groups and enable optimization leakage control
|
| 170 |
+
set num_groups [ipo_vt_expert -create]
|
| 171 |
+
if { $num_groups >= 2 } {
|
| 172 |
+
config_nitro_flow -name enable_leakage_control -value true
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
### Set buffer and inverter lists for more accurately estimation of the clock offset step
|
| 177 |
+
nrf_utils::configure_cts_engine $MGC_flowStage
|
| 178 |
+
|
| 179 |
+
# constrain the clock ideal transition for better timing convergence
|
| 180 |
+
nrf_utils::check_ideal_clock_transitions
|
| 181 |
+
|
| 182 |
+
nrf_utils::report_timer_configs
|
| 183 |
+
# ===========================================================================================
|
| 184 |
+
# RUN_PLACE_TIMING
|
| 185 |
+
# ===========================================================================================
|
| 186 |
+
if { [file exists nrf_customization.tcl] } {
|
| 187 |
+
source nrf_customization.tcl
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
## Remove assign
|
| 191 |
+
if {$MGC_fix_assigns } {
|
| 192 |
+
ipo_sweep_assigns -place_cell false -message verbose
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
## Enable N2N synthesis : Remapping in 0RC mode
|
| 196 |
+
if {$MGC_high_effort_remap} {
|
| 197 |
+
run_0rc_remap
|
| 198 |
+
config_place_timing -name enable_remap_optimization -value true
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
run_place_timing -effort $MGC_flow_effort -skip_precondition $MGC_skip_precondition -messages verbose
|
| 202 |
+
|
| 203 |
+
# Optional additional optimizations to improve timing closure
|
| 204 |
+
if { $MGC_enable_pre_cts_incr } {
|
| 205 |
+
source scr/pre_cts_incr.tcl
|
| 206 |
+
}
|
| 207 |
+
# ===========================================================================================
|
| 208 |
+
# END of PLACE STAGE
|
| 209 |
+
# ===========================================================================================
|
| 210 |
+
if { [file exists dbs/libs.db] } {
|
| 211 |
+
## split_db is true
|
| 212 |
+
write_db -data design -file dbs/place.db
|
| 213 |
+
} else {
|
| 214 |
+
write_db -data all -file dbs/place.db
|
| 215 |
+
}
|
| 216 |
+
if { $MGC_powerEffort != "none" && $MGC_saifFile != "" } {
|
| 217 |
+
## Getting one mode to write saif
|
| 218 |
+
set saifMode [nrf_get_saif_mode $MGC_powerCorner]
|
| 219 |
+
write_saif dbs/place.saif.gz -mode $saifMode
|
| 220 |
+
}
|
| 221 |
+
nrf_utils::write_reports $MGC_flowStage reports 100
|
| 222 |
+
|
| 223 |
+
#if { [info exists MGC_no_exit] && $MGC_no_exit eq "true" } {
|
| 224 |
+
# #continue
|
| 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#####################################################
|
| 2 |
+
## Copyright Mentor, A Siemens Business ##
|
| 3 |
+
## All Rights Reserved ##
|
| 4 |
+
## ##
|
| 5 |
+
## THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY ##
|
| 6 |
+
## INFORMATION WHICH ARE THE PROPERTY OF MENTOR ##
|
| 7 |
+
## GRAPHICS CORPORATION OR ITS LICENSORS AND IS ##
|
| 8 |
+
## SUBJECT TO LICENSE TERMS. ##
|
| 9 |
+
#####################################################
|
| 10 |
+
puts "
|
| 11 |
+
#####################################################
|
| 12 |
+
## Nitro Reference Flow : Clock Stage ##
|
| 13 |
+
## ##
|
| 14 |
+
## Loads design from place stage, prepares for ##
|
| 15 |
+
## and then runs run_clock_timing ##
|
| 16 |
+
#####################################################
|
| 17 |
+
"
|
| 18 |
+
|
| 19 |
+
set MGC_flowStage clock
|
| 20 |
+
fk_msg -set_prompt NRF
|
| 21 |
+
|
| 22 |
+
###Setting design and technology variables
|
| 23 |
+
source flow_variables.tcl
|
| 24 |
+
source scr/kit_utils.tcl
|
| 25 |
+
load_utils -name nrf_utils
|
| 26 |
+
load_utils -name save_vars
|
| 27 |
+
load_utils -name db_utils
|
| 28 |
+
|
| 29 |
+
config_application -cpus $MGC_cpus
|
| 30 |
+
config_timing -cpus $MGC_cpus
|
| 31 |
+
|
| 32 |
+
# Read db
|
| 33 |
+
if {![string length [get_top_partition]]} {
|
| 34 |
+
if { [file exists dbs/libs.db] } {
|
| 35 |
+
## split_db is true
|
| 36 |
+
if { [file isfile dbs/libs.db] } {
|
| 37 |
+
util::update_split_db -lib_db dbs/libs.db -design_db dbs/place.db
|
| 38 |
+
} else {
|
| 39 |
+
read_db -file dbs/libs.db
|
| 40 |
+
read_db -file dbs/place.db
|
| 41 |
+
}
|
| 42 |
+
config_default_value -command write_db -argument data -value design
|
| 43 |
+
} else {
|
| 44 |
+
if { [file isfile dbs/place.db] } {
|
| 45 |
+
util::update_full_db -design_db dbs/place.db
|
| 46 |
+
} else {
|
| 47 |
+
read_db -file dbs/place.db
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
set num_errors [nrf_utils::check_flow_variables $MGC_flowStage]
|
| 52 |
+
if { $num_errors > 0 } {
|
| 53 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 54 |
+
return -code error
|
| 55 |
+
}
|
| 56 |
+
util::save_vars
|
| 57 |
+
|
| 58 |
+
# ===========================================================================================
|
| 59 |
+
# START of CLOCK STAGE
|
| 60 |
+
# ==========================================================================================
|
| 61 |
+
check_design
|
| 62 |
+
config_shell -echo_script true
|
| 63 |
+
|
| 64 |
+
# ===========================================================================================
|
| 65 |
+
# Default settings
|
| 66 |
+
# ===========================================================================================
|
| 67 |
+
# Objective for automated CTS repeater selection
|
| 68 |
+
set MGC_cts_repeater_pruning_objective delay ; # Valid values: area delay driver_res input_cap leakage total_power
|
| 69 |
+
|
| 70 |
+
# CG Pruning settings
|
| 71 |
+
set MGC_ck_cg_apply_pruning true
|
| 72 |
+
|
| 73 |
+
# Usage of dont_use cells for GC Optimization
|
| 74 |
+
set MGC_ck_cg_use_dont_use false
|
| 75 |
+
|
| 76 |
+
# CTS engine tuning
|
| 77 |
+
set cts_partition_skew_threshold 0.50
|
| 78 |
+
set cts_compile_local_refine_skew_factor 0.30
|
| 79 |
+
set cts_intrinsic_repeater_delay_new true
|
| 80 |
+
|
| 81 |
+
# ===========================================================================================
|
| 82 |
+
# TECHNO / LIB
|
| 83 |
+
# ===========================================================================================
|
| 84 |
+
|
| 85 |
+
# Don't let the tool use its own generated vias
|
| 86 |
+
# Generated vias rules are provided
|
| 87 |
+
set node [get_config -name process -param node]
|
| 88 |
+
if {$node > 28 || $node=="unknown"} {
|
| 89 |
+
config_lib_vias -use_generated true -create true -select true -use_asymmetrical true -use_4cut true
|
| 90 |
+
} else {
|
| 91 |
+
config_lib_vias -use_generate false
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
# ===========================================================================================
|
| 95 |
+
# GENERIC
|
| 96 |
+
# ===========================================================================================
|
| 97 |
+
|
| 98 |
+
config_name_rule -cell CLOCK -net CLOCK
|
| 99 |
+
config_timing -use_annotated_cts_offsets false
|
| 100 |
+
|
| 101 |
+
# ===========================================================================================
|
| 102 |
+
# GR
|
| 103 |
+
# ===========================================================================================
|
| 104 |
+
config_route_global -category user_defined
|
| 105 |
+
fk_msg "Applying NRF non-default GR settings"
|
| 106 |
+
config_route_global -name gr_full_timing_update_thresh -value 0.0
|
| 107 |
+
|
| 108 |
+
# ===========================================================================================
|
| 109 |
+
# TIMING CONSTRAINTS - MCMM
|
| 110 |
+
# ===========================================================================================
|
| 111 |
+
if {[file exists scr/reload_constraints_${MGC_flowStage}.tcl]} {
|
| 112 |
+
source scr/reload_constraints_${MGC_flowStage}.tcl
|
| 113 |
+
}
|
| 114 |
+
nrf_utils::configure_scenarios $MGC_flowStage
|
| 115 |
+
nrf_utils::configure_target_libs $MGC_flowStage
|
| 116 |
+
|
| 117 |
+
# Set routing layers:
|
| 118 |
+
if { ![nrf_utils::configure_routing_layers] } {
|
| 119 |
+
return -code error
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
lpp::create_cell_edge_constraints
|
| 123 |
+
|
| 124 |
+
#constraining clock transition for SI
|
| 125 |
+
nrf_utils::set_clock_based_max_transition
|
| 126 |
+
|
| 127 |
+
# Force tight max_transition constraint on macros' data pins
|
| 128 |
+
if { $MGC_max_trans_on_macro_pins_value != 0 } {
|
| 129 |
+
foreach pin [ get_pins -of_objects [ get_cells -filter is_macro ] -filter direction==in&&!@is_clock_pin ] {
|
| 130 |
+
set_max_transition $MGC_max_trans_on_macro_pins_value [ get_pins $pin ]
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
# ===========================================================================================
|
| 135 |
+
# OCV - CRPR
|
| 136 |
+
# ===========================================================================================
|
| 137 |
+
# Use this file to source the needed files to set OCV derates. Can be either "regular OCV" or "AOCV" or "POCV"
|
| 138 |
+
source scr/ocv.tcl
|
| 139 |
+
if {$MGC_OCV == "aocv"} {
|
| 140 |
+
fk_msg "Enabling AOCV; please make sure you sourced appropraite AOCV files/settings using src/ocv.tcl"
|
| 141 |
+
config_timing -advanced_ocv true
|
| 142 |
+
}
|
| 143 |
+
if {$MGC_OCV== "pocv"} {
|
| 144 |
+
fk_msg "Enabling POCV; please make sure you sourced appropraite POCV files/settings using scr/ocv.tcl"
|
| 145 |
+
config_timing -parametric_ocv true
|
| 146 |
+
config_report_timing -add_columns variation
|
| 147 |
+
}
|
| 148 |
+
set_crpr_spec -method graph_based
|
| 149 |
+
set_crpr_spec -crpr_threshold $MGC_crpr_threshold
|
| 150 |
+
source scr/config.tcl
|
| 151 |
+
|
| 152 |
+
# ===========================================================================================
|
| 153 |
+
# HOLD
|
| 154 |
+
# ===========================================================================================
|
| 155 |
+
set_property -name is_dont_use -value true -objects [get_lib_cells $MGC_DLY_cells]
|
| 156 |
+
config_flows -hold_opt_cell_list [ get_lib_cells $MGC_DLY_cells ]
|
| 157 |
+
|
| 158 |
+
# ===========================================================================================
|
| 159 |
+
# MV - POWER
|
| 160 |
+
# ===========================================================================================
|
| 161 |
+
if { $MGC_powerEffort != "none" && $MGC_saifFile != "" } {
|
| 162 |
+
read_saif -file dbs/place.saif.gz
|
| 163 |
+
}
|
| 164 |
+
## Define Low power effort OPT effort for RCT
|
| 165 |
+
if { $MGC_powerEffort != "none"} {
|
| 166 |
+
config_clock_timing -name low_power_effort -value $MGC_powerEffort
|
| 167 |
+
}
|
| 168 |
+
if { $MGC_powerCorner != {} } {
|
| 169 |
+
config_clock_timing -name dont_prune_corners -value $MGC_powerCorner
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
# ===========================================================================================
|
| 173 |
+
# CTS
|
| 174 |
+
# ===========================================================================================
|
| 175 |
+
nrf_utils::configure_cts_engine $MGC_flowStage
|
| 176 |
+
|
| 177 |
+
config_clock_timing -name refine_cts -value $MGC_clock_refine_cts
|
| 178 |
+
fk_msg "Cleaning up NRF-generated pre-existing NDR/Shield rules on clock nets before CTS Buffering. Custom rules, if any, are kept."
|
| 179 |
+
set candidate_nets [filter_collection [collect_clock_nets] -expression "@nondefault_rule~=MGC_CLK_NDR_*"]
|
| 180 |
+
if {[sizeof_collection $candidate_nets] > 0} {
|
| 181 |
+
set_property -name nondefault_rule -value "" -object $candidate_nets
|
| 182 |
+
set_property -name shield_rule -value "" -object $candidate_nets
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
nrf_utils::report_timer_configs
|
| 186 |
+
|
| 187 |
+
# ===========================================================================================
|
| 188 |
+
# RUN_CLOCK_TIMING
|
| 189 |
+
# ===========================================================================================
|
| 190 |
+
config_clock_timing -name preserve_rcd_models -value true
|
| 191 |
+
config_clock_timing -name enable_optimize_clock_tree -value $MGC_enable_clock_data_opt
|
| 192 |
+
# Preserving CTS Reference corner from Pruning
|
| 193 |
+
set current_excluded_corners_for_pruning [config_clock_timing -name dont_prune_corners]
|
| 194 |
+
config_clock_timing -name dont_prune_corners -value [add_to_collection -unique true -object [get_corners $current_excluded_corners_for_pruning] -add [get_corners $::MGC_activeCorners(clock:ref)]]
|
| 195 |
+
|
| 196 |
+
###Max length constraint for optimization
|
| 197 |
+
config_optimize -buffer_removal_max_length_limit $MGC_maxLengthParam
|
| 198 |
+
|
| 199 |
+
if { [file exists nrf_customization.tcl] } {
|
| 200 |
+
source nrf_customization.tcl
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
run_clock_timing -cpus $MGC_cpus
|
| 204 |
+
|
| 205 |
+
## Insert tie-cells
|
| 206 |
+
if {$MGC_tie_low_cell ne "" && $MGC_tie_high_cell ne ""} {
|
| 207 |
+
nrf_utils::insert_tie_cells
|
| 208 |
+
fk_msg -type info "Running tie cells insertion."
|
| 209 |
+
} else {
|
| 210 |
+
fk_msg -type info "Skipping tie cells insertion."
|
| 211 |
+
}
|
| 212 |
+
# ===========================================================================================
|
| 213 |
+
# END of CLOCK STAGE
|
| 214 |
+
# ===========================================================================================
|
| 215 |
+
if { [file exists dbs/libs.db] } {
|
| 216 |
+
## split_db is true
|
| 217 |
+
write_db -data design -file dbs/clock.db
|
| 218 |
+
} else {
|
| 219 |
+
write_db -data all -file dbs/clock.db
|
| 220 |
+
}
|
| 221 |
+
if { $MGC_powerEffort != "none" && $MGC_saifFile != "" } {
|
| 222 |
+
## Getting one mode to write saif
|
| 223 |
+
set saifMode [nrf_get_saif_mode $MGC_powerCorner]
|
| 224 |
+
write_saif dbs/clock.saif.gz -mode $saifMode
|
| 225 |
+
}
|
| 226 |
+
nrf_utils::write_reports $MGC_flowStage reports 100
|
| 227 |
+
|
| 228 |
+
#if { [info exists MGC_no_exit] && $MGC_no_exit eq "true" } {
|
| 229 |
+
# #continue
|
| 230 |
+
#} else {
|
| 231 |
+
# exit
|
| 232 |
+
#}
|
| 233 |
+
|
abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/3_route.tcl
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|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|
| 3 |
+
# Task : routing
|
| 4 |
+
# Description: track/detail routing and final timing driven routing
|
| 5 |
+
# ==================================================================
|
| 6 |
+
puts "
|
| 7 |
+
#####################################################
|
| 8 |
+
## Nitro Reference Flow : Route Stage ##
|
| 9 |
+
## ##
|
| 10 |
+
## Loads design from clock stage, prepares for ##
|
| 11 |
+
## and then runs run_route_timing ##
|
| 12 |
+
#####################################################
|
| 13 |
+
"
|
| 14 |
+
|
| 15 |
+
set MGC_flowStage route
|
| 16 |
+
fk_msg -set_prompt NRF
|
| 17 |
+
|
| 18 |
+
###Setting design and technology variables
|
| 19 |
+
source flow_variables.tcl
|
| 20 |
+
source scr/kit_utils.tcl
|
| 21 |
+
load_utils -name nrf_utils
|
| 22 |
+
load_utils -name save_vars
|
| 23 |
+
load_utils -name db_utils
|
| 24 |
+
|
| 25 |
+
config_application -cpus $MGC_cpus
|
| 26 |
+
config_timing -cpus $MGC_cpus
|
| 27 |
+
|
| 28 |
+
# Read db
|
| 29 |
+
if {![string length [get_top_partition]]} {
|
| 30 |
+
if { [file exists dbs/libs.db] } {
|
| 31 |
+
# Split db is used
|
| 32 |
+
if { [file isfile dbs/libs.db] } {
|
| 33 |
+
# Old DB -- Convert to 2.5
|
| 34 |
+
util::update_split_db -lib_db dbs/libs.db -design_db dbs/clock.db
|
| 35 |
+
} else {
|
| 36 |
+
read_db -file dbs/libs.db
|
| 37 |
+
read_db -file dbs/clock.db
|
| 38 |
+
}
|
| 39 |
+
config_default_value -command write_db -argument data -value design
|
| 40 |
+
} else {
|
| 41 |
+
if { [file isfile dbs/clock.db] } {
|
| 42 |
+
# Old DB -- Convert to 2.5
|
| 43 |
+
util::update_full_db -design_db dbs/clock.db
|
| 44 |
+
} else {
|
| 45 |
+
read_db -file dbs/clock.db
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
set num_errors [nrf_utils::check_flow_variables $MGC_flowStage]
|
| 51 |
+
if { $num_errors > 0 } {
|
| 52 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 53 |
+
return -code error
|
| 54 |
+
}
|
| 55 |
+
util::save_vars
|
| 56 |
+
|
| 57 |
+
# ===========================================================================================
|
| 58 |
+
# START of ROUTE STAGE
|
| 59 |
+
# ==========================================================================================
|
| 60 |
+
check_design
|
| 61 |
+
|
| 62 |
+
config_shell -echo_script true
|
| 63 |
+
set MGC_rrt_opt true
|
| 64 |
+
|
| 65 |
+
# Don't let the tool use its own generated vias
|
| 66 |
+
# Generated vias rules are provided
|
| 67 |
+
set node [get_config -name process -param node]
|
| 68 |
+
if {$node > 28 || $node=="unknown"} {
|
| 69 |
+
config_lib_vias -use_generated true -create true -select true -use_asymmetrical true -use_4cut true
|
| 70 |
+
} else {
|
| 71 |
+
config_lib_vias -use_generate false
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
lpp::create_cell_edge_constraints
|
| 75 |
+
|
| 76 |
+
if { $MGC_powerEffort != "none" && $MGC_saifFile != "" } {
|
| 77 |
+
read_saif -file dbs/clock.saif.gz
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
# Target Scenario Management : enabling modes and corners
|
| 81 |
+
# This Proc is in scr/kit_utils.tcl
|
| 82 |
+
nrf_utils::configure_scenarios $MGC_flowStage
|
| 83 |
+
# Target Library Management: preparing and setting dont use cell list
|
| 84 |
+
# This Proc is in scr/kit_utils.tcl
|
| 85 |
+
if {$MGC_rrt_opt} {
|
| 86 |
+
nrf_utils::configure_target_libs $MGC_flowStage
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
# Generic configs:
|
| 90 |
+
config_timing -disable_clock_gating_checks false
|
| 91 |
+
set_crpr_spec -method graph_based
|
| 92 |
+
|
| 93 |
+
# Routing flow will set 2 rcd models internally: Postcts at first & then post_route after track routing
|
| 94 |
+
# All user specified engine settings will be honored
|
| 95 |
+
config_flows -preserve_rcd false
|
| 96 |
+
source scr/config.tcl
|
| 97 |
+
|
| 98 |
+
config_route_timing -reset_all
|
| 99 |
+
|
| 100 |
+
# Enable DFM optimization by replacing DFM vias
|
| 101 |
+
if {$MGC_replace_dfm} {
|
| 102 |
+
config_route_timing -name dvia_mode -value dfm
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
## Define Low power effort OPT effort for RRT
|
| 106 |
+
if { $MGC_powerEffort != "none"} {
|
| 107 |
+
config_route_timing -name low_power_effort -value $MGC_powerEffort
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
## check if design is legal, if not - error
|
| 111 |
+
if { [config_place_detail -name follow_drc_for] == {} } {
|
| 112 |
+
config_place_detail -name follow_drc_for -reset
|
| 113 |
+
set illegal_cells [get_illegal_cells]
|
| 114 |
+
if { [llength $illegal_cells] } {
|
| 115 |
+
fk_msg -type warning "Flow was run with suppressed pre_route checks during legalization. As a result [llength $illegal_cells] cells are illegal."
|
| 116 |
+
#return -code error "Stop the flow due to illegal cells"
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
# ===========================================================================================
|
| 121 |
+
# RUN_ROUTE_TIMING
|
| 122 |
+
# ===========================================================================================
|
| 123 |
+
|
| 124 |
+
if { [file exists nrf_customization.tcl] } {
|
| 125 |
+
source nrf_customization.tcl
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
if {$MGC_rrt_opt} {
|
| 129 |
+
# configs for extraction in DR
|
| 130 |
+
config_extraction -use_thickness_variation false
|
| 131 |
+
config_extraction -use_thickness_variation_for_cap false
|
| 132 |
+
config_extraction -use_thickness_variation_for_res true
|
| 133 |
+
# CRPR
|
| 134 |
+
set_crpr_spec -crpr_threshold $MGC_crpr_threshold
|
| 135 |
+
set_crpr_spec -method graph_based
|
| 136 |
+
set_crpr_spec -transition same_transition
|
| 137 |
+
### Max Length Constraint to be honored during optimization
|
| 138 |
+
fk_msg "Max Length Constraint"
|
| 139 |
+
set_max_length -length_threshold $MGC_maxLengthParam
|
| 140 |
+
fk_msg "Max Length Set to [report_max_length]"
|
| 141 |
+
fk_msg "Running RRT with Interleave Optimization"
|
| 142 |
+
run_route_timing -mode interleave_opt -cpus $MGC_cpus -messages verbose
|
| 143 |
+
} else {
|
| 144 |
+
run_route_timing -cpus $MGC_cpus -messages verbose
|
| 145 |
+
}
|
| 146 |
+
# ===========================================================================================
|
| 147 |
+
# END of ROUTE STAGE
|
| 148 |
+
# ===========================================================================================
|
| 149 |
+
if { [file exists dbs/libs.db] } {
|
| 150 |
+
## split_db is true
|
| 151 |
+
write_db -data design -file dbs/route.db
|
| 152 |
+
} else {
|
| 153 |
+
write_db -data all -file dbs/route.db
|
| 154 |
+
}
|
| 155 |
+
if { $MGC_powerEffort != "none" && $MGC_saifFile != "" } {
|
| 156 |
+
## Getting one mode to write saif
|
| 157 |
+
set saifMode [nrf_get_saif_mode $MGC_powerCorner]
|
| 158 |
+
write_saif dbs/route.saif.gz -mode $saifMode
|
| 159 |
+
}
|
| 160 |
+
nrf_utils::write_reports $MGC_flowStage reports 100
|
| 161 |
+
|
| 162 |
+
#if { [info exists MGC_no_exit] && $MGC_no_exit eq "true" } {
|
| 163 |
+
# #continue
|
| 164 |
+
#} else {
|
| 165 |
+
# exit
|
| 166 |
+
#}
|
| 167 |
+
|
abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/4_export.tcl
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
######################################################
|
| 2 |
+
### Copyright Mentor, A Siemens Business ##
|
| 3 |
+
### All Rights Reserved ##
|
| 4 |
+
### ##
|
| 5 |
+
### THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY ##
|
| 6 |
+
### INFORMATION WHICH ARE THE PROPERTY OF MENTOR ##
|
| 7 |
+
### GRAPHICS CORPORATION OR ITS LICENSORS AND IS ##
|
| 8 |
+
### SUBJECT TO LICENSE TERMS. ##
|
| 9 |
+
######################################################
|
| 10 |
+
puts "
|
| 11 |
+
######################################################
|
| 12 |
+
# Export Flow #
|
| 13 |
+
# #
|
| 14 |
+
# Fix process antennas, add fillers & metal fill #
|
| 15 |
+
# Output design data. #
|
| 16 |
+
# Control vars defined in flow_variables.tcl #
|
| 17 |
+
# #
|
| 18 |
+
######################################################
|
| 19 |
+
"
|
| 20 |
+
|
| 21 |
+
config_shell -echo_script false
|
| 22 |
+
fk_msg -set_prompt NRF
|
| 23 |
+
|
| 24 |
+
###Sourcing design and technology variables
|
| 25 |
+
source flow_variables.tcl
|
| 26 |
+
source scr/kit_utils.tcl
|
| 27 |
+
load_utils -name nrf_utils
|
| 28 |
+
load_utils -name save_vars
|
| 29 |
+
load_utils -name db_utils
|
| 30 |
+
|
| 31 |
+
set MGC_flowStage export
|
| 32 |
+
|
| 33 |
+
# Read DB
|
| 34 |
+
if {![string length [get_top_partition]]} {
|
| 35 |
+
if { [file exists dbs/libs.db] } {
|
| 36 |
+
# Split db is used
|
| 37 |
+
if { [file isfile dbs/libs.db] } {
|
| 38 |
+
# Old DB -- Convert to 2.5
|
| 39 |
+
util::update_split_db -lib_db dbs/libs.db -design_db dbs/route.db
|
| 40 |
+
} else {
|
| 41 |
+
read_db -file dbs/libs.db
|
| 42 |
+
read_db -file dbs/route.db
|
| 43 |
+
}
|
| 44 |
+
config_default_value -command write_db -argument data -value design
|
| 45 |
+
} else {
|
| 46 |
+
if { [file isfile dbs/route.db] } {
|
| 47 |
+
# Old DB -- Convert to 2.5
|
| 48 |
+
util::update_full_db -design_db dbs/route.db
|
| 49 |
+
} else {
|
| 50 |
+
read_db -file dbs/route.db
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
set num_errors [nrf_utils::check_flow_variables $MGC_flowStage]
|
| 56 |
+
if { $num_errors > 0 } {
|
| 57 |
+
fk_msg -type error "Please fix all errors to continue execution"
|
| 58 |
+
return -code error
|
| 59 |
+
}
|
| 60 |
+
util::save_vars
|
| 61 |
+
|
| 62 |
+
lpp::create_cell_edge_constraints
|
| 63 |
+
|
| 64 |
+
## Fix Antenna
|
| 65 |
+
set MGC_fix_antenna true ; # Mandatory to review : true|false
|
| 66 |
+
|
| 67 |
+
if { [file exists nrf_customization.tcl] } {
|
| 68 |
+
source nrf_customization.tcl
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
if {$MGC_fix_antenna eq true} {
|
| 72 |
+
check_antenna -cpus $MGC_cpus
|
| 73 |
+
fix_antenna -method jumper -cpus $MGC_cpus
|
| 74 |
+
|
| 75 |
+
if {$MGC_fix_antenna_use_diodes eq true} {
|
| 76 |
+
if {$MGC_fix_antenna_diodes != ""} {
|
| 77 |
+
config_antenna -diodes $MGC_fix_antenna_diodes
|
| 78 |
+
}
|
| 79 |
+
fix_antenna -method diode -finish all
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
## Check if design is DRC clean before starting chip finishing
|
| 84 |
+
set MGC_num_drc_errors_threshold 100 ; # If number of DRC errors exceeds this threshold the chip finishing steps will not be performed
|
| 85 |
+
check_drc
|
| 86 |
+
set num0 [llength [get_objects -type error -filter @category==drc -quiet true]]
|
| 87 |
+
set skip_chip_finishing false
|
| 88 |
+
if { $num0 > $MGC_num_drc_errors_threshold } {
|
| 89 |
+
fk_msg -type info "Number of DRC (including antenna) errors is too high ($num0 > $MGC_num_drc_errors_threshold). Chip finishing steps will be skipped \n"
|
| 90 |
+
set skip_chip_finishing true
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
## Place Filler
|
| 94 |
+
set MGC_insert_filler_cells true ; # true|false
|
| 95 |
+
|
| 96 |
+
if { $skip_chip_finishing == false && $MGC_insert_filler_cells eq true} {
|
| 97 |
+
# only needed for advanced nodes
|
| 98 |
+
#config_place_detail -name honor_lib_cell_edge_spacing -value true
|
| 99 |
+
set_property -objects [get_lib_cells -filter @is_filler] -name is_dont_use -value true
|
| 100 |
+
if {[llength $MGC_filler_lib_cells] == 0} {
|
| 101 |
+
set lc_list [get_lib_cells -filter @is_filler]
|
| 102 |
+
if {[llength $lc_list] == 0} {
|
| 103 |
+
fk_msg -type error "Could not find any lib cells marked as filler cells. No fillers inserted.\n"
|
| 104 |
+
} else {
|
| 105 |
+
set_property -objects $lc_list -name is_dont_use -value false
|
| 106 |
+
fk_msg -type info "Placing filler cells using all lib cells marked as fillers: $lc_list\n"
|
| 107 |
+
place_filler_cells -cpus $MGC_cpus -lib_cells $lc_list -respect_blockages $MGC_filler_respect_blockages
|
| 108 |
+
}
|
| 109 |
+
} elseif {[llength $MGC_filler_lib_cells] == 1} {
|
| 110 |
+
set lc_list [get_lib_cells -filter @is_filler -pattern $MGC_filler_lib_cells]
|
| 111 |
+
if {[llength $lc_list] == 0} {
|
| 112 |
+
fk_msg -type error "Could not find any filler lib cells matching pattern $MGC_filler_lib_cells. No fillers inserted.\n"
|
| 113 |
+
} else {
|
| 114 |
+
set_property -objects $lc_list -name is_dont_use -value false
|
| 115 |
+
fk_msg -type info "Placing filler cells using lib cells: $lc_list\n"
|
| 116 |
+
place_filler_cells -cpus $MGC_cpus -lib_cells $lc_list -respect_blockages $MGC_filler_respect_blockages
|
| 117 |
+
}
|
| 118 |
+
} else {
|
| 119 |
+
set lc_string [join $MGC_filler_lib_cells]
|
| 120 |
+
set tempvar ""
|
| 121 |
+
if {[string is integer -strict [lindex $lc_string 1]]} {
|
| 122 |
+
for {set x 0} {$x < [llength $lc_string]} {incr x 2} {
|
| 123 |
+
set fcpattern [lindex $lc_string $x]
|
| 124 |
+
set fcpercent [lindex $lc_string $x+1]
|
| 125 |
+
lappend tempvar "$fcpattern $fcpercent"
|
| 126 |
+
}
|
| 127 |
+
set MGC_filler_lib_cells $tempvar
|
| 128 |
+
# Place filler cells by using the percentage-based algorithm
|
| 129 |
+
set fill_groups {}
|
| 130 |
+
foreach filler_group $MGC_filler_lib_cells {
|
| 131 |
+
set filler_libcells [lindex $filler_group 0]
|
| 132 |
+
set filler_percentage [lindex $filler_group 1]
|
| 133 |
+
set filler_groupname [regsub -all {[*?]} $filler_libcells ""]
|
| 134 |
+
set_property -objects [get_lib_cells -filter is_filler -pattern $filler_libcells] -name is_dont_use -value false
|
| 135 |
+
create_filler_set -name FS_$filler_groupname -lib_cells [get_lib_cells -filter is_filler -pattern $filler_libcells]
|
| 136 |
+
lappend fill_groups FS_$filler_groupname $filler_percentage
|
| 137 |
+
}
|
| 138 |
+
fk_msg -type info "Placing filler cells using filler sets."
|
| 139 |
+
report_filler_sets
|
| 140 |
+
puts "Filler set percentages:"
|
| 141 |
+
for {set x 0} {$x < [llength $fill_groups]} {incr x 2} {
|
| 142 |
+
puts "\t[lindex $fill_groups $x] = [lindex $fill_groups $x+1]%"
|
| 143 |
+
}
|
| 144 |
+
puts ""
|
| 145 |
+
place_filler_cells -filler_set_prefix true -filler_set_percentages $fill_groups -cpus $MGC_cpus -respect_blockages $MGC_filler_respect_blockages
|
| 146 |
+
} else {
|
| 147 |
+
set lc_list [get_lib_cells -filter @is_filler -pattern $MGC_filler_lib_cells]
|
| 148 |
+
if {[llength $lc_list] == 0} {
|
| 149 |
+
fk_msg -type error "Could not find any filler lib cells matching pattern $MGC_filler_lib_cells. No fillers inserted.\n"
|
| 150 |
+
} else {
|
| 151 |
+
set_property -objects $lc_list -name is_dont_use -value false
|
| 152 |
+
fk_msg -type info "Placing filler cells using lib cells: $lc_list\n"
|
| 153 |
+
place_filler_cells -cpus $MGC_cpus -lib_cells $lc_list -respect_blockages $MGC_filler_respect_blockages
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
## Check for unfilled gaps.
|
| 159 |
+
## This has a dependency on how fill was inserted under blockages.
|
| 160 |
+
fk_msg -type info "Checking for unfilled gaps after filler cell insertion"
|
| 161 |
+
if { $MGC_filler_respect_blockages == "hard" } {
|
| 162 |
+
check_unfilled_gaps -include_gaps_under_blockage false
|
| 163 |
+
} elseif { $MGC_filler_respect_blockages == "all" } {
|
| 164 |
+
check_unfilled_gaps -include_gaps_under_blockage false
|
| 165 |
+
} elseif { $MGC_filler_respect_blockages == "none" } {
|
| 166 |
+
check_unfilled_gaps -include_gaps_under_blockage true
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
## Check for any new DRC issues and fix them
|
| 170 |
+
check_drc
|
| 171 |
+
set num1 [llength [get_objects -type error -filter @category==drc]]
|
| 172 |
+
if { $num1 } {
|
| 173 |
+
if { $num1 > $num0 } {
|
| 174 |
+
fk_msg -type info "Number of DRC errors increased after filler cell insertion ($num1 > $num0). Running DRC clean-up \n"
|
| 175 |
+
} else {
|
| 176 |
+
fk_msg -type info "Running DRC clean-up for remaining $num1 errors.\n"
|
| 177 |
+
}
|
| 178 |
+
clean_drc
|
| 179 |
+
run_route_timing -mode repair -cpus $MGC_cpus -user_params "-drc_effort high -drc_accept number -dp_local_effort high"
|
| 180 |
+
check_drc
|
| 181 |
+
set num2 [llength [get_objects -type error -filter @category==drc]]
|
| 182 |
+
if { $num2 } {
|
| 183 |
+
fk_msg -type info "$num2 DRC errors remain.\n"
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
## Insert Metal Fill
|
| 188 |
+
if { $skip_chip_finishing == false && $MGC_skip_metal_fill == false} {
|
| 189 |
+
fk_msg -type info "Inserting metal fill"
|
| 190 |
+
insert_metal_fill
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
## Write out data
|
| 194 |
+
set design [current_design]
|
| 195 |
+
set dataDir output
|
| 196 |
+
|
| 197 |
+
if { [info exists MGC_tanner_flow] && $MGC_tanner_flow eq "true"} {
|
| 198 |
+
# Write output data to EXPORT directory
|
| 199 |
+
write_verilog -file results/[current_design].v -bus_aware true
|
| 200 |
+
write_def -skip regions -all_vias -db_units 1000 -file results/routed.def -prefix_special_characters false
|
| 201 |
+
set corners [get_corners -filter enable]
|
| 202 |
+
set modes [get_modes -filter enable]
|
| 203 |
+
foreach_in_collection el $corners {
|
| 204 |
+
foreach el1 $modes {
|
| 205 |
+
write_sdf -corner $el -mode $el1 -file ./results/SDF_[current_design]_${el}_${el1}.sdf -skip_backslash true
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
# Exporting SPEF
|
| 209 |
+
foreach el $corners {
|
| 210 |
+
write_spef -corner $el -file ./results/SPEF_[current_design]_${el}.spef -coupling
|
| 211 |
+
}
|
| 212 |
+
} else {
|
| 213 |
+
write_verilog -file $dataDir/${design}.v.gz
|
| 214 |
+
write_def -file $dataDir/${design}.def.gz
|
| 215 |
+
write_lef -file $dataDir/${design}.lef.gz -lib_cells [get_lib_cells -of_objects [get_top_partition]]
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
# Export GDS
|
| 219 |
+
#we might need resolution 5.0:
|
| 220 |
+
#config_write_stream -resolution 5.0
|
| 221 |
+
if { $MGC_gds_layer_map_file != "" } {
|
| 222 |
+
source $MGC_gds_layer_map_file
|
| 223 |
+
write_stream -format gds -file $dataDir/${design}.gds
|
| 224 |
+
} elseif { $MGC_gds_layer_map_file == "" } {
|
| 225 |
+
fk_msg -type warning "No GDS layer-map file specified in flow variable MGC_gds_layer_map_file. GDS will not be written"
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
# Save db
|
| 229 |
+
if { [file exists dbs/libs.db] } {
|
| 230 |
+
## split_db is true
|
| 231 |
+
write_db -data design -file dbs/export.db
|
| 232 |
+
} else {
|
| 233 |
+
write_db -data all -file dbs/export.db
|
| 234 |
+
}
|
| 235 |
+
nrf_utils::write_reports $MGC_flowStage reports 100
|
| 236 |
+
|
| 237 |
+
# Propagate power and grounds and output power netlist
|
| 238 |
+
|
| 239 |
+
if { [info exists MGC_no_exit] && $MGC_no_exit eq "true" } {
|
| 240 |
+
fk_msg -type info "Because Nitro is not being exited, supply nets are not propagated and power netlist is not output by default.\n"
|
| 241 |
+
} else {
|
| 242 |
+
propagate_power_and_ground_nets
|
| 243 |
+
write_verilog -file $dataDir/${design}.power.v.gz -power true -well_connections true
|
| 244 |
+
# exit
|
| 245 |
+
}
|
| 246 |
+
|
abdelazeem201_ASIC-Design-Roadmap/mentor_scripts/createpathgroup.tcl
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set unq_input_list [all_inputs]
|
| 2 |
+
foreach_in_collection unq_clock_element [all_clocks] {
|
| 3 |
+
set unq_clock_name [get_port $unq_clock_element]
|
| 4 |
+
set unq_input_list [remove_from_collection $unq_input_list $unq_clock_name]
|
| 5 |
+
}
|
| 6 |
+
group_path -name f2f -from [all_registers] -to [all_registers] -critical_range 0.7
|
| 7 |
+
group_path -name i2f -from $unq_input_list -to [all_registers] -critical_range 0.7
|
| 8 |
+
group_path -name f2o -from [all_registers] -to [all_outputs] -critical_range 0.7
|
| 9 |
+
group_path -name i2o -from $unq_input_list -to [all_outputs] -critical_range 0.7
|