init effort to start developing mux local encoders

This commit is contained in:
tangxifan 2019-08-02 14:28:35 -06:00
parent 7748340314
commit 33f3a991b5
3 changed files with 27 additions and 4 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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;
}