bring tileable gsb builder for rr_graph online
This commit is contained in:
parent
4455615980
commit
646ee90937
|
@ -0,0 +1,16 @@
|
|||
#ifndef CLB2CLB_DIRECTS_H
|
||||
#define CLB2CLB_DIRECTS_H
|
||||
|
||||
#include "physical_types.h"
|
||||
|
||||
struct t_clb_to_clb_directs {
|
||||
t_physical_tile_type_ptr from_clb_type;
|
||||
int from_clb_pin_start_index;
|
||||
int from_clb_pin_end_index;
|
||||
t_physical_tile_type_ptr to_clb_type;
|
||||
int to_clb_pin_start_index;
|
||||
int to_clb_pin_end_index;
|
||||
int switch_index; //The switch type used by this direct connection
|
||||
};
|
||||
|
||||
#endif
|
|
@ -41,6 +41,8 @@
|
|||
#include "rr_graph_obj_util.h"
|
||||
#include "check_rr_graph_obj.h"
|
||||
|
||||
#include "clb2clb_directs.h"
|
||||
|
||||
//#define VERBOSE
|
||||
|
||||
struct t_mux {
|
||||
|
@ -55,16 +57,6 @@ struct t_mux_size_distribution {
|
|||
t_mux_size_distribution* next;
|
||||
};
|
||||
|
||||
struct t_clb_to_clb_directs {
|
||||
t_physical_tile_type_ptr from_clb_type;
|
||||
int from_clb_pin_start_index;
|
||||
int from_clb_pin_end_index;
|
||||
t_physical_tile_type_ptr to_clb_type;
|
||||
int to_clb_pin_start_index;
|
||||
int to_clb_pin_end_index;
|
||||
int switch_index; //The switch type used by this direct connection
|
||||
};
|
||||
|
||||
struct t_pin_loc {
|
||||
int pin_index;
|
||||
int width_offset;
|
||||
|
|
|
@ -127,8 +127,8 @@ std::vector<RRSegmentId> RRChan::get_segment_ids() const {
|
|||
}
|
||||
|
||||
/* Get a list of nodes whose segment_id is specified */
|
||||
std::vector<RRNodeId> RRChan::get_node_ids_by_segment_ids(const RRSegmentId& seg_id) const {
|
||||
std::vector<RRNodeId> node_list;
|
||||
std::vector<size_t> RRChan::get_node_ids_by_segment_ids(const RRSegmentId& seg_id) const {
|
||||
std::vector<size_t> node_list;
|
||||
|
||||
/* make sure a clean start */
|
||||
node_list.clear();
|
||||
|
@ -137,7 +137,7 @@ std::vector<RRNodeId> RRChan::get_node_ids_by_segment_ids(const RRSegmentId& seg
|
|||
for (size_t inode = 0; inode < get_chan_width(); ++inode) {
|
||||
/* Try to find the node_segment id in the list */
|
||||
if ( seg_id == node_segments_[inode] ) {
|
||||
node_list.push_back(nodes_[inode]);
|
||||
node_list.push_back(inode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class RRChan {
|
|||
RRSegmentId get_node_segment(const size_t& track_num) const;
|
||||
bool is_mirror(const RRGraph& rr_graph, const RRChan& cand) const; /* evaluate if two RR_chan is mirror to each other */
|
||||
std::vector<RRSegmentId> get_segment_ids() const; /* Get a list of segments used in this routing channel */
|
||||
std::vector<RRNodeId> get_node_ids_by_segment_ids(const RRSegmentId& seg_id) const; /* Get a list of segments used in this routing channel */
|
||||
std::vector<size_t> get_node_ids_by_segment_ids(const RRSegmentId& seg_id) const; /* Get a list of segments used in this routing channel */
|
||||
public: /* Mutators */
|
||||
/* copy */
|
||||
void set(const RRChan&);
|
||||
|
|
|
@ -117,7 +117,7 @@ std::vector<RRSegmentId> RRGSB::get_chan_segment_ids(const e_side& side) const {
|
|||
}
|
||||
|
||||
/* Get a list of rr_nodes whose sed_id is specified */
|
||||
std::vector<RRNodeId> RRGSB::get_chan_node_ids_by_segment_ids(const e_side& side,
|
||||
std::vector<size_t> RRGSB::get_chan_node_ids_by_segment_ids(const e_side& side,
|
||||
const RRSegmentId& seg_id) const {
|
||||
return chan_node_[size_t(side)].get_node_ids_by_segment_ids(seg_id);
|
||||
}
|
||||
|
|
|
@ -77,8 +77,8 @@ class RRGSB {
|
|||
std::vector<RRSegmentId> get_chan_segment_ids(const e_side& side) const;
|
||||
|
||||
/* Get a list of segments used in this routing channel */
|
||||
std::vector<RRNodeId> get_chan_node_ids_by_segment_ids(const e_side& side,
|
||||
const RRSegmentId& seg_id) const;
|
||||
std::vector<size_t> get_chan_node_ids_by_segment_ids(const e_side& side,
|
||||
const RRSegmentId& seg_id) const;
|
||||
|
||||
/* get a rr_node at a given side and track_id */
|
||||
RRNodeId get_chan_node(const e_side& side, const size_t& track_id) const;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,80 @@
|
|||
#ifndef TILEABLE_RR_GRAPH_GSB_H
|
||||
#define TILEABLE_RR_GRAPH_GSB_H
|
||||
|
||||
/********************************************************************
|
||||
* Include header files that are required by function declaration
|
||||
*******************************************************************/
|
||||
#include <vector>
|
||||
|
||||
#include "vtr_vector.h"
|
||||
#include "vtr_geometry.h"
|
||||
|
||||
#include "physical_types.h"
|
||||
#include "device_grid.h"
|
||||
|
||||
#include "rr_gsb.h"
|
||||
#include "rr_graph_obj.h"
|
||||
#include "clb2clb_directs.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
*******************************************************************/
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
/************************************************************************
|
||||
* Data stuctures related to the functions
|
||||
***********************************************************************/
|
||||
typedef std::vector<std::vector<std::vector<RRNodeId>>> t_track2track_map;
|
||||
typedef std::vector<std::vector<std::vector<RRNodeId>>> t_track2pin_map;
|
||||
typedef std::vector<std::vector<std::vector<RRNodeId>>> t_pin2track_map;
|
||||
|
||||
/************************************************************************
|
||||
* Functions
|
||||
***********************************************************************/
|
||||
t_track2track_map build_gsb_track_to_track_map(const RRGraph& rr_graph,
|
||||
const RRGSB& rr_gsb,
|
||||
const e_switch_block_type& sb_type,
|
||||
const int& Fs,
|
||||
const e_switch_block_type& sb_subtype,
|
||||
const int& subFs,
|
||||
const bool& wire_opposite_side,
|
||||
const std::vector<t_segment_inf>& segment_inf);
|
||||
|
||||
RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
|
||||
const RRGraph& rr_graph,
|
||||
const std::vector<size_t>& device_chan_width,
|
||||
const std::vector<t_segment_inf>& segment_inf,
|
||||
const vtr::Point<size_t>& gsb_coordinate);
|
||||
|
||||
void build_edges_for_one_tileable_rr_gsb(RRGraph& rr_graph,
|
||||
const RRGSB& rr_gsb,
|
||||
const t_track2pin_map& track2ipin_map,
|
||||
const t_pin2track_map& opin2track_map,
|
||||
const t_track2track_map& track2track_map,
|
||||
const vtr::vector<RRNodeId, RRSwitchId> rr_node_driver_switches);
|
||||
|
||||
t_track2pin_map build_gsb_track_to_ipin_map(const RRGraph& rr_graph,
|
||||
const RRGSB& rr_gsb,
|
||||
const DeviceGrid& grids,
|
||||
const std::vector<t_segment_inf>& segment_inf,
|
||||
int** Fc_in);
|
||||
|
||||
t_pin2track_map build_gsb_opin_to_track_map(const RRGraph& rr_graph,
|
||||
const RRGSB& rr_gsb,
|
||||
const DeviceGrid& grids,
|
||||
const std::vector<t_segment_inf>& segment_inf,
|
||||
int** Fc_out);
|
||||
|
||||
void build_direct_connections_for_one_gsb(RRGraph& rr_graph,
|
||||
const DeviceGrid& grids,
|
||||
const vtr::Point<size_t>& from_grid_coordinate,
|
||||
const RRSwitchId& delayless_switch,
|
||||
const std::vector<t_direct_inf>& directs,
|
||||
const std::vector<t_clb_to_clb_directs>& clb_to_clb_directs);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue