14 Commits (c83d11c9c0e5b5796d6fd86ff4bf0bab612c80df)

Author SHA1 Message Date
Brian Taylor c83d11c9c0 Call cm_cexit() to prevent the simulator running when d_process initialization errors occur. 2 years ago
Holger Vogt 21761207bc Change license to 3-clause BSD (see 2 years ago
Brian Taylor 09f070f582 Error handling improvements in cfunc.mod. Ensure that d_process.h wiil always respond to version and interface checks sent from sendheader. This is needed so that the pipe reads in sendheader do not cause Windows to hang when the interface version and in/out counts do not match. This hang was the cause of errors not being reported and the Windows gui hanging. Startup and header checks are now detected in cm_d_process, and the simulator will run but with runtime errors since a d_process model cannot be completely instantiated after initial errors. It would be good to find a means of gracefully halting the simulation run. 2 years ago
Brian Taylor 8c72a76844 Another attempt at clean up of error handling and reporting. It's OK on limux and cygwin, but Windows VisualC is being stubborn. I would prefer not to have to call exit(1) just for Windows, since then nothing is reported and the gui disappears in a puff of smoke. Even without the exit calls nothing gets reported with the Windows gui which will hang when there are errors detected by d_process. 3 years ago
Brian Taylor 4eae039779 Add modifications note. 3 years ago
Brian Taylor 4530cde8e2 Use Xspice cm_message_send to report errors rathen than printing to stderr and calling exit. When a d_process model has errors found in start(), sendheader(), and dprocess_exchangedata() these are reported, but if the model is run a SIGINT is raised. There must be a better way of stopping the simulator. 3 years ago
Brian Taylor df28fabc42 Restore the deleted unused params to be backword compatible. Handle the case where the d_process instance has a null in vector, so that N_din is zero. This allows the model to be just a pattern generator. Add include to cmproto.h to avoid a forward ref. to an enum type. 3 years ago
Brian Taylor 7820940be3 Remove the unused reset_delay param. 3 years ago
Brian Taylor e762047fc2 Add array bounds check, fix typos. 3 years ago
Brian Taylor 022a340ddb Fix VisualC and Mingw compiler warnings. 3 years ago
Brian Taylor cccb4a1559 Add callback to free process memory. 3 years ago
Brian Taylor 33780055ee Add MODIFICATIONS note, cleanup white space. 3 years ago
Brian Taylor 5c4352d02f Add __MINGW64__ defines for builds on mingw with msys. 3 years ago
Brian Taylor 3bb6e86015 Add Windows Visual Studio support for the Isotel d_process xspice digital model. The Isotel mixedsim-master/examples/embedded/motorforce C code needs to have minor changes for _MSC_VER defines, and are not included with this commit. The changes relate to using #pragma pack(push, 1)...#pragma pack(pop) around some structs, and setting stdin/stdout in binary mode. It is doubtful that the cfunc.mod will compile on mingw or cygwin since I don't know if they support pipe/fork/exec/spawn calls. The code builds and runs on Windows, Linux, and MacOS. In the future, Giles Atkinson is looking at allowing Xspice models to load shared libraries (.dll, .so) which will avoid creating and communicating with an external program. 3 years ago