VLSI Implementation of the Pacemaker Unit of the...
Transcript of VLSI Implementation of the Pacemaker Unit of the...
VLSI Implementation of the Pacemaker Unit of the Interstitial Cell of Cajal
Ganapathy Subramanium Sundar 1
Department of Bioengineering 2 University of California, San Diego 3
San Diego,CA-92093 4 5
Abstract 6
The digestion of the food in the gastro-intestinal tract is aided by the 7 peristaltic contractions of the gastric muscles. This gastric motility is a 8 result of the sponta- neous rhythmic pacemaker activity produced by the 9 interstitial cells of Cajal(ICC), which line the gastro-enteric system. The 10 interstitial cells of Cajal are a special- ized group of neuro-muscular cells 11 and are derived from fibroblasts. These cells generate periodic action 12 potentials termed as slow waves, which are responsible for gastric motility. 13 The objective of this project is to implement a VLSI model of a simple 14 ICC network capable of producing slow waves generated by the ICC 15 network of the stomach. The cells of the network are designed using a 16 mathemat- ical model where the membrane voltage of the ICC is based on 17 the flow of C a2+ ions and N a+ ions. 18
19
1 Introduction: 20
21 The human digestive system has the tasks of ingestion, digestion, absorption and 22 assimilation of food. The food taken in is pushed through the alimentary canal by a series of 23 rhythmic contractions of the smooth muscles lining the gastro-intestinal(GI)l tract called 24 peristalsis. These contractions are caused by a set of electrical-signals called ”slow waves”. 25 The slow-waves, in turn, are generated by the Interstitial cells of Cajal which also line the GI 26 tract. 27 The slow waves are a summation of a large number of various functional cell membrane 28 fluctuations called “Unitary Potentials (UP)”. The unitary potentials are generated from a 29 group of cell organelles called "Pacemaker Unit (PU)". The UP is generated by the flow of 30 Ca
2+ ions through the Pacemaker Unit. 31
32 Abnormalities in the Interstitial Cells of Cajal could result in gastric diseases like Irritable 33 Bowel Syndrome and Pylorus Dysfunction. In this project, a VLSI model of the Pacemaker 34 Unit, which is the most fundamental unit of the ICC, is built using VHDL from a proven 35 biophysical model. 36 37 2 Biophysical Background: 38
2.1 The Interstitial Cell of Cajal: 39
The Interstitial Cells of Cajal were first isolated by Santiago Ramon y Cajal. These cells are 40 found along the entire gut -wall including the myenteric-plexus and at the interface between 41 the circular muscle and the submucosa. These cells are neither neurons nor muscular cells 42
and are supposed to be derived from fibroblasts. The ICC are electrically coupled to the 43 enteric muscle cells through gap junctions. The slow waves in the digestive system are 44 generated by a large group of these cells. 45
Each part of the digestive system has its own charactersitic slow-wave. For example, in the 46 human digestive system, the frequency of the slow-waves is 3 cycles per minute in the 47 stomach and 12 cycles per minute in the duodenum. This variation is largely attributed to the 48 difference in the ICC population in the various digestive organs. Figure 1 shows the different 49 population of the ICC in the rat stomach and the rat intestine. 50
51
Figure 1: ICC distribution along the murine stomach and murine intestine[2] 52
53
2 .2 The Pa ce ma ke r Un i t : 54
[2] suggests that the Interstitial Cell of Cajal is fundamentally made up of a number of small 55 functional units which are responsible for the generation of the slow wa ves. These units are 56 called the pacemaker units and essentially are made up of four components: 57
2.2.1 The Endoplasmic Reticulum(ER): 58
It is the intracellular Ca2+
store that cycles Ca2+
by release via the IP3R and is sequestered 59 back again by the sarcoeondoplasmic reticulum calcium ATPase (SERCA) pump proteins. 60
2.2.2 The Mitochondrial Subspace (MT) : 61 62 It regulates the cellular ATP production through the mitochondrial calcium uni- 63 porter(MCU) and the Mitrochondrial Sodium/Calcium Exchanger(NCX). 64 65 2.2.3 Cytosolic Subspace(S1 and S2): 66 67 These two form the reamining of the pacemaker unit and includes the Non-Selective 68 Cation conductance exchanger(NSCC) and the intracellular C a2+ fluxes(S1S2). 69 70 2.3 The Unitary Potential: 71 72 The Unitary Potential is generated in the Pacemaker Unit as a consequence of the flow of 73 C a2+ ions. Initially C a2+ ions flow into the S1 subspace which then diffuse to S2 74 .Sufficient C a2+ entry into S2 raises the IP3 R open probability causing a flow of C a2+ 75 from the Endoplasmic Reticulum. The mitochondria also gets activated through the MCU 76 channel, causing rapid mitochondrial C a2+ accumulation. To maintain ionic concentrations 77 in the ER, the ER takes up C a2+ ions though the SERCA pump. The deficiency in the ions 78 in S1 causes the NSCC channel to open up taking up both N a+ and C a2+ ions. This 79 depolarization is then followed by a repolarization where mitochondria releases the excess 80
Ca2+ ions through NCX and S1 releases N a+ ions into the extracellular space. This 81 process is cyclic and gives rise to a unitary potential cycle. 82
83
84 Figure 2: The schematic diagram of the Pacemaker Unit and the flow of ions. 85
86 2.4 The Model Framework: 87 88 [2] models the Unitary Potential as a state model of 5 differential equations governing 89 the basic parameters. The state variables are: 90 91
Vm: Membrane Potential 92 C S1 : Ca
2+ concentration in S1 93
C S2 : Ca2+
concentration in S2 94 C ER : Ca
2+ concentration in ER 95
C MT : Ca2+
concentration in MT 96 N S1 : Na
+ concentration in S1 97
H: opening gate variable 98 Φ3: IP3R slow variable 99
The state equations are given by: 100 101
102
103
Where the Ji is the Ca2+ flux due to the particular channel i, φ1 and φ2 are the opening and 104 closing gate variables of I P3R and fm is the mitochondrial buffering rate. 105
106
3. System Implementation: 107
3.1 Basic Block Diagram: 108
The Pacemaker Unit's digital VLSI model has two inputs viz. the Clock and the Reset 109 and a 32 bit output for the output voltage generated. This is as shown in Figure 3 110
111
Figure 3: Black Box of Pacemaker Unit 112
113
Figure 4: Block Diagram of the Pacemaker Unit 114 115 The Pacemaker Unit's block diagram is shown in the following diagram. The constants 116 and the parameters are stored in a memory block in the 32 bit IEEE-754 format. The main 117 advantage of this format is that floating point numbers are easy to represent and compute. 118 The membrane voltage and the other state parameters are calculated in the computation 119 block. The system is a positive edge triggered system and consists of 32 bit floating point 120 multipliers, adders and subtractors. 121
To verify the accuracy of the model, the system was first simulated on MATLAB with a 122 initial resting potential of -70.1 mV. The system was also simulated in MATLAB to 123 determine the clock frequency required to run the system so as to obtain a unitary potential 124 of 3 cycles/minute as the case with most mammals. 125
The actual model was simulated using VHDL on Altera's FPGA software Quartus II. The 126 output waveforms were analyzed using ModelSim and the Register Transfer Level (RTL) 127 schematic was obtained. 128
129
4. Results: 130
Figure 5 shows the MATLAB simulation of the system using MATLAB's ode23 solver. By a 131 hit-and-trial method, the system was found to generate a unitary potential of the desired 132 frequency when the samples were spaced at 1.54 ms. Thus it was decided that the clock 133 frequency of the system to be at 6.4 kHz. Figure 6 shows the various Ca
2+ concentrations 134
across the different parts of the Pacemaker Unit. 135
136 Fig ure 5 : MAT LAB : U n i t a r y P o ten t i a l s ( Amp l i tud e 3 mV p k -p k) 137
138
139 Fig ure 6 : MAT LAB Ca
2 + i o n f lo w i n va r io u s c o mp o nent s o f t he P acemaker 140
Uni t 141 142 143 144
Fig ure 7 sho ws t he wa v e fo r m s i mu la t io n u s in g VHDL a t a c lo ck o f 6 .4 kHz . 145 T he s ys t e m was b u i l t u s in g t he b ehav io ura l mo d e l and emp lo yed t he Eule r ' s 146 met ho d fo r so lv i ng t he d i ffe r en t i a l eq ua t io n s . Ap p end i x A sho ws the RT L 147 sche mat i c s yn t hes i zed fo r the P acema ker Uni t . 148
149
Fig ure 7 : VHD L S i mu la t io n Outp u t o f t he P acemaker U ni t 150
151
5. Conclusion and Future Work: 152
T hus the V LSI mo d e l o f the P ace m a ker Un i t w as o b ta ined us i n g V H D L and 153 ve r i f i ed wi t h M AT LAB s i mula t io ns . T he In te r s t i t i a l Ce l l o f Ca j a l has mo re 154 t han o ne P ace maker U n i t . Hence the co l l ec t ive su mmat io n o f a l l t he 155 P acema ker u n i t s has to b e s tud ied . A l so the ga s t r i c wa l l i s l i ned wi t h mo re 156 t han o ne ICC. He nce i t i s neces sa r y to s t ud y t h e e ffec t s o f ma n y I CC s and 157 t he e ffec t o f t he ICC p o p ula t io n o n t he cha rac te r i s t i c s o f t he s lo w wa ve 158 gene ra ted . 159
References 160 [1] Sanders, K.M., T. Koh, S.D. and Ward., S.M., “Interstitial Cells of Cajal as pacemakers in 161 the gastrointestinal tract”, Annu Rev. Physiol. 68:307-343. 162 163 [2] Faville, R. , A. Pullan, K. Sanders and N. Smith.2008. A biophysically based mathematical model of 164 unitary potential activity in interstitial cells of Cajal.”,Biophysical Journal 95(1):88-104. 165 166 [3] Douglas L. Perry, VHDL- Programming by Example,McGraw-Hill 167 Publishers. 168
169
170
171
172
173
174
175
Appendix A 176
RTL Schematic of the Pacemaker Unit 177
178
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
D Q
PRE
ENA
CLR
SEL
DATAA
DATABOUT0
MUX21
0
1
0
0
1
0
1
0
1
0
1
<<A[23..0]
COUNT[6..0]
LEFT_SHIFT
<<A[23..0]
COUNT[6..0]
LEFT_SHIFT
0
1
0
1
0
1
0
1
0
1
<<A[23..0]
COUNT[6..0]
LEFT_SHIFT
0
1
C_ER_OUT0
fpresult~_OUT0 C_S1_OUT0
fpresult~_OUT0
C_S2_OUT0
fpresult~_OUT0 H_OUT0
fpresult~_OUT0
V_m_OUT0
fpresult~_OUT0 phi_3_OUT0
fpresult~_OUT0 C_MT_OUT0
fpresult~_OUT0
add~199_OUT0
exp~1943_OUT0
find_leftmost~11907_OUT0
orx~1924_OUT0orx~1925_OUT0
find_leftmost~11979_OUT0
find_leftmost~11985_OUT0
exp~2069_OUT0
find_leftmost~12459_OUT0
orx~1950_OUT0orx~1951_OUT0
exp~1796_OUT0
exp~1803_OUT0
orx~7796_OUT0orx~7797_OUT0
find_leftmost~12531_OUT0
find_leftmost~12537_OUT0
orx~7822_OUT0orx~7823_OUT0
sign~27_OUT0
ufract~254_OUT0
sign~28_OUT0
fpresult~_OUT0
LessThan4559_OUT
fracts~4934_OUT0
find_leftmost~11909_OUT0
Result~4843_OUT0
find_leftmost~12461_OUT0
find_leftmost~11211_OUT0
find_leftmost~11283_OUT0find_leftmost~11289_OUT0
fracts~4936_OUT0
fract~65_OUT0
Result~4839_OUT0
Result~4851_OUT0
Result~4859_OUT0
fracts~4937_OUT0
Add825_OUT
find_leftmost~12024_OUT0
find_leftmost~12025_OUT0
find_leftmost~12026_OUT0
ShiftLeft92_OUT
find_leftmost~11213_OUT0
find_leftmost~11912_OUT0
Add863_OUT
find_leftmost~12576_OUT0
find_leftmost~12577_OUT0
find_leftmost~12578_OUT0
ShiftLeft96_OUT
fracts~4938_OUT0
find_leftmost~12464_OUT0
LessThan1157_OUT
fracts~1234_OUT0
find_leftmost~11247_OUT0find_leftmost~11253_OUT0
orx~1928_OUT0orx~1929_OUT0
find_leftmost~11991_OUT0
fracts~4939_OUT0
Result~4818_OUT0
orx~1954_OUT0orx~1955_OUT0
fracts~1235_OUT0
orx~7800_OUT0orx~7801_OUT0
find_leftmost~12543_OUT0
orx~7826_OUT0orx~7827_OUT0
fracts~4940_OUT0
Add776_OUT
find_leftmost~11328_OUT0
find_leftmost~11329_OUT0
find_leftmost~11330_OUT0
ShiftLeft87_OUT
find_leftmost~11216_OUT0
fracts~1236_OUT0
find_leftmost~11915_OUT0
C_ER[8..-23]
clk
rst
C_S1[8..-23]
H[8..-23]
V_m[8..-23]
phi_3[8..-23]
C_MT[8..-23]
V_out[31..0]~reg0
V_out[31..0]
fpresult~[9121..9090]
32' h7F800001 --
find_leftmost~11907
orx~1925
find_leftmost~11985
find_leftmost~12459
orx~1951
exp~1803
orx~7797
find_leftmost~12537
orx~7823
sign~28
fracts~4934
find_leftmost~11909
Result~4843
find_leftmost~12461
find_leftmost~11211
find_leftmost~11289
fracts~4936
Result~4859
fracts~4937
ShiftLeft92
find_leftmost~11213
find_leftmost~11912
ShiftLeft96
fracts~4938
find_leftmost~12464
fracts~1234
find_leftmost~11253
orx~1929
find_leftmost~11991
fracts~4939
Result~4818
orx~1955
fracts~1235
orx~7801
find_leftmost~12543
orx~7827
fracts~4940
ShiftLeft87
find_leftmost~11216
fracts~1236
find_leftmost~11915
C_S2[8..-23]C_S2[8..-23]
179
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
<A[26..0]
B[26..0]
LESS_THAN
0
1
0
1
0
1
0
1
0
1
0
1
>>A[27..0]
COUNT[8..0]
RIGHT_SHIFT
0
1
1
0
1
0
1
C_S2_OUT0
C_ER_OUT0ufract~254_OUT0
fpresult~_OUT0
fracts~4941_OUT0
find_leftmost~12464_OUT0
find_leftmost~12467_OUT0
LessThan1157_OUT
fracts~1237_OUT0
find_leftmost~11949_OUT0
find_leftmost~11955_OUT0
find_leftmost~11289_OUT0
find_leftmost~11295_OUT0
orx~1930_OUT0
orx~1931_OUT0
fracts~4942_OUT0
orx~1956_OUT0orx~1957_OUT0
find_leftmost~12501_OUT0
find_leftmost~12507_OUT0
fracts~1238_OUT0
orx~7802_OUT0orx~7803_OUT0
Result~4851_OUT0
orx~7828_OUT0orx~7829_OUT0
fracts~4943_OUT0
find_leftmost~11216_OUT0
find_leftmost~11219_OUT0
fracts~1239_OUT0
leftright~39_OUT0
sign~27_OUT0
fracts~4944_OUT0
fracts~1240_OUT0
find_leftmost~11915_OUT0
find_leftmost~11919_OUT0
find_leftmost~11253_OUT0find_leftmost~11259_OUT0
orx~1932_OUT0
orx~1933_OUT0
find_leftmost~11991_OUT0find_leftmost~11997_OUT0
fracts~4945_OUT0
find_leftmost~12471_OUT0
orx~1958_OUT0orx~1959_OUT0
fracts~1241_OUT0
orx~7804_OUT0orx~7805_OUT0
find_leftmost~12543_OUT0find_leftmost~12549_OUT0
fract~65_OUT0
fract~66_OUT0
LessThan4559_OUT
fracts~4946_OUT0
fracts~1242_OUT0
fpresult~_OUT0fp_sign~13_OUT0
fracts~4947_OUT0
find_leftmost~11223_OUT0
sign~108_OUT0
ufract~1026_OUT0
sign~109_OUT0
fracts~1243_OUT0
find_leftmost~11961_OUT0
find_leftmost~11301_OUT0
orx~1934_OUT0orx~1935_OUT0
fracts~4948_OUT0
orx~1960_OUT0orx~1961_OUT0
Add1787_OUTShiftRight179_OUT
exp~1216_OUT0
find_leftmost~12513_OUT0
fracts~1244_OUT0
find_leftmost~11923_OUT0
orx~7806_OUT0orx~7807_OUT0
fracts~4949_OUT0
ufract~254
fracts~4941
find_leftmost~12467
fracts~1237
find_leftmost~11955
find_leftmost~11295
orx~1931
fracts~4942
orx~1957
find_leftmost~12507
fracts~1238
orx~7803
Result~4851
orx~7829
fracts~4943
find_leftmost~11219
fracts~1239
fracts~4944
fracts~1240
find_leftmost~11919
find_leftmost~11259
orx~1933
find_leftmost~11997
fracts~4945
find_leftmost~12471
orx~1959
fracts~1241
orx~7805
find_leftmost~12549
LessThan4559
3' h0 --
3' h0 --
fracts~4946
fracts~1242
fp_sign~13
fracts~4947
find_leftmost~11223
sign~109
fracts~1243
find_leftmost~11961
find_leftmost~11301
orx~1935
fracts~4948
orx~1961
ShiftRight179
1' h0 --
3' h0 --
exp~1216
find_leftmost~12513
fracts~1244
find_leftmost~11923
orx~7807
fracts~4949
sign~27
180
SEL[4..0]
DATA[31..0]OUT
MUX
0
1
0
0
1
0
1
0
1
0
0
1
0
1
<A[26..0]
B[26..0]
LESS_THAN
0
1
0
0
1
0
1
0
1
0
0
1
0
1
0
1
0
0
1
>>A[27..0]
COUNT[8..0]
RIGHT_SHIFT
0
1
0
1
0
0
1
SEL[4..0]
DATA[31..0]OUT
MUX
0
1
0
1
1
0
1
0
1
0
1
C_ER_OUT0
find_leftmost~12471_OUT0
find_leftmost~12475_OUT0
Add1787_OUT
fract~65_OUT0 Mux162_OUT
exp~1217_OUT0
C_S2_OUT0
fracts~1245_OUT0
fpresult~_OUT0
LessThan4559_OUT
fracts~4950_OUT0
Result~4839_OUT0
Result~4843_OUT0
Result~4851_OUT0
Result~4836_OUT0
exp~1218_OUT0
fracts~1246_OUT0
find_leftmost~11259_OUT0
find_leftmost~11265_OUT0
orx~1936_OUT0orx~1937_OUT0
find_leftmost~11997_OUT0
find_leftmost~12003_OUT0
fracts~4951_OUT0
exp~1224_OUT0
LessThan1157_OUT
find_leftmost~11223_OUT0
find_leftmost~11227_OUT0
exp~1219_OUT0
fracts~1247_OUT0
orx~7808_OUT0orx~7809_OUT0
find_leftmost~12549_OUT0find_leftmost~12555_OUT0
fracts~4952_OUT0
exp~1220_OUT0
fracts~1248_OUT0
find_leftmost~11923_OUT0
find_leftmost~11927_OUT0
fracts~4953_OUT0
find_leftmost~12479_OUT0
exp~1221_OUT0
fracts~1249_OUT0
Add534_OUTShiftRight48_OUT
find_leftmost~11961_OUT0find_leftmost~11967_OUT0
find_leftmost~11301_OUT0find_leftmost~11307_OUT0
orx~1938_OUT0orx~1939_OUT0
fracts~4954_OUT0
ufract~1026_OUT0
orx~7784_OUT0orx~7785_OUT0
exp~1222_OUT0
find_leftmost~12513_OUT0find_leftmost~12519_OUT0
fracts~1250_OUT0
orx~7810_OUT0orx~7811_OUT0
Mux42_OUT
Result~17454_OUT0
fracts~4955_OUT0
find_leftmost~11231_OUT0
exp~1223_OUT0
fracts~1251_OUT0
fracts~1252_OUT0
find_leftmost~11931_OUT0
find_leftmost~11271_OUT0
orx~1940_OUT0orx~1941_OUT0
find_leftmost~12009_OUT0
leftright~147_OUT0
sign~108_OUT0
find_leftmost~12483_OUT0find_leftmost~12475
Mux162
5' h00 --
3' h0 --
exp~1217
fracts~1245
fracts~4950
Result~4836
exp~1218
fracts~1246
find_leftmost~11265
orx~1937
find_leftmost~12003
fracts~4951
LessThan1157
3' h0 --
3' h0 --
find_leftmost~11227
exp~1219
fracts~1247
orx~7809
find_leftmost~12555
fracts~4952
exp~1220
fracts~1248
find_leftmost~11927
fracts~4953
find_leftmost~12479
exp~1221
fracts~1249
find_leftmost~11967
find_leftmost~11307
orx~1939
fracts~4954
ufract~1026
orx~7785
exp~1222
find_leftmost~12519
fracts~1250
orx~7811
Mux42
5' h00 --
3' h0 --
fracts~4955
find_leftmost~11231
exp~1223
fracts~1251
fracts~1252
find_leftmost~11931
find_leftmost~11271
orx~1941
find_leftmost~12009
sign~108
find_leftmost~12483
ShiftRight48
1' h0 --
3' h0 --
Result~17454
181
0
1
0
1
0
1
0
1
0
1
1
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
C_ER_OUT0
orx~7786_OUT0orx~7787_OUT0
C_S2_OUT0
LessThan1157_OUT
fracts~1253_OUT0
orx~7812_OUT0orx~7813_OUT0
find_leftmost~12555_OUT0
find_leftmost~12561_OUT0
fracts~1254_OUT0
find_leftmost~11231_OUT0
find_leftmost~11235_OUT0
fracts~1255_OUT0
orx~1916_OUT0orx~1917_OUT0
find_leftmost~11967_OUT0
find_leftmost~11973_OUT0
find_leftmost~11307_OUT0
find_leftmost~11313_OUT0
orx~1942_OUT0orx~1943_OUT0
orx~7788_OUT0orx~7789_OUT0
find_leftmost~12519_OUT0
find_leftmost~12525_OUT0
fracts~1256_OUT0
orx~7814_OUT0orx~7815_OUT0
exp~1943_OUT0
exp~1944_OUT0
find_leftmost~11931_OUT0
find_leftmost~11937_OUT0
find_leftmost~11271_OUT0
find_leftmost~11277_OUT0
orx~1918_OUT0orx~1919_OUT0
orx~1944_OUT0orx~1945_OUT0
find_leftmost~12009_OUT0find_leftmost~12015_OUT0
find_leftmost~12483_OUT0find_leftmost~12489_OUT0
exp~1945_OUT0
orx~7790_OUT0orx~7791_OUT0
orx~7816_OUT0orx~7817_OUT0
find_leftmost~12567_OUT0
exp~2069_OUT0
exp~2070_OUT0
exp~1946_OUT0
exp~2071_OUT0
exp~1947_OUT0
find_leftmost~11241_OUT0
orx~1920_OUT0orx~1921_OUT0
find_leftmost~11979_OUT0
find_leftmost~11319_OUT0
exp~2072_OUT0
orx~1946_OUT0orx~1947_OUT0
exp~1796_OUT0
exp~1797_OUT0
exp~1948_OUT0
orx~7792_OUT0orx~7793_OUT0
find_leftmost~12531_OUT0
orx~7818_OUT0orx~7819_OUT0
exp~2073_OUT0
exp~1798_OUT0
exp~1949_OUT0
exp~2074_OUT0
exp~1799_OUT0
exp~1950_OUT0
find_leftmost~11943_OUT0
find_leftmost~11283_OUT0
orx~1922_OUT0orx~1923_OUT0
orx~7787
fracts~1253
orx~7813
find_leftmost~12561
fracts~1254
find_leftmost~11235
fracts~1255
orx~1917
find_leftmost~11973
find_leftmost~11313
orx~1943
orx~7789
find_leftmost~12525
fracts~1256
orx~7815
exp~1944
find_leftmost~11937
find_leftmost~11277
orx~1919
orx~1945
find_leftmost~12015
find_leftmost~12489
exp~1945
orx~7791
orx~7817
find_leftmost~12567
exp~2070
exp~1946
exp~2071
exp~1947
find_leftmost~11241
orx~1921
find_leftmost~11979
find_leftmost~11319
exp~2072
orx~1947
exp~1797
exp~1948
orx~7793
find_leftmost~12531
orx~7819
exp~2073
exp~1798
exp~1949
exp~2074
exp~1799
exp~1950
find_leftmost~11943
find_leftmost~11283
orx~1923
182
0
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
1
0
1
0
0
1
0
1
1
0
1
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
0
1
1
0
1
0
0
1
00
1
10
1
00
1
10
1
00
1
10
1
00
1
10
1
00
1
10
1
0
C_ER_OUT0
exp~2069_OUT0
exp~2075_OUT0
orx~1948_OUT0orx~1949_OUT0
find_leftmost~12015_OUT0find_leftmost~12021_OUT0
exp~1796_OUT0
exp~1800_OUT0
find_leftmost~12489_OUT0
find_leftmost~12495_OUT0
exp~1951_OUT0
orx~7794_OUT0orx~7795_OUT0
Result~4839_OUT0
orx~7820_OUT0orx~7821_OUT0
find_leftmost~12567_OUT0find_leftmost~12573_OUT0
exp~2076_OUT0
exp~1801_OUT0
exp~2077_OUT0
exp~1802_OUT0
find_leftmost~11241_OUT0find_leftmost~11247_OUT0
fpresult~_OUT0
LessThan4559_OUT
fracts~4933_OUT0
find_leftmost~11319_OUT0find_leftmost~11325_OUT0
exp~1804_OUT0
fracts~4935_OUT0
find_leftmost~11943_OUT0find_leftmost~11949_OUT0
orx~1926_OUT0orx~1927_OUT0
orx~1952_OUT0orx~1953_OUT0
find_leftmost~12501_OUT0
orx~7798_OUT0orx~7799_OUT0
orx~7824_OUT0orx~7825_OUT0
Result~4836_OUT0
Classfp~_OUT0
Result~17454_OUT0
Classfp~_OUT0
Classfp~_OUT0
Classfp~_OUT0
fpresult~_OUT0
add~25_OUT0
fpresult~_OUT0
fract~65_OUT0
C_S2_OUT0
exp~1224_OUT0
LessThan1157_OUT
Equal9_OUT
fractc~_OUT0
fract~66_OUT0
Equal36_OUT
fractc~_OUT0
ShiftLeft96_OUT
ShiftLeft92_OUT
ShiftLeft87_OUT
multiply~156_OUT0
fractr~_OUT0
exp~1943_OUT0
find_leftmost~11907_OUT0
find_leftmost~11909_OUT0
find_leftmost~11910_OUT0find_leftmost~11912_OUT0
find_leftmost~11915_OUT0
find_leftmost~11919_OUT0
find_leftmost~11923_OUT0
find_leftmost~11927_OUT0
find_leftmost~11931_OUT0
find_leftmost~11937_OUT0
find_leftmost~11955_OUT0
find_leftmost~11960_OUT0
exp~2075
orx~1949
find_leftmost~12021
exp~1800
find_leftmost~12495
exp~1951
orx~7795
Result~4839
orx~7821
find_leftmost~12573
exp~2076
exp~1801
exp~2077
exp~1802
find_leftmost~11247
fracts~4933
find_leftmost~11325
exp~1804
fracts~4935
find_leftmost~11949
orx~1927
orx~1953
find_leftmost~12501
orx~7799
orx~7825
Classfp~[563..559]
2' h0 --
3' h0 --
Classfp~[833..832]
2' h0 --
Classfp~[879..878]
2' h0 --
Classfp~[1926..1925]
2' h0 --
fpresult~[3937..3906]
32' h7F800001 --
fractc~[887..864]fractc~[911..888]
fractc~[3479..3456]fractc~[3503..3480]
fractr~[551..480]
exp~1943
find_leftmost~11908
find_leftmost~11910
find_leftmost~11911find_leftmost~11914
find_leftmost~11918find_leftmost~11922
find_leftmost~11926find_leftmost~11930
find_leftmost~11936find_leftmost~11942
find_leftmost~11948find_leftmost~11954
find_leftmost~11960
Classfp~[837..834]
2' h0 --
1' h0 --
1' h0 --
183
184
185
186
187
188
189 190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
0
1
10
1
00
1
10
1
00
1
10
1
00
1
10
1
00
1
10
1
00
1
1
SEL
DATAA
DATABOUT0
MUX210
1
1
0
1
1
+A[4..0]
B[4..0]
ADDER
0
1
1
0
1
1
0
1
1
+A[4..0]
B[4..0]
ADDER
+A[10..0]
B[10..0]
ADDER
+A[10..0]
B[10..0]
ADDER
+A[7..0]
B[7..0]
ADDER
+A[9..0]
B[9..0]
ADDER
+A[9..0]
B[9..0]
ADDER
+A[9..0]
B[9..0]
ADDER
+A[12..0]
B[12..0]
ADDER
SEL
DATAA
DATAB
OUT0
MUX21
+A[8..0]
B[8..0]
ADDER
<
CIN
A[9..0]
B[9..0]
LESS_THAN
1
SEL
DATAA
DATAB
OUT0
MUX21
<
CIN
A[9..0]
B[9..0]
LESS_THAN
1
SEL
DATAA
DATABOUT0
MUX21
>>A[27..0]
COUNT[11..0]
RIGHT_SHIFT
<A[11..0]
B[11..0]
LESS_THAN
+A[13..0]
B[13..0]
ADDER
+A[14..0]
B[14..0]
ADDER
SEL
DATAA
DATABOUT0
MUX21
xA[23..0]
B[23..0]
MULTIPLIER
0
1
0
1
0
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
0
1
0
1
0
1
find_leftmost~11960_OUT0
find_leftmost~11961_OUT0
find_leftmost~11967_OUT0
find_leftmost~11973_OUT0
find_leftmost~11979_OUT0
find_leftmost~11985_OUT0
find_leftmost~11991_OUT0
find_leftmost~11997_OUT0
find_leftmost~12003_OUT0
find_leftmost~12009_OUT0
find_leftmost~12015_OUT0
find_leftmost~12021_OUT0
find_leftmost~12026_OUT0
find_leftmost~12019_OUT0
find_leftmost~12025_OUT0
find_leftmost~12018_OUT0
find_leftmost~12024_OUT0
find_leftmost~12022_OUT0
find_leftmost~12023_OUT0
Add825_OUT
find_leftmost~11324_OUT0
find_leftmost~11325_OUT0
find_leftmost~11330_OUT0
find_leftmost~11323_OUT0
find_leftmost~11329_OUT0
find_leftmost~11322_OUT0
find_leftmost~11328_OUT0
find_leftmost~11326_OUT0
find_leftmost~11327_OUT0
Add776_OUT
Classfp~_OUT0
multiply~156_OUT0
exp~1803_OUT0
exp~1804_OUT0
Add826_OUT
Add827_OUT
exp~1797_OUT0
exp~1798_OUT0
exp~1799_OUT0
exp~1800_OUT0
exp~1801_OUT0
exp~1802_OUT0
Add782_OUT
Add780_OUT
LessThan1689_OUT
LessThan1688_OUT
Result~6995_OUT0
Add786_OUT
Add785_OUT
ShiftLeft88_OUT
sfract~_OUT0
fractr~_OUT0
Mult16_OUT
orx~2921_OUT0
exp~1831_OUT0
exp~1830_OUT0
exp~1829_OUT0
exp~1828_OUT0
exp~1827_OUT0
expon_out~_OUT0
rexp~_OUT0
fract_out~_OUT0
rfract~_OUT0
exp~_OUT0
exp~1834_OUT0
exp~1833_OUT0
exp~1832_OUT0
find_leftmost~11966find_leftmost~11972
find_leftmost~11978find_leftmost~11984
find_leftmost~11990find_leftmost~11996
find_leftmost~12002find_leftmost~12008
find_leftmost~12014find_leftmost~12020
find_leftmost~12026
shifty~[237..224]
14' h0000 --
find_leftmost~12025
find_leftmost~12024
Add825
1' h1 --
5' h05 --
find_leftmost~11330
find_leftmost~11329
find_leftmost~11328
Add776
1' h1 --
5' h05 --
multiply~156
Add778
1' h1 --
1' h1 --
Add827
1' h1 --
1' h1 --
Add777
8' hFD --
Add779
10' h001 --
Add783
10' h07F --
Add782
Add784
1' h1 --
13' h0001 --
shiftr~[1556..1545]
Add781
1' h1 --
9' h0F9 --
LessThan1689
9' h169 --1' h1 --
shiftr~[1568..1557]
LessThan1688
1' h1 --
9' h180 --
shiftr~[1580..1569]
Result~6995
ShiftRight70
LessThan1691
11' h000 --
1' h0 --Add786
1' h1 --
14' h1FFD --
Add785
1' h1 --
15' h0001 --
sfract~[1155..1130]Mult16
24' h9D4952 --
stickyx~67
Result~6968
stickyx~66
check_round~75
Result~6997
rexp~[359..352]
rfract~[1034..1012]
exp~1834
exp~1833
exp~1832
207
0
1
0
1
0
1
0
1
0
1
SEL
DATAA
DATAB
OUT0
MUX21
0
11
0
11
0
11
0
11
0
11
0
11
0
11
0
11
0
10
0
10
0
11
SEL
DATAA
DATAB
OUT0
MUX21
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
SEL
DATAA
DATABOUT0
MUX21
exp~_OUT0
Add782_OUT
Result~6995_OUT0
exp~1831_OUT0
exp~1830_OUT0
exp~1829_OUT0
exp~1828_OUT0
exp~1827_OUT0
exp~1834_OUT0
exp~1833_OUT0
exp~1832_OUT0
Add787_OUT
Result~7019_OUT0
expon_out~_OUT0
rexp~_OUT0
infres~88_OUT0
infres~89_OUT0
zerores~88_OUT0
Result~7050_OUT0
Result~7049_OUT0
Result~7048_OUT0
Result~7047_OUT0
Result~7046_OUT0
Result~7045_OUT0
Result~7044_OUT0
Result~7043_OUT0
Result~7042_OUT0
Result~7041_OUT0
Result~7040_OUT0
Result~7039_OUT0
Result~7038_OUT0
Result~7037_OUT0
Result~7036_OUT0
Result~7035_OUT0
Result~7034_OUT0
Result~7033_OUT0
Result~7032_OUT0
Result~7031_OUT0
Result~7030_OUT0
Result~7029_OUT0
Result~7028_OUT0
Classfp~_OUT0
multiply~155_OUT0
add~25_OUT0
fpresult~_OUT0
exp~1831
exp~1830
exp~1829
exp~1828
exp~1827
expon_out~[359..352]
Result~7020
Result~7021
Result~7022
Result~7023
Result~7024
Result~7025
Result~7026
Result~7027
infres~89
Result~7051
zerores~89
fpresult~[3557..3527]
31' h7F800000 --
Result~7081
Result~7080
Result~7079
Result~7078
Result~7077
Result~7076
Result~7075
Result~7074
Result~7073
Result~7072
Result~7071
Result~7070
Result~7069
Result~7068
Result~7067
Result~7066
Result~7065
Result~7064
Result~7063
Result~7062
Result~7061
Result~7060
Result~7059
Result~7058
Result~7057
Result~7056
Result~7055
Result~7054
Result~7053
Result~7052
multiply~155
fpresult~[3588..3558]
31' h7F800001 --
208
0
1
0
1
0
1
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
>>A[27..0]
COUNT[8..0]
RIGHT_SHIFT
0
1
SEL[4..0]
DATA[31..0]OUT
MUX
0
1
0
1
Classfp~_OUT0add~25_OUT0
fpresult~_OUT0
C_S1_OUT0
LessThan1746_OUT
fracts~1801_OUT0
Result~7106_OUT0
fracts~1803_OUT0
orx~2975_OUT0orx~2976_OUT0
orx~3001_OUT0orx~3002_OUT0
exp~1835_OUT0
exp~1836_OUT0
Result~7154_OUT0
orx~2977_OUT0orx~2978_OUT0
orx~3003_OUT0orx~3004_OUT0
exp~1837_OUT0
exp~1838_OUT0
exp~1839_OUT0
orx~2979_OUT0orx~2980_OUT0
orx~3005_OUT0orx~3006_OUT0
exp~1840_OUT0
exp~1841_OUT0
exp~1842_OUT0
orx~2981_OUT0orx~2982_OUT0
orx~3007_OUT0orx~3008_OUT0
exp~1843_OUT0
orx~2983_OUT0orx~2984_OUT0
orx~3009_OUT0orx~3010_OUT0
orx~2985_OUT0orx~2986_OUT0
orx~3011_OUT0orx~3012_OUT0
fracts~1782_OUT0
orx~2987_OUT0orx~2988_OUT0
orx~3013_OUT0orx~3014_OUT0
fracts~1783_OUT0
fracts~1784_OUT0
fracts~1785_OUT0
orx~2989_OUT0orx~2990_OUT0
orx~3015_OUT0orx~3016_OUT0
fracts~1786_OUT0
fracts~1787_OUT0
fracts~1788_OUT0
orx~2991_OUT0orx~2992_OUT0
fracts~1789_OUT0
Result~7088_OUT0
fracts~1790_OUT0
fracts~1791_OUT0
Add789_OUTShiftRight72_OUT
orx~2993_OUT0orx~2994_OUT0
fracts~1792_OUT0
Mux64_OUT
fracts~1793_OUT0
fracts~1794_OUT0
add~25
fracts~1801
Result~7106
fracts~1803
orx~2976
orx~3002
exp~1836
orx~2978
orx~3004
exp~1837
exp~1838
Result~7134
exp~1839
orx~2980
orx~3006
exp~1840
exp~1841
Result~7138
exp~1842
orx~2982
orx~3008
exp~1843
orx~2984
orx~3010
orx~2986
orx~3012
Result~7146
fracts~1782
orx~2988
orx~3014
fracts~1783
fracts~1784
fracts~1785
orx~2990
orx~3016
fracts~1786
fracts~1787
fracts~1788
orx~2992
fracts~1789
Result~7088
fracts~1790
fracts~1791
ShiftRight72
1' h0 --
3' h0 --
orx~2994
fracts~1792
Mux64
5' h00 --
3' h0 --
fracts~1793
fracts~1794
Result~7154
209
<A[26..0]
B[26..0]
LESS_THAN
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATAB
OUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
SEL
DATAA
DATABOUT0
MUX21
0
1
=A[8..0]
B[8..0]
EQUAL
SEL
DATAA
DATABOUT0
MUX21
>>A[27..0]
COUNT[8..0]
RIGHT_SHIFT
<A[8..0]
B[8..0]
LESS_THAN
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
0
10
fpresult~_OUT0
orx~2995_OUT0
orx~2996_OUT0
fract~46_OUT0
C_S1_OUT0
exp~1835_OUT0
LessThan1746_OUT
Result~7113_OUT0
orx~2971_OUT0
orx~2972_OUT0
orx~2997_OUT0
orx~2998_OUT0
orx~2973_OUT0
orx~2974_OUT0
orx~2999_OUT0
orx~3000_OUT0
fpresult~_OUT0
Result~7106_OUT0
Classfp~_OUT0
fractc~_OUT0
fractc~_OUT0
LessThan1720_OUT
fractc~_OUT0
fracts~1803_OUT0
fracts~1801_OUT0
fracts~1794_OUT0
fracts~1793_OUT0
fracts~1792_OUT0
fracts~1791_OUT0
fracts~1790_OUT0
fracts~1789_OUT0
fracts~1788_OUT0
fracts~1787_OUT0
fracts~1786_OUT0
fracts~1785_OUT0
fracts~1784_OUT0
fracts~1783_OUT0
fracts~1782_OUT0
ShiftRight72_OUT
LessThan1747_OUT
Add789_OUT
Equal13_OUT
fracts~_OUT0
Add790_OUT
LessThan1721_OUT
fracts~1889_OUT0
fracts~1891_OUT0
fracts~1892_OUT0
fracts~1893_OUT0
fracts~1894_OUT0
fracts~1895_OUT0
fracts~1896_OUT0
fracts~1897_OUT0
fracts~1898_OUT0
fracts~1899_OUT0
fracts~1900_OUT0
fracts~1901_OUT0
fracts~1902_OUT0
fracts~1903_OUT0
fracts~1904_OUT0
fracts~1905_OUT0
fracts~1906_OUT0
fracts~1907_OUT0
fracts~1908_OUT0
fracts~1909_OUT0
fracts~1910_OUT0
fracts~1911_OUT0
fracts~1912_OUT0
fracts~1913_OUT0
orx~2996
fracts~1795
Result~7113
fracts~1796
fracts~1797
orx~2972
orx~2998
fracts~1798
fracts~1799
fracts~1800
orx~2974
orx~3000
fracts~1802
fracts~1804
Classfp~[813..809]
2' h0 --
3' h0 --
fractc~[1271..1248]
fractc~[1319..1296]
fractc~[1343..1320]
fracts~[1860..1833]
3' h0 --
1' h0 --
fracts~[1832..1805]
28' h0000000 --
fracts~1781
Equal13
9' h000 --
fracts~[1888..1861]
ShiftRight71
1' h0 --
3' h0 --
LessThan17211' h0 --
8' h00 --
fracts~1889
fracts~1891
fracts~1892
fracts~1893
fracts~1894
fracts~1895
fracts~1896
fracts~1897
fracts~1898
fracts~1899
fracts~1900
fracts~1901
fracts~1902
fracts~1903
fracts~1904
fracts~1905
fracts~1906
fracts~1907
fracts~1908
fracts~1909
fracts~1910
fracts~1911
fracts~1912
fracts~1913
LessThan1746
3' h0 --
3' h0 --
210
211
212
0
10
0
10
0
10
0
10
<A[8..0]
B[8..0]
LESS_THAN
+A[28..0]
B[28..0]
ADDER
+A[24..0]
B[24..0]
ADDER
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
>>A[27..0]
COUNT[10..0]
RIGHT_SHIFT
<<A[27..0]
COUNT[12..0]
LEFT_SHIFT
0
1
1
SEL[4..0]
DATA[31..0]OUT
MUX
0
1
<A[11..0]
B[11..0]
LESS_THAN 0
1
<A[11..0]
B[11..0]
LESS_THAN
fracts~_OUT0
Add789_OUT
LessThan1720_OUT
fractc~_OUT0
fracts~1889_OUT0
fracts~1891_OUT0
fracts~1892_OUT0
fracts~1893_OUT0
fracts~1894_OUT0
fracts~1895_OUT0
fracts~1896_OUT0
fracts~1897_OUT0
fracts~1898_OUT0
fracts~1899_OUT0
fracts~1900_OUT0
fracts~1901_OUT0
fracts~1902_OUT0
fracts~1903_OUT0
fracts~1904_OUT0
fracts~1905_OUT0
fracts~1906_OUT0
fracts~1907_OUT0
fracts~1908_OUT0
fracts~1909_OUT0
fracts~1910_OUT0
fracts~1911_OUT0
fracts~1912_OUT0
fracts~1913_OUT0
sticky~55_OUT0
ufract~371_OUT0
ufract~372_OUT0
ufract~373_OUT0
ufract~374_OUT0
ufract~375_OUT0
ufract~376_OUT0
ufract~377_OUT0
ufract~378_OUT0
ufract~379_OUT0
ufract~380_OUT0
ufract~381_OUT0
ufract~382_OUT0
ufract~383_OUT0
ufract~384_OUT0
ufract~385_OUT0
ufract~386_OUT0
ufract~387_OUT0
ufract~388_OUT0
ufract~389_OUT0
ufract~390_OUT0
ufract~391_OUT0
ufract~392_OUT0
ufract~393_OUT0
ufract~394_OUT0
ufract~395_OUT0
ufract~396_OUT0
C_S1_OUT0
fpresult~_OUT0
ufract~368_OUT0
shiftr~_OUT0
ShiftRight73_OUT
Add798_OUTShiftLeft89_OUT
find_leftmost~11475_OUT0
find_leftmost~11476_OUT0
Result~7181_OUT0
Add799_OUT
orx~3021_OUT0
orx~3022_OUT0
fracts~1914
fracts~1915
fracts~1916
fracts~1890
LessThan17201' h1 --
8' hE5 --
Add7921' h0 --
4' h1 --
1' h1 --
Add7911' h0 --
fracts~1917
ufract~369
ufract~370
ufract~371
ufract~372
ufract~373
ufract~374
ufract~375
ufract~376
ufract~377
ufract~378
ufract~379
ufract~380
ufract~381
ufract~382
ufract~383
ufract~384
ufract~385
ufract~386
ufract~387
ufract~388
ufract~389
ufract~390
ufract~391
ufract~392
ufract~393
ufract~394
ufract~395
ufract~396
ufract~368
orx~3018
ShiftRight73
ShiftLeft89
find_leftmost~11475
find_leftmost~11476
Result~7181Mux65
4' h0 --
orx~3019
LessThan1777
12' h01B --
orx~3020
orx~3021
LessThan1778
12' h01A --
orx~3022
Appendix B 213
VHDL Code for the Pacemaker Unit 214 library IEEE; 215 use IEEE.std_logic_1164.all; 216 use IEEE.std_logic_arith.all; 217 use IEEE.math_real.all; 218 --library IEEE_PROPOSED; 219 --use IEEE_PROPOSED.fixed_float_types.all; 220 --use IEEE_PROPOSED.fixed_pkg.all; 221 --use IEEE_PROPOSED.float_pkg.all; 222 223 entity Pace_Unit is 224 port (clk,rst:in STD_LOGIC;V_out:out STD_LOGIC_VECTOR(31 downto 0)); 225 226 end Pace_Unit; 227 architecture PU of Pace_Unit is 228 -- UP Model Parameters 229 constant g_Ca : real := 0.01; 230 constant E_NSCC : real := 0.0; 231 constant g_capNSCC_Ca : real := 0.12; 232 constant g_capNSCC_Na :real := 220.0; 233 constant K_NSCC :real := 0.12; 234 constant h_NSCC :real := 3.0; 235 constant g_PM :real := 420.0; 236 constant K_PM :real := 1.0; 237 constant g_Na :real := 15000.0; 238 constant K_Na :real := 10000.0; 239 constant h_Na :real := 4.0; 240 constant V_SERCA :real := 100000.0; 241 constant A_2 :real := 0.0006; 242 constant A_4 :real := 3.57; 243 constant A_5 :real := 0.000027; 244 constant A_6 :real := 0.0000231; 245 constant V_MCU :real := 800.0; 246 constant K_MCU :real := 10.0; 247 constant K_INH :real := 10.0; 248 constant h_INH :real := 4.0; 249 constant V_NCX :real := 0.5; 250 constant K_NCX :real := 0.3; 251 constant u_S1S2 :real := 0.04; 252 constant k_IPR :real := 2000.0; 253 constant k_1 :real := 0.0; 254 constant k_min1 :real := 6.4; 255 constant k_2 :real := 4.0; 256 constant r_2 :real := 200.0; 257 constant r_min2 :real := 0.0; 258 constant r_4 :real := 750.0; 259 constant R_1 :real := 36.0; 260 constant R_3 :real := 300.0; 261 constant g_alpha :real := 0.02; 262 constant g_beta :real := 300.0; 263 constant K_beta :real :=2.0; 264 constant h_beta :real := 2.0; 265 constant K_m :real := 0.01; 266 constant B_m :real := 100.0; 267
constant y_S1 :real := 100.0; 268 constant y_S2 :real := 1.0; 269 constant y_ER :real := 20.0; 270 constant y_MT :real := 200.0; 271 constant d_S :real := 26.0; 272 constant C_m :real := 20.0; 273 constant Z_Ca :real := 2.0; 274 constant Z_Na :real :=1.0; 275 constant V_t :real := 26.7; 276 constant C_O :real:= 1800.0; 277 constant P :real := 1.0; 278 signal V_m :real := -70.1; 279 signal C_S1 :real := 0.12; 280 signal C_S2 :real := 0.023; 281 signal C_ER :real := 203.0; 282 signal C_MT: real := 0.22; 283 signal N_S1 :real := 10100.0; 284 signal H : real := 0.0; 285 signal phi_3 :real := 0.306; 286 signal a_phi3,b_phi3,phi_1,phi_min1,phi_2,J_IPR,J_S1S2,J_NCX,J_MCU,J_SERCA : real := 0.0 287 ; 288 signal 289 I_Na,I_PM,g_NSCC_Ca,g_NSCC_Na,I_NSCC_Ca,I_NSCC_Na,E_Ca,I_Ca,I_iCa,I_iNa,f_m : 290 real := 0.0 ; 291 signal l_MTS1,l_ERS1,l_ERS2,l_S1S2,l_MTS2 : real := 0.0 ; 292 begin 293 process(clk,rst) 294 begin 295 if rst = '1' and rising_edge(clk) then 296 V_out <= CONV_STD_LOGIC_VECTOR(INTEGER(V_m),32); 297 a_phi3 <= g_alpha; 298 b_phi3 <= g_beta*((C_S2**h_beta)/(K_beta**h_beta+C_S2**h_beta)); 299 phi_3 <= phi_3+ (a_phi3-b_phi3*phi_3);--IP3R Slow Rate Variable 300 --IP3R Constants 301 phi_1 <= (k_1*R_1+r_2*C_S2)/(R_1+C_S2); 302 phi_min1 <= ((k_min1+r_min2)*R_3)/(R_3+C_S2); 303 phi_2 <= (k_2*R_3+r_4*C_S2)/(R_3+C_S2); 304 J_IPR <=k_IPR*(((P*phi_1*H)/(P*phi_1+phi_min1))**4.0)*(C_ER-C_S2); 305 J_S1S2 <= u_S1S2*(C_S2-C_S1); 306 J_NCX <= V_NCX*(C_MT/(K_NCX+C_MT)); 307 J_MCU <= V_MCU*((C_S2**2.0)/(K_MCU**2.0+C_S2**2.0)); 308 J_SERCA <= V_SERCA*((C_S1-A_2*C_ER)/(1.0 309 +A_4*C_S1+A_5*C_ER+A_6*C_S1*C_ER)); 310 I_Na <= g_PM*(C_S1**h_Na/(K_Na**h_Na+C_S1**h_Na)); 311 g_NSCC_Ca <= 312 g_capNSCC_Ca*(K_NSCC**h_NSCC/(K_NSCC**h_NSCC+C_S1**h_NSCC)); 313 g_NSCC_Na <= 314 g_capNSCC_Na*(K_NSCC**h_NSCC/(K_NSCC**h_NSCC+C_S1**h_NSCC)); 315 I_NSCC_Ca <= g_NSCC_Ca*(V_m-E_NSCC); 316 I_NSCC_Na <= g_NSCC_Na*(V_m-E_NSCC); 317 E_Ca <= 0.5*V_t*log(C_O/C_S1); 318 I_Ca <= g_Ca*(V_m-E_Ca); 319 l_MTS1 <= y_MT/y_S1; 320 l_ERS1 <= y_ER/y_S1; 321 l_ERS2 <= y_ER/y_S2; 322 l_S1S2 <= y_S1/y_S2; 323
l_MTS2 <= y_MT/y_S2; 324 f_m <= 1.0/(1.0+(K_m*B_m/(K_m+C_MT**2.0))); 325 I_iNa <= I_NSCC_Na+I_Na; 326 I_iCa <= I_NSCC_Ca+I_Ca; 327 V_m <= V_m- ((I_iCa+I_iNa)/C_m); 328 C_S1 <= C_S1 + (J_S1S2+l_MTS1*J_NCX)- 329 ((d_S/Z_Ca)*I_iCa+l_ERS1*J_SERCA); 330 C_S2 <= C_S2 + (l_ERS2*J_IPR-(l_S1S2*J_S1S2+l_MTS2*J_MCU)); 331 C_ER <= C_ER + (J_SERCA-J_IPR); 332 C_MT <= C_MT + f_m*(J_MCU-J_NCX); 333 N_S1 <= N_S1 - ((d_S/Z_Na)*I_iNa); 334 H <= H+ ((phi_3*(1.0-H))- (((P*phi_1*phi_2)/(P*phi_1+phi_min1)*H))); 335 --V_out <= CONV_STD_LOGIC_VECTOR(INTEGER(V_m),32); 336 337 338 end if; 339 end process; 340 end PU; 341 342
343
344
345
346