handle netlisting remote (http[s]) hierarchic objects
This commit is contained in:
parent
b5852ffc70
commit
6e13f3cd77
|
|
@ -1250,7 +1250,6 @@ int descend_schematic(int instnumber)
|
||||||
if(!strcmp(xctx->sch[xctx->currsch],""))
|
if(!strcmp(xctx->sch[xctx->currsch],""))
|
||||||
{
|
{
|
||||||
char cmd[PATH_MAX+1000];
|
char cmd[PATH_MAX+1000];
|
||||||
char filename[PATH_MAX];
|
|
||||||
char res[PATH_MAX];
|
char res[PATH_MAX];
|
||||||
|
|
||||||
my_strncpy(filename, xctx->sch[xctx->currsch], S(filename));
|
my_strncpy(filename, xctx->sch[xctx->currsch], S(filename));
|
||||||
|
|
@ -1342,10 +1341,10 @@ int descend_schematic(int instnumber)
|
||||||
xctx->currsch++;
|
xctx->currsch++;
|
||||||
hilight_child_pins();
|
hilight_child_pins();
|
||||||
|
|
||||||
get_sch_from_sym(filename, xctx->inst[n].ptr+ xctx->sym);
|
|
||||||
dbg(1, "descend_schematic(): filename=%s\n", filename);
|
|
||||||
unselect_all(1);
|
unselect_all(1);
|
||||||
|
get_sch_from_sym(filename, xctx->inst[n].ptr+ xctx->sym);
|
||||||
remove_symbols();
|
remove_symbols();
|
||||||
|
dbg(1, "descend_schematic(): filename=%s\n", filename);
|
||||||
/* we are descending from a parent schematic downloaded from the web */
|
/* we are descending from a parent schematic downloaded from the web */
|
||||||
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
||||||
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
||||||
|
|
@ -1354,10 +1353,9 @@ int descend_schematic(int instnumber)
|
||||||
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
||||||
/* build local file name of downloaded object and load it */
|
/* build local file name of downloaded object and load it */
|
||||||
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
||||||
load_schematic(1, sympath, 1);
|
my_strncpy(filename, sympath, S(filename));
|
||||||
} else {
|
|
||||||
load_schematic(1, filename, 1);
|
|
||||||
}
|
}
|
||||||
|
load_schematic(1, filename, 1);
|
||||||
if(xctx->hilight_nets)
|
if(xctx->hilight_nets)
|
||||||
{
|
{
|
||||||
prepare_netlist_structs(0);
|
prepare_netlist_structs(0);
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,17 @@ void spice_block_netlist(FILE *fd, int i)
|
||||||
else
|
else
|
||||||
spice_stop=0;
|
spice_stop=0;
|
||||||
get_sch_from_sym(filename, xctx->sym + i);
|
get_sch_from_sym(filename, xctx->sym + i);
|
||||||
|
|
||||||
|
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
||||||
|
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
||||||
|
char sympath[PATH_MAX];
|
||||||
|
/* download item into ${XSCHEM_TMP_DIR}/xschem_web */
|
||||||
|
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
||||||
|
/* build local file name of downloaded object and load it */
|
||||||
|
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
||||||
|
my_strncpy(filename, sympath, S(filename));
|
||||||
|
}
|
||||||
|
|
||||||
if(split_f) {
|
if(split_f) {
|
||||||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||||
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,17 @@ static void tedax_block_netlist(FILE *fd, int i)
|
||||||
else
|
else
|
||||||
tedax_stop=0;
|
tedax_stop=0;
|
||||||
get_sch_from_sym(filename, xctx->sym + i);
|
get_sch_from_sym(filename, xctx->sym + i);
|
||||||
|
|
||||||
|
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
||||||
|
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
||||||
|
char sympath[PATH_MAX];
|
||||||
|
/* download item into ${XSCHEM_TMP_DIR}/xschem_web */
|
||||||
|
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
||||||
|
/* build local file name of downloaded object and load it */
|
||||||
|
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
||||||
|
my_strncpy(filename, sympath, S(filename));
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(fd, "\n# expanding symbol: %s # of pins=%d\n",
|
fprintf(fd, "\n# expanding symbol: %s # of pins=%d\n",
|
||||||
xctx->sym[i].name,xctx->sym[i].rects[PINLAYER] );
|
xctx->sym[i].name,xctx->sym[i].rects[PINLAYER] );
|
||||||
fprintf(fd, "## sym_path: %s\n", abs_sym_path(xctx->sym[i].name, ""));
|
fprintf(fd, "## sym_path: %s\n", abs_sym_path(xctx->sym[i].name, ""));
|
||||||
|
|
|
||||||
|
|
@ -436,6 +436,17 @@ void verilog_block_netlist(FILE *fd, int i)
|
||||||
else
|
else
|
||||||
verilog_stop=0;
|
verilog_stop=0;
|
||||||
get_sch_from_sym(filename, xctx->sym + i);
|
get_sch_from_sym(filename, xctx->sym + i);
|
||||||
|
|
||||||
|
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
||||||
|
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
||||||
|
char sympath[PATH_MAX];
|
||||||
|
/* download item into ${XSCHEM_TMP_DIR}/xschem_web */
|
||||||
|
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
||||||
|
/* build local file name of downloaded object and load it */
|
||||||
|
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
||||||
|
my_strncpy(filename, sympath, S(filename));
|
||||||
|
}
|
||||||
|
|
||||||
if(split_f) {
|
if(split_f) {
|
||||||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||||
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,17 @@ void vhdl_block_netlist(FILE *fd, int i)
|
||||||
else
|
else
|
||||||
vhdl_stop=0;
|
vhdl_stop=0;
|
||||||
get_sch_from_sym(filename, xctx->sym + i);
|
get_sch_from_sym(filename, xctx->sym + i);
|
||||||
|
|
||||||
|
if( strstr(xctx->current_dirname, "http://") == xctx->current_dirname ||
|
||||||
|
strstr(xctx->current_dirname, "https://") == xctx->current_dirname) {
|
||||||
|
char sympath[PATH_MAX];
|
||||||
|
/* download item into ${XSCHEM_TMP_DIR}/xschem_web */
|
||||||
|
tclvareval("try_download_url {", xctx->current_dirname, "} {", filename, "}", NULL);
|
||||||
|
/* build local file name of downloaded object and load it */
|
||||||
|
my_snprintf(sympath, S(sympath), "%s/xschem_web/%s", tclgetvar("XSCHEM_TMP_DIR"), get_cell_w_ext(filename, 0));
|
||||||
|
my_strncpy(filename, sympath, S(filename));
|
||||||
|
}
|
||||||
|
|
||||||
if(split_f) {
|
if(split_f) {
|
||||||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||||
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
tclgetvar("netlist_dir"), skip_dir(xctx->sym[i].name), getpid());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue