diff --git a/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_pbtypes.h b/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_pbtypes.h index 73890c89c..bb6588be4 100644 --- a/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_pbtypes.h +++ b/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_pbtypes.h @@ -1,3 +1,5 @@ +#ifndef SPICE_PBTYPES_H +#define SPICE_PBTYPES_H void fprint_pb_type_ports(FILE* fp, char* port_prefix, @@ -18,11 +20,6 @@ void generate_spice_src_des_pb_graph_pin_prefix(t_pb_graph_pin* src_pb_graph_pin char** src_pin_prefix, char** des_pin_prefix); -void find_interc_fan_in_des_pb_graph_pin(t_pb_graph_pin* des_pb_graph_pin, - t_mode* cur_mode, - t_interconnect** cur_interc, - int* fan_in); - void fprintf_spice_pb_graph_pin_interc(FILE* fp, char* parent_pin_prefix, enum e_spice_pin2pin_interc_type pin2pin_interc_type, @@ -109,3 +106,5 @@ void fprint_spice_idle_block(FILE* fp, t_type_ptr type_descriptor); void generate_spice_logic_blocks(char* subckt_dir, t_arch* arch); + +#endif diff --git a/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_primitive.c b/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_primitive.c index 1f21995d7..60c2c993f 100644 --- a/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_primitive.c +++ b/vpr7_x2p/vpr/SRC/fpga_x2p/spice/spice_primitive.c @@ -40,7 +40,7 @@ void fprint_pb_primitive_generic(FILE* fp, int index, t_spice_model* spice_model) { int num_sram_port = 0; - + t_spice_model_port** sram_port = NULL; int i; int num_sram = 0; int expected_num_sram = 0; @@ -91,6 +91,7 @@ void fprint_pb_primitive_generic(FILE* fp, /* Decode SRAM bits */ num_sram = count_num_sram_bits_one_spice_model(spice_model, -1); + sram_port = find_spice_model_ports(spice_model, SPICE_MODEL_PORT_SRAM, &num_sram_port, TRUE); /* what is the SRAM bit of a mode? */ /* If logical block is not NULL, we need to decode the sram bit */ if ( 0 < num_sram_port) { @@ -184,6 +185,7 @@ void fprint_pb_primitive_generic(FILE* fp, my_free(formatted_subckt_prefix); my_free(port_prefix); my_free(sram_vdd_port_name); + my_free(sram_port); return; }