目次

UPFを用いたPG設計

shift_unit.v

   …
   input               sleepCon;
   output [`BitBus] shift_out;
   
   m_shift_unit m_shift_unit( .shift_out(shift_out), .shift_a(shift_a), .shift_b(shift_b), .aluop(aluop) );
   …

shift_unit.upf

create_power_domain PD_TOP -include_scope
create_power_domain PD_SHI -elements {m_shift_unit}

create_supply_net VDD -domain PD_TOP
create_supply_net VDD -domain PD_SHI -reuse

create_supply_net VSS -domain PD_TOP
create_supply_net VSSV -domain PD_TOP
create_supply_net VSSV -domain PD_SHI -reuse

set_domain_supply_net PD_TOP -primary_power_net VDD -primary_ground_net VSS
set_domain_supply_net PD_SHI -primary_power_net VDD -primary_ground_net VSSV

create_supply_port VSS -domain PD_TOP -direction in
create_supply_port VDD -domain PD_TOP -direction in

connect_supply_net VDD -ports {VDD}
connect_supply_net VSS -ports {VSS}

create_power_switch SHI_SW -domain PD_TOP \
         -output_supply_port {SW_OUT VSSV} \
         -input_supply_port {SW_IN VSS} \
         -control_port {SW_CTRL sleepCon} \
         -on_state {PW_ON SW_IN {SW_CTRL == 1}}

set_isolation SHI_ISO -domain PD_SHI \
         -isolation_power_net VDD -isolation_ground_net VSS \
         -clamp_value 0 \
         -applies_to outputs
set_isolation_control SHI_ISO -domain PD_SHI \
         -isolation_signal sleepCon \
         -isolation_sense low \
         -location parent

add_port_state VDD \
         -state {VDD_NORM 0.90000}
add_port_state SHI_SW/SW_OUT \
        -state {VSSV_NORM 0.00000}
add_port_state SHI_SW/SW_OUT \
        -state {VSSV_OFF off}
add_port_state VSS \
        -state {VSS_NORM 0.00000}

create_pst TOP_PST -supplies [list SHI_SW/SW_OUT VDD VSS]
add_pst_state SHI_ON -pst TOP_PST -state {VSSV_NORM VDD_NORM VSS_NORM}
add_pst_state SHI_OFF -pst TOP_PST -state {VSSV_OFF VDD_NORM VSS_NORM}

電力ドメインの作成

create_power_domain PD_TOP -include_scope
create_power_domain PD_SHI -elements {m_shift_unit}

供給ネットの作成と設定

create_supply_net VDD -domain PD_TOP
create_supply_net VDD -domain PD_SHI -reuse

create_supply_net VSS -domain PD_TOP
create_supply_net VSSV -domain PD_TOP
create_supply_net VSSV -domain PD_SHI -reuse

set_domain_supply_net PD_TOP -primary_power_net VDD -primary_ground_net VSS
set_domain_supply_net PD_SHI -primary_power_net VDD -primary_ground_net VSSV

供給ポートの作成と接続

create_supply_port VSS -domain PD_TOP -direction in
create_supply_port VDD -domain PD_TOP -direction in

connect_supply_net VDD -ports {VDD}
connect_supply_net VSS -ports {VSS}

Power Switchの設定

create_power_switch SHI_SW -domain PD_TOP \
         -output_supply_port {SW_OUT VSSV} \
         -input_supply_port {SW_IN VSS} \
         -control_port {SW_CTRL sleepCon} \
         -on_state {PW_ON SW_IN {SW_CTRL == 1}}

Isolation Cellの設定

set_isolation SHI_ISO -domain PD_SHI \
         -isolation_power_net VDD -isolation_ground_net VSS \
         -clamp_value 0 \
         -applies_to outputs
set_isolation_control SHI_ISO -domain PD_SHI \
         -isolation_signal sleepCon \
         -isolation_sense low \
         -location parent

Power State Tableの作成

add_port_state VDD \
         -state {VDD_NORM 0.90000}
add_port_state SHI_SW/SW_OUT \
        -state {VSSV_NORM 0.00000}
add_port_state SHI_SW/SW_OUT \
        -state {VSSV_OFF off}
add_port_state VSS \
        -state {VSS_NORM 0.00000}

create_pst TOP_PST -supplies [list SHI_SW/SW_OUT VDD VSS]
add_pst_state SHI_ON -pst TOP_PST -state {VSSV_NORM VDD_NORM VSS_NORM}
add_pst_state SHI_OFF -pst TOP_PST -state {VSSV_OFF VDD_NORM VSS_NORM}

論理合成

load_upf shift_unit.upf
set_voltage 0  -min 0  -object_list VSS
set_voltage 0  -min 0  -object_list VSSV
set_voltage 0.9  -min 0.9  -object_list VDD
compile_ultra -オプション
save_upf SHIFT_UNIT.upf

配置配線

前準備

add_pg_pin_to_db cs203sn_uc_core_*.db -mw_library_name CS203SN -output pgpin_cs203sn_uc_core_*.db
add_pg_pin_to_db cs203sn_uc_nscan_*.db -mw_library_name CS203SN -output pgpin_cs203sn_uc_nscan_*.db

Place & Route

load_upf SHIFT_UNIT.upf
derive_pg_connection -create_nets
derive_pg_connection -reconnect
derive_pg_connection -power_net {VDD} -power_pin {VDD} -cells {*ISO} 
derive_pg_connection -ground_net {VSS} -ground_pin {VSS} -cells {*ISO}
create_voltage_area -power_domain PD_SHI -coordinate {10.5 8.1 55 58.5} -guard_band_x 0 -guard_band_y 0 -is_fixed
map_power_switch SHI_SW -domain PD_TOP -lib_cells {SC27RFPSTAPXH1 SC27RFPSTAPXA1 SC27RFPSTAPXB1 SC27RFPSTAPXC1 SC27RFPSTAPXD1 SC27RFPSTAPXF1}
 create_power_switch_array -lib_cell {SHI_SW} \
                -x_increment 40 -y_increment 1.8 \
                -start_row 0 \
                -start_column 0 \
                -bounding_box {3.5 8.1 6.9 58.5} \
                -prefix "RINGL" \
                -snap_to_row_and_tile \
                -orientation FS \
                -respect hard_blockage
connect_power_switch -mode hfn -source {SLEEPCON} -port_name {MTE} -voltage_area PD_TOP -verbose
または
connect_pin -from {SLEEPCON} -to {RING*/MTE}