Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c40db3c
"ocd_git_pure automatic update to repo"
RTimothyEdwards May 17, 2019
d3c498d
Merge branch 'master' into irsim-9.7
RTimothyEdwards May 19, 2019
8fefbd0
"ocd_git_pure automatic update to repo"
RTimothyEdwards May 19, 2019
10a9c68
Merge branch 'master' into irsim-9.7
RTimothyEdwards Jun 16, 2019
7fd5e76
"ocd_git_pure automatic update to repo"
RTimothyEdwards Jun 16, 2019
61591a8
Merge branch 'master' into irsim-9.7
RTimothyEdwards Jan 30, 2020
c333818
"ocd_git_pure automatic update to repo"
RTimothyEdwards Jan 30, 2020
176528f
"ocd_git_pure automatic update to repo"
RTimothyEdwards Feb 24, 2020
807d4ea
Changes for git merge
RTimothyEdwards Feb 24, 2020
e3a0f38
Merge branch 'master' into irsim-9.7
RTimothyEdwards Feb 24, 2020
2635c3c
Merge branch 'master' into irsim-9.7
RTimothyEdwards Feb 24, 2020
76df12d
Merge branch 'master' into irsim-9.7
RTimothyEdwards Sep 27, 2020
3774fe1
Merge branch 'master' into irsim-9.7
RTimothyEdwards Sep 30, 2020
9998caa
Merge branch 'master' into irsim-9.7
RTimothyEdwards Sep 25, 2021
144631d
Merge branch 'master' into irsim-9.7
RTimothyEdwards Sep 26, 2021
95254f1
Merge branch 'master' into irsim-9.7
RTimothyEdwards Oct 12, 2021
75b62cc
Merge branch 'master' into irsim-9.7
RTimothyEdwards Sep 17, 2022
08951bd
Merge branch 'master' into irsim-9.7
RTimothyEdwards Oct 2, 2022
e0aca6b
Merge branch 'master' into irsim-9.7
RTimothyEdwards Oct 3, 2022
e3da344
Merge branch 'master' into irsim-9.7
RTimothyEdwards Jul 25, 2023
fd073e4
Merge branch 'master' into irsim-9.7
RTimothyEdwards Oct 27, 2023
a301a06
Merge branch 'master' into irsim-9.7
RTimothyEdwards Mar 18, 2025
6acaeb6
Merge branch 'master' into irsim-9.7
RTimothyEdwards Nov 12, 2025
ff459b9
Merge branch 'master' into irsim-9.7
RTimothyEdwards Nov 13, 2025
c23c0a7
Tcl/Tk 9, fix "classic" build with gcc-14, headless -nocon mode, fix …
stfns-s Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
irsim
/irsim/irsim
/irsim/gentbl
/irsim/genspktbl
irsimexec
defs.mak
Depend
Expand All @@ -8,6 +10,7 @@ config.log
scripts/defs.mak
scripts/config.log
scripts/config.status
scripts/autom4te.cache
make.log
install.log
*.o
Expand Down
8 changes: 8 additions & 0 deletions analyzer/ana_glob.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ extern void EnableInput( /* */ );
extern void DisableAnalyzer( /* */ );
extern void EnableAnalyzer( /* */ );
extern void TerminateAnalyzer( /* */ );
extern void WindowResize( /* ev */ );
extern void WindowExposed( /* event */ );
extern void HandleButton( /* ev */ );
extern void HandleKey( /* ev */ );

/* EXPORTS FROM thread.c */

extern int xloop_create( /* */ );

/* EXPORTS FROM defaults.c */

Expand Down
2 changes: 2 additions & 0 deletions analyzer/analyzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public void DisplayTraces( isMapped )
{
int change;

if (window == 0) return; /* GUI is built lazily; not ready yet */

DisableInput();

traces.total += numAdded;
Expand Down
1 change: 1 addition & 0 deletions analyzer/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
*/
#include <stdio.h>
#include <stdlib.h> /* for atoi() */
#include <string.h> /* for strlen() */
#include "ana.h"
#include <X11/Xutil.h>
Expand Down
11 changes: 7 additions & 4 deletions base/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,13 @@ public int config( cname )
device_names = (DevRec **)malloc(sizeof(DevRec *));
device_names[0] = (DevRec *)NULL;

/* Insert default devices */
makedevice("nfet", "n-channel", (float)0.0);
makedevice("pfet", "p-channel", (float)0.0);
makedevice("resistor", "resistor", (float)0.0);
/* Insert default devices. The array index must match the implant */
/* enum used as t->ttype, since transistors are looked up as */
/* device_names[t->ttype]: NCHAN=0, PCHAN=1, DEP=2, RESIST=3. */
makedevice("nfet", "n-channel", (float)0.0); /* NCHAN = 0 */
makedevice("pfet", "p-channel", (float)0.0); /* PCHAN = 1 */
makedevice("resistor", "resistor", (float)0.0); /* DEP = 2 */
makedevice("resistor", "resistor", (float)0.0); /* RESIST = 3 */

while( fgetline( line, LSIZE, cfile ) != NULL )
{
Expand Down
14 changes: 13 additions & 1 deletion base/rsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

#ifdef TCL_IRSIM
#include <tk.h>
/* Tcl version 9 compatibility */
#if TCL_MAJOR_VERSION < 9
typedef int Tcl_Size;
#endif
#endif

#include "defs.h"
Expand Down Expand Up @@ -316,7 +320,8 @@ private void apply (fun, vfunc, arg)

#ifdef TCL_IRSIM
/* Check for case in which arguments are passed as a list. */
int start, argc;
int start;
Tcl_Size argc;
char **argv;

if (targc == applyStart + 1)
Expand Down Expand Up @@ -4026,6 +4031,13 @@ private int analyzer()
if (!InitDisplay(first_file, (*x_display) ? x_display : NULL))
return(0);
InitTimes(sim_time0, stepsize, cur_delta, 1);
#else
/* The Tk GUI is built lazily; building it sets up the */
/* analyzer's X window via start_analyzer(). Do it now, */
/* before DisplayTraces() touches the window -- otherwise */
/* we crash on a NULL display / zero window. */
if (Tcl_Eval(irsiminterp, "irsim::build_gui") != TCL_OK)
return(-1);
#endif
}

Expand Down
11 changes: 11 additions & 0 deletions base/rsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,15 @@ extern int expand();
extern int input();
extern void shift_args();

#ifndef TCL_IRSIM
/* the Tcl build (tclirsim.c) has its own static finput() */
extern int finput();
#endif
extern void InitCmdPath();
extern void init_commands();

/* analyzer display locking, used under HAVE_PTHREADS (see event.c) */
extern void EnableInput();
extern void DisableInput();

#endif /* _RSIM_H */
2 changes: 1 addition & 1 deletion base/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ private int input_sim (simfile, has_param_file)
break;

case 'r':
newtrans(RESIST, 2, targc, targv);
newtrans(RESIST, RESIST, targc, targv);
break;

case 'x':
Expand Down
8 changes: 4 additions & 4 deletions irsim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ tclirsim${SHDLIB_EXT}: ${EXTRA_LIBS}
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ ${LDDL_FLAGS} ${LD_RUN_PATH} \
${EXTRA_LIBS} -lc ${LIBS} ${LD_EXTRA_LIBS}

$(DESTDIR)${INSTALL_BINDIR}/irsim:
${RM} $(DESTDIR)${INSTALL_BINDIR}/irsim
${CP} irsim $(DESTDIR)${INSTALL_BINDIR}/irsim
$(DESTDIR)${INSTALL_BINDIR}/${IRSIM_BIN}:
${RM} $(DESTDIR)${INSTALL_BINDIR}/${IRSIM_BIN}
${CP} irsim $(DESTDIR)${INSTALL_BINDIR}/${IRSIM_BIN}

$(DESTDIR)${INSTALL_BINDIR}/gentbl:
${RM} $(DESTDIR)${INSTALL_BINDIR}/gentbl
Expand All @@ -43,7 +43,7 @@ gentbl:
genspktbl:
${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} genspktbl.c -o $@ ${LIBS}

install: $(DESTDIR)${INSTALL_BINDIR}/irsim $(DESTDIR)${INSTALL_BINDIR}/gentbl \
install: $(DESTDIR)${INSTALL_BINDIR}/${IRSIM_BIN} $(DESTDIR)${INSTALL_BINDIR}/gentbl \
$(DESTDIR)${INSTALL_BINDIR}/genspktbl

install-tcl: $(DESTDIR)${INSTALL_TCLDIR}/tclirsim${SHDLIB_EXT}
Expand Down
2 changes: 1 addition & 1 deletion irsim/genspktbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ double delaytab[ SPIKETBLSIZE + 1 ][ SPIKETBLSIZE + 1 ];
FILE *F;


main( argc, argv )
int main( argc, argv )
int argc;
char *argv[];
{
Expand Down
10 changes: 5 additions & 5 deletions irsim/gentbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FILE *out;


/* name of interval */
char *pinterval( high, low )
char *pinterval( int high, int low )
{
static char temp[100];

Expand All @@ -60,14 +60,14 @@ int strength( i )
#define max( A, B ) ( ((A) > (B)) ? (A) : (B) )

/* find the enclosing interval */
char *span( ihigh, ilow, jhigh, jlow )
char *span( int ihigh, int ilow, int jhigh, int jlow )
{
return( pinterval( min( ihigh, jhigh ), max( ilow, jlow ) ) );
}


/* merge two intervals using least-upper bound operation */
char *merge( ihigh, ilow, jhigh, jlow )
char *merge( int ihigh, int ilow, int jhigh, int jlow )
{
register int ahigh, alow;

Expand All @@ -94,7 +94,7 @@ char *merge( ihigh, ilow, jhigh, jlow )


/* convert interval to use weak values */
char *weak( i, j )
char *weak( int i, int j )
{
if( i == 0 )
i = 1;
Expand All @@ -108,7 +108,7 @@ char *weak( i, j )
}


main()
int main()
{
register int i, j, k, ii, jj, interval2;

Expand Down
3 changes: 1 addition & 2 deletions irsim/irsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public void Usage( msg, s1 )

/* Main routine for irsim */

public main( argc, argv )
char *argv[];
int main( int argc, char *argv[] )
{
int i, arg1, has_param_file;

Expand Down
11 changes: 8 additions & 3 deletions random/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@

#include <tcl.h>

/* Tcl version 9 compatibility */
#if TCL_MAJOR_VERSION < 9
typedef int Tcl_Size;
#endif

/*--------------------------------------------------------------*/
/* return a sample from a unit normal distribution */
/*--------------------------------------------------------------*/
Expand Down Expand Up @@ -293,7 +298,7 @@ int do_random(ClientData cl, Tcl_Interp *interp, int argc, char *argv[])
return TCL_ERROR;
}
else {
int list_count;
Tcl_Size list_count;
char **list;

if (Tcl_SplitList(interp, argv[3], &list_count,
Expand All @@ -307,7 +312,7 @@ int do_random(ClientData cl, Tcl_Interp *interp, int argc, char *argv[])
}
}
else if (strcmp(argv[1], "-permute") == 0) {
int list_count;
Tcl_Size list_count;
char *t;
char **list;

Expand Down Expand Up @@ -378,7 +383,7 @@ int do_random(ClientData cl, Tcl_Interp *interp, int argc, char *argv[])
return TCL_ERROR;
}
else {
int list_count;
Tcl_Size list_count;
char *t;
char **list;

Expand Down
5 changes: 5 additions & 0 deletions scripts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ gr_dflags
gr_cflags
DIST_DIR
cadinstall
irsim_bin
programs
unused
modules
Expand Down Expand Up @@ -2541,6 +2542,8 @@ _ACEOF
ALL_TARGET="standard"
INSTALL_TARGET="install-irsim"

irsim_bin="irsim"

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
Expand Down Expand Up @@ -6234,6 +6237,7 @@ if test $usingTcl ; then
extra_defs="$extra_defs -DTCL_DIR=\\\"\${TCLDIR}\\\""
else
programs="$programs irsim"
irsim_bin="cirsim"
unused="$unused tcltk"
fi

Expand Down Expand Up @@ -6764,6 +6768,7 @@ fi






ac_config_files="$ac_config_files defs.mak"
Expand Down
5 changes: 5 additions & 0 deletions scripts/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ dnl Override default target when compiling under TCL
ALL_TARGET="standard"
INSTALL_TARGET="install-irsim"

dnl Name of the installed standalone binary (overridden below for non-Tcl)
irsim_bin="irsim"

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
Expand Down Expand Up @@ -807,6 +810,7 @@ if test $usingTcl ; then
extra_defs="$extra_defs -DTCL_DIR=\\\"\${TCLDIR}\\\""
else
programs="$programs irsim"
irsim_bin="cirsim"
unused="$unused tcltk"
fi

Expand Down Expand Up @@ -1266,6 +1270,7 @@ AC_SUBST(sub_extra_libs)
AC_SUBST(modules)
AC_SUBST(unused)
AC_SUBST(programs)
AC_SUBST(irsim_bin)
AC_SUBST(cadinstall)
AC_SUBST(DIST_DIR)

Expand Down
1 change: 1 addition & 0 deletions scripts/defs.mak.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ SUB_EXTRA_LIBS = @sub_extra_libs@
MODULES += @modules@
UNUSED_MODULES += @unused@
PROGRAMS += @programs@
IRSIM_BIN = @irsim_bin@
INSTALL_CAD_DIRS += @cadinstall@

RM = rm -f
Expand Down
Loading