91 lines
4.9 KiB
Plaintext
91 lines
4.9 KiB
Plaintext
XSCHEM : schematic capture and netlisting EDA tool
|
|
|
|
Xschem is a schematic capture program, it allows creation of hierarchical representation
|
|
of circuits with a top down approach . By focusing on interfaces, hierarchy and instance
|
|
properties a complex system can be described in terms of simpler building blocks. A VHDL
|
|
or Verilog or Spice netlist can be generated from the drawn schematic, allowing the
|
|
simulation of the circuit. Key feature of the program is its drawing engine written in C
|
|
and using directly the Xlib drawing primitives; this gives very good speed performance,
|
|
even on very big circuits. The user interface is built with the Tcl-Tk toolkit, tcl is
|
|
also the extension language used.
|
|
|
|
DOCUMENTATION AND MANUAL
|
|
|
|
http://repo.hu/projects/xschem
|
|
|
|
BUILDING & RUNNING
|
|
|
|
Please read additional information in file INSTALL_WIN for installation instructions
|
|
|
|
SUBDIRECTORIES
|
|
|
|
XSchemWin: Windows specific files (e.g. xschem.tcl, xschemrc, config.h)
|
|
|
|
INSTRUCTIONS TO ADD XSCHEM TO VISUAL STUDIO 2019
|
|
|
|
1. requirements
|
|
|
|
- Microsoft Visual Studio 2019
|
|
- Wix Toolset Visual Studio 2019 Extension (Download through Microsoft Extensions on VS 2019)
|
|
- Wix Toolset Build Tools v3.11 (Download online from wixtoolset)
|
|
- ActiveState tcl/tk 8.6 (Remember install directory where includes files are, see step h)
|
|
32-bit, 64-bit ActiveState need to match XSchem x86, x64, respectively.
|
|
- bison (Remember executabled directory for step h, preferably don't have spaces in the directory path (ie., don't use Program Files))
|
|
(http://gnuwin32.sourceforge.net/packages/bison.htm, Complete package, except sources (bison-2.4.1-setup.exe))
|
|
- flex (Remember executabled directory for step h, see bison note)
|
|
(http://gnuwin32.sourceforge.net/packages/flex.htm, Complete package, except sources (flex-2.5.4a-1.exe))
|
|
|
|
2. Create new XSchemWin project on Visual Studio 2019
|
|
|
|
a. Open VS2019
|
|
b. Create a new project
|
|
c. Select Empty Project
|
|
d. Project Name: XSchemWin
|
|
Location: D:\Projects\XSchem
|
|
Solution Name: XSchemWin (Check Place solution and project in the same directory).
|
|
e. Click Create
|
|
A new folder XSchemWin will be created (XschemWin.sln and XSchem.vcxproj)
|
|
f. Add C/H files under src into the project (e.g. svn://repo.hu/xschem/trunk/src)
|
|
- Exclude src/expandlabel.c, src/expandlabel.h, src/parselabel.c (add later after using Windows Flex and bison)
|
|
- Exclude src/xschem.tcl and src/xschemrc (add the two files from svn://repo.hu/xschem/trunk/src/XSchemWin/)
|
|
- Add config.h from svn://repo.hu/xschem/trunk/src/XSchemWin/
|
|
config.h is generated by Linux counterpart. Edit if necessary
|
|
g. XSchemWin Property Page > Linker > Input (All Configuration for x64 depending on what machine dependency you installed for Active State):
|
|
Add "tcl86t.lib;tk86t.lib" for Additional Dependencies
|
|
h. For (All Configurations, x64)
|
|
XSchemWin Property Page > VC++ Directories > Include Directories, Add "C:\ActiveTcl\include"
|
|
XSchemWin Property Page > VC++ Directories > Library Directories, Add "C:\ActiveTcl\lib"
|
|
XSchemWin Property Page > VC++ Directories > Executable Directories, Add "D:\GnuWin32\bin"
|
|
i. XSchemWin Property Page > C/C++ > Preprocessor, Add ";_CRT_SECURE_NO_WARNINGS" to proceed with the following compile error:
|
|
Severity Code Description Project File Line Suppression State
|
|
Error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. XSchemWin D:\Projects\XSchem\src\actions.c 117
|
|
j. Right click parselabel.l
|
|
Property Pages > Item type, change from "Does not participate in build" to "Custom Build Tool"
|
|
Click Apply to get options for "Custom Build tool"
|
|
Command Line: flex -l -oparselabel.c ..\src\parselabel.l
|
|
Outputs: parselabel.c
|
|
k. Right click expandlabel.y
|
|
Property Pages > Item type, change from "Does not participate in build" to "Custom Build Tool"
|
|
Command Line: bison -d -o expandlabel.c ..\src\expandlabel.y
|
|
Outputs: expandlabel.c
|
|
|
|
3. compiling
|
|
|
|
- config.h can be edited to change default's XSCHEM_LIBRARY_PATH.
|
|
It's defaulted to include the following directories:
|
|
C:/Program Files/XSchem/xschem_library/devices
|
|
C:/Program Files/XSchem/xschem_library/examples
|
|
C:/Program Files/XSchem/xschem_library/ngspice
|
|
C:/Program Files/XSchem/xschem_library/logic
|
|
C:/Program Files/XSchem/xschem_library/binto7seg
|
|
C:/Program Files/XSchem/xschem_library/pcb
|
|
C:/Program Files/XSchem/xschem_library/rom8k
|
|
|
|
Ctrl-b
|
|
- After compiling the first time, add expandlabel.c, expandlabel.h, parselabel.c into the project.
|
|
These 3 files are created in D:\Projects\XSchem\XSchemWin
|
|
|
|
4. running from Visual Studio 2019
|
|
|
|
F5
|