Here is the source code for the Pacemaker Verification System project. The following is a breakdown of the source folders:
-
GUI/
This folder contains the MATLAB code for the GUI monitor program. It has been tested on MATLAB versions 2009a, 2011a, and 2011b. It should theoretically work on standard MATLAB installations without additional packages. Execute
PVS_GUI.mto run the GUI. -
LookupModels/
This folder contains the MATLAB Simulink and Stateflow models for the virtual heart. Simulink HDL Coder is required to convert these models to HDL for use on an FPGA. These models are known to work with MATLAB 2011a. The
LookupModeling.mdllibrary contains the Stateflow models for the node and path automata. The other.mdlfiles are full heart models that have been linked with this library (the_scopemodels have Simulink scope entities for debugging via simulation). These full models can be generated with the build scripts in thescripts/folder.These are called lookup models because they use lookup tables to calculate ERP lengths for the node automata as a function of activation time within RRP. As a result, these models consume significantly more resources than the simple models.
-
SimpleModels/
This folder contains the MATLAB Simulink and Stateflow models for the virtual heart. Simulink HDL Coder is required to convert these models to HDL for use on an FPGA. These models are known to work with MATLAB 2011a. The
SimpleModeling.mdllibrary contains the Stateflow models for the node and path automata. The other.mdlfiles are full heart models that have been linked with this library (the_scopemodels have Simulink scope entities for debugging via simulation). These full models can be generated with the build scripts in thescripts/folder. The modelcase2mod_new.mdlwas used for demonstration of the system, and is constructed from thecase2mod_new.matfile using the build script.These are called simple models because they do not use lookup tables like the above lookup models.
-
hdl_harness/
This folder contains the Verilog harness for running the virtual heart model on an FPGA. It handles all I/O for the virtual heart, such as sending beats and receiving paces to and from the pacemaker, and sending and receiving configuration data to and from the monitor PC running the MATLAB GUI.
This harness was designed for the Terasic DE0-Nano evaluation board with an Altera Cyclone IV FPGA. Synthesis was performed through the Altera Quartus II free web edition development environment, version 11.1. Quartus projects were constructed with the Terasic SystemBuilder software. To use this harness, generate a project with the appropriate I/O (LEDs, GPIO, clock) in SystemBuilder. Copy these files into the project and reassign
TopLevel.vas the top-level module. Then copy the autogenerated virtual heart model HDL files from Simulink into the project. Ensure that the heart model (in our casecase2mod_new) matches with the instantiation inTopLevel.v. The project should now be ready for synthesis and flashing the board. -
scripts/
This folder contains the build data and the build script for constructing virtual heart models. Each
.matfile represents a different heart, where the timing properties for each tissue node and the paths between them are established. The scriptbuildmodel.mconstructs the Simulink heart model.mdlusing a.matfile for the topology and a library.mdlfile for including the implementation of generic nodes and paths. For example,case2mod_new.mdlinSimpleModelingwas constructed usingcase2mod_new.matas the topology andSimpleModeling.mdlas the library. The build scripts have been tested in MATLAB 2011a and 2011b and should only require the Simulink and Stateflow packages.
- Group: [email protected]
- Zhihao Jiang: [email protected]
- Sriram Radhakrishnan: [email protected]
- Varun Sampath: [email protected]
- Shilpa Sarode: [email protected]
- Prof. Rahul Mangharam: [email protected]