FPGA-Based Computer Organization Teaching
FPGA-Based Computer Organization Teaching
net/publication/280739859
CITATIONS READS
3 10,559
1 author:
Mohammad Awedh
King Abdulaziz University
32 PUBLICATIONS 1,022 CITATIONS
SEE PROFILE
All content following this page was uploaded by Mohammad Awedh on 07 August 2015.
ABSTRACT: This paper describes a novel approach to teach computer organization using an incremental ap-
proach of working models on FPGA. It presents the design concepts and realization of MIPS-based architecture into
the teaching tool. Our new approach has improved the student learning and understanding of the major concepts in
computer organization. Our main goal of this study is to compare our method (model) of teaching to the one that
was used prior to this study in our institute.
Keywords: FPGA; MIPS processor; RTL; Verilog; Hardware Description Language; Synthesis; CAD tools; Computer
Organization; Assembly Language; Incremental approach and working models.
INTRODUCTION: The course “computer organiza- lating important features of a processor, students can
tion and architecture” is a common course for com- obtain a better understanding of the internal operation
puter engineering students, which plays a central role of a processor (Yurcik and Wolffe, 2001). Different
in the computer engineering curriculum offered at simulators oriented to help in teaching specific con-
universities throughout the world (Holland & Hauck, cepts in modern computer architectures, such as cache
2003). Teaching this course to computer engineering memory, pipelining, and superscalar organizations
and computer science students solely on textbook (Grnbacher, 1998). In another works, researcher (Li &
materials is inadequate (Hatfield & Rieker, 2005) and Chu, 1932). and (Sugawara & Hiraki, 2006) use ac-
(Kasim et al., 2005). Students have to depend on their tive tool for teaching computer organization and ar-
imaginations to understand the fundamental hard- chitecture by taking benefit of simulation and Field
ware-related concepts. Traditionally, most courses in Programmable Gate Array (FPGA) technology. FPGA
computer architecture and organization include prac- technology helps designing high performance systems
tical work in the laboratory. It is not possible to build at low cost(Sugawara & Hiraki, 2006). This paper
a laboratory that can offer several computer architec- presents novel approach to teach computer organiza-
tures for teaching computer organization and architec- tion using an incremental approach of working mod-
ture. Furthermore, having up-to-date information els on FPGA. Our methodology of teaching digital
needs to be in touch with the rapid evolution of the computer organization course differs from the previ-
computer technology and industry. Therefore, search- ous (traditional) one in two aspects. The first aspect is
ing for an effective way of teaching computer organi- the use of the incremental approaches of working
zation and architecture is a continuing task (Hatfield models. This teaching tool helps computer engineer-
& Rieker, 2005). ing students to be familiarized practically with com-
puter organization through development, design, and
Literature Review: There are some modern teaching
implement of a functional and synthesizable proces-
approaches that combined effective hardware design
sor. The second aspect is the use of Field programma-
and hardware implementation to help students under-
ble gate arrays to implement a real processor. Hence,
standing computer architecture concepts and encour-
the students feel the joy of designing and running a
age students to further work on the field (Hala, 2012).
functional processor in real hardware. The students
One of these approaches is teaching with software
also have the chance of adding more instructions and
simulators, which have several advantages over real
improve the performance. The previous teaching
microcomputer platforms; they are not costly and
method for the course was based on theory of com-
more flexible. In addition, graphical presentation and
puter construction. This method teaches students how
animation support students to better understand vari-
computers work by studying their inner details (e.g.,
ous design issues (Rodriguez et al., 1998). By simu-
5
[(Asian J. Adv. Basic Sci.: 4(1), 2015, 5-11) Teaching Computer Organization Using Field Programmable Gate Array: An Incre…]
6
[(Asian J. Adv. Basic Sci.: 4(1), 2015, 5-11) Teaching Computer Organization Using Field Programmable Gate Array: An Incre…]
Behavioral Description of a Simple MIPS Proces- porting Procedures in Computer Hardware) talks
sor: The first phase in our teaching methodology is to about supporting procedures in MIPS. This section
help our students understand and realize the detailed was explained in detail prior to the assignment. To
operation (function) of processors. A behavioral de- support such function, students have to implement two
scription (in Verilog) of a simple single-cycle MIPS new instructions: jal and jr. The students first have to
processor was presented to the students. This Verilog modify the single-cycle design of MIPS (Figure 3) and
module of the single-cycle MIPS processor is fully show how the basic data path and control unit can be
synthesizable and implementable in FPGA. The pro- extended to handle these new instructions. This re-
cessor implements the following subset of MIPS in- quired an addition of the proper control signals and
structions: or, ori, and, andi, beq, sub, add, slt, lw, sw, hardware (e.g., multiplexers). Then, they implement
j. their modifications into the provided Verilog code.
Figure 4 shows the complete top-level system design
The students were asked to modify the Verilog behav-
using Xilinix ISE CAD tool the amount of FPGA
ioral description of the MIPS machine to run the fol-
resources used.
lowing MIPS code. The code has some MIPS instruc-
tions that are not implemented in the given Verilog Pipelined MIPS Processor: The third phase of our
behavioral description. teaching is to implement the piplined MIPS. The goal
.text is for our students to gain a deeper understanding of
# Address of
pipelined processor implementation.
ori $s0 , $0 , 0xD000
7−segment
ori $s1 , $0 , 0xE000 # Address of LEDs
loop sr l $s7 , $s 6 ,2
Figure 5: The pipelined datapath with the con- Only Simulation Simulation and
trol signals identified. I used HDL for Synthesis
95% 5%
Final Projects: The final project is to extend the pipe-
lined implementation to perform data forwarding and To evaluate our teaching approach, two surveys were
data hazard detection. After the students have success- conducted; one was after the second phase and the
fully implemented their pipelined processors, they second at the end of the semester. The goal of the first
were given real programs that failed to run because of survey is to evaluate the students’ progress as well as
the data hazard. These programs are control-hazard their feedback to improve the course. Among the
free. questions of this survey were a set that evaluates our
Even though, data forwarding and data hazard are method so far and gains students feedback. The five-
well explained in (Hermie, 2010), some students point Likert scale items (Likert, 1932) were used in
struggled to have their processors correctly imple- these surveys and the average students’ responses for
mented in FPGA. Hence, we decided to make the final the three semesters are presented.
project a group project of two students. Table 3 shows the average students responses on our
teaching methodology for the three semesters. The
RESULTS AND DISCUSSION: Our new approach results show the success of our new approach. How-
had been applied for three consecutive semesters. The ever, pipelined processor design had not been includ-
number of students in each semester is 10 on the av- ed yet. We believe, complex design (like pipelined
erage. Therefore, we decide to evaluate our method- process design) will be a major and better factor to
ology after the third semester. Any new enhancement evaluate the success of our teaching methodology.
and improvement to the new approach will be applied Hence, we decide to include the same set of questions
for a future teaching of the course. However, surveys in the final survey (at the end of the semester).
are conducted in each semester. To prepare for apply- We also include in this survey the evaluation of the
ing our teaching approach, a survey was conducted at tools that we used in our teaching: Verilog as a hard-
the first day of the class. The goal is to evaluate stu- ware description language and FGPA as an imple-
dents’ background and readiness. This survey helped menting hardware. Table 4 shows students’ feedback
in preparing labs, extra materials and tutorials. A set on using these teaching tools. Another set of ques-
of questions are related to the profile data of the stu- tions are related to the course contents and students
dents attending the courses. Information collected concern. Table 5 shows the students feedback.
includes the background materials in Digital Design – The final survey was conducted at the end of each
related to combinational and sequential design of semester. The first set of questions is dedicated to
digital systems. Another set of questions are related to evaluate the overall quality of the course and com-
using Hardware Description Language (HDL) for pared to other courses in the Computer Engineering
design, debugging and functional simulation of digital curriculum. Table 6 shows students feedback. Table 7
systems; and the implementation of digital circuits shows the overall quality of the teaching tools.
using FPGAs. Table 2 shows the average results of We also included in the final survey the two questions
that were asked in the second survey. The goal is to
8
[(Asian J. Adv. Basic Sci.: 4(1), 2015, 5-11) Teaching Computer Organization Using Field Programmable Gate Array: An Incre…]
evaluate our methodology after students finish their Table 4: Student Evaluation of Using HDL and
implementation of pipelined design and final projects. FPGA.
In addition, a couple of questions were added to eval-
uate the overall methodology. Table 8 depicts the Too Extremely
Easy Fair Hard
average students’ responses for the three semesters. Easy Hard
Using Verilog
Table 3: Evaluation of Our Teaching Method- to describe 5% 60% 20% 10% 5%
ology: First Feedback. digital design
Using Verilog
Question: Modifying working models and
for Functional 82% 13% 3% 2% 0%
adding new instructions helped me realized Simulation
and understand computer design Using FPGA to
implement 0% 10% 45% 30% 15%
digital design
Strongly Strongly
Agree Undecided Disagree
Agree Disagree
Table 5: Course Contents and Students Con-
cern.
77% 16% 7% 0% 0%
Too Extremely
Easy Fair Hard
Question: Incrementally increase the complexity Easy Hard
of a design helped me understand process design Using Verilog
to describe 5% 60% 20% 10% 5%
Strongly Strongly digital design
Agree Undecided Disagree Using Verilog
Agree Disagree for Functional 82% 13% 3% 2% 0%
Simulation
81% 18% 1% 0% 0% Using FPGA
to implement 0% 10% 45% 30% 15%
digital design
9
[(Asian J. Adv. Basic Sci.: 4(1), 2015, 5-11) Teaching Computer Organization Using Field Programmable Gate Array: An Incre…]
Table 7: Overall Quality of the Teaching Tools. CONCLUSION: This paper has described the use of
FPGA to reinforce the concepts of Computer Organi-
The availability of resources zation design using an incremental approach in which
Extremely students extend and modify existing models. It high-
Too Easy Easy Fair Hard
Hard lights the importance of design process abstraction
94% 6% 0% 0% 0% levels for teaching hardware design to students in a
The complexity of the tools hands-on manner.
Extremely A positive feedback we got is from the senior project
Too Easy Easy Fair Hard committee. The committee has stated that a small,
Hard
however increasing, number of senior projects use
23% 52% 12% 7% 6%
soft processor in their senior projects has been no-
Using Verilog to describe and simulate digital ticed. Some students have modified the original de-
design sign of the processor and include it in their design of
Strongly Strongly Dis- embedded systems.
Agree Undecided Disagree
Agree agree Students’ responses to our new teaching methodology
74% 21% 4% 1% 0% have been enthusiastic; they indicate in comments of
Using FPGA to implement digital design the final survey that the method has greatly enhanced
Strongly Strongly Dis- their understanding of processor design. However,
Agree Undecided Disagree some students suggested to use simpler processor;
Agree agree
mostly suggested 8-bit version of the MIPS structure
63% 26% 7% 1% 3%
as presented in (Hermie, 2010). In addition, almost all
students suggested working in fixed number of
Table 8: Evaluation of Our Teaching Method- groups (two or three) from the beginning of the
ology: Second Feedback. course.
In future courses, it would be beneficial to include the
Modifying working models and adding new in- design of a cache memory in our design methodolo-
structions helped me realized and understand gy; students may implement and improve some
computer design cache-related design issues. For instance, improving
Strongly Strongly cache performance, applying different methods of
Agree Undecided Disagree
Agree Disagree handling cache misses and writes. Furthermore, final
79% 13% 7% 0% 1% projects can be more beneficial by including more
Incrementally increase the complexity of a design issues. For instance, the implementation of
design helped me understand process design control hazard (specifically, the static and dynamic
Strongly Strongly branch prediction) and improving cache performance.
Agree Undecided Disagree To reach to the above mentioned steps of processor
Agree Disagree
and cache design, we are working, as also suggested
78% 19% 1% 0% 2% by the students, in using simpler MIPS processor.
The Overall teaching method used is useful Simple processor design helps to expedite and debug
and helpful in understanding complex digi- design without scarifying in understanding the major
tal design concepts of computer organization design.
Strongly Strongly
Agree Undecided Disagree
Agree Disagree REFERENCES:
76% 24% 0% 0% 0% 1. Aws Yousif, Fida El-Din and Hasan Krad (2011)
The teaching technique used is adequate for Teaching Computer Architecture and Organization
other computer engineering courses using Simulation and FPGAs, IJIET, 1(3), 190
194.
Strongly Strongly
Agree Undecided Disagree 2. Digilent (2015) Digilent Basys 2 Spartan-3E
Agree Disagree
FPGA Board. http://www.digilentinc.com
44% 51% 3% 1% 1% /Products/Detail.cfm?NavPath=2,400,790&Prod=
BASYS2.
The outcomes of the surveys will be used to improve 3. Grnbacher H (1998) Teaching computer architec-
teaching the course in the future and suggest im- ture/organization using simulators, Proc. Fron-
provements to the prerequisite courses as well. tiers Educ. Conf., 1107-1112.
4. Hatfield B. and Rieker. M (2005) Incorporating
simulation and implementation into teaching
10
[(Asian J. Adv. Basic Sci.: 4(1), 2015, 5-11) Teaching Computer Organization Using Field Programmable Gate Array: An Incre…]
computer organization and architecture. In 35th computer. In The 7th Middle Eastern Simulation
ASEE/IEEE Frontiers in Education Conf, pages Multiconference ”MESM2005”, 151–158.
FIG–18, Indianapolis, USA. 12. Likert, R. (1932) A technique for the measurement
5. Hana Park, Young-Woong Ko, Jungmin So and of attitudes. Archives of Psychology.
Jeong-Gun Lee (2013) Synthesizable Manycore 13. Li. Y. and Chu.W. (1996) Using fpga for computer
Processor Designs with FPGA in Teaching Com- architecture/organization education. In Proceed-
puter Architecture International Journal of Control ings of the 1996 Workshop on Computer Architec-
and Automation, 6(5), 429-438. ture Education, WCAE-2 ’96, New York, NY,
6. Hala ElAarag (2012) Teaching computer organi- USA.
zation: a practical approach. Journal of Compu- 14. Likert. R. (1932) A technique for the measurement
ting Sciences in Colleges, 28, 210-1017. of attitudes. Archives of Psychology, 22(140).
7. Hermie. J. M. Voulgarelis (2010) The importance 15. Patterson D. A . and Hennessy J. L. (2014) Com-
of physically built working models in design puter Organization and Design. Elsevier, MA,
teaching of undergraduate architectural students. USA, 5th edition.
2nd international conference on design education, 16. Rodriguez .L. Pardo, M. Moure, M. Valdes, and E.
28 june - 1 july. Mandado. Viscp(1998) a virtual instrumentation
8. Holland J. H. and Hauck. S. (2003) Harnessing and cad tool for electronic engineering learning.
fpgas for computer architecture education, Pro- In Frontiers in Education Conference, 1998. FIE
ceedings of the IEEE Intr. Conf. on Microelectron- ’98. 28th Annual, 3, 1095–1099.
ic Systems Education (MSE03). 17. Sklyarov V and Skliarova I. (2005) Teaching re-
9. Jean-Luc Dekeyser, Ahmad Shadi Aljendi (2015) configurable systems: methods, tools, tutorials,
Adopting New Learning Strategies for Computer and projects. Education, IEEE Transactions on,
Architecture in Higher Education Case Study: 48(2), 290–300.
Building the S3 Microprocessor in 24 Hours. 18. Sugawara. Y and Hiraki. K (2006) A computer
Workshop on Computer Architecture Education architecture education curriculum through the de-
held in conjunction with the 42nd International sign and implementation of original processors
Symposium on Computer Architeture, Portland, using fpgas, In 36th ASEE/IEEE Frontiers in Ed-
United States. ucation Conference.
10. Jong Hyuk Lee and Seung Eun Lee and Heon 19. Yurcik. M. H. W, Wolffe G. D. (2001) A survey of
Chang Yu and Taeweon Suh (2012) Pipelined simulators used in computer organiza-
CPU Design With FPGA in Teaching Computer tion/architecture courses. Proceedings of the 2001
Architecture. Education, IEEE Transactions, Summer Computer Simulation Conference
55(3), 341-348. (SCSC).
11. Kasim. M., Al-Aubidy, and A. A. Samadi (2005)
Simulation and fpga implementation of a simple
11