diff --git a/vpr7_x2p/libarchfpga/SRC/fpga_spice_include/spice_types.h b/vpr7_x2p/libarchfpga/SRC/fpga_spice_include/spice_types.h index 76b58c744..d5ce520c6 100644 --- a/vpr7_x2p/libarchfpga/SRC/fpga_spice_include/spice_types.h +++ b/vpr7_x2p/libarchfpga/SRC/fpga_spice_include/spice_types.h @@ -93,9 +93,10 @@ enum e_process_corner { /* For SRAM */ enum e_sram_orgz { - SPICE_SRAM_STANDALONE, - SPICE_SRAM_SCAN_CHAIN, - SPICE_SRAM_MEMORY_BANK + SPICE_SRAM_STANDALONE, /* SRAMs are organized and accessed as standalone elements */ + SPICE_SRAM_SCAN_CHAIN, /* SRAMs are organized and accessed by a scan-chain */ + SPICE_SRAM_MEMORY_BANK, /* SRAMs are organized and accessed by memory bank */ + SPICE_SRAM_LOCAL_ENCODER /* SRAMs are organized and accessed by a local encoder */ }; enum e_spice_accuracy_type { @@ -240,6 +241,8 @@ struct s_spice_model_port { /* Timing edeges linked to other t_model_ports */ int* num_tedges; /* 1-D Array, show number of tedges of each pin */ t_spice_model_tedge*** tedge; /* 3-D array, considering the each pin in this port, [pin_number][num_edges[iedge]] is an edge pointor */ + /* SRAM organization only applicable SRAM ports */ + enum e_sram_orgz organization; }; struct s_spice_model_wire_param { diff --git a/vpr7_x2p/libarchfpga/SRC/read_xml_mrfpga.c b/vpr7_x2p/libarchfpga/SRC/read_xml_mrfpga.c index 60905e871..c4ce60183 100644 --- a/vpr7_x2p/libarchfpga/SRC/read_xml_mrfpga.c +++ b/vpr7_x2p/libarchfpga/SRC/read_xml_mrfpga.c @@ -120,7 +120,7 @@ ProcessWireBuffer(INOUTP ezxml_t Node, return; } -void +static void ProcessTechComp(INOUTP ezxml_t Node, OUTP struct s_arch *arch) { const char *Prop; diff --git a/vpr7_x2p/libarchfpga/SRC/read_xml_spice.c b/vpr7_x2p/libarchfpga/SRC/read_xml_spice.c index c0a79aa23..b4a51652f 100644 --- a/vpr7_x2p/libarchfpga/SRC/read_xml_spice.c +++ b/vpr7_x2p/libarchfpga/SRC/read_xml_spice.c @@ -765,6 +765,26 @@ static void ProcessSpiceModelPort(ezxml_t Node, port->inv_spice_model_name = my_strdup(FindProperty(Node, "inv_circuit_model_name", FALSE)); ezxml_set_attr(Node, "inv_circuit_model_name", NULL); } + + /* Add a feature to enable/disable the configuration encoders for multiplexers */ + const char* Prop = FindProperty(Node, "organization", FALSE); + if (NULL == Prop) { + port->organization = SPICE_SRAM_STANDALONE; /* Default */ + } else if (0 == strcmp("scan-chain", Prop)) { + port->organization = SPICE_SRAM_SCAN_CHAIN; + } else if (0 == strcmp("memory-bank", Prop)) { + port->organization = SPICE_SRAM_MEMORY_BANK; + } else if (0 == strcmp("standalone", Prop)) { + port->organization = SPICE_SRAM_STANDALONE; + } else if (0 == strcmp("local-encoder", Prop)) { + port->organization = SPICE_SRAM_LOCAL_ENCODER; + } else { + vpr_printf(TIO_MESSAGE_ERROR, + "[LINE %d] Unknown property %s for SRAM organization\n", + Node->line, FindProperty(Node, "organization", FALSE)); + exit(1); + } + ezxml_set_attr(Node, "organization", NULL); return; }