Remote FPGA Laboratory Course Development based on an Open Multimodal Laboratory Facility Vassilis Fotopoulos, Anastasios Fanariotis, Theofanis Orphanoudakis Hellenic Open University School of Science and Technology Tsamadou 13-15, GR-26222, Patras, GREECE +30 2610 367529
[email protected]
[email protected]
ABSTRACT In this paper the implementation of a remote FPGA laboratory course is proposed, based on a low cost but powerful FPGA development board, the ALTERA DE0-Nano which is powered by an Altera Cyclone IV Field Programmable Gate Array (FPGA) IC. The course is developed based on an open multimodal laboratory facility at the Digital Systems and Media Computing Laboratory of the Hellenic Open University. The course consists of laboratory exercises in the form of VHDL (VHSIC Hardware Description Language) design experiments that the end user can conduct from his or her Personal Computer through a graphical web interface and Altera's Quartus II EDA (Electronic Design Automation) software on hardware that is connected and set-up on a remote server while observing the results in real time. The exercises created for this course are designed to be both educational and interesting while being geared towards entry-level users thus producing a trouble-free RL (Remote Laboratory) that in turn maximizes educational gain.
Categories and Subject Descriptors B.6.3 [Logic Design]: Design Aids – Hardware Description Languages. K.3.1 [Computers And Education]: Computers Uses in Education – Distance Learning.
Keywords FPGA, VHDL, distance learning, remote lab, online course.
1.
Athanassios N. Skodras Department of Electrical and Computer Engineering Faculty of Engineering University of Patras Rion, GR-26504, Patras, GREECE +30 2610 996167
INTRODUCTION
In recent years, advances in technology have made possible the development of innovative learning applications. Additionally, with the recognition of the value and flexibility of distance learning, a number of online courses were made available from different educational institutions over the web. The Masive Open Online Courses (MOOCs) available from specialized portals such as edX or Coursera, are offering rich educational opportunities to millions of students worldwide. To quantify the above observations, there are 93 computer science and 25 electronics related courses in edX from top universities like MIT, Harvard, Berkeley etc. In the field of electronics, one of the pioneers is MIT's edx 6.002x which enrolled 155,000 students in 2012, although only 26,000 may be considered active students since they proceed to the solve the first available problem [1]. However, all these electronic courses available have a common
characteristic; the lack of access to physical laboratorial equipment. The students are graded based on simulation tools. In Europe the largest project providing access to virtual and remote laboratory facilities is the Go-Lab (Global Online Science Labs for Inquiry Learning at School) Project [2]. However, GoLab scope is limited to open up online science laboratories (remote and virtual labs) for the large-scale use in school education and not higher education students or scientists with increased requirements in terms of interaction and experimentation. The overall aim of the Go-Lab project is to encourage young people aged from 10 to 18 to engage in science topics, acquire scientific inquiry skills, and experience the culture of doing science by undertaking active guided experimentation. To achieve this aim, the Go-Lab project creates the Go-Lab Portal allowing science teachers finding online labs and inquiry learning applications appropriate for their class, combining these in Inquiry Learning Spaces (ILSs) supporting particular lesson scenarios, and sharing the ILSs with their students. Using the ILSs, the students receive the opportunity to perform personalized scientific experiments with online labs in a structured learning environment. Some particular courses, may go one step further by offering their students the opportunity to purchase real electronic equipment in very low cost by some supporting companies but no matter how cheap these kits are, they are still not free and thus they are not required strictly in order to complete these courses. There are a lot yet to be done in the area of real time, engineering-type laboratory training, especially in the field of digital systems where simulation prevails. If MOOCs are left aside because a massive course would definitely require a lot of equipment, one may find a few available examples of remote laboratories like CLEM [3], an implementation of a remote e-learning project on Mechatronics based on Cloud platform, the Massachusetts Institute of Technology iLab Remote FPGA & CPLD Laboratory [4] one of the first remote laboratories based on a framework created for this type of learning, the Online Lab created by the Ilmenau University of Technology in order to support the needs for remote engineering of FPGAs and CPLDs [5] and the Arduino remote Lab created in the Digital Systems and Media Computing Laboratory (DSMC) of Hellenic Open University (HOU) for the needs of a distance learning course on microcontrollers [6], [7]. In this paper we present the development of an open remote FPGA Lab course, which is made available to students and trainers and can support training curricula on the topics of digital
system design and embedded systems in the context of both formal and informal education. The objective is to provide an experimental facility with open remote access so that: •
lab activities environments,
are
ported
to
distance
learning
•
a very large number of individuals can be educated with minimal hardware resources,
•
Apache HTTP Server
•
C++ RTMP Server
•
access to real systems for illustrations, during on-line courses or virtual classrooms is made possible and
•
Avconv Video Converter
•
PHP 5.5
•
sharing of instruments and equipments between different departments and institutions is facilitated.
•
MySql Server
•
Shell In A box
Thus, the participants can experience real system behaviour of their experiments, avoiding overly abstract, unnatural-looking graphs and GUI widgets, while at the same time train at using state-of-the-art equipment.
2.
with 2.0GHz P4 machines, 1GB of ram memory and 40GB disks. Apart from Quartus II Free edition, which is Altera's proprietary software, necessary to communicate with the DE0-Nano board, all other software tools are open source. The list includes the following:
DESIGN METHODOLOGY
The main target during the development of the system under presentation was the achievement of a level of interactivity that could approximate the flexibility of hands-on experience while maintaining the safety of the remote equipment. The selected laboratory setup was that of a typical development board with programmable logic and pre-connected peripherals. The open issues in opening this setup allowing remote access are related first to interfacing to actual signals following the board specifications, then to implement appropriate remote device configuration tools and finally to capturing system behavior in an efficient way so that experiment execution and debugging can be performed in an efficient manner. In this section we describe the solutions implemented in the case of the DSMC remote FPGA lab to address the above issues.
Apache with the aid of PHP serves the web interface to the users while Avconv and C++ RTMP server are responsible for serving the real time video of the experiment. MySql is in charge for handling the timeslot reservation system (Figure 2), users account data and usage statistics. To allow fair distribution of access time to students, registered users were only allowed access to system in discrete time slot intervals of 1 hour that could be reserved online. The reservation schedule was made available to all users and the system supported addition of new reservations and removal of previously submitted reservations. A complete logging system provided statistics to the system administrator and the possibility to take action when reservation load increased. Finaly Shell In A box is used whenever one of the administrators needs access to the system for maintenance purposes.
Application server
14bit + (4bit spare) ALTERA DE0-nano Arduino microcontroller Figure 1. The laboratory's architecture The system's architecture consists of three individual subsystems (Figure 1). The first one is the application server on which all the corresponding software tools are installed. The application server is an Ubuntu Linux 14.04 LTS machine which can be installed and give value even on old workstations like our decade old PCs,
Figure 2. The timeslot reservation system Remote device configuration is made possible through the Quartus II JTAG server (an option appearing at the user hardware setup dialog box when running its locally installed version of the ALTERA Quartus II software) allows different applications to share access to JTAG cables (such as the ByteBlaster cable). Clients connect to the server using a TCP/IP connection. Thus, users can access JTAG cables connected to a remote computer, (a feature foreseen also to solve cases when an operating system has no fast JTAG hardware available). Through the Quartus provided JTAG daemon that also runs on the DSMC remote FPGA lab application server, it is possible to download user code to the DE0-Nano board reconfiguring the FPGA. The experimentation
interface (Figure 3) was kept as simple as possible by designing a simple way of transparent user-hardware interaction. At the left part of the web page, occupying almost 2/3 of the window, is the live-cam video showing the connected hardware while on the right part, is an image of the DE0-Nano board along with graphical buttons related to the second subsystem.
prototyping. It hosts a powerful Cyclone IV device with 22,320 Logic Elements (LEs), two external GPIO headers for interfacing, eight on-board LEDs, four dip-switches and two push-buttons, onboard memory devices including SDRAM and EEPROM that are more than adequate for most laboratory experiments a tutor can come up with. It is affordable, small and lightweight, easily reconfigurable, and it can be powered by a USB mini-AB port or a 2-pin external power header if mobile/wearable computing is the target application. Since the DE0-Nano board comes with no additional I/O and display modules, an external 7-segment display for numerical output and a servo motor for practicing pulse width modulation have been connected to pre-selected I/O pins of the FPGA.
3.
Figure 3. The experimentation interface The second subsystem, is an Arduino Uno rev3, which serves as a transparent middleware between the web interface and the FPGA board. To achieve physical interaction with the FPGA, 14 pins from the Arduino, configured as digital inputs, are directly wired to 14 pins of the FPGA. This enables the trainee to provide physical input to the FPGA by pressing the numbered buttons at the lower right part of the experimentation interface. A custom made red-led array is used to prove to the trainee that his input has actually reached to the system board. Thus, the use of the Arduino controller is kept transparent to the user who only interacts with the graphical interface emulating control buttons though selection boxes and monitoring correct signal activation via LED indications.
COURSE IMPLEMENTATION
A crash course has been setup with the assistance of an LMS (Learning Management System) platform (http://dsmc.edu20.org) and five e-lectures where given through the synchronous elearning platform CENTRA from the teaching staff. Twenty students from different areas across Greece were selected and had the chance to practice on the lab systems. The course included two written assignments submitted and evaluated using the LMS platform. Finally a hands-on examination took place after the 6 week course ended and certificates were awarded. The learning objectives of the course were the following: •
to familiarize students with design methodologies and development of digital electronic circuits
•
to train students in hardware description languages of digital systems such as VHDL
•
to train students in modern development tools in programmable field gate arrays (FPGA)
•
to familiarize students with digital controllers and related state of the art development platforms based on FPGAs and peripheral electronics
•
to familiarize students with modern applications of embedded digital systems and market trends
To achieve the above objectives the e-lectures covered the topics of digital design methodologies and design flows, the VHDL language syntax and its use for digital system specification and development, FPGA architectures and design principles and the tools for VHDL simulation, synthesis and placement on the FPGA device and platform of choice. The structure of the assignments gradually guided students from the simpler structures of combinatorial logic, to sequential circuits and from structural description of hardware components to higher level descriptions of complex Finite State Machines (FSMs) and practical modules and functional blocks like a serial transfer interface.
Figure 4. A photo of the hardware used: the DE0-Nano is at the left, a servo motor in the middle and a custom led array, accompanied by a 7-segment display at the right part of the photo (Arduino interfacing board is left outside the captured window since its use is transparent to the user). The third subsystem is the Altera DE-0 Nano. It is a compactsized FPGA development platform, exceptionally suited for logic design, control, robotics and other type of projects practicing and
The structure of the assignments guided students first to simulate the system behavior using both open source HDL simulators like the GNU GHDL simulator [8] accompanied with the gtkwave waveform viewer [9] and commercial simulation frameworks like the Altera-Modelsim Simulator. Having verified the correct operation of their design the students were requested to download and verify the operation on board observing the interaction with the available hardware peripherals. A comprehensive lab tutorial was made available to the students together with all accompanying documentation like FPGA datasheet, DE0-Nano, Quartus II and ALTERA-Modelsim user manuals. Additionally,
sample code and projects where first presented and were made available online in source code for students to download and use as reference designs. The assignments included demonstration of combinatorial and sequential logic with programmable time intervals and counting steps using the external LEDs and display, programmable moving patterns of the servo motor and interactive communication with the user I/O pins emulating a serial interface operation. The course was complemented by a social event and visit to a Business incubator in Patras hosting several start-ups in the field of Nano/Microelectronics-based Systems and Applications aiming to strengthen collaboration among young engineers and professionals from the private sector. Thus, the students had the chance to get in touch with the science of digital design and embedded systems through a comprehensive learning experience.
80% 70% 60% 50% 40% 30% 20% 10% 0% 1
2
3
4
5
3
4
5
3
4
5
(a) 60%
4.
COURSE ASSESMENT
50%
The success of the course was measured by four aspects, namely: 40%
• •
Questionnaires handed to the participants and submitted anonymously The course website where all related material was openly accessed. With the help of the available web analytics and posts to the corresponding forum, we had the opportunity to measure both quantitatively and qualitatively the success of the course
30% 20% 10% 0% 1
•
A social network group formed and utilized both during course execution as well as after its completion
•
Statistics extracted from the administration page of each system
In Figure 5 we present some indicative responses related to the course assessment showing the statistics of the submitted responses to the questionnaires by the students. Figure 5 presents the distribution of student opinions regarding the degree of satisfaction related to the overall course structure (a), the web interface to the remote FPGA lab facility (b) and the LMS used (c) (1=Poor, 2=Average, 3=Good, 4=Very good, 5=Excellent). As we observe from Figure 5a the course was highly successful among students with 73% of them describing it as excellent and 27% as a very good experience. There was no complaint about a level of satisfaction less than very good. The same trend is observed regarding the LMS used (Figure 5c). All students found the platform between very good and excellent, since it offered ample functionality, an intuitive interface and ease of access. The only improvement proposed by the students was related to the web interface developed to provide access to the remote lab, in which case 18% characterized it as simply good (Figure 5b). This was due to three main reasons: i) the servers used had not been upgraded until the time of course execution, ii) only two systems had been assembled and were made available to students limiting the available time slots for simultaneous reservations and iii) the resolution of the web cameras used was limited reducing the quality of the video. To address the above issues the software and equipment have been migrated to upgraded servers running the latest version of Ubuntu Linux OS and additional hardware to equip the laboratory has been planned to expand the available facility in the future.
2
(b) 60% 50% 40% 30% 20% 10% 0% 1
2
(c) Figure 5. Course assessment by students (1=Poor, 2=Average, 3=Good, 4=Very good, 5=Excellent): degree of satisfaction related to the course (a), web interface (b) and LMS used (c) The application server also hosts an administration account which opens a web page for maintenance and statistic extraction purposes (Figure 6). As can be seen, the system administrator can start or stop from here the RTMP and JTAG servers, the camera capture, extract usage statistics for the system or specific users, or even use an SSH connection for full control of the host computer. The following table shows usage statistics extracted from the administration page of the systems. It has to be noted that although the whole course duration was 6 weeks, the students had used the FPGA hardware only during the last three weeks, over which the average values where calculated.
Table 1. Usage statistics Average usage hours per system and per day
5. 4.45h (~31h per week)
Average usage hours per user (for the whole course duration) Maximum hours usage from one student
15.58h (~5h per week) 35h (~12h per week)
Median hours usage from one student
11.5h (~4h per week)
These statistics give a concrete proof that such a remote laboratory course provides great opportunities for students that would like to experiment a few extra hours, whenever they want, which is very difficult comparing to a traditional laboratory with certain working and availability hours. It also shows that the laboratory hardware equipment is fully exploited while the costs stay extremely low since in this case two working places where used for the practice of twenty students. No malfunctions have been noted despite the fact that the systems where used in certain days for many consecutive hours. Thus we can safely assume that a large number of students can be tutored with a small number of systems, something which is really an important feature for a University like HOU for which almost 240 students enroll each year to the theoretical branch of this course, PLH21-Digital Systems.
CONCLUSIONS/FUTURE WORK
This project was supported by IEEE/CAS Society and completed successfully at the end of 2014. Results were very encouraging according to the questionnaire answers received by the users (Figure 5) and the overall educational gain. Adding new peripheral hardware and exercises into the existing infrastructure and improving the laboratory's instruction manual with the experience gained, is our top priority for the near future. Also a worldwide MOOC version can be implemented based on the experience acquired from this effort and this is a prospect that we intend to examine and evaluate.
6.
REFERENCES
[1] Mitros, P.F., Afridi, K.K., Sussman, G.J., Terman, C.J., White, J.K., Fischer, L., Agarwal, A., "Teaching electronic circuits online: Lessons from MITx's 6.002x on edX," Circuits and Systems (ISCAS), 2013 IEEE International Symposium on , pp.2763-2766, 19-23 May 2013, doi: 10.1109/ISCAS.2013.6572451 [2] De Jong, T.; Linn, M. C.; Zacharia, Z. C.: Physical and Virtual Laboratories in Science and Engineering Education. In: Science 19 April 2013: Vol. 340 no. 6130, p. 305-308 [3] Chao, K., James, A.E., Nanos, G.A., Chen, J., Stan, S., Muntean, I., Figliolini, G., Pierluigi, R., Bouzgarrou, B.C., Vitliemov, P., Cooper, J. and Capelle, van J. 2013. Cloud Elearning for Mechatronics: CLEM. In Proceedings of the eBussiness Engineering (ICEBE),2013 10th IEEE International Conference (Coventry, United Kingdom, 11-13 Sept. 2013) [4] Harward, J., Del-Alamo, J., Choudhary, V., DeLong, K., Hardison, J., Lerman, S., et al., iLab: A Scalable Architecture for Sharing Online Experiments. International Conference on Engineering Education, 2004 [5] Pop, D., Zutin, G. D., Auer, E. M., Henke, K. and Wuttke, H. 2011. An online Lab to Support a Master Program in Remote Engineering. In Proceedings of ASEE/IEEE Frontiers in Education Conference (Rapid City, South Dakota, October 12 - 15, 2011) [6] Fotopoulos, V., Spiliopoulos, A., Fanariotis, A., 2013. Preparing a remote conducted course for microcontrollers based on Arduino. In Proceedings of 7th International Conference in Open and Distance Learning (Athens,Greece,2013) [7] http://dsmc2.eap.gr/open-remote-labs
Figure 6. The administration page/panel
[8] http://home.gna.org/ghdl/ [9] http://gtkwave.sourceforge.net/