You are on page 1of 5

4138 IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—II: EXPRESS BRIEFS, VOL. 69, NO.

10, OCTOBER 2022

A High-Accuracy Digital Implementation of the


Morris–Lecar Neuron With Variable
Physiological Parameters
Alexander J. Leigh , Member, IEEE, Moslem Heidarpur, and Mitra Mirhassani , Senior Member, IEEE

Abstract—A highly accurate digital implementation of the meaningful. Higher-level descriptions include the Izhkevich
Morris-Lecar neuron model is presented with the intended appli- model [7] and the Adaptive-Exponential Integrate and Fire
cation of hardware acceleration for neuroscience simulation. The (AdEx) model [8]. Although less complex than the first class
novel implementation employs the COordinate Rotation DIgital
Computer (CORDIC) algorithm to create a fixed-point imple- of detailed models while still behaviourally diverse, these mod-
mentation that is not only very accurate but requires low digital els do not have direct parallelism to biology which limits their
hardware resources. The accuracy exceeds that of the current applications in meaningful neuronal simulation.
state-of-the-art, requires fewer hardware resources to implement, Furthermore, the complexity of the mathematical models
and operates at a higher maximum clock frequency. The design is used in neuroscience often leads to extensive computation
validated on FPGA and a normalized RMSE of 0.2039 is achieved
at a maximum clock frequency of 378.07MHz. requirements. The time required for simulation can be greatly
reduced using custom hardware to accelerate simulation since
Index Terms—Spiking neurons, morris-lecar neuron, neuro- custom hardware is substantially faster than software [9].
morphic hardware, FPGA.
Although there are many options for hardware implementa-
tions of artificial neurological systems, Field-Programmable
I. I NTRODUCTION Gate Array (FPGA) offers many advantages. FPGA imple-
mentations are much more flexible than ASIC digital imple-
MONG the many complex systems of living beings,
A the brain and neurological systems are among the most
perplexing and intricate [1]. The biological nervous system
mentations and are far more robust than analog ASIC [9],
all while offering higher computation speed and lower power
consumption than software solutions.
consists of a vast number of neurons, the basic unit of com- Even though the Hodgkin-Huxley model offers one of the
putation. Neurons transmit information through spikes in the most meaningful descriptions of neuronal behaviour [10], it
electric potentials of their membranes. Information is coded is computationally expensive and the Morris-Lecar model is
both in the rate of these spikes and in the timing through an excellent substitute that offers a highly relevant description
methods called rate coding and temporal coding [2]. of the behaviour of a biological neuron. Therefore, a highly
A growing understanding of the neuronal information trans- accurate FPGA implementation of the Morris-Lecar neuron
mission mechanism is amassing, and central to the continua- model is presented with variable physiological parameters.
tion of growth in this field is simulation of real systems [3]. The proposed work has lower error and hardware resource
Mathematical modelling is frequently used to further thoughts requirements than previously proposed designs [11], [12].
regarding neurological systems. Additionally, simulations have This is achieved by applying the COordinate Rotation DIgital
been used to offer insight into the progression of neurologi- Computer (CORDIC) Algorithm [13] in a strategic manner to
cal diseases, among other applications in neuroscience and the nonlinear terms of the system.
medicine [4]. Background information is presented, followed by pre-
Given the applications for neural simulation, many mathe- liminary simulations and error analysis. Subsequently, the
matical models of neurons have been proposed with varying design is presented and compared to previous implementa-
levels of detail in their descriptions of a real neuron. Among tions to highlight its key advantages in neuroscience simulation
the most detailed models are the Hodgkin-Huxley model [5] applications.
and the Morris-Lecar model [6], where all model parameters
have parallels in a real neuron, thus making them biologically
II. BACKGROUND
Manuscript received 6 June 2022; accepted 21 June 2022. Date of pub-
lication 1 July 2022; date of current version 26 September 2022. This A. The Morris-Lecar Neuron Model
brief was recommended by Associate Editor F. An. (Corresponding author: The Morris-Lecar Neuron Model was proposed by
Alexander J. Leigh.)
The authors are with the SHIELD Automotive Cybersecurity Centre of Catherine Morris and Harold Lecar as a mathematical descrip-
Excellence, University of Windsor, Windsor, ON N9B 3P4, Canada (e-mail: tion of the behavioural modes of neurological voltage oscil-
leigh11@uwindsor.ca). lations in barnacle giant muscle fiber [6]. As such, this
Color versions of one or more figures in this article are available at
https://doi.org/10.1109/TCSII.2022.3187623. neuron model has physiological meaning and its parame-
Digital Object Identifier 10.1109/TCSII.2022.3187623 ters and behaviour have direct correspondence to biological
1549-7747 
c 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Huawei Technologies Co Ltd. Downloaded on November 11,2022 at 18:39:53 UTC from IEEE Xplore. Restrictions apply.
LEIGH et al.: HIGH-ACCURACY DIGITAL IMPLEMENTATION OF THE MORRIS–LECAR NEURON 4139

TABLE I
reality. Although simpler than prior conductance-based neu- M ODEL PARAMETERS U SED TO VALIDATE THE CORDIC
ron models such as the Hodgkin-Huxley neuron model [5], I MPLEMENTATION OF THE M ORRIS -L ECAR N EURON
the Morris-Lecar model has become popular among neurosci-
entists as it still can provide insight into natural neurological
behaviour [10].
The model consists of two interdependent differential
equations:
dV
Iapp = C + gL (V − VL ) + gCa m∞ (V − VCa ) + gK n(V − VK )
dt
(1)
dn
= λ(n∞ − n) (2)
dt
where:
1 V − V1
m∞ = (1 + tanh( )) (3)
2 V2 algorithm is employed in rotation mode, and it is used in vec-
1 V − V3 toring mode for multiplication and division operations. For the
n∞ = (1 + tanh( )) (4) −i
2 V4 exponential unit, αi is the precomputed value of e2 , while αi
V − V3 is 2−i for multiplication and division.
λ = λmax cosh( ) (5)
2V4
where Iapp is the input current, V is the membrane potential III. S OFTWARE S IMULATION
of the neuron and n is an auxiliary variable corresponding to Firstly, the efficacy of the CORDIC algorithm as a real-
sodium channels. The physiological parameters are defined as: ization method for the Morris-Lecar neuron was evaluated
• C : membrane capacitance per area in software. The CORDIC algorithm was applied to evaluate
• VCa : calcium equilibrium potential all multiplication, division, and hyperbolic operations in the
• VK : potassium equilibrium potential Morris-Lecar neuron model. Since both the hyperbolic cosine
• VL : leak equilibrium potential and hyperbolic tangent operations are presented in the model,
• gCa : conductance value for calcium the exponential definitions of the hyperbolic functions were
• gK : conductance value for potassium employed so that the two units could be implemented using a
• gL : conductance value for leak single CORDIC exponential unit.
The hyperbolic cosine function can be defined in terms of
B. The Coordinate Rotation Digital Computer (CORDIC) the exponential function as:
Algorithm
ex + e−x
The COordinate Rotation DIgital Computer (CORDIC) cosh(x) = (7)
2
Algorithm is an iterative algorithm that reduces complex terms
into shift and add operations in digital hardware [13]–[15]. Likewise, the hyperbolic tangent is defined as:
The CORDIC algorithm computes a given function through e2x − 1
rotation. By decomposing the rotation into small, predefined tanh(x) = (8)
e2x + 1
angles based on powers of 2, complex functions can be com-
puted using efficient iterative shift and add operations in digital The required iteration numbers for each operation were
hardware. determined through extensive simulation to determine an
With a sufficiently large number of iterations, exceptional acceptable trade-off between accuracy and throughput.
accuracy can be achieved in multiplication, division, exponen- Simulations were conducted for a wide range of input cur-
tial, and hyperbolic functions using the CORDIC algorithm. rent and for varying input model parameters. Table I shows
This potentially high-accuracy and low hardware require- the three parameter sets for which simulations and validation
ment method will be leveraged to efficiently implement the were conducted. Group 1 results in Andronov-Hopf bifur-
Morris-Lecar neuron with low error and variable physiological cation [11], [12], while Group 2 was presented by Morris
parameters. and Lecar for pacemaker oscillation [6], and Group 3 creates
The CORDIC algorithm can be expressed in a general saddle-node bifurcations [12]. Multiple error data points repre-
form as: senting different input stimulus levels were collected for each
parameter group for increasing iteration numbers to assess the
xi+1 = xi − σi 2−i yi CORDIC algorithm’s effect on model accuracy.
yi+1 = yi + σi 2−i xi It was found that exceptional accuracy is obtained for 7
iterations for exponential operations, 10 iterations for multi-
zi+1 = zi − σi αi (6)
plication, and 7 iterations for division. It was important to seek
where the initialization of x, y, and z depend on the desired low iteration numbers as the iteration number also influences
function to compute. σi = ±1 and αi depends on the target the word length of the CORDIC units in fixed point digital
function. To compute the exponential function, the CORDIC hardware.

Authorized licensed use limited to: Huawei Technologies Co Ltd. Downloaded on November 11,2022 at 18:39:53 UTC from IEEE Xplore. Restrictions apply.
4140 IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—II: EXPRESS BRIEFS, VOL. 69, NO. 10, OCTOBER 2022

Fig. 1. Simulations of the membrane potential of the original and CORDIC Morris-Lecar Neuron for levels of input stimulus and model parameters.

TABLE II
Figure 1 shows simulations of the membrane potential of M EASURES OF E RROR FOR D IFFERENT PARAMETERS AND
the original and CORDIC Morris-Lecar neurons. It is apparent L EVELS OF I NPUT S TIMULUS
that clear qualitative matching is present between the two time-
domain membrane potentials. Note that the term original refers
to the ideal model in software simulation using floating point
operations.

A. Error Analysis
To properly assess and justify the selected CORDIC
iteration numbers for the implementation, error analysis was
performed. Three quantities were assessed, namely the Root
Mean Square Error (RMSE), normalized RMSE (nRMSE),
and Mean Absolute Error (MAE) so that a consistent assess- CORDIC-based Morris-Lecar neuron model to ensure match-
ment could be made with previous implementations for proper ing in their excitability. The Jacobian of the Morris-Lecar
comparison [11], [12]. These quantities are defined as: model is defined by:
 
δ V̇ δ V̇
1
n
J= δV δN (12)
MAE = |VCORDIC − V| (9) δ Ṅ δ Ṅ
n δV δN
i=1

n where:
i=1 (VCORDIC − V)
2
RMSE = (10) gCa (V − VCa )sech2 ( V−V
δ V̇ −1 V2 )
1
n = (gL + gK N + gCa m∞ + )
RMSE δV C 2V2
NRMSE = (11) δ V̇ −1
Vmax − Vmin = gK(V − VK )
δN C
Table II shows sample measurements of the error for various δ Ṅ λmax (n∞ − N) V − V3 λ V − V3
operating points. As is apparent, the CORDIC algorithm with = sinh( )+ sech2 ( )
δV 2V4 2V4 2V4 V4
sufficient iterations yields exceptional performance with very δ Ṅ
low error. = −λ (13)
δN
Table III shows select fixed points of the original
B. Bifurcation Analysis and CORDIC neurons for various input stimulus levels.
The term bifurcation refers to stability transitions in Additionally, Figure 2 shows sample phase portraits for the
dynamical systems and bifurcation analysis is a very important original and CORDIC Morris-Lecar neuron. As close matching
tool in characterizing the excitability of neurons [16]. Since is apparent, the results of bifurcation analysis further sup-
consistency in bifurcation implies consistency in excitabil- port the validation of behavioural similarity between the two
ity, bifurcation analysis was performed on the original and models since they exhibit consistent excitability.

Authorized licensed use limited to: Huawei Technologies Co Ltd. Downloaded on November 11,2022 at 18:39:53 UTC from IEEE Xplore. Restrictions apply.
LEIGH et al.: HIGH-ACCURACY DIGITAL IMPLEMENTATION OF THE MORRIS–LECAR NEURON 4141

Fig. 2. Phase portraits for the original and CORDIC Morris-Lecar neuron.

TABLE III
F IXED P OINTS FOR B OTH THE O RIGINAL AND CORDIC
M ORRIS -L ECAR N EURON FOR PARAMETER G ROUP 1

Fig. 3. Oscilloscope screen captures for the implemented neuron. Note that
any observed noise can be attributed to the reduced-resolution resistive ladder
IV. H ARDWARE I MPLEMENTATION DAC used to convert the membrane potential to an analog signal.
After software verification, the proposed CORDIC-based
implementation of the Morris-Lecar neuron was implemented
on Xilinx’s Kintex-7 FPGA to validate the design’s func- CORDIC units return the results with handshaking signals
tionality. The VHDL design was constructed using generic and new operands are presented. The maximum operation
statements such that the word length, integer and fractional frequency is limited by the CORDIC exponential unit as the
−i
bits, time step, and CORDIC iteration numbers are all recon- precomputed shift and add operations that implement e2
figurable for high flexibility in the design. Based on the are the slowest single-cycle operations in the system. The
operational range of the model values observed in simulation, longest throughput delay is a result of sequential multiplication
a fixed-point arithmetic with 10 integer bits and 15 fractional operations.
bits was selected for the proposed hardware implementation Figure 3 shows screen captures from an oscilloscope show-
such that overflow and underflow are avoided and the large ing the implemented waveform from the FPGA. The digital
range of input stimulus used for validation can be accommo- membrane potential was converted to analog for viewing using
dated in hardware. The time step was selected to be dt = 2−5 a 12-bit resistive ladder DAC. Any observed noise in the signal
for convenience. Since the CORDIC operations require shifts can be attributed to the conversion method and reduced reso-
by as many as n bits, where n is the CORDIC iteration number, lution for conversion. It is clear that Figure 3 verifies that the
the CORDIC computational units extend the input operands to implemented design closely matches behavioural expectations.
the required lengths to avoid overflow, then return them back
to the 25-bit width used for the system.
One critical challenge that arises from implementation is V. R ESULTS
operations scheduling since 4 exponential, 8 multiplication, Table IV shows post-implementation resource usage for
and 4 division operations must be performed. To keep hard- the proposed implementation on the Kintex-7 FPGA, as well
ware resource requirements low, only one of each CORDIC as results from previous works. As is shown, the proposed
operational unit (multiplication, division, exponential) was work requires fewer LUTs for implementation and operates
used. Multiplication operations run sequentially with concur- at a substantially higher clock frequency than previously
rent division and exponential operations. The system passes proposed implementations. Furthermore, the CORDIC-based
input operands to the CORDIC units with handshaking sig- implementation offers significantly lower error than previous
nals to initiate the operation. Once the results are ready, the implementations. Given the increased accuracy and reduced

Authorized licensed use limited to: Huawei Technologies Co Ltd. Downloaded on November 11,2022 at 18:39:53 UTC from IEEE Xplore. Restrictions apply.
4142 IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—II: EXPRESS BRIEFS, VOL. 69, NO. 10, OCTOBER 2022

TABLE IV
FPGA R ESOURCE U TILIZATION C OMPARISONS FOR THE P ROPOSED VI. C ONCLUSION AND F UTURE W ORK
I MPLEMENTATION AND P REVIOUS W ORKS . N OTE T HAT THE R ESOURCE A novel, resource-efficient, and highly accurate implementa-
S AVINGS A RE L EFT E MPTY FOR THE PWL1 D ESIGN S INCE THE U SE OF
DSP B LOCKS S KEWS U SAGE DATA R EPORTED FOR THE D ESIGN tion of the biologically meaningful Morris-Lecar neuron model
on FPGA has been presented with the target application of
hardware acceleration for neuroscience simulations. All model
parameters are externally variable, making it an excellent can-
didate for modelling neurological diseases and the response of
neurological systems under biologically explicable behavioural
changes.
Possible extensions of this brief could include the
use of this design for implementations of highly paral-
lel networks for hardware acceleration of neuroscientific
simulations.
resource requirements of the proposed implementation, the
CORDIC-based Morris-Lecar neuron is an excellent candidate
R EFERENCES
for accurate hardware acceleration of neuroscience simula-
tions. The lowered resource requirements allow for larger [1] D. S. Bassett and M. S. Gazzaniga, “Understanding complexity in the
human brain,” Trends Cogn. Sci., vol. 15, no. 5, pp. 200–209, 2011.
networks of neurons to be constructed to accelerate simu- [Online]. Available: https://www.sciencedirect.com/science/article/pii/
lations of vastly parallel networks of biologically accurate S1364661311000416
neurons. Although the LUT usage is not a direct measure of [2] D. A. Butts et al., “Temporal precision in the neural code and the
timescales of natural visions,” Nature, vol. 449, pp. 92–95, Sep. 2007.
silicon area in an ASIC implementation, there is a strong rela- [3] W. Gerstner, H. Sprekeler, and G. Deco, “Theory and simulation in
tionship between these two metrics [17], meaning the LUT neuroscience,” Science, vol. 338, no. 6103, pp. 60–65, 2012. [Online].
usage is an important metric when considering design transfers Available: https://www.science.org/doi/abs/10.1126/science.1227356
[4] S. Postnova, C. Finke, M. T. Huber, K. Voigt, and H. A. Braun,
to ASIC. Conductance-Based Models for the Evaluation of Brain Functions,
Firstly, the two designs in [12] sacrifice model accuracy Disorders, and Drug Effects. Vienna, Austria: Springer, 2012,
for reduced hardware resource requirements. From Table IV pp. 97–132.
[5] A. L. Hodgkin and A. F. Huxley, “A quantitative description of mem-
it is clear that these designs have far higher error than the brane current and its application to conduction and excitation in nerve,”
proposed design, require far more LUTs to implement, and J. Physiol., vol. 117, pp. 500–544, Aug. 1952.
operate a much lower clock frequencies. Although the LUT [6] C. Morris and H. Lecar, “Voltage oscillations in the barnacle giant
muscle fiber,” Biophys. J., vol. 35, pp. 193–213, Jul. 1981.
usage is not immediately apparent in the case of the Morris- [7] E. M. Izhikevich, “Simple model of spiking neurons,” IEEE Trans.
Lecar PieceWise Linear (MLPWL1) design, 8 DSP blocks are Neural Netw., vol. 14, no. 6, pp. 1569–1572, Nov. 2003.
used, which if implemented without DSP blocks would dra- [8] R. Brette and W. Gerstner, “Adaptive exponential integrate-and-fire
model as an effective description of neuronal activity,” J. Neurophysiol.,
matically increase the required number of LUTs. Additionally, vol. 94, no. 5, pp. 3637–3642, Jul. 2005.
the piecewise linear approximations used in [12] for both [9] A. Cassidy, S. Denham, P. Kanold, and A. Andreou, “FPGA based sil-
designs result in substantial accuracy degradation outside of icon spiking neural array,” in Proc. IEEE Biomed. Circuits Syst. Conf.,
Montreal, QC, Canada, Nov. 2007, pp. 75–78.
the anticipated operational range. [10] E. M. Izhikevich, “Which model to use for cortical spiking neurons?”
Furthermore, the Division-Based Morris Lecar (DBML) IEEE Trans. Neural Netw., vol. 15, no. 5, pp. 1063–1070, Sep. 2004.
model proposed in [11] has larger hardware resource require- [11] A. Ghiasi and A. Zahedi, “Field-programmable gate arrays-based morris-
lecar implementation using multiplierless digital approach and new
ments, operates at a lower clock frequency, and has slightly divider-exponential modules,” Comput. Electr. Eng., vol. 99, Apr. 2022,
higher error than the proposed implementation. Furthermore, Art. no. 107771. [Online]. Available: https://www.sciencedirect.com/
the DBML model modifies the meaning of the input param- science/article/pii/S004579062200074X
[12] M. Hayati, M. Nouri, S. Haghiri, and D. Abbott, “Digital multiplier-
eters to the model. One of the most significant aspects of less realization of two coupled biological morris-lecar neuron model,”
the Morris-Lecar neuron model is that its parameters have IEEE Trans. Circuits Syst. I, Reg. Papers, vol. 62, no. 7, pp. 1805–1814,
direct correspondence to biological quantities. Without a clear Jul. 2015.
[13] J. Volder, “The CORDIC computing technique,” in Proc. Western Joint
and direct link of the parameters to physiological quanti- Comput. Conf., San Francisco, CA, USA, Mar. 1959, pp. 257–261.
ties, the DBML may see limitation in neurological modelling. [14] M. Heidarpur, P. Khosravifar, A. Ahmadi, and M. Ahmadi, “CORDIC-
In contrast, the proposed CORDIC implementation maintains astrocyte: Tripartite glutamate-IP3-Ca2+ interaction dynamics on
FPGA,” IEEE Trans. Biomed. Circuits Syst., vol. 14, no. 1, pp. 36–47,
the direct link of the parameters to physiological constants Feb. 2020.
and allows these parameters to be input by the user with- [15] P. K. Meher, J. Valls, T.-B. Juang, K. Sridharan, and K. Maharatna, “50
out the need to redesign the system. These parameters are years of CORDIC: Algorithms, architectures, and applications,” IEEE
Trans. Circuits Syst. I, Reg. Papers, vol. 56, no. 9, pp. 1893–1907,
very important in select modelling applications. For example, Sep. 2009.
Fabry’s disease is believed to be characterized by changes in [16] E. M. Izhikevich, Dynamical Systems in Neuroscience: The Geometry
the neuron’s conductance to certain ions [18]. Thus, without of Excitability and Bursting. Cambridge, MA, USA: MIT Press, 2006.
[17] I. Kuon and J. Rose, “Measuring the gap between FPGAs and ASICs,”
the ability to directly model these changes, accurate simu- IEEE Trans. Comput.-Aided Design Integr. Circuits Syst., vol. 26, no. 2,
lation would be difficult. Therefore, the proposed CORDIC pp. 203–215, Feb. 2007.
Morris-Lecar neuron would be a good candidate for appli- [18] B. Namer et al., “Changes in ionic conductance signature of noci-
ceptive neurons underlying fabry disease phenotype,” Front. Neurol.,
cations where the effects of physiological parameter changes vol. 8, p. 335, Jul. 2017. [Online]. Available: https://www.frontiersin.
must be observed. org/article/10.3389/fneur.2017.00335

Authorized licensed use limited to: Huawei Technologies Co Ltd. Downloaded on November 11,2022 at 18:39:53 UTC from IEEE Xplore. Restrictions apply.

You might also like