FPGA_Design_of_Boolean_Functions_Using_a_Cascade_of_Decoders_and_Logic_Gates

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

MIPRO 2020, September 28 - October 02, 2020, Opatija, Croatia

FPGA Design of Boolean Functions Using


a Cascade of Decoders and Logic Gates

A.N. Borodzhieva*, I.I. Stoev**, I.D. Tsvetkova*, S.L. Zaharieva** and V.A. Mutkov**
*University of Ruse “Angel Kanchev”/Department of Telecommunications, Ruse, Bulgaria
**University of Ruse “Angel Kanchev”/Department of Electronics, Ruse, Bulgaria
{aborodzhieva, istoev, itsvetkova, szaharieva, vmutkov}@uni-ruse.bg

Abstract – The paper presents active and interactive and communication skills are used and developed in the
methods used for improving knowledge that students will laboratory exercises [2, 3, 4].
get while implementing different Boolean functions with a
cascade of full decoders and OR logic gates based on their First, different active and interactive learning methods
schematic view and their testing on the laboratory board used in the training process are considered in the paper.
built with devices of Spartan-6 FPGA Family. The courses Next, active learning in FPGA design of Boolean
“Digital Electronics” and “Pulse and Digital Devices” functions using a cascade of decoders is described.
introduce the students-bachelors of the electrical specialties
in our University to the main problems of digital electronics. II. ACTIVE AND INTERACTIVE LEARNING METHODS
USED IN THE TRAINING PROCESS
Keywords – Boolean functions, combinational circuits,
decoders, digital electronics, FPGAs, logic gates, Xilinx. Usually, students are asked to do some activities
outside of school. In primary and secondary education,
I. INTRODUCTION these activities are often referred to as home-based
activities (homework) and are done by students at home.
Digital electronics is a part of the modern equipment In higher education, these extracurricular activities are
like washing machines, dryers, dishwashers, toasters, air often called assignments (tasks), and students typically
conditioners, game consoles, etc. The fundamentals and perform them at home, in libraries, or at other university
implementation of digital electronics units are basic for facilities. Based on these features, education can be
understanding the principle of operation and design of generalized as “lessons at classroom and homework at
computers and communications, military and security home”. This model, known as a teaching-based model, has
equipment, consumer and industrial electronics, embedded been used for decades at each educational level and it is
systems, and so on [1]. often associated with passive student learning (Fig. 1).
At the University of Ruse one of the main courses is Flip teaching presents a total change of perspective,
“Digital Electronics” in the curriculum of electrical and seeking the active participation of students in the learning
computer engineering programs. The course covers process. It performs an interchange of the two main
various topics in the field of synthesis and analysis of activities of the traditional model: lectures and homework.
logic devices and it is based on two components – lectures The main change is that lessons are delivered at home and
and laboratory exercises. For the purposes of the effective homework – in the classroom [5].
educational process for electrical and computer engineers,
a variety of active and interactive learning methods are The active learning method consists of a group of tools
used during the lab exercises together with the elements of allowing students to “actively” participate in the course by
the traditional presentation-based lectures. For faster and engaging in activities proposed to improve their skills
longer-lasting learning of the material being studied, rather than attempting to absorb unilaterally transmitted
active learning techniques such as case-based and information.
problem-based learning, one-minute papers and “think-
pair-share”, decision-making activities, etc. are used
[2, 3, 4]. Modelling and simulating, as well as FPGA
designing give the students opportunities for finding a Active Learning
solution for different practical tasks and better Passive Learning
understanding the material. Critical thinking, creativity,
collaboration, research and problem solving, innovations
This publication is developed within the frame of Project “Forest
Monitoring System for Early Fire Detection and Assessment in the
Balkan-Med Area” (SFEDA), project code 2263, financed under the Define
Demonstrate
Analyze
transnational Cooperation Programme INTERREG V-B "Balkan- List
Apply
Define
Mediterranean 2014-2020", co-funded by the European Union and the Describe
Practice
Create
National Funds of the participating countries and by the National Explain Evaluate
Scientific Program ICTinSES, financed by the Ministry of Education
and Science of Bulgaria. Figure 1. Comparison of passive and active learning

1596
Authorized licensed use limited to: UNIV ESTADUAL PAULISTA JULIO DE MESQUITA FILHO. Downloaded on July 15,2023 at 21:14:03 UTC from IEEE Xplore. Restrictions apply.
The active learning method (Fig. 1) requires students In the process of think, pair, and share, the lecturer
to implement a variety of activities to generate full formulates a problem or a question, then groups students
awareness of what they are doing as content processing in pairs and gives each pair time enough to make a
enables them to learn. In essence, it is a student-centered conclusion on the problem, and permits each participant to
approach in which the student determines his or her pace define the conclusion in voice, for example one student
and style of learning and finds support in his or her peers, explains a concept while the other student evaluates what
and where teachers play the role of “guiding and is being learned. Applying variations of the process, the
motivating” the student in the learning process. The active students are engaged in the learning process,
learning approach can be related to a variety of communicating, and retaining more information [8].
techniques, ranging from traditional problem-solving to
case studies, learning from doing, learning through doing, During the buzz sessions, students participate in
discussion activities, or peer training. Modern session groups focused on a single topic. Every student in
technologies play an important role in the learning each group contributes ideas. The teacher encourages
process, but they are not essential, so problems based on discussion and collaboration among the students in each
simulations and games are included along with the use of group. During the buzz sessions, students should learn
mobile devices and ultimately classrooms equipped with from one another’s experiences [8].
modern high technologies. Definitely, active learning The incident process is a teaching style involving case
arouses more student interest than traditional lectures, study formats. The focus of this process is on learning
providing flexibility for course development, and how to solve real problems involving real people,
encourages a tendency to take on individual and group providing small groups of students with details from real
challenges. In engineering education, experimental-based situations and then ask them to find out a workable
learning and the group approach offer activities where solution. This teaching style prepares the students for life
motivation and creativity are essential. Students are outside the classroom [8].
provided with tools to build their own knowledge,
modified dynamically, along with the capacity to assess During the Q&A sessions, each time when the topic is
the difficulty of the problem and to determine the criterion introduced, before the formal lecture, the teacher asks the
to be used to solve it [6]. students to write the thematic questions on cards. After
collecting the cards, the teacher mixes them up, reads
Continuous assessment throughout the course is them and answers the questions generated by students [8].
considered motivating and maintains regular training
habits. Therefore, student assessment requires rethinking. III. ACTIVE LEARNING IN FPGA DESIGN OF BOOLEAN
Rather than just an end-of-course exam, project work, FUNCTIONS USING A CASCADE OF DECODERS
exercises and course participation are also an essential part
of the assessment. A joint (collaborative) assessment of A. Applied active and interactive methods during
the project work is used to motivate cooperation, but implementation of logical functions with decoders
exams are evaluated individually to prevent free riding.
Based on the flip teaching, realizing an interchange of
The visualization using numerical software (for example,
the two main activities of the traditional model (lectures
Scilab, MATLAB, Logisim, Multisim, etc.) aims to focus
and homework), during the classes in the courses “Digital
the learning on understanding the material. Design
Electronics” and “Pulse and Digital Devices” lessons are
exercises and practical measurements are used to
delivered at home and homework – in the classroom.
familiarize students with laboratory equipment and to
Before the lesson, students should get acquainted with the
motivate them studying the theory [7].
theoretical issues discussed in detail in [9, 10] (or in other
Some of the interactive teaching styles and the most sources in Internet), as well as with the possibilities of
effective ways to engage the students’ interests are: Logisim [11] for studying digital circuits (Fig. 3) – for
1) brainstorming; 2) think-pair-share; 3) buzz session; example, definition of decoder (Fig. 3 A), the truth table
4) incident process; 5) question and answer sessions [8]. (Fig. 3 B), the output functions (Fig. 3 C) and the block
diagram (Fig. 3 D) of a complete decoder with two inputs
The interactive brainstorming is performed in group and four outputs. Students need to test the circuit
sessions. It is useful for generating creative ideas and it (Fig. 3 D) for all four input combinations and the results
helps students learn together in a group. Different types of observed are shown in Fig. 3 E, where the active input and
interactive brainstorming are presented in Fig. 2 [8]. output signals are 1s. For this result, students need to use
Team-idea
the software product Logisim [11].
It is also necessary for students to get acquainted in
mapping

advance with the solved two examples – Problem 1 and


Problem 2 (Fig. 4), which allow the implementation of a
Individual
Brainstorming Group passing Boolean function with a decoder and additional logic
gates (Problem 1) or by cascading decoders and additional
brainstorming

logic gates (Problem 2).


Structured
and
Reverse or
negative Students learning the courses “Digital Electronics” and
unstructured thinking “Pulse and Digital Devices” can use individual
brainstorming or think, pair, and share activities to solve
Figure 2. Brainstorming these problems and test the logic circuit shown in Fig. 3 E.

1597
Authorized licensed use limited to: UNIV ESTADUAL PAULISTA JULIO DE MESQUITA FILHO. Downloaded on July 15,2023 at 21:14:03 UTC from IEEE Xplore. Restrictions apply.
Decoders A
The decoders are devices with n inputs and m outputs  m  2n  , providing an active signal (1 or 0) to one
of the outputs according to the combination of the logical signals supplied to the inputs.
The truth table, the output functions and the structural diagram built in Logisim of a full decoder with
2 inputs and 4 outputs are presented below.
Truth Table of a Full Decoder with 2 Inputs and 4
Outputs (Active Input and Output Signals: Logic 1) Structural diagram of the decoder D

Output functions of the decoder C


Y0  x1 x2 ; Y1  x1 x2 ; Y2  x1 x2 ; Y3  x1 x2 .

Testing the circuit for all 4 input combinations


E

Figure 3. Flip teaching (an interchange of lectures and homework) during the classes in the courses “Digital Electronics” and “Pulse and Digital
Devices”

Problem 1. Using a three-input decoder and additional logic gates, construct a structural diagram that
implements the function f  x1,x2 ,x3     0,1, 3, 7  if the decoder has: a) inverse outputs (integrated circuit
SN74LS138, with three enabling inputs E1 , E2 , E3 ); b) normal outputs. Justify the type of the additional logic gate
by describing the operation of the circuit for the input combinations with numbers 3 and 6.
Depending on the decoder type (normal or inverse outputs) and the way of describing the function (Perfect
Disjunctive Normal Form, PDNF, or Perfect Conjunctive Normal Form, PCNF), the chosen additional logic gate
is given in the table below.

Problem 2. Using two-input decoders with normal outputs and enabling inputs and additional logic gates,
construct a structural circuit that implements the Boolean function f  x1,x2 ,x3 ,x4    1, 5, 6, 8,12,13,15 .
Solution: In the table below the minterms m corresponding to the input combinations for which the function
has a value of 1 are given. Each minterm is divided into two parts: the first one  m includes the variables x1 and
x2 , and the second one  m  – x3 and x4 . Each part can be obtained at the output of a decoder with two inputs.
The products of the first two arguments can be obtained at the outputs of a two-input decoder and can be used as
enabling signals to the next stage composed of two-input decoders whose information inputs are connected to the
other two variables. In this way, the cascade of the decoders is realized and shown in the figure below. The
justification of the type of the additional logic gate is based on the results presented in the table above.

Figure 4. Problem 1 and Problem 2 – formulation and solution

1598
Authorized licensed use limited to: UNIV ESTADUAL PAULISTA JULIO DE MESQUITA FILHO. Downloaded on July 15,2023 at 21:14:03 UTC from IEEE Xplore. Restrictions apply.
Problem 3. Investigate the operation of a two-
input decoder with normal outputs and an
enabling input and determine the function
implemented by cascading such decoders and
with an additional logic gate (OR). Fill in the
truth table of the device after programming
FPGA with the file casc_Dc_WG_xx.bit, where
xx = 01...30. The device realizes the function of
four variables by a cascade of two-input decoders
with normal outputs and an additional logic gate
(OR) (Problem 2). After testing with the
laboratory board and completing the truth table,
build the schematic of the device used for
creating the bit file in the environment of
ISE Project Navigator. If you have some free
time during the practical classes, create the bit
file in ISE Project Navigator by yourself.

Figure 5. Problem 3 – formulation and solution

addition, they need to provide evidence from their work


B. Applied active and interactive methods during presenting a report consisting of step-by-step solutions.
implementation of logical functions with decoders
Students from the second year study some basic The third assignment gives the students an opportunity
disciplines, where they learn essential skills. During the to combine them in pairs, so using the activity think, pair
classes in the courses “Digital Electronics” and “Pulse and and share they can get the solution. Also, this problem is
Digital Devices”, students have to realize a function of aimed to provoke them to use learning through doing by
3 arguments with a three-input full decoder (Problem 1) programming. Students are divided in groups and they can
and a function of 4 arguments by cascading two-input full help each other using discussion activities, or peer
decoders (Problem 2) in three ways: 1) manually; 2) by training. The generated bit file allows the exploration of
constructing and testing the circuit in Logisim; 3) by two similar devices. After programming FPGA with the
constructing and testing (or only testing) the circuit in the bit file, two students can work simultaneously on the lab-
environment of ISE Project Navigator [12]. Here students board. In the last part of this problem, students use a lab-
need to use learning from doing, learning through doing, board to test their solutions. An example of a screenshot
discussion activities, or peer training. A collaborative from the software used for a part of the solution of a
(joint) assessment of the project work is used to motivate student, on the screen of the computer, is given in Fig. 5.
cooperation, but exams are evaluated individually to A photo taken when testing with the lab-board is shown in
prevent free riding. The visualization using software (for Fig. 5 (the students around the board).
example, in this case, Logisim and ISE Project Navigator) In engineering education, experimentally based
aims to focus the learning on understanding the material. learning and the group approach offer activities in which
During the classes, students get formulated tasks like motivation and creativity are essential. These are basic
those shown in Fig. 4 and Fig. 5. For every student, there skills that modern students must possess in order to be
is a personal assignment. They need to solve them and competitive. Students are given the opportunity to build
present a report with solutions like those shown in Fig. 4 their own knowledge that can be dynamically modified,
and Fig. 5. The solution of the first problem is presented along with defining the criteria to be used to solve the
in details in [9]. problems.

Students can solve alone the first and the second Students enrolled in the courses “Digital Electronics”
assignment. To solve these problems students can use and “Pulse and Digital Devices” have the opportunity to
individual brainstorming or team idea mapping. In learn some essential skills, which will make them
successful engineers. Lecturers try to improve knowledge

1599
Authorized licensed use limited to: UNIV ESTADUAL PAULISTA JULIO DE MESQUITA FILHO. Downloaded on July 15,2023 at 21:14:03 UTC from IEEE Xplore. Restrictions apply.
of the students using active and interactive methods and gate.net/publication/290729475_Digital_Electronics_Principles_D
evices_and_Applications/citations
make them competitive in the future.
[2] B. Balamuralithara, P. C. Woods, “Virtual laboratories in
IV. CONCLUSION engineering education: The simulation lab and remote lab.”
Computer Applications in Engineering Education, pp.108-118,
The lectures in the courses “Digital Electronics” and 2009.
“Pulse and Digital Devices” at the University of Ruse are [3] J. Pang, “Active Learning in the Introduction to Digital Logic
really interested in improving the engineering education Design Laboratory Course”. ASEE Zone III Conference 2015.
by applying active learning and interactive methods for https://www.asee.org/documents/zones/zone3/2015/Active-
Learning-in-the-Introduction-to-Digital-Logic-Design-Laboratory-
attracting the students’ attention, presented in the paper Course.pdf.
and promoting them within our university community. [4] S. Senthamarai, “Interactive teaching strategies”, Journal of
Applied and Advanced Research, 3(Suppl. 1), 2018, pp. S36-S38.
On the basis of configuring the logic blocks in FPGAs
complex Boolean functions are implemented. In the [5] A. Fidalgo-Blanco, M. Martinez-Nuñez, O. Borrás-Gene, J. J.
Sanchez-Medina. “Micro flip teaching ‒ An innovative model to
course “Digital Electronics” and “Pulse and Digital promote the active involvement of students.” Computers in
Devices” students study how to build a circuit using logic Human Behavior, Volume 72, July 2017, pp. 713-723.
gates (for example, only 2-input NAND gates) or some [6] L. J. Cymberknop, R. L. Armentano. “Active Learning Approach
combinational units (for example, decoders and to Enhance Engineering Education in Argentina: A Case of Study
multiplexers). One of the topics covered in the courses is in Signals and Systems.” Creative Education, 9, 1444-1456, 2018.
the design of devices implementing Boolean functions [7] A. Lehtovuori, M. Honkala, H. Kettunen, and J. Leppävirta.
using decoders or a cascade of decoders and logic gates, “Promoting Active Learning in Electrical Engineering Basic
Studies”. http://dx.doi.org/10.3991/ijep.v3iS3.2653.
presented in the paper.
[8] S. Senthamarai. “Interactive teaching strategies”. Journal of
The laboratory exercises help the students to develop Applied and Advanced Research, 2018: 3 (Suppl. 1), S36S38
design experience and problem-solving skills, important https://dx.doi.org/10.21839/jaar.2018.v3S1.166, ISSN 2519-9412,
Phoenix Research Publishers, 2018.
for the engineering profession. They gain skills for
[9] A. Borodzhieva. “Pulse and Digital Circuits. Laboratory Practice
analyzing, synthesizing and evaluating design information with Modern Circuit Solutions – FPGA (part 1). Ruse: Academic
and problems. Therefore, it is very important for the Publishing House “University of Ruse”, 2019 (in Bulgarian).
lectures in the universities to develop effective teaching [10] Combinational circuits using Decoder.
pedagogical methods to involve students in active learning https://www.geeksforgeeks.org/combinational-circuits-using-
for the laboratory classes in digital electronics. decoder/
[11] Logisim, http://www.cburch.com/logisim/
REFERENCES [12] Xilinx documentation, https://www.xilinx.com/content/xilinx/en/
downloadNav/design-tools/v2012_4---14_7.htm
[1] A. K. Maini. “Digital Electronics: Principles, Devices and
Applications”, DOI 10.1002/9780470510520, 2007, research-

1600
Authorized licensed use limited to: UNIV ESTADUAL PAULISTA JULIO DE MESQUITA FILHO. Downloaded on July 15,2023 at 21:14:03 UTC from IEEE Xplore. Restrictions apply.

You might also like