[topgen] Don't copy data from block into instances

There's no need to do this, as long as we can look up the block
quickly. The nicest way to do that would be to add a "block" field to
the instance dictionary, but that would be enormous when we dumped
top_earlgrey.gen.hjson (I tried it - it added 32k lines!), so we just
pass around a dictionary mapping block name to the IpBlock object
instead.

Note that we do still have to copy inter_signal_list, because that
gets annotated (through references; it's not very easy to trace) by
the code in intermodule.py.

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index 134b964..c73a645 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -493,74 +493,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list:
-      [
-        {
-          name: rx
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: tx
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: tx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_frame_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_break_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_parity_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -597,74 +530,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list:
-      [
-        {
-          name: rx
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: tx
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: tx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_frame_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_break_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_parity_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -701,74 +567,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list:
-      [
-        {
-          name: rx
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: tx
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: tx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_frame_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_break_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_parity_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -805,74 +604,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list:
-      [
-        {
-          name: rx
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: tx
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: tx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_frame_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_break_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_parity_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -909,32 +641,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: gpio
-          width: 32
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: gpio
-          width: 32
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -973,69 +680,7 @@
       }
       domain: "0"
       size: 0x2000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sd
-          width: 4
-          type: inout
-        }
-      ]
-      available_input_list:
-      [
-        {
-          name: sck
-          width: 1
-          type: input
-        }
-        {
-          name: csb
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: rxf
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rxlvl
-          width: 1
-          type: interrupt
-        }
-        {
-          name: txlvl
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rxerr
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rxoverflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: txunderflow
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "true"
-      scan_reset: "true"
       inter_signal_list:
       [
         {
@@ -1075,49 +720,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sd
-          width: 4
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list:
-      [
-        {
-          name: sck
-          width: 1
-          type: output
-        }
-        {
-          name: csb
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: error
-          width: 1
-          type: interrupt
-        }
-        {
-          name: spi_event
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1157,49 +760,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sd
-          width: 4
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list:
-      [
-        {
-          name: sck
-          width: 1
-          type: output
-        }
-        {
-          name: csb
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: error
-          width: 1
-          type: interrupt
-        }
-        {
-          name: spi_event
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1236,112 +797,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sda
-          width: 1
-          type: inout
-        }
-        {
-          name: scl
-          width: 1
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: fmt_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: fmt_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: nak
-          width: 1
-          type: interrupt
-        }
-        {
-          name: scl_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: stretch_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_unstable
-          width: 1
-          type: interrupt
-        }
-        {
-          name: trans_complete
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_nonempty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: acq_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: ack_stop
-          width: 1
-          type: interrupt
-        }
-        {
-          name: host_timeout
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1378,112 +834,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sda
-          width: 1
-          type: inout
-        }
-        {
-          name: scl
-          width: 1
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: fmt_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: fmt_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: nak
-          width: 1
-          type: interrupt
-        }
-        {
-          name: scl_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: stretch_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_unstable
-          width: 1
-          type: interrupt
-        }
-        {
-          name: trans_complete
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_nonempty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: acq_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: ack_stop
-          width: 1
-          type: interrupt
-        }
-        {
-          name: host_timeout
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1520,112 +871,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: sda
-          width: 1
-          type: inout
-        }
-        {
-          name: scl
-          width: 1
-          type: inout
-        }
-      ]
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: fmt_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_watermark
-          width: 1
-          type: interrupt
-        }
-        {
-          name: fmt_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: nak
-          width: 1
-          type: interrupt
-        }
-        {
-          name: scl_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_interference
-          width: 1
-          type: interrupt
-        }
-        {
-          name: stretch_timeout
-          width: 1
-          type: interrupt
-        }
-        {
-          name: sda_unstable
-          width: 1
-          type: interrupt
-        }
-        {
-          name: trans_complete
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_nonempty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: tx_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: acq_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: ack_stop
-          width: 1
-          type: interrupt
-        }
-        {
-          name: host_timeout
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1662,52 +908,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list:
-      [
-        {
-          name: pda0_tx
-          width: 1
-          type: output
-        }
-        {
-          name: pcl0_tx
-          width: 1
-          type: output
-        }
-        {
-          name: pda1_tx
-          width: 1
-          type: output
-        }
-        {
-          name: pcl1_tx
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: done_ch0
-          width: 1
-          type: interrupt
-        }
-        {
-          name: done_ch1
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1744,25 +945,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: timer_expired_0_0
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -1809,156 +992,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list:
-      [
-        {
-          name: d
-          width: 1
-          type: inout
-        }
-        {
-          name: dp
-          width: 1
-          type: inout
-        }
-        {
-          name: dn
-          width: 1
-          type: inout
-        }
-      ]
-      available_input_list:
-      [
-        {
-          name: sense
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: se0
-          width: 1
-          type: output
-        }
-        {
-          name: dp_pullup
-          width: 1
-          type: output
-        }
-        {
-          name: dn_pullup
-          width: 1
-          type: output
-        }
-        {
-          name: tx_mode_se
-          width: 1
-          type: output
-        }
-        {
-          name: suspend
-          width: 1
-          type: output
-        }
-      ]
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: pkt_received
-          width: 1
-          type: interrupt
-        }
-        {
-          name: pkt_sent
-          width: 1
-          type: interrupt
-        }
-        {
-          name: disconnected
-          width: 1
-          type: interrupt
-        }
-        {
-          name: host_lost
-          width: 1
-          type: interrupt
-        }
-        {
-          name: link_reset
-          width: 1
-          type: interrupt
-        }
-        {
-          name: link_suspend
-          width: 1
-          type: interrupt
-        }
-        {
-          name: link_resume
-          width: 1
-          type: interrupt
-        }
-        {
-          name: av_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_full
-          width: 1
-          type: interrupt
-        }
-        {
-          name: av_overflow
-          width: 1
-          type: interrupt
-        }
-        {
-          name: link_in_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_crc_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_pid_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rx_bitstuff_err
-          width: 1
-          type: interrupt
-        }
-        {
-          name: frame
-          width: 1
-          type: interrupt
-        }
-        {
-          name: connected
-          width: 1
-          type: interrupt
-        }
-        {
-          name: link_out_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -2086,11 +1120,6 @@
       }
       domain: "0"
       size: 0x4000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -2122,38 +1151,6 @@
           randwidth: 240
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: otp_operation_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: otp_error
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal_macro_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: fatal_check_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -2403,11 +1400,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -2441,26 +1433,6 @@
           randwidth: 64
         }
       ]
-      interrupt_list: []
-      alert_list:
-      [
-        {
-          name: fatal_prog_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: fatal_state_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "true"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -2874,11 +1846,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -2902,34 +1869,6 @@
           randwidth: 160
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: classa
-          width: 1
-          type: interrupt
-        }
-        {
-          name: classb
-          width: 1
-          type: interrupt
-        }
-        {
-          name: classc
-          width: 1
-          type: interrupt
-        }
-        {
-          name: classd
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3024,25 +1963,7 @@
         clk_slow_i: clkmgr_aon_clocks.clk_aon_powerup
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: wakeup
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3258,18 +2179,7 @@
         clk_io_div4_i: clkmgr_aon_clocks.clk_io_div4_powerup
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "true"
-      scan_reset: "true"
       inter_signal_list:
       [
         {
@@ -3385,18 +2295,7 @@
         clk_i: clkmgr_aon_clocks.clk_io_div4_powerup
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "true"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3572,28 +2471,7 @@
         clk_aon_i: clkmgr_aon_clocks.clk_aon_powerup
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list: []
-      wakeup_list:
-      [
-        {
-          name: aon_wkup_req
-          width: "1"
-        }
-        {
-          name: usb_wkup_req
-          width: "1"
-        }
-      ]
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3812,42 +2690,7 @@
         clk_aon_i: clkmgr_aon_clocks.clk_aon_timers
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: wkup_timer_expired
-          width: 1
-          type: interrupt
-        }
-        {
-          name: wdog_timer_bark
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list:
-      [
-        {
-          name: aon_timer_wkup_req
-          width: "1"
-        }
-      ]
-      reset_request_list:
-      [
-        {
-          name: aon_timer_rst_req
-          width: "1"
-        }
-      ]
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3937,18 +2780,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -3987,62 +2819,7 @@
         clk_i: clkmgr_aon_clocks.clk_io_div4_secure
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list:
-      [
-        {
-          name: recov_as
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_cg
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_gd
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_ts_hi
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_ts_lo
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_ls
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: recov_ot
-          type: alert
-          width: 1
-          async: "0"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4108,11 +2885,6 @@
         clk_otp_i: clkmgr_aon_clocks.clk_io_div4_peri
       }
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -4144,26 +2916,6 @@
           name_top: SramCtrlRetAonInstrExec
         }
       ]
-      interrupt_list: []
-      alert_list:
-      [
-        {
-          name: fatal_intg_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-        {
-          name: fatal_parity_error
-          type: alert
-          width: 1
-          async: "0"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4291,35 +3043,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list:
-      [
-        {
-          name: tck
-          width: 1
-          type: input
-        }
-        {
-          name: tms
-          width: 1
-          type: input
-        }
-        {
-          name: tdi
-          width: 1
-          type: input
-        }
-      ]
-      available_output_list:
-      [
-        {
-          name: tdo
-          width: 1
-          type: output
-        }
-      ]
       param_list:
       [
         {
@@ -4363,59 +3086,6 @@
           randwidth: 160
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: prog_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: prog_lvl
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rd_full
-          width: 1
-          type: interrupt
-        }
-        {
-          name: rd_lvl
-          width: 1
-          type: interrupt
-        }
-        {
-          name: op_done
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: recov_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: recov_mp_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: recov_ecc_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4607,18 +3277,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list: []
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4658,11 +3317,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -4780,26 +3434,6 @@
           randwidth: 160
         }
       ]
-      interrupt_list: []
-      alert_list:
-      [
-        {
-          name: recov_ctrl_update_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: fatal_fault
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4872,35 +3506,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: hmac_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: fifo_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: hmac_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -4952,11 +3558,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -4989,29 +3590,6 @@
           name_top: KmacReuseShare
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: kmac_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: fifo_empty
-          width: 1
-          type: interrupt
-        }
-        {
-          name: kmac_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list: []
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5099,11 +3677,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -5237,33 +3810,6 @@
           randwidth: 256
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: op_done
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal_fault_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: recov_operation_err
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5419,11 +3965,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -5435,42 +3976,6 @@
           name_top: CsrngSBoxImpl
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: cs_cmd_req_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: cs_entropy_req
-          width: 1
-          type: interrupt
-        }
-        {
-          name: cs_hw_inst_exc
-          width: 1
-          type: interrupt
-        }
-        {
-          name: cs_fatal_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal_alert
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5558,49 +4063,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: es_entropy_valid
-          width: 1
-          type: interrupt
-        }
-        {
-          name: es_health_test_failed
-          width: 1
-          type: interrupt
-        }
-        {
-          name: es_fatal_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: recov_alert
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: fatal_alert
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5685,38 +4148,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: edn_cmd_req_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: edn_fatal_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal_alert
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5788,38 +4220,7 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list: []
-      interrupt_list:
-      [
-        {
-          name: edn_cmd_req_done
-          width: 1
-          type: interrupt
-        }
-        {
-          name: edn_fatal_err
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal_alert
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -5894,11 +4295,6 @@
       }
       domain: "0"
       size: 0x1000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -5930,26 +4326,6 @@
           name_top: SramCtrlMainInstrExec
         }
       ]
-      interrupt_list: []
-      alert_list:
-      [
-        {
-          name: fatal_intg_error
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: fatal_parity_error
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -6076,11 +4452,6 @@
       }
       domain: "0"
       size: 0x10000
-      bus_device: tlul
-      bus_host: none
-      available_inout_list: []
-      available_input_list: []
-      available_output_list: []
       param_list:
       [
         {
@@ -6092,33 +4463,6 @@
           name_top: OtbnRegFile
         }
       ]
-      interrupt_list:
-      [
-        {
-          name: done
-          width: 1
-          type: interrupt
-        }
-      ]
-      alert_list:
-      [
-        {
-          name: fatal
-          type: alert
-          width: 1
-          async: "1"
-        }
-        {
-          name: recov
-          type: alert
-          width: 1
-          async: "1"
-        }
-      ]
-      wakeup_list: []
-      reset_request_list: []
-      scan: "false"
-      scan_reset: "false"
       inter_signal_list:
       [
         {
@@ -9394,204 +7738,204 @@
   [
     {
       name: aes_recov_ctrl_update_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: aes
     }
     {
       name: aes_fatal_fault
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: aes
     }
     {
       name: otbn_fatal
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: otbn
     }
     {
       name: otbn_recov
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: otbn
     }
     {
       name: sensor_ctrl_aon_recov_as
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_cg
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_gd
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_ts_hi
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_ts_lo
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_ls
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: sensor_ctrl_aon_recov_ot
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sensor_ctrl_aon
     }
     {
       name: keymgr_fatal_fault_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: keymgr
     }
     {
       name: keymgr_recov_operation_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: keymgr
     }
     {
       name: otp_ctrl_fatal_macro_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: otp_ctrl
     }
     {
       name: otp_ctrl_fatal_check_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: otp_ctrl
     }
     {
       name: lc_ctrl_fatal_prog_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: lc_ctrl
     }
     {
       name: lc_ctrl_fatal_state_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: lc_ctrl
     }
     {
       name: entropy_src_recov_alert
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: entropy_src
     }
     {
       name: entropy_src_fatal_alert
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: entropy_src
     }
     {
       name: csrng_fatal_alert
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: csrng
     }
     {
       name: edn0_fatal_alert
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: edn0
     }
     {
       name: edn1_fatal_alert
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: edn1
     }
     {
       name: sram_ctrl_main_fatal_intg_error
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: sram_ctrl_main
     }
     {
       name: sram_ctrl_main_fatal_parity_error
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: sram_ctrl_main
     }
     {
       name: sram_ctrl_ret_aon_fatal_intg_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sram_ctrl_ret_aon
     }
     {
       name: sram_ctrl_ret_aon_fatal_parity_error
-      type: alert
       width: 1
+      type: alert
       async: "0"
       module_name: sram_ctrl_ret_aon
     }
     {
       name: flash_ctrl_recov_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: flash_ctrl
     }
     {
       name: flash_ctrl_recov_mp_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: flash_ctrl
     }
     {
       name: flash_ctrl_recov_ecc_err
-      type: alert
       width: 1
+      type: alert
       async: "1"
       module_name: flash_ctrl
     }
diff --git a/hw/top_earlgrey/data/top_earlgrey.sv.tpl b/hw/top_earlgrey/data/top_earlgrey.sv.tpl
index 0a762fd..38e1357 100644
--- a/hw/top_earlgrey/data/top_earlgrey.sv.tpl
+++ b/hw/top_earlgrey/data/top_earlgrey.sv.tpl
@@ -123,24 +123,17 @@
   % if not lib.is_inst(m):
 <% continue %>
   % endif
+<%
+  block = name_to_block[m['type']]
+  inouts, inputs, outputs = block.xputs
+%>\
   // ${m["name"]}
-  % for p_in in m["available_input_list"] + m["available_inout_list"]:
-    ## assume it passed validate and have available input list always
-    % if "width" in p_in:
-  logic ${lib.bitarray(int(p_in["width"]), max_sigwidth)} cio_${m["name"]}_${p_in["name"]}_p2d;
-    % else:
-  logic ${lib.bitarray(1, max_sigwidth)} cio_${m["name"]}_${p_in["name"]}_p2d;
-    % endif
+  % for p_in in inputs + inouts:
+  logic ${lib.bitarray(p_in.bits.width(), max_sigwidth)} cio_${m["name"]}_${p_in.name}_p2d;
   % endfor
-  % for p_out in m["available_output_list"] + m["available_inout_list"]:
-    ## assume it passed validate and have available output list always
-    % if "width" in p_out:
-  logic ${lib.bitarray(int(p_out["width"]), max_sigwidth)} cio_${m["name"]}_${p_out["name"]}_d2p;
-  logic ${lib.bitarray(int(p_out["width"]), max_sigwidth)} cio_${m["name"]}_${p_out["name"]}_en_d2p;
-    % else:
-  logic ${lib.bitarray(1, max_sigwidth)} cio_${m["name"]}_${p_out["name"]}_d2p;
-  logic ${lib.bitarray(1, max_sigwidth)} cio_${m["name"]}_${p_out["name"]}_en_d2p;
-    % endif
+  % for p_out in outputs + inouts:
+  logic ${lib.bitarray(p_out.bits.width(), max_sigwidth)} cio_${m["name"]}_${p_out.name}_d2p;
+  logic ${lib.bitarray(p_out.bits.width(), max_sigwidth)} cio_${m["name"]}_${p_out.name}_en_d2p;
   % endfor
 % endfor
 
@@ -153,14 +146,17 @@
   logic [${interrupt_num-1}:0]  intr_vector;
   // Interrupt source list
 % for m in top["module"]:
+<%
+  block = name_to_block[m['type']]
+%>\
     % if not lib.is_inst(m):
 <% continue %>
     % endif
-    % for intr in m["interrupt_list"] if "interrupt_list" in m else []:
-        % if "width" in intr and int(intr["width"]) != 1:
-  logic [${int(intr["width"])-1}:0] intr_${m["name"]}_${intr["name"]};
+    % for intr in block.interrupts:
+        % if intr.bits.width() != 1:
+  logic [${intr.bits.width()-1}:0] intr_${m["name"]}_${intr.name};
         % else:
-  logic intr_${m["name"]}_${intr["name"]};
+  logic intr_${m["name"]}_${intr.name};
         % endif
     % endfor
 % endfor
@@ -576,18 +572,13 @@
 if not lib.is_inst(m):
      continue
 
-port_list = m["available_input_list"] + m["available_output_list"] + m["available_inout_list"]
-if len(port_list) == 0:
-    max_sigwidth = 0
-else:
-    max_sigwidth = max([len(x["name"]) for x
-      in m["available_input_list"] + m["available_inout_list"] + m["available_output_list"]])
+block = name_to_block[m['type']]
+inouts, inputs, outputs = block.xputs
 
-if len(m["interrupt_list"]) == 0:
-    max_intrwidth = 0
-else:
-    max_intrwidth = max([len(x["name"]) for x
-        in m["interrupt_list"]])
+port_list = inputs + outputs + inouts
+max_sigwidth = max(len(x.name) for x in port_list) if port_list else 0
+max_intrwidth = (max(len(x.name) for x in block.interrupts)
+                 if block.interrupts else 0)
 %>\
   % if m["param_list"]:
   ${m["type"]} #(
@@ -598,46 +589,44 @@
   % else:
   ${m["type"]} u_${m["name"]} (
   % endif
-    % for p_in in m["available_input_list"] + m["available_inout_list"]:
+    % for p_in in inputs + inouts:
       % if loop.first:
 
       // Input
       % endif
-      .${lib.ljust("cio_"+p_in["name"]+"_i",max_sigwidth+9)} (cio_${m["name"]}_${p_in["name"]}_p2d),
+      .${lib.ljust("cio_"+p_in.name+"_i",max_sigwidth+9)} (cio_${m["name"]}_${p_in.name}_p2d),
     % endfor
-    % for p_out in m["available_output_list"] + m["available_inout_list"]:
+    % for p_out in outputs + inouts:
       % if loop.first:
 
       // Output
       % endif
-      .${lib.ljust("cio_"+p_out["name"]+"_o",   max_sigwidth+9)} (cio_${m["name"]}_${p_out["name"]}_d2p),
-      .${lib.ljust("cio_"+p_out["name"]+"_en_o",max_sigwidth+9)} (cio_${m["name"]}_${p_out["name"]}_en_d2p),
+      .${lib.ljust("cio_"+p_out.name+"_o",   max_sigwidth+9)} (cio_${m["name"]}_${p_out.name}_d2p),
+      .${lib.ljust("cio_"+p_out.name+"_en_o",max_sigwidth+9)} (cio_${m["name"]}_${p_out.name}_en_d2p),
     % endfor
-    % for intr in m["interrupt_list"] if "interrupt_list" in m else []:
+    % for intr in block.interrupts:
       % if loop.first:
 
       // Interrupt
       % endif
-      .${lib.ljust("intr_"+intr["name"]+"_o",max_intrwidth+7)} (intr_${m["name"]}_${intr["name"]}),
+      .${lib.ljust("intr_"+intr.name+"_o",max_intrwidth+7)} (intr_${m["name"]}_${intr.name}),
     % endfor
-    % if m["alert_list"]:
+    % if block.alerts:
 <%
-w = sum([x["width"] if "width" in x else 1 for x in m["alert_list"]])
+w = len(block.alerts)
 slice = str(alert_idx+w-1) + ":" + str(alert_idx)
 %>
-      % for alert in m["alert_list"] if "alert_list" in m else []:
-        % for i in range(alert["width"]):
-      // [${alert_idx}]: ${alert["name"]}<% alert_idx += 1 %>
-        % endfor
+      % for alert in block.alerts:
+      // [${alert_idx}]: ${alert.name}<% alert_idx += 1 %>
       % endfor
       .alert_tx_o  ( alert_tx[${slice}] ),
       .alert_rx_i  ( alert_rx[${slice}] ),
     % endif
     ## TODO: Inter-module Connection
-    % if "inter_signal_list" in m:
+    % if m.get('inter_signal_list'):
 
       // Inter-module signals
-      % for sig in m["inter_signal_list"]:
+      % for sig in m['inter_signal_list']:
         ## TODO: handle below condition in lib.py
         % if sig['type'] == "req_rsp":
       .${lib.im_portname(sig,"req")}(${lib.im_netname(sig, "req")}),
@@ -682,10 +671,10 @@
       .alert_rx_o  ( alert_rx ),
       .alert_tx_i  ( alert_tx ),
     % endif
-    % if m["scan"] == "true":
+    % if block.scan:
       .scanmode_i,
     % endif
-    % if m["scan_reset"] == "true":
+    % if block.scan_reset:
       .scan_rst_ni  (scan_rst_ni),
     % endif