From: Gong D. <gd...@us...> - 2007-06-17 03:20:16
|
hi all, I had modified dev.c to support more flexible device define. The device define code are here: DEVices[ 0] = get_urc_info(); DEVices[ 1] = get_asrc_info(); DEVices[ 2] = get_bjt_info(); DEVices[ 3] = get_bjt2_info(); DEVices[ 4] = get_bsim1_info(); DEVices[ 5] = get_bsim2_info(); DEVices[ 6] = get_bsim3_info(); DEVices[ 7] = get_bsim3v0_info(); DEVices[ 8] = get_bsim3v1_info(); DEVices[ 9] = get_bsim3v1a_info(); DEVices[10] = get_bsim3v1s_info(); DEVices[11] = get_b3soi_info(); DEVices[12] = get_bsim4_info(); DEVices[13] = get_b3soipd_info(); DEVices[14] = get_b3soifd_info(); DEVices[15] = get_b3soidd_info(); DEVices[16] = get_cap_info(); DEVices[17] = get_cccs_info(); DEVices[18] = get_ccvs_info(); DEVices[19] = get_cpl_info(); DEVices[20] = get_csw_info(); DEVices[21] = get_dio_info(); DEVices[22] = get_hfeta_info(); DEVices[23] = get_hfet2_info(); DEVices[24] = get_hsm1_info(); DEVices[25] = get_ind_info(); DEVices[26] = get_mut_info(); DEVices[27] = get_isrc_info(); DEVices[28] = get_jfet_info(); DEVices[29] = get_jfet2_info(); DEVices[30] = get_ltra_info(); DEVices[31] = get_mes_info(); DEVices[32] = get_mesa_info(); DEVices[33] = get_mos1_info(); DEVices[34] = get_mos2_info(); DEVices[35] = get_mos3_info(); DEVices[36] = get_mos6_info(); DEVices[37] = get_mos9_info(); DEVices[38] = get_res_info(); DEVices[39] = get_soi3_info(); DEVices[40] = get_sw_info(); DEVices[41] = get_tra_info(); DEVices[42] = get_txl_info(); DEVices[43] = get_vbic_info(); DEVices[44] = get_vccs_info(); DEVices[45] = get_vcvs_info(); DEVices[46] = get_vsrc_info(); #ifdef CIDER DEVices[47] = get_nbjt_info(); DEVices[48] = get_nbjt2_info(); DEVices[49] = get_numd_info(); DEVices[50] = get_numd2_info(); DEVices[51] = get_numos_info(); #else DEVices[47] = NULL; DEVices[48] = NULL; DEVices[49] = NULL; DEVices[50] = NULL; DEVices[51] = NULL; #endif #ifdef ADMS DEVices[52] = get_hicum0_info(); DEVices[53] = get_hicum2_info(); DEVices[54] = get_mextram_info(); DEVices[55] = get_ekv_info(); DEVices[56] = get_psp102_info(); #else DEVices[52] = NULL; DEVices[53] = NULL; DEVices[54] = NULL; DEVices[55] = NULL; DEVices[56] = NULL; #endif #ifdef NDEV /* NDEV */ DEVices[57] = get_ndev_info(); #else DEVices[57] = NULL; #endif DEVices[58] = NULL; DEVices[59] = NULL; Also, a lot of changes are made to other files for avoiding NULL pointer. These files including: spicelib/analysis/acan.c spicelib/analysis/cktdest.c spicelib/analysis/cktdisto.c spicelib/analysis/cktdump.c spicelib/analysis/cktfbran.c spicelib/analysis/cktic.c spicelib/analysis/cktload.c spicelib/analysis/cktnoise.c spicelib/analysis/cktop.c spicelib/analysis/cktpzld.c spicelib/analysis/cktpzset.c spicelib/analysis/cktsetup.c spicelib/analysis/ckttemp.c spicelib/analysis/ckttrunc.c spicelib/analysis/ckttyplk.c spicelib/parser/inptyplk.c The modifications won't affect ngspice's function. I had test the code, it should work. If not, one can change back to old dev.c. I rename it as dev_old.c G.D. |