Exemplo n.º 1
0
void compute_delay_lookup_tables(struct s_router_opts router_opts,
		struct s_det_routing_arch det_routing_arch, t_segment_inf * segment_inf,
		t_timing_inf timing_inf, t_chan_width_dist chan_width_dist, INP t_direct_inf *directs, 
		INP int num_directs) {

	static struct s_net *original_net; /*this will be used as a pointer to remember what */

	/*the "real" nets in the circuit are. This is    */
	/*required because we are using the net structure */
	/*in these routines to find delays between blocks */
	static struct s_block *original_block; /*same def as original_nets, but for block  */

	static int original_num_nets;
	static int original_num_blocks;
	static int longest_length;

	load_simplified_device();

	alloc_and_assign_internal_structures(&original_net, &original_block,
			&original_num_nets, &original_num_blocks);
	setup_chan_width(router_opts, chan_width_dist);

#ifdef INTERPOSER_BASED_ARCHITECTURE
	/* Change the number of cuts to zero to avoid running the cut routine
	 * at build_rr_graph. This is because placement uses only deltas to estimate
	 * the delay between two points, and having a non-homogeneous chip only
	 * generates noise */
	int temp_num_cuts = num_cuts;
	num_cuts = 0;
#endif

	alloc_routing_structs(router_opts, det_routing_arch, segment_inf,
			timing_inf, directs, num_directs);

#ifdef INTERPOSER_BASED_ARCHITECTURE
	num_cuts = temp_num_cuts;
#endif

	longest_length = get_longest_segment_length(det_routing_arch, segment_inf);

	/*now setup and compute the actual arrays */
	alloc_delta_arrays();
	compute_delta_arrays(router_opts, det_routing_arch, segment_inf, timing_inf,
			longest_length);

	/*free all data structures that are no longer needed */
	free_routing_structs(router_opts, det_routing_arch, segment_inf,
			timing_inf);

	restore_original_device();

	free_and_reset_internal_structures(original_net, original_block,
			original_num_nets, original_num_blocks);
}
void
compute_delay_lookup_tables(struct s_router_opts router_opts,
			    struct s_det_routing_arch det_routing_arch,
			    t_segment_inf * segment_inf,
			    t_timing_inf timing_inf,
			    t_chan_width_dist chan_width_dist)
{

    static struct s_net *original_net;	/*this will be used as a pointer to remember what */

    /*the "real" nets in the circuit are. This is    */
    /*required because we are using the net structure */
    /*in these routines to find delays between blocks */
    static struct s_block *original_block;	/*same def as original_nets, but for block  */

    static int original_num_nets;
    static int original_num_blocks;
    static int longest_length;

    load_simplified_device();

    alloc_and_assign_internal_structures(&original_net,
					 &original_block,
					 &original_num_nets,
					 &original_num_blocks);
    setup_chan_width(router_opts, chan_width_dist);

    alloc_routing_structs(router_opts, det_routing_arch, segment_inf,
			  timing_inf);

    longest_length =
	get_longest_segment_length(det_routing_arch, segment_inf);


    /*now setup and compute the actual arrays */
    alloc_delta_arrays();
    compute_delta_arrays(router_opts, det_routing_arch, segment_inf,
			 timing_inf, longest_length);

    /*free all data structures that are no longer needed */
    free_routing_structs(router_opts, det_routing_arch, segment_inf,
			 timing_inf);

    restore_original_device();

    free_and_reset_internal_structures(original_net, original_block,
				       original_num_nets,
				       original_num_blocks);
}