{"id":16372608,"url":"https://github.com/hedhyw/spice3f5","last_synced_at":"2025-03-23T03:32:30.072Z","repository":{"id":52188675,"uuid":"131679922","full_name":"hedhyw/spice3f5","owner":"hedhyw","description":"Add cmake to spice3f5 for build in linux or windows. SPICE is a general-purpose circuit simulator with several built-in semiconductor device models. SPICE was developed at the Electronics Research Laboratory of the University of California, Berkeley.","archived":false,"fork":false,"pushed_at":"2018-05-01T06:08:00.000Z","size":19417,"stargazers_count":41,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"linux","last_synced_at":"2025-03-18T17:05:15.668Z","etag":null,"topics":["c","cmake","port","spice"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hedhyw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-01T05:32:03.000Z","updated_at":"2025-01-31T08:21:15.000Z","dependencies_parsed_at":"2022-08-26T08:01:48.682Z","dependency_job_id":null,"html_url":"https://github.com/hedhyw/spice3f5","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fspice3f5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fspice3f5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fspice3f5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fspice3f5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hedhyw","download_url":"https://codeload.github.com/hedhyw/spice3f5/tar.gz/refs/heads/linux","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052619,"owners_count":20553161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cmake","port","spice"],"created_at":"2024-10-11T03:11:57.851Z","updated_at":"2025-03-23T03:32:29.132Z","avatar_url":"https://github.com/hedhyw.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spice3 (no nutmeg, etc)\n\n## Changes\n  - Add os_linux port;\n  - Add cmake build process manager;\n  - Fix some code for ANSI-C.\n\n## Requirement\n\n  - build-essential;\n  - cmake;\n  - libx11-dev;\n  - libxaw7-dev;\n  - libxt-dev.\n\n_Tested on computer with Ubuntu 17.10 and 4.13.0-32-generic kernel._\n\n```\n# apt install build-essential cmake libx11-dev libxaw7-dev libxt-dev\n```\n\n\n## For build, run:\n```\n$ cd FOLDER_WITH_SPICE3F5\n$ FOLDER_WITH_SPICE3F5/util/build.sh\n```\n_Output will be in the build folder. Spice3: build/src/bin/spice3_\n\n## For install, run:\n```\n$ cd FOLDER_WITH_SPICE3F5\n$ FOLDER_WITH_SPICE3F5/util/install.sh\n```\n\n## Notes\n\nFor additional information see notes/\\*, lib/helpdir\\* and man/\\*.\n\n## Old readme\n```\n\t\t\t\t\t\t\t\tJuly, 1993\n\n\tSpice3f4\n\n---------- New features in Spice3f.4\n\nWith this release, the University of California will no longer\nbe providing technical support for Spice3, and no plans have been made\nfor providing support any time in the future.  Some work on Spice3 will\ncontinue (notably the BSIM-3 model and perhaps other device models).\n\nThe following is a list of new features and fixes from the previous\nrelease of Spice3, 3f.3 (note that 3f.4 is a \"last minute\" release with\nonly a few new changes):\n\tInitial conditions specified across voltage sources is now handled\n\t\"alter\" command accepts expressions, new syntax is either:\n\t\talter dev param = expr\n\t\talter @dev[param] = expr\n\t\"altermod\" command for altering model parameters (was \"alter\")\n\tminor bug fixes\n\nThe following is a list of new features and fixes from the previous\nmajor release of Spice3 (3f.2) and the previous release (3f.3) (note\nthat 3f.3 is primarily a bug-fix release over 3f.2):\n\tAdded non-linear controlled source functions \"u(x)\" and \"uramp(x)\"\n\tFixes to AC sensitivity calculation\n\tFixes to initial conditions code\n\tFixed spurious error messages when running multiple anaylses in\n\t\tbatch mode\n\tFixed plotting (again)\n\tFixed \"available memory\" calculation\n\tFixed default scale to be log for analysis done by decade/octave\n\t\t(ac, disto, noise); use plot option \"linear\" to override\n\tFixed asciiplot\n\tFixed problem causing BSIM models to not be found\n\tRemoved \"spiced\" (a remote-spice daemon for BSD unix); added an\n\t\trspice command which uses \"rsh\" instead.\n\tOnline help info is now identicle to the \"Spice3f User's Manual\"\n\tFixed numerous and various parsing errors\n\t\"TF\" analysis output is now identified as \"TF\" data, not \"DC\" data\n\tComplex numbers and Real vectors are now printed by the\n\t\t\"show\"/\"showmod\" commands\n\tFixes to help MacIntosh port\n\tPort for DEC Alpha running OSF/1\n\tMisc. changes to improve portability\n\nAdditional features since release 3e.2 are:\n\tAC and DC Sensitivity.\n\tMOS3 discontinuity fix (\"kappa\").\n\tAdded a new JFET fitting parameter.\n\tMinor initial conditions fix.\n\tRewritten or fixed \"show\" and \"trace\" commands.\n\tNew interactive commands \"showmod\" and \"alter\".\n\tMinor bug-fixes to the Pole-Zero analysis.\n\tMiscellaneous bug fixes in the front end.\n\n\n\f----------  Systems supported\n\nSpice3f.4 has been compiled and and run under the following operating systems:\n\tOSF 1, DEC Alpha\n\tUltrix 4, RISC or VAX\n\tSunOS 4, Sun3 or Sun4\n\nThe following systems have been successfully tested either in the past or\nby someone outside of UC Berkeley.\n\tMS-DOS on the IBM PC, using MicroSoft C 5.1 or later\n\tAIX V3, RS/6000\n\tHP-UX 8.0, 9000/700\n\tDynix 3.0, Sequent Symmetry or Balance (does _not_ take advantage of\n\t\tparallelism)\n\tHP-UX 7.0, 9000/300\n\tIrix 3.2, SGI Personal Iris\n\tNeXT 2.0\n\tApple MacIntosh, Using Think C\n\nOther systems may require a small amount of porting effort.  Note that\nthe 'gcc' C compiler was used successfully to compile Spice3f.4.\n\nDue to the heavy use of floating point math operations, Spice3 on the\nPC requires a math co-processor.  Also, on the PC, SVGA displays are\n_not_ supported.  Only CGA, EGA, and VGA displays are supported (via\nthe MicroSoft graphics library) at this time.\n\nA 68020 or better processor and a math co-processor is required for\nthe MacIntosh.\n\nSystems using the X11 Window System (generally any \"workstation\" class\nof system) must have the MIT Athena Widget Set  available (\"libXaw.a\"\nand possiblely \"libXmu.a\").  These are frequently not distributed or\ndistributed as \"usupported software\" by commercial workstation\nvendors.\n\n\f---------- Unloading Spice3 from disk or tape\n\nThe Unix distribution comes on 1/2\" 9-track tape, 8mm tape, or DEC TK50 tape\nin \"tar\" format.  The MS-DOS distribution comes on several 3.5\" floppy\ndiskettes (both high and low density) in the standard MS-DOS format.\nThe contents of both distributions are identical, including filenames,\nexcept for the additional files on the MS-DOS disks used for automatic\nunloading.\n\nThe source code and associated data files for spice3f.4 require over 6MB,\nand up to an additional 22MB may be required to compile under Unix (for a\nDEC RISC workstation with the compiler option '-g').  For MS-DOS using\nMicroSoft C 5.1 or later, nearly 8MB (beyond the 6MB for the source) is\nrequired.\n\nUNIX:  The UNIX distribution of Spice3f.4 comes in \"tar\" format.  To\n\textract Spice3f.4 first create the directory that you wish to\n\thold the distribution and \"cd\" into that directory.  Then\n\texecute the command \"tar x\" (after mounting the tape).  Note\n\tthat some sites may require that you explicitly indicate the\n\ttape drive name when using the \"tar\" command; this is done with\n\tthe 'f' flag, for example \"tar xf /dev/rmt0h\".\n\nMS-DOS:  Spice3f.4 comes on MS-DOS format 3.5\" disks.  To extract the\n\tdistribution onto a hard disk, create the directory on the hard\n\tdisk that you wish to hold the source code.  \"cd\" into that\n\tdirectory on the hard disk.  For each of the distributed disks,\n\tIN ORDER, insert the disk into the drive (we'll assume drive\n\t\"B:\" here), and enter \"B:UNLOAD B:\".  This will use the script\n\t\"unload.bat\" to extract the source files off of the disk and\n\tinto the current directory or a subdirectory of the current\n\tdirectory.  You might see the error \"File not found ????????.???\",\n\tthat is normal.\n\nConverting the MS-DOS format disks to UNIX:  The MS-DOS format is not\n\tdirectly readable by UNIX systems.  One publically available\n\ttool for doing this is known as \"mtools\" (search popular\n\tftp sites), but this is not the only method.  Note: In MS-DOS,\n\ttext file lines end with \"^M^J\", where under UNIX lines end only\n\twith \"^J\".  Also, execute permission needs to be set on all\n\tfiles in the \"util/\" subdirectory when moving to UNIX.\n\nMAC:  Spice3 is not distributed in a format for the Apple MacIntosh.  You\n\tmust determine how to transfer the files to a Mac from the media that\n\tyou have.\n\n\f---------- Compiling Spice3f.4 under UNIX\n\n\tTo build Spice3f.4 on a Unix system follow the steps below.\n\tFor additional notes on internal changes and porting issues,\n\tplease inspect the subdirectory \"notes\".\n\n\tFirst you must edit the file \"conf/defaults\" and change the\n\tlisted parameters to reflect the standard organization of\n\tsoftware at your site.  A description of each parameter is\n\tincluded in this file.\n\n\tSecond, for each type of system at your site, you must provide\n\ta file in the same subdirectory (\"conf/\") which contains\n\texceptions to the previously edited \"defaults\" file; note that\n\teven if you are supporting one type of system with no\n\texceptions this is still necessary.  Several files are supplied for\n\tthe system types that have been tested with this distribution,\n\tincluding \"mips\" (for DECstations), \"sun4\", \"sequent\", \"irix\",\n\t\"hpux\", and \"rs6000\".\n\n\tNote that some of these per-system definition files have\n\tspecial definitions which are required for the given system and\n\twhich do not appear in the \"defaults\" file.\n\n\tNote also that successful compiling does not depend on the\n\tparticular names given to these 'exception' or 'system\n\tdefinition' files.  For example, the \"mips\" configuration file\n\tcould have been named \"decstation\"; this name is used for\n\tgenerating unique directory names such that different systems\n\tto not use the same area for the compile process (more detail\n\tare listed in the \"defaults\" file).\n\n\tFinally, it is possible to combine additional files\n\n\tAfter the defaults file has been edited and a system-dependent\n\tfile created or modified, run the command \"util/build system\"\n\tfrom the directory above the \"util\" subdirectory; for \"system\"\n\tyou must substitute the name of the system-dependent file that\n\tyou created or modified in the previous step.  Spice3 will then\n\tbe built via recursive \"make\" commands (it may take a several\n\tseconds to get going on some systems).  The total time can be\n\tas little as 20 minutes or as long as four hours depending on\n\tthe speed and load of your system.  Compiling across NFS will\n\tslow down compiling significantly.\n\n\tIf you have trouble using the \"build\" script, try \"build -help\"\n\tfor infomation on debugging options.  Some system combinations\n\tmay require listing more than one system name on the \"build\" line,\n\tfor example \"build hpux hp300\" to build on an HP 9000/300 as\n\topposed to a HP 9000/700.  When the build script has successfully\n\tcompleted, see the section below on Installing Spice3.\n\f---------- Additional Notes on Compiling Spice3f.4 under UNIX\n\n\tNOTE: Some systems have a problem with directory names containing\n\ta \"-\" in either the full source directory name or the full directory\n\tname of any program used in compiling.  This may show up as an\n\tunexpected or unreasonable error message.  Avoid directory names\n\twith a \"-\" (this is an old bug in the \"make\" command, which has\n\tpropagated to many vendors before being fixed).\n\n\tNOTE: On some systems, the \"build\" scripts seems sluggish.  This\n\tmay be caused by a long \"$PATH\", with many entries before \"/bin\"\n\tand \"/usr/bin\"; you may be able to speed up the script by trimming\n\tyour \"$PATH\" before running the build script.\n\n\tNOTE (SunOS):  There is small bug somewhere in one version of the\n\tSun-supplied X11 libraries.  This bug results in the following\n\troutines being undefined in the \"link\" stage:\n\n\t\t_get_wmShellWidgetClass\n\t\t_get_applicationShellWidgetClass\n\n\tThis is apparently a problem with the dynamic-link version of the\n\t\"Xmu\" library.  If you have this problem, the best reported fix is\n\tto use the following options on the \"link\" line (embed the following\n\tin the LIBX variable in \"conf/sun4\", or wherever):\n\n\t\t-Bstatic -lXmu -Bdynamic\n\n\tThis is anticipated in a comment in the current copy of \"conf/sun4\".\n\n\tNOTE: GNU make is not compatible with the traditional \"make\", and\n\tis not compatible with spice3.  Using GNU make may result in\n\tinfinite recursion.\n\n\n\f---------- Compiling under MS-DOS with MicroSoft C 5.1:\n\n\tThe PC lacks the program \"/bin/sh\" (and others) which the above\n\tUnix installation depends on.  Instead we have supplied simple\n\tcompiling scripts for use with MicroSoft C 5.1.  This less\n\tflexible system requires that you edit several files before building:\n\n\t\tsrc/bin/tunepc.c (built-in file locations); Change the values\n\t\t\tof the following C variables as appropriate -- leave\n\t\t\tdouble quote and single quote marks as-is, and use\n\t\t\ttwo backslash ('\\') characters where you want one:\n\n\t\t\tSpice_Exec_Dir: location you plan to install spice.\n\n\t\t\tSpice_Lib_Dir: location you plan to install the spice\n\t\t\t\tstartup and data files.\n\n\t\t\tSpice_OptChar: command line option character\n\t\t\t\t(indicates whether you want to type\n\t\t\t\t\"spice -r\" or \"spice /r\").\n\n\t\t\tDef_Editor: location you plan to install spice\n\n\t\t\tAsciiRawFile: location you plan to install spice\n\n\t\t\tThe last three options (not listed here) are not\n\t\t\tsignificant under MS-DOS, but should be left as is\n\t\t\t(blank).\n\n\t\tsrc/bin/cconf.c\t\tDevices and analyses for \"cspice\"\n\t\tsrc/bin/bconf.c\t\tDevices and analyses for \"bspice\"\n\n\t\t\tThe initial segment of \"cconf.c\" and \"bconf.c\"\n\t\t\tare \"#define\" lines that determine which devices\n\t\t\tand analyses should be compiled in to the simulator.\n\t\t\tFor devices, the line looks like \"#define DEV_xxx\"\n\t\t\twhere \"xxx\" is the name of some device;  For\n\t\t\tanalyses, the line looks like \"#define AN_xxx\".\n\t\t\tNames and descriptions of both analyses and devices\n\t\t\tare as listed below (\"Devices and Analyses supported\n\t\t\tin Spice3f.2\", at the end); see also the user's manual.\n\t\t\tA reasonable default is supplied with each.\n\t\t\tDo not modify anything below the list of '#define'\n\t\t\tlines.\n\t\t(more)\n\n\t\tsrc/include/os_msdos.h\n\t\t\tIf you do not want the spice-supplied \"hardcopy\"\n\t\t\troutine for sending plots to an IBM Personal\n\t\t\tGraphics Printer (or equivalent), comment out the\n\t\t\t\"#define WANT_PCHARDCOPY\" line near the bottom.\n\t\t\tSome versions of MS-DOS can't normally send VGA\n\t\t\tgraphics to a printer.\n\n\f\tOnce these files have been edited, \"cd\" into the top directory\n\t(above \"util\\\", \"src\\\", and \"conf\\\") and run \"msc51.bat\".  The\n\tscript first sets compiler options in the environment and then\n\tprocedes with the compile.  Since the environment may not have\n\tenough room, you may have to clear some unused environment\n\tvariables before the build, otherwise the build could fail.\n\tNote that these options are only useful for MicroSoft C 5.1 or\n\tlater.\n\n\tCompiler errors are written to the file \"src\\msc.out\".  This\n\tincludes many warnings because Spice3 was originally written in\n\tpre-ANSI C (or \"K\u0026R\" C) under Unix.  Except for these (numerous)\n\twarnings, Spice3 should compile and run without trouble; see the\n\tnext section on installing.\n\n\tCleaning up under MS-DOS (after installing):\n\n\tTo delete the original source tree from your hard disk, you may\n\tuse the supplied script \"util\\delall.bat\".  You must copy\n\tthis script outside of the source tree before you run it or it\n\twill remove itself before finishing.  Run the script from the top\n\tdirectory of the source tree (above \"util\\\").\n\n---------- Compiling on the MacIntosh\n\n\tSince there is no scripting language on the Mac, you must do\n\tconsiderable work to build spice3 on a Mac.  The details\n\tare included in a seperate file, \"notes/mac_port\".\n\n\f---------- Installing Spice3\n\n\tAfter spice3 and the associated programs have been created, you may\n\ttest the program.  There are a few test inputs in the \"examples\"\n\tsubdirectory.\n\n\tBecause spice3 is not installed in it's final destination at this\n\tpoint, you should set the environment variable \"SPICE_LIB_DIR\" to\n\tthe \"lib\" subdirectory to indicate the location of some startup files.\n\n\tFinally, you may install spice3 and associated components into\n\ta standard place.  Under Unix systems, the command \"util/build\n\tsystem install\" will do this automatically (again substitute\n\tyour system name or type for \"system\").  Under MS-DOS or for\n\tthe MacIntosh, the files must be copied explicitly.\n\n\tThe executable programs are from the subdirectories \"src/bin\",\n\tas follows:\n\t\tspice3\t\tUNIX only: the simulator.\n\t\tbspice\t\tMS-DOS only: a batch mode simulator:\n\t\t\t\t\"bspice \u003c input.cir\" generates the file\n\t\t\t\t\"rawspice.raw\", which is read by \"nutmeg\"\n\t\t\t\t(see below).\n\t\tcspice\t\tMS-DOS only: a spice2 like interface for\n\t\t\t\tsmall runs (runs out of memory easily).\n\t\t\t\tUse \"cspice \u003c input.cir\"; generates\n\t\t\t\t'asciiplots' for .plot lines.\n\t\tnutmeg\t\tA stand-alone data analysis program;\n\t\t\t\tSpice3 without the simulation capability.\n\t\thelp\t\tA stand alone help browser.\n\t\tproc2mod\tConverts process characterization files\n\t\t\t\tto Spice3 BSIM1 MOS model definitions.\n\t\tsconvert\tConverts between ascii and binary spice\n\t\t\t\tdata files (\".raw\" files).\n\t\tmultidec\tA utility for decomposing coupled lossy\n\t\t\t\ttransmission lines into equivalent uncoupled\n\t\t\t\tlines.  Not available on MS-DOS (need the\n\t\t\t\t\"getopt\" library).\n\n\tThe following startup/data files are installed from the \"lib/\"\n\tsubdirectory:\n\t\thelpdir/spice.txt\ton-line information for spice3.\n\t\thelpdir/spice.idx\tindex for spice.txt, generated with\n\t\t\t\t\t\tthe program \"bin/makeidx\".\n\n\t\tscripts/spinit\t\tspice/nutmeg commands executed at\n\t\t\t\t\t\tstartup.\n\t\tscripts/setplot\t\tA script for the command \"setplot\".\n\n\t\tnews\t\t\ta start up message of your choosing.\n\t\tmfbcap\t\t\tgraphics-terminal capability database\n\t\t\t\t\t(not required for MS-DOS).\n\n\t(Previous versions had a seperate help files for spice3 and\n\tnutmeg;  the current help file is now identicle to the \"Spice3f4\n\tUser's Manual\", so there is no distinction).\n\n\tFor the PC and MacIntosh, you must generate the \".idx\" files\n\tyourself by running \"makeidx spice.txt\".  Unix \"man\" pages are\n\talso supplied for the programs spice, nutmeg, and sconvert, for\n\tthe mfb database format (looks like termcap), and for the mfb\n\tlibrary.  These are not installed automatically as they are\n\told, unsupported, and may be out of date.\n\n\fDevices and Analyses supported in Spice3f.4:\n\tFor reference, the following is a list of all devices and their\n\tcommon abbreviation in Spice3:\n\n\t\tasrc:\tarbitrary voltage/current source\n\t\tbjt:\tbipolar junction transistor\n\t\tbsim1:\tdetailed MOS model\n\t\tbsim2:\tdetailed MOS model, revised version of bsim1\n\t\tcap:\tcapacitor\n\t\tcccs:\tcurrent-controlled current source\n\t\tccvs:\tcurrent-controlled voltage source\n\t\tcsw:\tcurrent controlled switch\n\t\tdio:\tdiode\n\t\tltra:\tlossy transmission line\n\t\tind:\tinductor\n\t\tisrc:\tcurrent source\n\t\tjfet:\tJunction FET\n\t\tmes:\tMES FET (GaAs)\n\t\tmos1:\tMOS, simplest analytic model, fastest\n\t\tmos2:\tMOS, middle complexity and accuracy\n\t\tmos3:\tMOS, most complicated, most accurate\n\t\tmos6: \tMOS, new, fast analytic, short-channel\n\t\tres:\tresistor\n\t\tsw:\tswitch\n\t\ttra:\tlossless transmission line\n\t\turc:\tuniform RC line\n\t\tvccs:\tvoltage-controlled current source\n\t\tvcvs:\tvoltage-controlled voltage source\n\t\tvsrc:\tvoltage source\n\n\tThe following is the corresponding list of analyses:\n\t\top:\tDC operating point\n\t\tdc:\tDC transfer curve\n\t\ttf:\tSmall signal transfer function\n\t\tac:\tAC (frequency domain)\n\t\ttran:\ttransient\n\t\tpz:\tpole-zero\n\t\tdisto:\tdistortion\n\t\tnoise:\tnoise\n\t\tsense:\tsensitivity\n\n\n\nTechnical Problems\n\n\tSpice no longer has technical support from the\n\tUniversity of California.  If you have problems with the\n\tmedia or questions about ording spice3, you may send email to:\n\n\t\tsoftware@eecs.berkeley.edu\n\n\tor (via US Mail):\n\n\t\tEECS/ERL Industrial Support Office\n\t\tAttn: Spice Technical Question\n\t\t205 Cory Hall\n\t\tU.C. Berkeley\n\t\tBerkeley, CA   94720\n\n\tPatches for some previous version of spice3 are available via\n\tanonymous ftp from ic.berkeley.edu, in the subdirectory \"pub/spice3/\".\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedhyw%2Fspice3f5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhedhyw%2Fspice3f5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedhyw%2Fspice3f5/lists"}