Merge branch 'StefanSchippers:master' into master
This commit is contained in:
commit
73789df48c
|
|
@ -1604,7 +1604,11 @@ void symbol_in_new_window(int new_process)
|
|||
rebuild_selected_array();
|
||||
|
||||
if(xctx->lastsel !=1 || xctx->sel_array[0].type!=ELEMENT) {
|
||||
my_strncpy(filename, xctx->sch[xctx->currsch], S(filename));
|
||||
if(tclgetboolvar("search_schematic")) {
|
||||
my_strncpy(filename, abs_sym_path(xctx->current_name, ".sym"), S(filename));
|
||||
} else {
|
||||
my_strncpy(filename, add_ext(xctx->sch[xctx->currsch], ".sym"), S(filename));
|
||||
}
|
||||
if(new_process) new_xschem_process(filename, 1);
|
||||
else new_schematic("create", NULL, filename, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,14 +236,15 @@ function endfile(f) {
|
|||
y=-m*space
|
||||
x=-width
|
||||
print "T {@name}",-x-lwidth+5, y-space/2-8-lab_voffset,0,0,labsize, labsize,"{}" >sym
|
||||
print "L 4 " (x+lwidth) ,y-space/2,(-x-lwidth) , y-space/2,"{}" >sym
|
||||
print "L 4 " (x+lwidth) ,y+n*space-space/2,(-x-lwidth) , y+n*space-space/2,"{}" >sym
|
||||
print "L 4 " (x+lwidth) ,y-space/2,(x+lwidth) , y+n*space-space/2,"{}" >sym
|
||||
print "L 4 " (-x-lwidth) ,y-space/2,(-x-lwidth) , y+n*space-space/2,"{}" >sym
|
||||
|
||||
|
||||
print "P 4 5", \
|
||||
(-x-lwidth) ,y-space/2, \
|
||||
(x+lwidth) , y-space/2, \
|
||||
(x+lwidth), y+n*space-space/2, \
|
||||
(-x-lwidth), y+n*space-space/2, \
|
||||
(-x-lwidth) ,y-space/2, \
|
||||
"{}" > sym
|
||||
hsort_key(index_pin, y_pin, n_pin) # 20140519
|
||||
|
||||
num_i = num_o = 0 #20140519
|
||||
|
||||
for(ii=0;ii<n_pin;ii++)
|
||||
|
|
|
|||
|
|
@ -3523,6 +3523,7 @@ int load_schematic(int load_symbols, const char *fname, int reset_undo, int aler
|
|||
}
|
||||
else fd=fopen(name,fopen_read_mode);
|
||||
if( fd == NULL) {
|
||||
size_t len;
|
||||
ret = 0;
|
||||
if(alert) {
|
||||
fprintf(errfp, "load_schematic(): unable to open file: %s, fname=%s\n", name, fname );
|
||||
|
|
@ -3531,6 +3532,13 @@ int load_schematic(int load_symbols, const char *fname, int reset_undo, int aler
|
|||
tcleval(msg);
|
||||
}
|
||||
}
|
||||
len = strlen(name);
|
||||
if(!strcmp(name + len - 4, ".sym")) {
|
||||
xctx->save_netlist_type = xctx->netlist_type;
|
||||
xctx->netlist_type = CAD_SYMBOL_ATTRS;
|
||||
set_tcl_netlist_type();
|
||||
xctx->loaded_symbol = 1;
|
||||
}
|
||||
clear_drawing();
|
||||
if(reset_undo) set_modify(0);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4350,6 +4350,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
int e_b = xctx->rect[c][n].ellipse_b;
|
||||
save = xctx->draw_window; xctx->draw_window = 1;
|
||||
drawrect(xctx->rectcolor,NOW, x1,y1,x2,y2, 0, e_a, e_b);
|
||||
filledrect(xctx->rectcolor, NOW, x1, y1, x2, y2, 1, -1, -1);
|
||||
xctx->draw_window = save;
|
||||
}
|
||||
set_modify(1);
|
||||
|
|
|
|||
|
|
@ -3818,9 +3818,19 @@ proc save_file_dialog { msg ext global_initdir {initialf {}} {overwrt 1} } {
|
|||
# opens indicated instance (or selected one) into a separate tab/window
|
||||
# keeping the hierarchy path, as it was descended into (as with 'e' key).
|
||||
proc open_sub_schematic {{inst {}} {inst_number 0}} {
|
||||
global search_schematic
|
||||
set rawfile {}
|
||||
set one_sel [expr {[xschem get lastsel] == 1}]
|
||||
if { $inst eq {} && $one_sel} {
|
||||
set n_sel [xschem get lastsel]
|
||||
|
||||
if { $inst eq {} && $n_sel == 0} {
|
||||
if {$search_schematic == 1} {
|
||||
set f [abs_sym_path [xschem get current_name] {.sch}]
|
||||
} else {
|
||||
set f [file rootname [xschem get schname]].sch
|
||||
}
|
||||
xschem new_schematic create {} $f
|
||||
return 1
|
||||
} elseif { $inst eq {} && $n_sel == 1} {
|
||||
set inst [lindex [xschem selected_set] 0]
|
||||
xschem unselect_all
|
||||
} else {
|
||||
|
|
@ -7084,10 +7094,10 @@ proc tab_ctx_cmd {tab_but what} {
|
|||
}
|
||||
# puts $filename
|
||||
}
|
||||
|
||||
proc tab_context_menu {tab_but} {
|
||||
global retval search_schematic
|
||||
|
||||
|
||||
# find filename associated with tab button
|
||||
set win_path [lindex [$tab_but cget -command] 3] ;# xschem new_schematic switch .x1.drw
|
||||
set tablist [xschem tab_list] ;# .drw filename0 .x1.drw filename1 ...
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ E {}
|
|||
B 2 1690 -960 2250 -630 {flags=graph,unlocked
|
||||
|
||||
sim_type=dc
|
||||
y1=-160
|
||||
y1=-190
|
||||
y2=0
|
||||
divy=4
|
||||
subdivy=1
|
||||
|
|
@ -58,8 +58,8 @@ y1=0.875402
|
|||
y2=5.6754
|
||||
divy=4
|
||||
subdivy=1
|
||||
x1=2.4
|
||||
x2=2.6
|
||||
x1=2.4088074
|
||||
x2=2.6088074
|
||||
divx=6
|
||||
subdivx=1
|
||||
node="diffout@2uA;v(diffout)%0
|
||||
|
|
@ -94,8 +94,8 @@ autoload=1}
|
|||
B 2 1050 -740 1680 -530 {flags=graph,unlocked
|
||||
|
||||
sim_type=ac
|
||||
y1=-34
|
||||
y2=43
|
||||
y1=-32
|
||||
y2=46
|
||||
|
||||
subdivy=1
|
||||
x1=0
|
||||
|
|
@ -120,7 +120,7 @@ xrawfile=$netlist_dir/cmos_example_ngspice.raw}
|
|||
B 2 1050 -960 1680 -750 {flags=graph,unlocked
|
||||
|
||||
sim_type=ac
|
||||
y1=21
|
||||
y1=18
|
||||
y2=180
|
||||
divy=4
|
||||
subdivy=1
|
||||
|
|
@ -148,8 +148,8 @@ y1=2.3
|
|||
y2=2.7
|
||||
divy=4
|
||||
subdivy=1
|
||||
x1=2.4
|
||||
x2=2.6
|
||||
x1=2.4088074
|
||||
x2=2.6088074
|
||||
divx=6
|
||||
subdivx=1
|
||||
node="minus;minus%0
|
||||
|
|
@ -277,7 +277,7 @@ only_toplevel=false value="
|
|||
** https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/examples/mos/modelcard.pmos
|
||||
|
||||
.model cmosn NMOS
|
||||
+Level= 9 version=3.3.0
|
||||
+Level= 49 version=3.3.0
|
||||
+Tnom=27.0
|
||||
+Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07
|
||||
+Lint=9.36e-8 Wint=1.47e-7
|
||||
|
|
@ -311,7 +311,7 @@ only_toplevel=false value="
|
|||
+vgs_max=4 vds_max=4 vbs_max=4
|
||||
|
||||
.model cmosp PMOS
|
||||
+Level= 9 version=3.3.0
|
||||
+Level= 49 version=3.3.0
|
||||
+Tnom=27.0
|
||||
+Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07
|
||||
+Lint=6.23e-8 Wint=1.22e-7
|
||||
|
|
@ -460,7 +460,7 @@ value="* .temp 30
|
|||
|
||||
.op
|
||||
.print dc format=raw file=cmos_example_xyce.raw v(*) i(*)
|
||||
.dc vplus 2.3 2.7 0.001
|
||||
.dc vminus 2.4 2.6 0.001
|
||||
.print dc format=raw file=cmos_example_xyce.raw v(*) i(*)
|
||||
|
||||
"}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ color="8 6"
|
|||
|
||||
linewidth_mult=1.0
|
||||
hilight_wave=-1
|
||||
dataset=188
|
||||
dataset=-1
|
||||
rawfile=$netlist_dir/autozero_comp.raw
|
||||
sim_type=tran
|
||||
rainbow=0
|
||||
|
|
@ -136,7 +136,7 @@ saout
|
|||
0.45"
|
||||
sweep="freq0 freq1 freq0"
|
||||
mode=HistoH
|
||||
xlabmag=2.0}
|
||||
xlabmag=1.3}
|
||||
B 2 270 -1610 680 -1450 {flags=graph,unlocked
|
||||
y1 = 0
|
||||
y2 = 0.9
|
||||
|
|
|
|||
Loading…
Reference in New Issue