2019-09-16 18:35:51 -05:00
|
|
|
/***********************************************
|
|
|
|
* Header file for verilog_routing.cpp
|
|
|
|
**********************************************/
|
2019-06-08 21:11:22 -05:00
|
|
|
#ifndef VERILOG_ROUTING_H
|
|
|
|
#define VERILOG_ROUTING_H
|
2019-09-16 18:35:51 -05:00
|
|
|
|
|
|
|
/* Include other header files which are dependency on the function declared below */
|
2019-09-17 21:40:26 -05:00
|
|
|
#include "mux_library.h"
|
2019-09-16 18:35:51 -05:00
|
|
|
#include "module_manager.h"
|
2019-10-15 17:08:51 -05:00
|
|
|
#include "rr_blocks.h"
|
2019-09-16 18:35:51 -05:00
|
|
|
|
2019-04-26 13:23:47 -05:00
|
|
|
void dump_verilog_routing_chan_subckt(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
char* verilog_dir,
|
|
|
|
char* subckt_dir,
|
|
|
|
int x, int y,
|
|
|
|
t_rr_type chan_type,
|
|
|
|
int LL_num_rr_nodes, t_rr_node* LL_rr_node,
|
|
|
|
t_ivec*** LL_rr_node_indices,
|
|
|
|
t_rr_indexed_data* LL_rr_indexed_data,
|
|
|
|
int num_segment, t_segment_inf* segments,
|
|
|
|
t_syn_verilog_opts fpga_verilog_opts);
|
|
|
|
|
|
|
|
void dump_verilog_grid_side_pin_with_given_index(FILE* fp, t_rr_type pin_type,
|
|
|
|
int pin_index, int side,
|
|
|
|
int x, int y,
|
2019-08-08 16:17:43 -05:00
|
|
|
int unique_x, int unique_y, /* If explicit, needs the coordinates of the mirror*/
|
2019-07-02 11:10:48 -05:00
|
|
|
boolean dump_port_type,
|
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
void dump_verilog_grid_side_pins(FILE* fp,
|
|
|
|
t_rr_type pin_type, int x, int y, int side,
|
|
|
|
boolean dump_port_type);
|
|
|
|
|
|
|
|
void dump_verilog_switch_box_chan_port(FILE* fp,
|
|
|
|
t_sb* cur_sb_info,
|
|
|
|
int chan_side,
|
|
|
|
t_rr_node* cur_rr_node,
|
|
|
|
enum PORTS cur_rr_node_direction);
|
|
|
|
|
2019-05-24 17:29:17 -05:00
|
|
|
void dump_verilog_switch_box_short_interc(FILE* fp,
|
2019-04-26 13:23:47 -05:00
|
|
|
t_sb* cur_sb_info,
|
|
|
|
int chan_side,
|
|
|
|
t_rr_node* cur_rr_node,
|
|
|
|
int actual_fan_in,
|
2019-07-02 11:10:48 -05:00
|
|
|
t_rr_node* drive_rr_node,
|
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
void dump_verilog_switch_box_mux(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
FILE* fp,
|
|
|
|
t_sb* cur_sb_info,
|
|
|
|
int chan_side,
|
|
|
|
t_rr_node* cur_rr_node,
|
|
|
|
int mux_size,
|
|
|
|
t_rr_node** drive_rr_nodes,
|
2019-06-27 11:29:57 -05:00
|
|
|
int switch_index,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
int count_verilog_switch_box_interc_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_sb cur_sb_info, int chan_side,
|
|
|
|
t_rr_node* cur_rr_node);
|
|
|
|
|
|
|
|
int count_verilog_switch_box_interc_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_sb cur_sb_info, int chan_side,
|
|
|
|
t_rr_node* cur_rr_node);
|
|
|
|
|
|
|
|
void dump_verilog_switch_box_interc(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
FILE* fp,
|
|
|
|
t_sb* cur_sb_info,
|
|
|
|
int chan_side,
|
2019-06-27 11:29:57 -05:00
|
|
|
t_rr_node* cur_rr_node,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
int count_verilog_switch_box_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_sb cur_sb_info);
|
|
|
|
|
|
|
|
int count_verilog_switch_box_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_sb cur_sb_info);
|
|
|
|
|
|
|
|
void dump_verilog_routing_switch_box_subckt(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
char* verilog_dir, char* subckt_dir,
|
|
|
|
t_sb* cur_sb_info,
|
|
|
|
int LL_num_rr_nodes, t_rr_node* LL_rr_node,
|
|
|
|
t_ivec*** LL_rr_node_indices,
|
2019-05-10 11:21:06 -05:00
|
|
|
t_syn_verilog_opts fpga_verilog_opts,
|
2019-06-27 11:29:57 -05:00
|
|
|
boolean compact_routing_hierarchy,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
|
2019-05-24 17:29:17 -05:00
|
|
|
void dump_verilog_connection_box_short_interc(FILE* fp,
|
2019-04-26 13:23:47 -05:00
|
|
|
t_cb* cur_cb_info,
|
2019-07-02 11:10:48 -05:00
|
|
|
t_rr_node* src_rr_node,
|
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
void dump_verilog_connection_box_mux(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
FILE* fp,
|
|
|
|
t_cb* cur_cb_info,
|
2019-06-27 11:29:57 -05:00
|
|
|
t_rr_node* src_rr_node,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
void dump_verilog_connection_box_interc(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
FILE* fp,
|
|
|
|
t_cb* cur_cb_info,
|
2019-06-27 11:29:57 -05:00
|
|
|
t_rr_node* src_rr_node,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
int count_verilog_connection_box_interc_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_rr_node* cur_rr_node);
|
|
|
|
|
2019-06-08 21:11:22 -05:00
|
|
|
int count_verilog_connection_box_one_side_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
2019-06-10 13:50:10 -05:00
|
|
|
const RRGSB& rr_gsb, enum e_side cb_side);
|
2019-06-08 21:11:22 -05:00
|
|
|
|
2019-04-26 13:23:47 -05:00
|
|
|
int count_verilog_connection_box_interc_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_rr_node* cur_rr_node);
|
|
|
|
|
2019-06-08 21:11:22 -05:00
|
|
|
int count_verilog_connection_box_one_side_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
2019-06-10 13:50:10 -05:00
|
|
|
const RRGSB& rr_gsb, enum e_side cb_side);
|
2019-06-08 21:11:22 -05:00
|
|
|
|
2019-04-26 13:23:47 -05:00
|
|
|
int count_verilog_connection_box_one_side_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
int num_ipin_rr_nodes,
|
|
|
|
t_rr_node** ipin_rr_node);
|
|
|
|
|
2019-06-08 21:11:22 -05:00
|
|
|
int count_verilog_connection_box_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
2019-06-10 13:50:10 -05:00
|
|
|
const RRGSB& rr_gsb, t_rr_type cb_type);
|
2019-06-08 21:11:22 -05:00
|
|
|
|
2019-04-26 13:23:47 -05:00
|
|
|
int count_verilog_connection_box_one_side_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
int num_ipin_rr_nodes,
|
|
|
|
t_rr_node** ipin_rr_node);
|
|
|
|
|
2019-06-08 21:11:22 -05:00
|
|
|
int count_verilog_connection_box_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
2019-06-10 13:50:10 -05:00
|
|
|
const RRGSB& rr_gsb, t_rr_type cb_type);
|
2019-06-08 21:11:22 -05:00
|
|
|
|
2019-04-26 13:23:47 -05:00
|
|
|
int count_verilog_connection_box_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_cb* cur_cb_info);
|
|
|
|
|
|
|
|
int count_verilog_connection_box_reserved_conf_bits(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
t_cb* cur_cb_info);
|
|
|
|
|
|
|
|
void dump_verilog_routing_connection_box_subckt(t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
char* verilog_dir, char* subckt_dir,
|
|
|
|
t_cb* cur_cb_info,
|
2019-06-27 11:29:57 -05:00
|
|
|
boolean compact_routing_hierarchy,
|
2019-07-01 12:27:48 -05:00
|
|
|
bool is_explicit_mapping);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
2019-09-16 18:35:51 -05:00
|
|
|
void print_verilog_routing_resources(ModuleManager& module_manager,
|
|
|
|
t_sram_orgz_info* cur_sram_orgz_info,
|
|
|
|
char* verilog_dir,
|
|
|
|
char* subckt_dir,
|
|
|
|
const t_arch& arch,
|
|
|
|
const t_det_routing_arch& routing_arch,
|
|
|
|
int LL_num_rr_nodes, t_rr_node* LL_rr_node,
|
|
|
|
t_ivec*** LL_rr_node_indices,
|
|
|
|
t_rr_indexed_data* LL_rr_indexed_data,
|
|
|
|
const t_fpga_spice_opts& FPGA_SPICE_Opts);
|
2019-04-26 13:23:47 -05:00
|
|
|
|
2019-10-23 12:46:55 -05:00
|
|
|
void print_verilog_flatten_routing_modules(ModuleManager& module_manager,
|
|
|
|
const DeviceRRGSB& L_device_rr_gsb,
|
|
|
|
const t_det_routing_arch& routing_arch,
|
|
|
|
const std::string& verilog_dir,
|
|
|
|
const std::string& subckt_dir,
|
|
|
|
const bool& use_explicit_port_map);
|
|
|
|
|
|
|
|
void print_verilog_unique_routing_modules(ModuleManager& module_manager,
|
|
|
|
const DeviceRRGSB& L_device_rr_gsb,
|
|
|
|
const t_det_routing_arch& routing_arch,
|
|
|
|
const std::string& verilog_dir,
|
|
|
|
const std::string& subckt_dir,
|
|
|
|
const bool& use_explicit_port_map);
|
|
|
|
|
2019-06-08 21:11:22 -05:00
|
|
|
#endif
|